Deep understanding of Web 2.0 and API's by Sharad and Sahil



[1]
What is web-2.0?
Web 2.0 is a new generation of W.W.W, which is aimed more at the ability of people to collaborate and share information online. Web 2.0 refers to the transition from static HTML Web pages to a more dynamic Web, which is more organized and is based on serving Web applications to its users.

Changes we saw in web 2.0 from web 1.0: -
Web 1.0 Web 2.0
 DoubleClick --> Google AdSense
 Ofoto --> Flickr 
Akamai --> BitTorrent 
mp3.com --> Napster
  Britannica Online --> Wikipedia
 personal websites --> blogging 
       evite --> upcoming.org and EVDB 
domain name speculation --> search engine optimization 
page views --> cost per click 
screen scraping --> web services 
publishing --> participation
 content management systems --> wikis 
directories (taxonomy) --> tagging ("folksonomy") 
  stickiness --> Syndication
[2]
API: 
As we always talk about the web in your day to day life but not focus on the key terms of it that how our web is going to work in the real world. Therefore, to understand how our web responds to our request the concept of API’s arrive

What is API?
 API stands for Application Programming Interface (main participant of all the interactivity) It is like a messenger that takes the user requests to a system and responds to us via seamless connectivity.

We use APIs in many scenarios:
For example 1: To urge data for an internet application or to attach to a foreign server that has data like weather that keeps changing, Or to enable two applications to exchange data among each
other.
API not only works as a messenger between user and server but also defines the location in the server where the data of the client is residing. It is a pathway to fetch data from the desired location.
Most common real-life use of API concepts include:
* Waiter in a restaurant taking our order request to the chef and brings back the requested dish to us. * On pressing the switchboard once the tube light turns off.
* Booking flights online from sites like making my trip (web-based)
* Signing up on a shopping site through Facebook Account (web-based)

Q-> Now one question arises that this work is also done by HTTP (Hypertext Transfer Protocol) service so how to differentiate between them? 
ANS-> We cannot differentiate both the terms because usually, APIs are created in applications and the applications are hosted on a server. Now to call those APIs ones must use HTTP protocol over the network. Therefore, it is clearly defining that API is a software level application, which gives instructions to a server on how to connect with the user/client request and to apply this software application we have to use HTTP protocols.

Useful component of HTTP:-
XHR - XML Http Request all browsers have a built-in XML Http Request Object (XHR).
XHR (a JavaScript object) is used to transfer data between a web browser and a web server.
XHR is often used to request and receive data for modifying a web page.

The XHR object may be a Web Developers Dream because you can
* Update an internet page without reloading the page.
* Request data from a server - after the page has loaded. * Receive data from a server - after the page has loaded.
* Send data to a server - within the background.
Therefore, if you are, a web-developer and you make your new webpages one same domain but every time you have to reload domain to show new projects, then you can use XHR


[3]
There is a new concept arising about rest API

What is the Rest API?
REST determines how the API looks like. It stands for “Representational State Transfer”. It
is a set of rules that developers follow when they have to create an API. One of these rules states that you simply should be ready to get a bit of knowledge (called a resource) once you link to a selected URL.
Each URL is named a ‘request’ while the info sent back to you is named a ‘response’.
Therefore, it is all about the deigning of your URL, which you are going to show to your user or client.

What is SOA?
Service-Oriented Architecture (SOA) is an architectural approach in which applications make use of services available on the network. In this architecture, services are provided to make applications, through a communication call over the web. There are two major roles within Service-oriented Architecture:
1. Service provider: The service provider is the maintainer of the service and the organization that makes available one or more services for others to use. To advertise services, the provider publishes them in a registry, together with a service contract that specifies the nature of the service, how to use it, the requirements for the service, and the fees charged.
2. Service consumer: The service consumer can locate the service metadata in the registry and develop the required client components to bind and use the service.
[4]




Components of SOA:
[5]




References: - 
[1] https://en.wikipedia.org/wiki/Web_2.0#/media/File:Web_2.0_Map.svg
[2] https://www.oreilly.com/pub/a/web2/archive/what-is-web-20.html
[3] https://www.w3schools.com/whatis/whatis_http.asp
[4]&[5] https://www.geeksforgeeks.org/service-oriented-architecture/










Comments