zerojs! Build the best CMS wheels

Source: Internet
Author: User

Zerojs is a CMS based on Nodejs, Angularjs, and Git. Above it can continue to develop a blog, forums, wikis and other similar content-managed systems.

    • Embracing developers and communities
      • Clear levels, highly decoupled. The front and back ends are fully independent systems, even if they are separated.
      • Each level is using the most popular tools and methods in the industry as the bottom layer, and there is little learning cost for developers.
      • Modules, themes, kit system simple mature, two times development no pits.

Back-end architecture

Zerojs is based on sails. Has inherited the three major advantages of sails:

    • A powerful Model layer. Sails implements its own ORM, and the interface is almost identical to the mongoose, and is easy to use. With the Community unified database drive, can perfectly support MONGO, MySQL, Redis, PostgreSQL and so on database. The ORM package is perfect for setting up a database that can be used for a single model designation.
    • Provides a fully automatic restful interface for the model. Implementation declarations can be used.
    • Controller and view are fully express-based, with no additional learning costs.

The core layer of the ZEROJS contains the most common features of the CMS, with three features:

    • Content Management is a powerful feature. Zerojs is a unified abstraction for the core concepts of "content node", "Classification and tagging", and provides a unified index, summary and other functions for inheritors. At the same time, the system is still very open, allowing developers to declare common model, and then use some of the features in Mixin way.
    • The system is highly scalable. Hooks are used in almost every critical action of the process to support the extension. For example, "increase, delete, change, check" the back and forth. At the same time, a choice of driver is used to support the needs of developers in system operations, such as logging statistics.
    • To the front-end unprecedented friendliness. Native support for traditional template rendering, front-end MVVM frame rendering, and mixed rendering and many other ways. The system by default provides a complete set of angular modules (including login, registration, node additions and deletions, etc.) to the developer at will, can achieve almost 0 of the code in the case of the front end into a single page application. Engineering problems, such as compressed packaging of static resources, are automatically completed by the system according to the current environment.

ZEROJS's extension layer is based on the GIT implementation and benefits:

    • Code security is guaranteed and does not hang system.
    • You can package your own new features in the current development environment with one click. No manual sorting is required.

The following is a blog system base module based on Zerojs:

Front-end architecture

As mentioned earlier, ZEROJS provides all the standard REST interfaces for the front end, and supports multiple ways of view rendering. means that the front end can be fully self-developed, or even completely discard the server-side view layer, not in the same environment can also. The front-end architecture, which is referred to here, mainly refers to the angular front-end architecture provided by the ZEROJS default. Here are three front-end issues of greatest concern:

First, how to use the default front module?

ZEROJS provides a complete set of angular modules for each of the main functions of "users, nodes, tags, statistics", and has a default controller. Many times, for example, a new node type such as "Diary", developers need to do is only a very simple three steps:

    1. Declare this type at the back end.
    2. Front-end introduction of files,
    3. Then write the front-end template file is enough.

Even if you want to add a field, just write the template. The default module has undergone a variety of scenes of temper, the function is very perfect. If you are in a very special place, be sure to handle it yourself manually, you can still reuse the default module service, filter, and so on. Almost all functions are encapsulated in the service. Very noticeable when these default modules and ZEROJS have no coupling at the back end! This means that even if you want to switch completely to your backend, as long as the interface standard, then these modules are also available.

Second, how to deal with the pre-loaded data?

In the single page application, often in order to save the request, speed up the first screen display speed and let the server forward some data directly on the page, such as "basic information of the current user", "first screen data" and so on. ZEROJS when processing view, encountered "Render a single node", "Render node list" will default to render the node content directly to the page, in angular, introduced the system by default provided by the Preload module to obtain this data. But still don't worry too much, the system provides the node additions and deletions, the list rendering, the individual node rendering and so on the default angular module has automatically supported the use of preload data. Developers still need to write the template as well as normal.

Third, the front-end script module dependencies, packaging compression, etc. how to deal with?

These problems are engineering problems, ZEROJS in the production environment will analyze the template and then unified packaging and then injected into the template. Future in the view layer may launch CDN module, more friendly to the front end!

The following is a blog system based on Zerojs, of course, it is not polite to say to be the king of the blog.

Http://www.cnblogs.com/sskyy/p/3918299.html

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.