Getting started with Javascript-based mobile web CMS-Overview
I looked for the mobile framework on the project and found it from the beginning. As a result, I found an example to build a mobile platform CMS-modemcms, which facilitates in-depth understanding of the project. At the same time, I can maintain a CMS system on my own.
Build a framework
I tried AngularJS and EmberJS and found that for AngluarJS and EmberJS, the main problem is that it is not easy to introduce things that I am familiar. And considering that Google has never supported its own projects very well ~~, So I gave up AngluarJS's idea.
So I began to look for some solutions, but finally I chose a more general solution.
RequireJS
JQuery
Underscore
BackboneCompared with AngularJS, Backbone is a lightweight solution. Flexibility is a good thing for you, that is, you can add many things at will.
About Backbone
Backbone. js is a JavaScript framework and RESTful JSON application interface. It is also a set of programming models that conform to the MVC Architecture in general. Backbone. js is lightweight and runs on a Javascript library.
The specific function should be
Backbone is lightweight, supports jquery, built-in routing, and object view. The powerful sync mechanism reduces page size and accelerates page display.
JQuery allows you to easily process HTML (an application in a standard General Markup Language), events, and animation effects, and provides AJAX interaction for websites. However, jQuery allows you to separate the code from the html content by defining the id.
Underscore is the Backbone dependency library. Underscore is a JavaScript utility library that provides features similar to Prototype. js, but does not inherit any JavaScript built-in objects.
You can read RequireJS in sequence by using only relevant dependent modules.The front-end UI uses Pure CSS, a lightweight CSS framework. However, in the end, the overall usage is equivalent. But it can have a better mobile experience.
Other replaceable frameworksAngularJSConsidering some factors, Backbone may be replaced, but it is not currently feasible. To learn is a solution, and to better popularize something.HandlebarsHandlebars is an improvement of Mustache. The display and logic are separated, and the syntax is compatible with Mustache. It can be compiled into code to improve the path support of Mustache, however, if you want to run on the server, you need to use the server-side Javascript Engine such as Node. js.
ProjectThe front-end and back-end separation design provides only JSON data for the front-end, so in a sense, it may only be suitable for browsing, and this should be used with the background framework. In general, it is suitable for reading websites.
Source codeThe code is still on Github, and the basic functions are ready for Works.
Https://github.com/gmszone/moqi.mobi
Progress and purposeFinal Goal: To build a mobile platform CMS system.
Currently: for such a project, the following two frameworks are prioritized,
Django + Tastypie API
WordpressNow: data can be read from the background.
OthersSome good materials include: