So I’m looking into Backbone.js and my initial reaction is “eh, that looks a lot more like back-end programming than I’m comfortable with!“. The back-end developers I work with, say that it’s still front-end, that it’s the future and hence that I just have to go with it cause it’s the evolution of my work.
But really, when I read something like “If you noticed the get/set mutators, have a cookie! A model’s attributes can’t be read through your typical object.attribute format” as the first real example in a tutorial, I’m wondering if I’m just too dumb to understand it right away, or if this is just not my area of expertise.
In my opinion, Backbone.js wraps some front-end parts of a project in a back-end structural model, making the work for back-end devs a lot easier, but for me a lot more difficult and (unnecessarily?) complicated.
So in essence…am I overreacting, should I just bite the bullet and get used to it? Or do I have a point and a good reason to be worried that my work will become more difficult, be more expendable so to speak?
Thanks for your opinions!
I think your concern is very real and well thought-out, but perhaps doesn’t paint the full picture.
Backbone certain deviates from more traditional and simpler front-end architectures, but often for the goal of organization and scalability that is otherwise impossible to achieve. When any project grows (front-end or back-end), spaghetti code can turn into a rat’s nest. Applying a framework like Backbone from the beginning of a project certainly comes at the cost of a learning curve and requires a bit more planning, but it can certainly pay off ten-fold in scalability.
Front-end developers often scale by adding tools such as build scripts, script loaders, etc. Object-oriented frameworks such as Prototype or Ext go a step further and promote better organizational strategies. The main difference between these and Backbone is that Backbone is inherently modeled on MVC. MVC is a well-proven programming paradigm and is certainly worth learning for coders.
I guess Backbone could be complicated to learn for front-end developers who only do web stuff.
Backbone will be easy for front-end developers who do kind of Android, iOS, Flex, Qt, or any GUI toolkit based development.
MVC framework is necessary for interactive realtime web app development. Otherwise, it’s gonna end up with terrible spaghetti.
View is to be show users what kind of data it has.
So when data is changed, view should be redrawn. There are setters is for that reason.
Have you explored http://angularjs.org/ ? Angular will give you all the mutation observation of backbone, but without all the intrusive model wrappers (getters/setters) + lots more. Best of all it’s an extension of HTML syntax so it’s great for web developers/designers.
The skill set required by a front-end developer is constantly evolving. When I started my career all that was required to call oneself a “web developer” was a rudimentary understanding of HTML.
Nowadays the proliferation of frameworks, Content Management platforms, and programming languages has dramatically added to the complex nature of front-end development. Today a front-end developer is often expected to be an accomplished programmer, not merely someone who can slice-n-dice a Photoshop file and add a few hover states to buttons.
It is easy to feel bogged down by the pressure to keep up with all these new technologies. When I hear about Backbone or Node or whatever is the flavour of the month, my first thought is “oh no, here we go again”. But I remind myself that I initially felt the same way about the tools and technologies I now consider essential.
I don’t think you should feel pressured to adopt technology X just because all the hipstergrammers say it’s the next big thing, but in most cases it’s worth investing a day or two to wrap your head the around new languages, frameworks and techniques, at least the ones being widely embraced by the community. That way, you’ll have an idea whether they are a good fit for your own practice.
Returning to Backbone, I would venture to say that for most websites it isn’t a good fit. Why? Because it is designed for Single Page Applications (SPAs). If you are building a traditional page-based website then Backbone is most likely overkill. On the other hand, if you’re developing a true desktop-style web app (Twitter, Rdio) then a client-side Framework such as Backbone will almost certainly make your life much easier.
@jnicol: “Today a front-end developer is often expected to be an accomplished programmer, not merely someone who can slice-n-dice a Photoshop file and add a few hover states to buttons.“
This is part of my problem. Just because I’m not too excited about Backbone, doesn’t mean that the Photoshop and hover states thing is all I (can) do. It’s sad that many back-end developers still think that’s all that front-end devs do (I’m not calling you out, it’s a generic thing I keep seeing). And it’s definitely the sentiment I got when I voiced my reservations from some co-workers, as if that’s all I do at work (it’s not).
Thanks for your opinions and views so far. Keep them coming!
He loves it. Because of the MVC thing. It’s the best way he says to store data, etc., like everyone above is saying.
But what *I* learned in this process is that there is something different front what you always thought of as a front-end dev and a back-end dev. It’s a front-end Developer with a capital D. This is the person who writes JS to create logic within an application. A developer friend of mine explained it this way: gmail was written entirely by a front-end Developer (again, capital D).
So they really are different roles, IMO… Internally, I’ve started referring to these roles as UI developer, front-end Developer and back-end developer. There is also a more backers developer that wha we’d typically call back-end. Instead of focusing on PHP, ASP, Ruby, etc… This person focuses on business logic and would call PHP, etc., front-end.
So all our roles in the development world are relative. Do I think the rest of my team needs to learn backbone? I hope not, because then I’d have to pay them all more! It does really expand our capabilities because now this employee can write a full app by himself with what he’s learned. But do I still see the value in an HTML, CSS, jQuery developer? Absolutely. There will always be a need for designers who can deliver templates.
I hope this helped. Great question!
@jdgraffam I like your separation of “UI development” and “front-end development”. Not to say one person can’t do both, but using two distinct terms helps to underscore that it’s two distinct skill sets we’re talking about.
@Senff I didn’t mean to imply that your own skills are limited to slicing PSDs – I was probably somewhat flip in my characterization of the front-end developer skill set! I was trying to say that the definition of front-end development is now very broad, and can extend into territory that was traditionally the domain of back-end developers.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".