Does prototype.js support any design pattern?

38 views
Skip to first unread message

Amit Dwivedi

unread,
Nov 9, 2015, 2:01:52 AM11/9/15
to Prototype & script.aculo.us
Hi,
As far as i know, prototype.js is a framework based on OO(correct me if i m wrong). we can write a new class in java script which can extend the behavior of existing one. My question is...Is it support some sort of Design Pattern (like MVC).
     One more thing if we want to add new features by using prototype.js, is it easily pluggable. 

Walter Lee Davis

unread,
Nov 9, 2015, 8:20:25 AM11/9/15
to prototype-s...@googlegroups.com
Prototype is a foundation toolkit, which starts with the premise that JavaScript needs some help to become the great OO language it could be. It extends the language in useful ways, making it possible to write good code quickly, with useful shortcuts and mental models. The next great thing that it does is spackle over the (thankfully shrinking) mountain of differences between various browsers' JS implementations, giving you a single stable API to write to. Finally, it provides useful core tools to build applications that extend the DOM or communicate out of band with the server using Ajax.

I like to think of it as "a tool that can build tools", which appeals to this grandson of a tool-and-die maker very much. It's much less a plug-in support mechanism, which I liken jQuery to, than a better way to write and reason about JavaScript applications in browsers. I like to say that "I could build jQuery in Prototype, but not the other way around".

So to answer your main question, no, there isn't any MVC framework that I know of that is based upon Prototype, but if you had a good reason to build one, it would make the process much simpler and widely runnable than if you stuck to vanilla JS.

Walter

>
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scripta...@googlegroups.com.
> To post to this group, send email to prototype-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/prototype-scriptaculous.
> For more options, visit https://groups.google.com/d/optout.

Amit Dwivedi

unread,
Nov 10, 2015, 1:21:33 AM11/10/15
to Prototype & script.aculo.us
Thanks for clearing my doubt.


On Monday, November 9, 2015 at 6:50:25 PM UTC+5:30, Walter Lee Davis wrote:

On Nov 9, 2015, at 2:01 AM, Amit Dwivedi <amydw...@gmail.com> wrote:

> Hi,
> As far as i know, prototype.js is a framework based on OO(correct me if i m wrong). we can write a new class in java script which can extend the behavior of existing one. My question is...Is it support some sort of Design Pattern (like MVC).
>      One more thing if we want to add new features by using prototype.js, is it easily pluggable.

Prototype is a foundation toolkit, which starts with the premise that JavaScript needs some help to become the great OO language it could be. It extends the language in useful ways, making it possible to write good code quickly, with useful shortcuts and mental models. The next great thing that it does is spackle over the (thankfully shrinking) mountain of differences between various browsers' JS implementations, giving you a single stable API to write to. Finally, it provides useful core tools to build applications that extend the DOM or communicate out of band with the server using Ajax.

I like to think of it as "a tool that can build tools", which appeals to this grandson of a tool-and-die maker very much. It's much less a plug-in support mechanism, which I liken jQuery to, than a better way to write and reason about JavaScript applications in browsers. I like to say that "I could build jQuery in Prototype, but not the other way around".

So to answer your main question, no, there isn't any MVC framework that I know of that is based upon Prototype, but if you had a good reason to build one, it would make the process much simpler and widely runnable than if you stuck to vanilla JS.

Walter

>
> --
> You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages