• Complain

Mark Clow - Angular 5 Projects

Here you can read online Mark Clow - Angular 5 Projects full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 0, publisher: Apress, Berkeley, CA, 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.

Mark Clow Angular 5 Projects
  • Book:
    Angular 5 Projects
  • Author:
  • Publisher:
    Apress, Berkeley, CA
  • Genre:
  • Year:
    0
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Angular 5 Projects: summary, description and annotation

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

Mark Clow: author's other books


Who wrote Angular 5 Projects? Find out the surname, the name of the author of the book and a list of all author's works by series.

Angular 5 Projects — 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 "Angular 5 Projects" 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
Mark Clow 2018
Mark Clow Angular 5 Projects
1. Web Applications and AJAX Communications
Mark Clow 1
(1)
Sandy Springs, Georgia, USA
This book was written for developers who have a very basic knowledge of web development. It doesnt require software to be installed in advance, but in later chapters you will need to install software to run the example code. The book provides information on how to download and install the software when required.
Before we dive into Angular, I want to introduce some basic concepts of web development. This chapter covers the basic architecture of a web application and how it passes data from the server to the web browser. It also introduces some of the tools that might make your life easier when debugging the communication between the server and the web browser.
More experienced developers can just skip over this chapter.
Introducing the Client and Server
Web applications basically involve two computers communicating with each other, called a server and a client . This concept is illustrated in Figure .
Figure 1-1 Clientserver architecture The server sits in the company - photo 1
Figure 1-1
Client/server architecture
The server sits in the company office or data center, listens to HTTP requests, and responds back with answers. The server also accesses the data (stored in a database) thats used by the web application.
The user uses their web browser to interact with the web application. The users computer communicates with the server, sending HTTP requests and receiving answers. Client computers may be a variety of machines, from smart watches to cell phones to tablets to computers.
On the web, clients and servers communicate using HTTP (HyperText Transfer Protocol). HTTP works as a request-response protocol between a client and server. Chapter covers HTTP in detail.
Server-Side Web Applications
A server-side web application is one where most of the application executes on the server, and the client is only used to display HTML pages one at a time. When the user performs an action in the web application, the client sends a request to the server, which does something and returns a brand-new HTML page to be displayed on the client as a response. The web page is regenerated every time and sent back to be displayed on the clients web browser, as illustrated in Figure .
Figure 1-2 Server-side web application Client-Side Web Applications - photo 2
Figure 1-2
Server-side web application
Client-Side Web Applications
Client-side web applications (also known as single page apps , or SPAs for short) are a more recent phenomenon, and the computing industry is moving more towards this model. Here, a lot of the application still executes on the server, but some code also executes on the client (the web browser) to avoid the frequent regeneration of pages. When the user performs an action in the client, it sends a request to the server, which does something and returns information about the result not an entirely new HTML page. The client-side code listens for an answer from the server and itself decides what to do as a response without generating a new page. Client-side web applications tend to be more interactive and flexible because they can respond more quickly to user interactionsthey dont have to wait on the server to send back as much data. They only need to wait for the server to respond back with a result, rather than a whole HTML page. This architecture is illustrated in Figure .
Figure 1-3 Client-side web application Striking a Balance So there are - photo 3
Figure 1-3
Client-side web application
Striking a Balance
So there are basically two types of web applications : server-side and client side (SPA). If these are thought of as black and white, your web application should be somewhere in the middle, in the grey area.
The server-side should remain the repository for the clever stuffthe business rules, data storage, and settings should remain on the server and be invoked or retrieved from the client-side when required.
The client-side (browser) should use the more modern client-side technology to avoid full-page refreshes. However, it shouldnt be too smart or too bloated. It should know enough to do its job of interacting with the user and nothing more. It should invoke code on the server-side to do smart things or perform business processes. It shouldnt have too much business logic, internal system data (data other than that data the user can view or modify) or hardcoded information because thats better managed on the server.
Caution
You must avoid throwing everything but the kitchen sink into the client.
Creating Web Applications with AJAX
AJAX stands for Asynchronous JavaScript and XML . AJAX is a technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and JavaScript.
When a client-side web application needs to communicate with the server, it uses AJAX to send something out and waits for the result to come back. Remember, it gets back a result that only contains data, not an entirely new web page. Also, the client-side code doesnt stop running while its waiting, because it still has to display the user interface and respond to the user. This is the asynchronous part of AJAX.
Client-side web applications use JavaScript to invoke the AJAX request and respond to it. This is the JavaScript part of AJAX.
AJAX requests used to use XML (Extensible Markup Language ) as the data format for the request and result data going back and forth between the client and the server. Nowadays, AJAX tends to use JSON (JavaScript Object Notation ) as the data format instead of XML. Thats because JSON is much more compact and maps more directly onto the data structures used in modern programming languages. But both XML and JSON are commonly used formats for transferring data in text form.
Earlier, I used the term asynchronous . You may think of asynchronous this way: you call your spouse to ask a favor. Their phone is busy, so you leave a message asking them to stop at the supermarket and buy you a case of beer. In the meantime, you keep watching TVbecause thse things are happening asynchronously . The outcomes of this process would include the following:
  • Success : Spouse calls you back and tells you the beer is on the way.
  • Failure : Spouse calls you back and tells you the store was closed.
In AJAX, the client-side code doesnt stop running while waiting for a response from the server, just as you didnt stop watching TV while waiting for your spouse to get back to you.
Callbacks
Typically, when you make an AJAX call, you have to tell it what to do when the server response is received. This code that the AJAX system code should fire when the response is received is known as the callback .
When you perform AJAX operations, you invoke the AJAX code with parameters and one or two functionsthe callbacks. There are two types of callbacks:
  • Success : The success (or done) callback is invoked if the server responds successfully and the client receives the answer without error.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Angular 5 Projects»

Look at similar books to Angular 5 Projects. 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 «Angular 5 Projects»

Discussion, reviews of the book Angular 5 Projects 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.