Backbone.js and friends

832 views
754 views

Published on

Published in: Technology, Education
2 Comments
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
832
On SlideShare
0
From Embeds
0
Number of Embeds
378
Actions
Shares
0
Downloads
4
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide
  • Здесь нужно рассказать о чем презентация и в чем её цель. Цель – показать, что backbone.JS является далеко не полным решением для построения средних и больших апликаций.
  • Всё из вышеперечисленного есть в backbone.JS
  • Backbone.js and friends

    1. 1. backbone.JS and his friends Dima Tarasenko, 2013
    2. 2. Skull bone... Phalanges bone… Rib bone… Yes! Backbone!!! Addy Osmani thinks about JS framework
    3. 3. Framework shouldn’t be slow and fat
    4. 4. Community Good Documented Fast Intuitive Success projects Small Examples Framework should be …
    5. 5. Backbone.js is a lightweight JavaScript library that adds structure to your client-side code. It makes it easy to manage and decouple concerns in your application, leaving you with code that is more maintainable in the long term. It’s a library, rather than a framework, that plays well with others and scales well, from embedded widgets to large-scale applications. © Addy Osmani
    6. 6. So, it’s great!!!
    7. 7. Butt!
    8. 8. It’s only a code organizer!
    9. 9. backbone.JS Collections Routers Models Events Views History Real Application ≈ 6/26 ≈ 23% OOP core Dependencies Collections/Routers/Models.. Controllers Layouts Utilities DOM Query Error handling Validators REST support Internalization Application class Normalization layer Session management Data Readers/Writers Permissions management Integration of all modules Build system Unit test framework …
    10. 10. AAAAAAAAA!!!
    11. 11. Session management OOP core Dependency manager Base classes Controllers Build system Utilities Integration Layouts Unit tests Permissions REST support UI components Error handling Validators Oh my goodness… Other…
    12. 12. Time lack No consistency Long code reviews Our solutions are bad No unit tests A lot of bugs… bugs… bugs… Oooops
    13. 13. What should we do?
    14. 14. Scenario 1: do it like real cowboys!!!
    15. 15. For example, N13 - OOP Library • • • • • • • • • • Mixins classes Statics support String namespaces Classical inheritance Class configuration Constructors Super method calls Mixins methods calls Dependencies manager Other libraries compatibility
    16. 16. N13.define('App.View', { extend : 'Backbone.View', statics : { prop: 'hello', func: function () { return this.prop; } }, configs : {cfg: 'default'}, requires: ['App.Class1'], init : function () { this.callParent(); } }); // String namespace // Parent class var cl = new App.View({ cfg: 'new value' }); // Instantiates class // Class configuration // Static property // Static method // Correct this - App.Class // // // // Сonfiguration property Will be loaded first Constructor function Calls Backbone.View::init()
    17. 17. N13.define('Mixin', {method: function () {return ' mixed';}}); N13.define('Base', {method: function () {return ' base'; }}); N13.define('App.Class', { extend: 'Base', mixins: {mix: 'Mixin'}, method: function () { return 'Hello' + this.callMixin('mix') + this.callParent(); } }); // // // // App.Class is a function Parent class List of mixins Overridden method var cl = new App.Class(); cl.method(); // App.Class instantiation // returns 'hello mixed base' // Calls method() from Base // Calls method() from Mixin
    18. 18. Looks great!!!
    19. 19. Butt!
    20. 20. OOP Library is 1/26 part of real application
    21. 21. And three weeks of work
    22. 22. How developer thinks about himself
    23. 23. The reality
    24. 24. So, it’s possible, but it took a lot of time
    25. 25. Scenario 2: do it like real developers!
    26. 26. OOP core V V V Dependencies V V V Collections/Models/Routers/Controllers V V V Embedded Widgets V* V V Layouts V V V DOM Query V V V Error handling X X X Validators V V V REST support V V V Internalization V V V Application class V V V Session manager X X X Data management V V V Build system V V X Unit test V V V * - powerful feature
    27. 27. ExtJs Dojo toolkit Yahoo UI backbone.JS 1 dev - $595, 20 devs - $11 185 free free free
    28. 28. So, what???!!!
    29. 29. With backbone, you should be true developer!
    30. 30. Or, you will get this…
    31. 31. So, how can we measure our developers?
    32. 32. Developers skills* at SoftServe T J M S L A C (Trainee) (Junior) (Mid) (Senior) (Lead) (Architect) (Chuck Norris) = = = = = = = 0 1 2 3 4 5 16 * Pro adds 0.5 for every value
    33. 33. Project success formula
    34. 34. SoftServe success range [ 0.8; ∞) My success range (1; ∞)
    35. 35. For example
    36. 36. Summary: • With backbone.JS, we should invent the wheel. It tooks a lot of time • Frameworks are better then our “hand made” • Skilled people - are very important
    37. 37. Questions?

    ×