Does backbone-deep-model replace backbone.js collections? - backbone.js

I'm currently learning Backbone.js and came across backbone-deep-model. Does this replace the regular Backbone Collection since you can create lists in backbone-deep-model?

Related

Angular JS - How to template out recursive or parent/child data?

I am working with some data and I think that the best data structure will be a recursive parent/child relationship to represent a hierarchy.
My question is:
How to best return this data from my API to work nicely with angular?
How to use the angular to convert this into my DOM?
Many thanks
Toby

what is mean by templating language. Why underscoreJs is required for backbone application

My understanding for underscoreJs is , it's a javascript library which provides helper function. i am not getting what is core functionality underscoreJs provide for backbone
Backbone is MV library, where M - model need to works with big arrays data. Underscore got a lot of methods by array and array's like objects. Underscore consists simple templating engine for small tasks. In backbone works you can use this engine for your needs.

Converting Regular Backbone App to use Marionette.js

I am considering changing our current application to use Marionette. The trouble is that there is currently a whole number of different views, models, and collections that have been made by other developers that use regular Backbone.
I figure I can't really convert the whole application in one go especially considering I didn't develop a whole bunch of it. I am considering just starting with the Application object and Router.
Is this going to be possible? Can I start with that and convert the actual views later?
We recently converted our backbone application to use marionette, and we started with creating a new marionette application and router, and then created a few regions and layouts which managed our older Backbone views.
We were then able to convert the old backbone views to Marionette's ItemViews and CompositeViews, and we found we were able to delete a lot of old code.
Any custom collections and models we kept untouched. You'll probably find you won't need to change them.
My advice is to have a good read through the docs and have a look through how other people have their application structured, and how their router works. There are a few boilerplate examples and generators on github.
The simple answer is yes, you can convert the app piece by piece over time.
And your strategy of starting with the Application and Router is good. I've done a few projects where I only used the Application, Router, and maybe the Module feature of Marionette, keeping the rest plain Backbone.
From the Marionette Docs:
Like Backbone itself, you're not required to use all of Marionette
just because you want to use some of it. You can pick and choose which
features you want to use. This allows you to work with other Backbone
frameworks and plugins easily. It also means that you are not required
to engage in an all-or-nothing migration to begin using Marionette.
And even once you start converting the views, you can do it one view at a time, as needed.

backbone.js marionette and co

i am a beginner in the backbonejs world und bought a book from Addy Osmani’s Backbonejs Application. i am reading the book and i try to build an application with backbonejs. Somewhere in the book, he wrote a section about backbonejs extendsion and expose how to use marionettejs. I visited on Github backbonejs extendsion site, they have many extendsion included marionettejs. Now i am confused about using backbonejs, should i use extendsion like Marionettejs too or not? I know that extendsion can brings many advantages for webdevelopment, when i gonna use backbonejs then i should use marionettejs too? When it is useful to use extendsion when not?
I find Marionette to be a useful addition to Backbone, because it reduces the amount of repetitive code you need to write (unbinding event listeners when views close, rendering one view for each item in a collection and attaching it to the DOM, etc.).
There's a nice (short) comparison of Marionette and plain Backbone here: http://addyosmani.github.io/backbone-fundamentals/#boilerplate-rendering-code
Ultimately, the best tool for you will depend on what you want to achieve and what your preferences are.
Full disclosure: I may not be entirely objective, since I'm writing a book on Marionette. But I'm sure other members will provide you with their own opinions.

YII HTML rendering

I use YII widgets for making my views and rely on CGridView, CLiStData, CHtml classes..
I often see comparison online between client side MV* frameworks like Ember, backbone .. and then I use jquery in YII for adding all interactivity. But, the views are being made from widgets.
So, My question is YII a server side HTML rendering framework ?
Yes. Really, what's the question about?
If you ask if Yii can cooperate with some MVVM (Model-View-View-Model) library, like knockout or backbone then answer is yes and no. As generally Yii generates widgets as static HMTL, somewhat enchanced with jQuery. For trully MVVM widgets, you have to make them by your own. Most common case is CActiveForm, to make form bindable to view model.
Personally I use knockoutjs wih yii and made quick and dirty patched version of CActiveFrom (strictly Im using TbActiveForm from YiiBooster, but thats not important here) to add bindings and it works fine.
Isn't it similar question to Yii and Knockout Together?

Resources