Frameworks, Frameworks, Frameworks

On the road of web development, time-to-time you find yourself choosing a platform to develop on -- whether it is a client-side application or strictly backend. When I first started out I was strictly developing in HTML then ASP and then finally PHP for a very long time. At my current job I started using Coldfusion as a backend solution. But recently I have been more interested in front-end work using client-side scripting with Javascript/CSS. A consequence of that has been me moving over to more MVC (Model-View-Controller) type development. Depending on the size of your project, MVC can be a great thing or just overkill for what your application to do.

MVC frameworks are great for when you have an application that will eventually grow to be a full featured application. It make adding modules and functionality super easy and organized. If you make a change to one area theoretically it won't break other areas. It keeps things nice and separated -- mostly your data and your actual views.

Traditionally the concept of MVC is applied mostly to backend development but recently it has been moving more over to the front-end. What does that mean? Before you would simply use backend solutions like PHP or Ruby to create an MVC type application and you would have the following setup:

  • Model: Database
  • View: HTML/Javascript/CSS
  • Controller: Action pages on the server

Nowadays things have slightly been changing. Instead of having the MVC framework exist only on the server, the whole concept is being shifted into Javascript. Frameworks like AngularJS, BackboneJS, etc. have been coming up like wild fire. I've used a little bit of everything to get my feet wet and I gotta say they are super impressive.

I've mostly stuck with BackboneJS only because it is the barest of them all. It comes with very little assistance and most of what you need extra you have to code it in yourself. I don't like it when I make an application and am told how to format my code or how to use it in order for it to fit the framework. BackboneJS let's you do what you want -- for the most part.

So far what I've done is use MarionetteJS (fills in the gaps that BackBoneJS has) and built MVC format applications:

  • Model: Async calls to the server/database (RESTful)
  • View: Underscore / Handlebars Templates
  • Controller: Javascript functions within the application

I've learned through the years, that backend programming languages will change and vary greatly between clients. You can have one client use strictly ASP.net another one use Coldfusion or in extreme cases (god forbid) Java. In any case you don't want to have to re-learn MVC or any kind of framework in a completely different language for just one project. Yeah sure the experience would be awesome -- but sometimes you just don't have the time. Idealistically, if you can just figure out how to get the data off the server using the available backend language, you can just use the Javascript MVC you are so used to and produce the application without fiddling around too much with the actual server.

comments powered by Disqus