![]() We’ve agreed to make some changes, used Marionette to make Backbone more attractive, attached some plugins for cosmetics and performance. I had obligations as well - I’ve promised to take care of the views and models we’ve created together, respect all the effort and investment we’ve made so far. However, after many hours and lines of code that we’ve spent together, it was hard to break up just like that. Slowly, my excitement started to decline, I’ve discovered myself starting to look at other front-end frameworks, they were sexier, younger, more attractive. I was told once that I do not really understand it. ![]() It required all my attention while we were rendering views together, we had fun preventing memory leaks, but it was difficult as well, as both of us were blaming each other for creating them. Backbone was demanding, gelous for details. After a while I’ve started to pay attention that not everything is perfect. In my dreams the components respect each other and cooperate, being attentive to other components’ events, listening carefully and responding appropriately and respectfully. I’ve seen colorful future, the future where we together, hand by hand, build beautiful, simple and reusable UI components, raise them in peace and happiness. I was really impressed, excited by its simple and gentle perception of the world, its powerful abilities and benefits for one who decides to stick with it. We have spent a dozen of hours together, full of entertaining and deep conversations (into late night hours). A view's events hash may now also contain direct function values as well as the string names of existing view methods.My relationship with Backbone.js is complicated.The comparator function is also now bound by default to the collection - so you can refer to this within it. A Backbone collection's comparator function may now behave either like a sortBy (pass a function that takes a single argument), or like a sort (pass a comparator function that expects two arguments).bind and unbind have been renamed to on and off for clarity, following jQuery's lead.Added a "sync" event, which triggers whenever a model's state has been successfully synced with the server (create, save, destroy). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |