On node's role in building Hypermedia API

Source: Internet
Author: User
Tags install node npm install node

on node's role in building Hypermedia APICHSZS, reprint need to indicate.

Blog home: Http://blog.csdn.net/chszs hypermedia, or hypermedia, is a technique for organizing and managing blocky multimedia information (including text, images, video, etc.) with a nonlinear mesh structure. The concept of hypermedia is similar to the earlier hypertext text. The essence of hypertext is to add links to text content. This makes up the hypertext. Hypermedia is similar.
Whether it's hypermedia or hyper-text. The transport protocol used is HTTP, which means that the hypermedia can be accepted by all browsers.

and describe the type of hypermedia we use MIME.

MIME is Multipurpose Internet Mail Extensions, a Multipurpose Internet Mail extension type, MIME is an Internet standard that was first applied to the e-mail system. Later its definition was gradually applied to the Internet domain.

Specifies the type of media with MIME. Then the client browser will be able to clearly know how to handle this type of media.
node. JS is a library built on Google's V8 JavaScript engine, which is designed to easily and quickly build scalable Web applications.

node. JS is event-driven, taking advantage of JavaScript's closure features and event handling mechanisms, using a non-clogging I/O model that is ideal for data-intensive real-time applications. Node. JS implements features similar to Apache HTTP server, making it capable of building JavaScript-based, high-concurrency Web applications. node. JS enables front-end development to use the same programming language--javascript.


Rest Web services can be said to be customized for the HTTP protocol, using URIs in the HTTP protocol to identify unique network resources, using GET, POST, PUT, delete and other verbs to manipulate resources, REST Web services are clearly more efficient than SOAP Web services, Because it does not require additional encapsulation protocols and remote procedure calls.
As for the manifestation of resources, it can be HTML5. It can also be XML data format, JSON data format. or a binary protobuf format.

Which data format to use depends on the needs of the project.
node. JS provides HTTP manipulation capabilities that can be used on either the client or server side. The biggest advantage of node. JS is that it has a large third-party library, and there are multiple libraries in the same way that can simplify our development efforts in RESTful WEB services. Example:
1) node-restify home page: Https://github.com/mcavage/node-restifyrestify is a streamlined, similar to express library for building restful The node. JS Library for the API.

Installation: NPM Install Restify
2) node-restful Home: Https://github.com/baugarten/node-restfulnode-restful is the package of the Express library and is ideal for creating restful APIs. Installation: NPM Install node-restful
There are also a lot of third-party libraries that are not listed.

Besides. We are also able to build restful APIs directly using node. JS's core library, or using the Express library to build restful APIs. There are many ways to achieve the goal.
There are very few hypermedia books. So there are fewer books devoted to how to build Hypermedia APIs, and Hypermedia is a network resource, and the same can be defined with URIs, so node. JS is very easy to implement the RESTful API for hypermedia.


Have to say. Using HTML5 and node to build Hypermedia API This book is too blunt to read. However, the book itself is very valuable. Because the need for a restful API to implement hypermedia is not uncommon, it can be said to be one of the essential skills of a web developer. Repeating the reading and figuring out its connotation is my little suggestion to the reader of this book.

On node's role in building Hypermedia API

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.