Hoodie: A super fast Web development framework based on JS and couchdb

Source: Internet
Author: User
Keywords Can development framework nbsp;
Hoodie: Super fast webhttp://www.aliyun.com/zixun/aggregation/13435.html based on JS and couchdb "> Development framework Published 7 hours ago | Times Read | SOURCE hood.ie| 0 Reviews | Author hood.ie nosqlcouchdbweb Development Framework Cloud Computing Hoodiejavascript Open Source Summary: The framework can not only standardize the structure of the application, but also help developers to quickly complete the project construction. This time to introduce a super fast Web development framework: Based on COUCHDB, can adapt to most of the data structure model, and based on the characteristics of JS is to accelerate the user most of the operation.

For a society where time is money, everyone wants to work quickly to complete, and in the rapid development of machine performance today, can be rapid development of the language and framework is a deep welcome to the vast number of developers, this time to everyone that is based on JS and COUCHDB for rapid web development framework.

Hoodie

hoodie--the architecture for a fully front-end Web application without caring for the backend, the database, or the server, using the Open-source library as simple as jquery. The following is a list of the features of the framework:

uses offline mode by default: Hoodie typically stores data locally and synchronizes it with the backend at the right time, which is ideal for mobile app development. Online registration, login, logoff, password reset, and other account management functions use COUCHDB for file-based storage: A limited event system that is not subject to data structure types: Easy to monitor changes to the database and make changes to the view. Strong, fine-grained sharing settings, even for the smallest pieces of data to send and receive e-mail each layer uses JavaScript and JSON, even database queries can use JS to achieve convenient, simple local dev settings, even for you to configure Dev-domains Deployment of Nodejitsu can be achieved with minimal effort

From the features that seem to have shown that hoodie will bring a lot of convenience to the actual work, take a look at the code snippet hoodie in a task List application:

1. Installation of Hoodie

Hoodie = new Hoodie (' Http://api.myappname.dev ');

We have seen that only a simple JS statement is required to complete the hoodie installation, using just the API endpoint--your application's local dev URL and the "API" subdomain.

2. User Registration

hoodie.account.signUp (username, password);

As simple as the features say, the same user logoff, login, and other account management functions can be so simple to achieve.

3. Storage of data

The following statement demonstrates the storage of a new task

var type = ' Task '; attributes = {title: ' Try out Hoodie Today '};hoodie.store.add (type, attributes). Done (function ( NewObject) {//data was saved!});

As you can see, the documents you store need a type and some JSON data. Both are arbitrary and do not need to be predefined elsewhere. As long as you give hoodie valid JSON, it can digest.

4. Event listeners

When the task is added, we need to modify the view so that we can listen directly to the related changes in the data store:

Hoodie.store.on ("Add:task", Function (event, changedobject) {//Update the view with the changedobject});

5. Data loading (Loading)

The following attempts to load user-owned "task" documents

var type = ' Task '; hoodie.store.findAll (type). Done (function (tasks) {/Does something with the tasks});

Looks very good, can produce look hoodie document to obtain more details.

Open Source Related

Hoodie All the code has been open source on GitHub, click here to view.

Original link: Hoodie Very Fast Web App Development (Compile/Zhonghao revisers/Wang)

"The First China Cloud computing Conference" will be held in June 2013 5-7th in the Beijing National Convention Center. Slam The Register!

Related activities have been hot launched:

2013 China Cloud Computing Survey, weekly awards and so you take! “

Innovation Cloud 2013 Cloud Innovation Product and Application project solicitation, welcome to the developer, team and entrepreneurial enterprises to participate!

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.