It depends on what you're developing. I am developing a web standards 
diagnostic-grade medical imaging application, and for me, quick-and-dirty 
javascript is completely unacceptable. 

First, without some sort of structure, it's difficult to maintain complex 
applications after they get to be a certain size. If you've got a few scripts 
on a page, I guess that's fine, but when you're talking about multiple reusable 
components on a page, with internal code reuse between them, you should be 
thinking about how to encapsulate some of that functionality into 
libraries/frameworks for easy re-use and maintenance. 

Second, when you start talking about lots of events in your app, you're going 
to want to look for/build a framework that allows you to abstract a lot of that 
code into libraries, so you don't have to repeat the same boilerplate all the 
time. A lot of these MVC style frameworks help with that - they allow you to 
develop just the business logic, handling all of the boilerplate themselves. 
You should try to understand what they do, but once you grok it, use it away.

Third, and maybe most importantly, some of the better MVC frameworks encourage 
loose coupling between components. What that means is that the frameworks allow 
you to develop different concerns of the application (communication logic, 
presentation logic, etc) in different places, and make it easier for you to 
test each of these concerns individually. This is a great boon for 
productivity, as it allows you to have replaceable components. Don't like your 
communication fabric? Replace it with another implementation, and just make an 
adapter to have it work with your existing code. Loose coupling allows you this.

-- 
Anatoly Geyfman
http://www.geyfman.net

On Saturday, March 26, 2011 at 11:58 AM, cihat altuntas wrote: 
> What do you tkink about developing MVC style client-side javascript code? Or 
> sometimes Is Quick and dirty hacking Javascript code enough? If you have any 
> experince using MVC style javascript code could you tell advantages or 
> disadvantages over javascript hacking ? 
> 
>  -- 
>  To view archived discussions from the original JSMentors Mailman list: 
> http://www.mail-archive.com/[email protected]/
> 
>  To search via a non-Google archive, visit here: 
> http://www.mail-archive.com/[email protected]/
> 
>  To unsubscribe from this group, send email to
> [email protected]
> 

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to