ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Computer Science & Programming»
  • Programming Languages

Should I Use Javascript MVC?

Updated on May 29, 2013

My Nettuts Jquery Quiz

I tweet the response from taking various web development quizzes, with A to A+ grades!
I tweet the response from taking various web development quizzes, with A to A+ grades! | Source

My Hubpages Jquery Quiz

I did pretty good on a web development quiz found on Hubpages - with no looking of course!
I did pretty good on a web development quiz found on Hubpages - with no looking of course! | Source

Idea for Website

You have an idea for a website or app, or perhaps you would like to revamp your current site. Here are some ideas:

- a dance academy doing dance classes, having members, events, etc...
- a homemade food blog for the community of your neighbourhood/town
- have people upload videos of pets doing funny things

The choices used to be pretty easy (for those who have less technical people involved in running the site).

All server-side implementations. The website was built on your web server, people put content into it, and it downloaded to each user every time.

MVC is a way to structure your website

The MVC way

Different software in time has taken share with the MVC pattern. Ruby-on-Rails, CakePHP, CodeIgniter, iOS (Objective C). This was often hidden from the end user, who was the content creator/director. This was still done server-side, one page download at a time.

List of Client Side MVC websites

JavascriptMVC (Bitovi)

All the cool kids

Lately, all the cool kids have switched over to something new it seems. You download the app in full from the web and then you just send results/interactions behind the scenes to your web server/database. You may have seen this functionality on popular websites such as the ones in this table to the right. The website seems to happen "without page reloading".


Should you immediately jump in to this trend with both feet and not look back? My answer for many manager-led, content driven websites is in the title above -- no!

They are useful for purely tech companies, but I will outline the pros and cons below.

Say something!

What is a good dummy project to make to get the feel of a framework like these?

See results

The Case For No

Should you just say, "Well, Hulu and Grooveshark are awesome, and I want to be, so I'm going to drop that download onto my site, roll the dice, and my developers are smart enough that we will be like that next week!" Not really.

Here are some situations in which you should not use a Javascript MVC framework for your site:

  1. people are happy with the current situation. Let's say you work for a company, and the company has management, and the management likes the current process of managing the website. Don't radically change it and tell them Google told you so.
  2. you are consulting/contracting building a site, and you are handing off the final, day-to-day administration to someone else who doesn't want to handle code. Your job is help the company in the future (make sales, etc), and traditional, easier to use methods like Wordpress are going to help them make sales and make changes to adapt better.
  3. your company needs business support. Did two guys cut page load times in half with their new framework? If there is a problem though, who are you going to call? These types of frameworks are very young, produced as a side-project to their day job. Documentation, on-site training, community/forums, videos/examples and the like are time consuming to produce early on.
  4. will it gel with our current setup? None of them are "plug-in-play" with many popular current website solutions. They rely on a REST-ful architecture, HTTP headers like PUT, and flawless front-end execution because errors and their messages are harder to track down.
  5. time to market. As cool as I think batmanJS sounds, if the boss says the product needs to launch in a month as a top priority, I'm not hoping that I will learn CoffeeScript and batman.js to launch in a month, I'm using a tool I already know how to use. Aside from backboneJS, it takes time to learn a new framework and its many facets.
  6. lack of research into customer market. You might read, "Doesn't require Jquery! Great! Let's get rid of it!", or "HTML6? Rawk! I always wanted to be the industry leader." Jquery is extremely helpful in cross-browser negotiation, and the html6 hype seems to be a Google Chrome thing. Make sure that you know what your customer base uses browser-wise before jumping ship, in case you may need to support visually-impaired people, people that use older browsers, people with mobile devices without smartphones, etc...

The Case For Yes

Here are some situations in which you could or should implement this style.

  1. the app or website is your business. Something like Rdio music website is the company, whereas Springfield public library website is not.
  2. performance and speed of response are critical. When people use email, they want to read, compose and send immediately. When people blog or edit photos, it is not as necessary to provide this immediate speed feeling.
  3. large applications. An airline website that needs to remember many things about the current customer and their flight needs a really robust and structured way to keep these little changes in memory. They also are large enough to have a separation of concerns such as an IT department. If it is doubtful that higher management will need to update the website themselves, this is another case for yes.
  4. REST for all! You should get into REST.
  5. mobile first. If your idea is for smartphones, loading the app once and then using it forever is definitely the experience users are looking for.

My Experience

Just because I've watched many videos on AngularJS and built that basic blog, read a book by Addy Osmani and some blogs and built some other demos, and my friend Justin Meyer works on the high quality JavascriptMVC client-side mvc framework doesn't mean that my life is radically different.

The internet is still made of people and by people, so collaboration is something that is foremost in many people's minds when establishing an internet presence, and debugging is another one.

Unfortunately, the power of the single page works well for developers and consumers, but not as well for search engines, management, and graphic designers, who may all struggle more than with a traditional website stack.

Some questions early on for using the single-page/Javascript MVC style were:

  • Where does the designer markup and styling go for "page specific" or event specific areas?
  • Can we block off a members area in a single page framework?
  • What are the tools available to build and debug with this? (Batarang for Chrome example)
  • How to share "pages", aka states, with friends easily?
  • What if there is a loading error, how to tell the user? (404 style pages are not available)

So, we choose to skip this route this time and use the more traditional approach of Joomla.

Thanks for reading, and hope this helped you out in your business decision making!

Fork In The Road video by by Francis Hwang


    0 of 8192 characters used
    Post Comment

    No comments yet.