词条 | JavaScriptMVC |
释义 |
| name = JavaScriptMVC | logo = Javascriptmvc.png | logo size = 192px | developer = Justin B. Meyer, Brian Moschel | released = {{Start date and age|2008|05}} | discontinued = | latest release version = 3.3 | latest release date = {{Start date and age|2013|07|23}} | latest preview version = | latest preview date = | status = Now marketed as DoneJS[1] | programming language = JavaScript | operating system = Cross-platform | license = MIT License[2] | website = {{Official URL}} }}{{Portal|Free and open-source software}} 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. Because it does not depend on server components, it can be combined with any web-service interface and server-side language like ASP.NET, Java, Perl, PHP, Python, or Ruby. HistoryThe first release of JavaScriptMVC was published in May 2008. JavaScriptMVC 2.0 became stable in June 2009 and is based directly on jQuery, mainly to keep the code size small and to focus on its unique features. Version 3.0 was released in December 2010. CanJS, JavaScriptMVC's extracted MVC parts, was released in April 2012. In May 2015, JavaScriptMVC was rebranded as DoneJS with an extended feature set and scope. ControllerA controller is a list of functions that gets 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, the Controller recognizes them as Actions and hooks them up correctly, for example: A controller can also handle OpenAjax events, for example: ViewJavaScriptMVC 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. For example, file "test.ejs" ( data = [ "Hello", "World" ] ): produces the following "output": ModelThe Model class provides basic functionality to organize the application's data layer. TestsJavaScriptMVC also comes with a comprehensive test plug-in that supports classic unit tests for models, as well as functional tests, 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. References1. ^{{cite web|url=http://donejs.com/About.html#section=section_Evolve|title=DoneJS is the successor to JavaScriptMVC.|publisher=Bitovi}} 2. ^{{cite web|url=https://github.com/bitovi/javascriptmvc/blob/master/license.md|title=JavaScriptMVC license|publisher=Bitovi|accessdate=12 December 2012}} External links
2 : JavaScript libraries|Ajax (programming) |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。