• Complain

Fernando Doglio - Pro REST API Development with Node.js

Here you can read online Fernando Doglio - Pro REST API Development with Node.js full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2015, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Fernando Doglio Pro REST API Development with Node.js
  • Book:
    Pro REST API Development with Node.js
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2015
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Pro REST API Development with Node.js: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Pro REST API Development with Node.js" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Pro REST API Development with Node.js is your guide to managing and understanding the full capabilities of successful REST development. API design is a hot topic in the programming world, but not many resources exist for developers to really understand how you can leverage the advantages.

This book will provide a brief background on REST and the tools it provides (well known and not so well known). Understand how there is more to REST than just JSON and URLs. You will then cover and compare the maintained modules currently available in the npm community, including Express, Restify, Vatican, and Swagger. Finally you will code an example API from start to finish, using a subset of the tools covered.

The Node community is currently flooded with modules; some of them are published once and never updated again - cluttering the entire universe of packages. Pro REST API Development with Node.js shines light into that black hole of modules for the developers trying to create an API. Understand REST API development with Node.js using this book today.

What youll learn
  • What REST really is and how you can use it to your advantage.
  • How to use a variety of modules including JSON/Hal, Express, Restify, Vatican, and Swagger.
  • How to build an example RESTful API from start to finish.
  • How to troubleshoot any problems and move on with your API.
Who this book is for

This is book is designed for any Node.js developer who wants to fully understand REST API development. So often, the true capabilities of this method are not fully understood. This book will shed light on all aspects and make REST API development easy.

Table of ContentsIntroduction

Chapter One: REST 101

Chapter Two: API Design Best Practices

Chapter Three: Node.js and REST

Chapter Four: Architecting a REST API

Chapter Five: Working with Modules

Chapter Six: Planning Your REST API

Chapter Seven: Developing Your REST API

Chapter Eight: Troubleshooting

Fernando Doglio: author's other books


Who wrote Pro REST API Development with Node.js? Find out the surname, the name of the author of the book and a list of all author's works by series.

Pro REST API Development with Node.js — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Pro REST API Development with Node.js" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Fernando Doglio 2015
Fernando Doglio Pro REST API Development with Node.js 10.1007/978-1-4842-0917-2_1
1. Rest 101
Fernando Doglio 1
(1)
La Paz, Canelones, Uruguay
Electronic supplementary material
The online version of this chapter (doi: 10.1007/978-1-4842-0917-2_1 ) contains supplementary material, which is available to authorized users.
Nowadays, the acronym REST has become a buzzword, and as such, its being thrown into the digital wind very carelessly by a lot of tech people without fully understanding what it really means. Just because you can interact with a system using HTTP, and send JSON back and forth, doesnt mean its a RESTful system. REST is a lot more than thatand that is what well cover in this chapter.
Lets start where it all began, with Roy Fieldings paper, going over the main characteristics of his idea. Ill try to explain the main aspects of it, the constraints he added and why. Ill go over some examples and then jump backward, into the past, because even though REST has proven to be a huge jump forward regarding distributed systems interconnection, before Fieldings paper became popular, developers were still looking for solutions to the problem: how to easily interconnect a nonhomogeneous set of systems.
Ill do a quick review of the options developers had back then to interconnect systems, mainly going over SOAP and XML-RPC (the two main players before REST).
In the end, Ill jump back to our current time, comparing the advantages that REST brought us and thus showing why is it so popular today.
But first, a small clarification is in order: as youll read in just a few minutes, REST is protocol independent (as long as the protocol has support for a URI scheme), but for the sake of this book and since were focusing on API design, lets assume that the protocol were using is HTTP, which will simplify explanations and examples. And as long as you keep in mind that the same is true for other protocols (like FTP), then youll be fine.
Where Did It All Start?
This whole thing started with Roy Fielding, an American computer scientist born in 1965. He is one of the main authors of the HTTP protocol for the first three years of its existence.
So, as you can see, Fielding has made a lot of great contributions to the IT world, especially regarding the Internet, but I think that his doctoral thesis is the thing that received the most attention and made his name known among a lot of people who otherwise wouldnt have heard of him.
In the year 2000, Fielding presented his doctoral dissertation, Architectural Styles and the Design of Network-based Software Architecture. In it he coined the term REST , an architectural style for distributed hypermedia systems.
Put simply, REST (short for REpresentational State Transfer ) is an architectural style defined to help create and organize distributed systems. The key word from that definition should be style , because an important aspect of REST (and which is one of the main reasons books like this one exist) is that it is an architectural stylenot a guideline, not a standard, or anything that would imply that there are a set of hard rules to follow in order to end up having a RESTful architecture.
And because it is a style, and there is no Request for Comments (RFC) out there to define it, its subject to misinterpretations from the people reading about it. Not only that, but some go as far as to leave parts out, and implement a subset of its features, which in turn leads to a widespread and incomplete REST ideal, leaving out features that would otherwise be useful and help your systems users.
The main idea behind REST is that a distributed system, organized RESTfully, will improve in the following areas:
  • Performance : The communication style proposed by REST is meant to be efficient and simple, allowing a performance boost on systems that adopt it.
  • Scalability of component interaction : Any distributed system should be able to handle this aspect well enough, and the simple interaction proposed by REST greatly allows for this.
  • Simplicity of interface : A simple interface allows for simpler interactions between systems, which in turn can grant benefits like the ones previously mentioned.
  • Modifiability of components : The distributed nature of the system, and the separation of concerns proposed by REST (more on this in a bit), allows for components to be modified independently of each other at a minimum cost and risk.
  • Portability : REST is technology and language agnostic, meaning that it can be implemented and consumed by any type of technology (there are some constraints that Ill go over in a bit, but no specific technology is enforced).
  • Reliability : The stateless constraint proposed by REST (more on this later) allows for the easier recovery of a system after failure.
  • Visibility : Again, the stateless constraint proposed has the added benefit of improving visibility, because any monitoring system doesnt need to look further than a single request message to determine the full state of said request (this will become clear once I talk about the constraints in a bit).
From this list, some direct benefits can be extrapolated:
  • A component-centric design allows you to make systems that are very fault tolerant. Having the failure of one component not affect the entire stability of the system is a great benefit for any system.
  • Interconnecting components is quite easy, minimizing the risks when adding new features or scaling up or down.
  • A system designed with REST in mind will be accessible to a wider audience, thanks to its portability (as described earlier).With a generic interface, the system can be used by a wider range of developers.
In order to achieve these properties and benefits, a set of constraints were added to REST to help define a uniform connector interface.
REST Constraints
According to Fielding, there are two ways to define a system. One is to start from a blank slate, an empty whiteboard, with no initial knowledge of the system being built or the use of familiar components until the needs are satisfied. A second approach is to start with the full set of needs for the system, and constraints are added to individual components until the forces that influence the system are able to interact in harmony with each other.
REST follows the second approach. In order to define a REST architecture, a null-state is initially defineda system that has no constraints whatsoever and where component differentiation is nothing but a mythand constraints are added one by one.
Client-Server
The first constraint to be added is one of the most common ones on network-based architectures: client - server . A server is in charge of handling a set of services, and it listens for requests regarding said services. The requests, in turn, are made via a connector by a client system needing one of those services (see Figure ).
Figure 1-1 Client-Server architecture diagram The main principle behind - photo 1
Figure 1-1.
Client-Server architecture diagram
The main principle behind this constraint is the separation of concerns . It allows for the separation of front-end code (representation and possible UI-related processing of the information) from the server side code, which should take care of storage and server-side processing of the data.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Pro REST API Development with Node.js»

Look at similar books to Pro REST API Development with Node.js. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Pro REST API Development with Node.js»

Discussion, reviews of the book Pro REST API Development with Node.js and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.