JavascriptMVC

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search
JavaScriptMVC
File:Javascriptmvc.png
Developer(s) Justin B. Meyer, Brian Moschel
Written in JavaScript
Operating system Cross-platform
License MIT License[citation needed]
Website http://www.javascriptmvc.com/

JavaScriptMVC is an open-source Rich Internet Application framework based on jQuery and OpenAjax. It extends those libraries with a Model-View-Controller architecture and tools for testing and deployment. As it does not depend on server components, it can be combined with any Web service interface and server-side language like PHP, Perl, ASP.NET, Python or Java.

History

The first release of JavaScriptMVC was published in May 2008. JavaScriptMVC 2.0 became stable in June 2009 and is now based directly on jQuery, mainly to keep the code size small and to focus on its unique features.

Controller

A Controller is a list of functions that get called back when the appropriate event happens. The name of the function provides a description of when the function should be called. By naming functions in the correct way, Controller recognizes them as Actions and hook them up in the correct way, for example:

$.Controller.extend('TodosController',{
  ".todo mouseover": function(el, ev){
    el.css("backgroundColor","red")
  },
  ".todo mouseout": function(el, ev){
    el.css("backgroundColor","")
  },
  "#create_todo click" : function(){
    this.find("ol").append("New Todo"); 
  }
});

View

JavaScriptMVC uses EJS templates to render HTML data in controllers and inject them into the DOM. The syntax was inspired by ERuby and is similar to PHP or other server-side template engines.

Model

The Model class provides basic functionality to organize the application's data layer.

Tests

JavaScriptMVC also comes with a comprehensive Test plug-in that supports classic unit tests for models, as well as functional test, that are required to deal with event driven architectures. Tests can be run on the command line with Rhino, using Selenium and during development with the integrated test console pop-up window.

External links


de:JavascriptMVC

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...