Skip to main content

What is REST

Today I will put some detail on REST,a architecture which is just hot now a days among architect,personally I felt this is the one of the simplest architecture.Although it's not easy to implement without getting thorow understanding of it.
Representational State Transfer(REST) is  architectural style for distributed hypermedia systems .
This complete architecture use few elements like Resource,URI,Verb,Representation,Component and Connector etc.
Let me explain each term with detail:
* what is Resource?
 -The key abstraction of information in REST is a resource.A resource can be any meaningful functional object which can be addressed and can act upon a request
* What is URI?
 - The address using which resource is being addressed is URI(uniform resource identifier ).It's having it's own structure to represent any object.It's composed of five parts called scheme, host, path, query, and fragment e.g. http://xyz.com/Resource/pageno=10#bookmark
If it is internal than you can refer 
"/WebProject/resources/getcontent?page=HomePage&section=2"
* What is Verb?
 -In REST all operation performed using following verbs:GET, PUT, POST, and DELETE
The GET verb is used to read a resource.The PUT and DELETE verbs allow a request to alter the state of a resource atomically.POST create a new entry in the collection.The POST operation is very generic and no specific meaning can be attached to it.  In general, use POST when only a subset of a resource needs to be modified and it cannot be accessed as its own resource; or when the equivalent of a method call must be exposed
*  What is Representation?
-The data transmitted to and from the resource is a Representation of Resource.A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata
* What is connector?
-REST is having various connector like Client,Server,Cache,Resolver and tunnel.These connectors present an abstract interface for component communication, enhancing simplicity by providing a clean separation of concerns and hiding the underlying implementation of resources and communication mechanisms.All REST interactions are stateless. That is, each request contains all of the information necessary for a connector to understand the request, independent of any requests that may have preceded it.
* What is component?
-There are four components in REST: Origin Server,Proxy,gateway,useragent.An origin server uses a server connector to govern the namespace for a requested resource. A gateway component is an intermediary imposed by the network to provide an interface encapsulation of other services, for data translation, performance enhancement, or security enforcement.A user agent uses a client connector to initiate a request and becomes the ultimate recipient of the response.

This architecture is having following Web Constraints:
-Client Server
-Stateless
-Cache
-Uniform Interface
-Layered Systems
-Code on Demand

I will continue with rest of the detail along with some code-piece in my next write-up.

Comments

Popular posts from this blog

Quickest way to setup Sitecore 10.1 Vanilla instance

Sitecore 10.1 Vanilla installation on Developer machine   Step 1. Install Visual studio 2019 Step 2. Install SQL server 2019 (Developer edition) Step 3. Copy all the setup files and tools at shared location with full rights   Step 4. Browse “Sitecore 10.1.1 rev. 005862 (Setup XP0 Developer Workstation rev. 1.2.3-r6)” folder and run setup.exe in admin mode Step 5. You should be able to see SIA installation screen, click on Start button to start installation Step 6. SIA complete the entire process in 3 parts, first part installed all required Sitecore 10.1 prerequisites. Step 7. Once Prerequisites are installed restart the development machine and open setup.exe again in admin mode (refer step #4). Once SIA will be started then don’t click on Install button again for “Prerequisites”, just click on Skip. Step 8. As I said in Step #6 that Sitecore does installation in three parts, so this is second parts where you will have to pass require parameter to setup sol...

Sitecore Site Creation: A Comparison of SXA and Headless SXA

  Objective: Are you thinking about using Sitecore for your website development? If so, you might be wondering whether to use Sitecore Experience Accelerator (SXA) or Headless SXA. In this post, we'll examine the differences between these two methods and help you determine which one is best for your project. Its totally depend on the business context and load model. To design your site using SXA: Sitecore SXA brings Sitecore in competition with other easy to use CMS with enterprise capability. SXA empowers teams to collaborate effectively, streamline website creation, and maintain brand consistency. Its flexibility and scalability make it an excellent choice for enterprise CMS solutions. Few of SXA core enterprise CMS capabilities are: Parallel Work Streams Responsive Grid Layouts Reusable Renderings and Components Themes for Brand Consistency Page Designs for Consistency and Flexibility Customizing Renderings with Variants   But what about Headless SXA? This approach is in hi...

Content Localization of website in asp.net

Localization of content of website Objective: To reach globally, every organization planned to localized the website which means that content of the website would be available in the user own language, which will give comfort to end user and it will be easy to communicate. Points need to follow: To localize a website successfully, there should be very clear defined policy from functional and clearly adapted by technical. Since localization mistakes and oversights can be awkward for website users and potentially embarrassing for the company, make sure to get it right — it's absolutely worth the time and effort. We need to pay attention on some couple of points: -              Dates: Need to have clear understanding that which date format is being used at which place and should get displayed in that format. E.g. Month, day, year vs. day, month, year. -         ...