Build a JavaScript-based mobile web Cms--hello,world

Source: Internet
Author: User

In an introduction to building a JavaScript-based mobile Web CMS--A brief introduction to some of the principles of the Qi CMS, its polar framework, and then began to explain how the CMS is built step after step.

Requirejs using libraries and dependencies

Here is Bower js to download the library, detailed can refer to Bower install JS use Bower Management JS this article.

Libraries that need to be downloaded have

    • Requirejs
    • Backbone
    • Underscore
    • Mustache
    • Jquery
Using Requirejs

Example of quoting official website

<! DOCTYPE html>

We need a require.js and a main.js in the same directory, using require () in main.js to load the script that needs to be loaded.

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

The other libraries can be configured in config, and then the app.js is called.

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

When the index.html is opened, it is output in the console Hello World . So we're going to complete a basic framework, but there's no HTML, and this will continue the next time.

Related Resources

QQ Discussion Group: 344271543

SOURCE Github:https://github.com/gmszone/moqi.mobi

Build a JavaScript-based mobile web Cms--hello,world

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.