The code below is for modern browsers only.Naming conventions are as follows:m or M - Modelv or V - Viewc or C - Controller   /********************************************************************************************     ********************************************************************************************     *( C )ontrol     *  Cin -  Input Path     *  COut - Ouput Path     ********************************************************************************************     *******************************************************************************************/    /**     *COut     */    var COut = ( function ()     {        var messages =         {            name:         'Please enter a valid name',            email:        'Please enter a valid email',            email_s:      'Please enter a valid email.',            pass:         'Please enter password, 6-40 characters',            url:          'Please enter a valid url',            title:        'Please enter a valid title',            tweet:        'Please enter a valid tweet',            empty:        'Please complete all fields',            same:         'Please make emails equal',            taken:        'Sorry, that email is taken',            validate:     'Please contact <a class=d href=mailto:foo@@host.com>support</a> to reset your password'..........
Foo - Control | Naming conventions update
javascript;mvc;library design
The code within the functions seems clear and simple to me, so my answer mostly focus on the naming conventions:Why call your variables m..., v..., c... when you could call them model, view, controller? This would make your code immediately clearer to anyone who reads it.The functions under CIn are also prefixed with c, which is redundant. Since COut is a controller, it is obvious, that its functions are controller functions so they could simply be called tryIt, block, etc.Strictly speaking, in MVC, the role of a controller is to handle user input and (optionally) to output data. There is not one controller for input and another one for output, both should be handled by the same controller. It might make sense however to wrap output operations in a separate class. In Kohana for instance there's a Response object. This is pretty much what you've done with COut, except that you shouldn't call it a controller since that's not really what it is. You could call it Response or Output for example. HtmlResponse might be a good choice too as that would allow you to also have JsonResponse, XmlResponse, etc.