Construct a Javascript-based mobile web CMS-Hello, World, cmshello

Source: Internet
Author: User

Construct a Javascript-based mobile web CMS-Hello, World, cmshello

In an introduction to Javascript-based mobile web CMS, I briefly introduced some of the principles of moji CMS, including its core framework, then we should explain how the CMS is built step by step.

RequireJS library and dependency

Here we use bower JS to download the library. For details, refer to the article "bower install js" using bower to manage js.

The libraries to be downloaded include

  • RequireJS
  • Backbone
  • Underscore
  • Mustache
  • JQuery
Use RequireJS

Reference examples on the official website

<!DOCTYPE html>

We need a require. js file and a main. js file in the same directory. In main. js, we use require () to load the script to be loaded.

require.config({    baseUrl: 'lib/',    paths: {        jquery: 'jquery-2.1.1.min'    },    shim: {        underscore: {            exports: '_'        }    }});require(['../app'], function(App){    App.initialize();});

You can configure other libraries in config and then call app. js.

define(['jquery', 'underscore'], function($, _){    var initialize = function() {        console.log("Hello World");    }    return {        initialize: initialize    };});

When index.html is opened, it is output on the console.Hello World. In this way, we will complete a basic framework, but there is no HTML, and this will continue next time.

Related Resources

QQ group: 344271543

Source code Github: https://github.com/gmszone/moqi.mobi


How to develop mobile Web applications efficiently

After computers and the Internet, mobile Internet is setting off the third wave of the information technology revolution, and new technologies and applications are emerging. This article recommends 10 excellent mobile Web development frameworks to help developers develop mobile Web applications more efficiently. 1. Sencha Touch FrameworkSencha Touch is the world's first HTML5-based mobile Web development framework. It supports the latest HTML5 and CSS3 standards and is fully compatible with Android and Apple iOS devices, provides a wide range of Web UI components to quickly develop mobile terminal applications. 2. The jQuery MobilejQuery Mobile framework elevated the "write less, do more" spirit to a higher level. The jQuery mobile framework helps you design an application that can run on all popular smartphones and tablet platforms without developing a special version for each mobile terminal. 3. jQTouchjQTouch is a jQuery plug-in used to implement various common UI effects such as animations, list navigation, and default application styles on mobile phones. Supports iPhone, Android, and other mobile phones. 4. The M ProjectThe-M-Project is a mobile Web application framework that contains various UI components and develops HTML5 applications based on jQuery. It supports platforms such as iOS, Android, Palm WebOS, and BlackBerry. 5. DHTMLX Touch-HTML5 JavaScript Framework for MobileDHTMLX Touch is a free HTML5-based JavaScript library used to build cross-platform mobile Web applications.

What is the framework suitable for presenting news on mobile web and html5 + css3 + javascript on mobile phones?

JQuery Mobile
Jquerymobile.com/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.