4 ms·
Nice... I am writing my first site using backbone and as a Java Dev sometimes I have a hard time to do things in backbone, I want to make everything a into reus
by cfontes 15y ago
Nice... I am writing my first site using backbone and as a Java Dev sometimes I have a hard time to do things in backbone, I want to make everything a into reusable objects and views as far as I am seeing right now are not always to be used like that.
Sometimes They are used to listen to collections and create smaller things( like a factory ) sometimes they can represent a whole small popup, sometimes a single HTML entity.
I am sure my code is not 100% yet, but patterns like this help a lot.
- alinajaf 15y agoNot sure why you're being downvoted, but I tend to agree. I've found that my backbone apps are a lot nicer to deal with when I think of my views as potentially re-usable components. It takes a bit of forethought but you end up with much nicer, composable interfaces that allow you to respond quickly to changing requirements.