On Apr 1, 7:26 am, Peter Michaux <[email protected]> wrote:
> On Sat, Mar 26, 2011 at 11:58 AM, cihat altuntas
>
> <[email protected]> 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 ?
>
> It depends on the project. Even a small project can benefit from MVC
> if it needs to keep multiple elements in a page in sync.
>
> Recently I wrote an article about MVC in JavaScript that shows some of
> the advantages that I have enjoyed.
>
> http://peter.michaux.ca/articles/mvc-architecture-for-javascript-appl...
>
> Peter

It's interesting.
Whenever I heard or read about MVC for client side JavaScript, I
looked at it with disbelief, and thought that author doesn't really
understand pattern and tries to use it as cure for everything.
I know MVC quite good from web application frameworks, and I thought
also that MVC pattern was due its nature first introduced with web
frameworks.
To me MVC idea in short was: Question (http request) via router passed
to Controller (which if needed changes Model) that returns View
(generated from templates and data taken from Model).
Why would someone want to incorporate that to client side JavaScript ?
JavaScript programming in most cases is not about returning content,
it is more about events and responding to them, check something, drag
something, hide something etc.

After I read Peter your Article, I understood that probably my
understanding of MVC was too specific. It was also funny to see that
in most cases I program to guidelines you pointed in your article, so
I was using MVC without assuming that, however I called it
modularization and separation of logic :)

Thanks for great read Peter.

Mariusz



-- 
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