<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dinakar</title>
    <description>The latest articles on DEV Community by Dinakar (@dinakar).</description>
    <link>https://dev.to/dinakar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F305124%2F0ffa82d4-09e8-44e8-9cf6-91d782726604.jpg</url>
      <title>DEV Community: Dinakar</title>
      <link>https://dev.to/dinakar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dinakar"/>
    <language>en</language>
    <item>
      <title>Let's Learn - Week 1 - REST vs SOAP</title>
      <dc:creator>Dinakar</dc:creator>
      <pubDate>Mon, 27 Jul 2020 07:06:15 +0000</pubDate>
      <link>https://dev.to/dinakar/let-s-learn-week-1-rest-vs-soap-264p</link>
      <guid>https://dev.to/dinakar/let-s-learn-week-1-rest-vs-soap-264p</guid>
      <description>&lt;p&gt;The final post for this week 1 , we are going to wrap up with the difference between REST vs SOAP.&lt;/p&gt;

&lt;p&gt;Although this is not an Apple-Apple comparison because SOAP is format of XML whereas REST is actually an architectural style , I would like to highlight just the differences that gives a recap of what we have seen so far&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Frest%2520vs%2520soap.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Frest%2520vs%2520soap.png%3Fraw%3Dtrue" alt="rest-vs-soap"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have quite some idea about the basic terminologies and key concepts , next week will meet you all with &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Fspring%2520boot%2520icon.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Fspring%2520boot%2520icon.png%3Fraw%3Dtrue" alt="spring-boot"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>restful</category>
      <category>soap</category>
      <category>webservices</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Let's Learn - Week 1 - REST</title>
      <dc:creator>Dinakar</dc:creator>
      <pubDate>Mon, 27 Jul 2020 07:06:06 +0000</pubDate>
      <link>https://dev.to/dinakar/let-s-learn-week-1-rest-13o1</link>
      <guid>https://dev.to/dinakar/let-s-learn-week-1-rest-13o1</guid>
      <description>&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    * Introduction&lt;br&gt;
    * Resource&lt;br&gt;
    * Data Exchange&lt;br&gt;
    * Service Definition&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Introduction &lt;a&gt;&lt;/a&gt;&lt;br&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;REST stands for REpresentational State Transfer coined by Roy Thomas Fielding who is credited for developing HTTP.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;REST makes best use of HTTP (Hyper Text Transfer Protocol).&lt;br&gt;
Thus, RESTful webservices try to define services using the different concepts that are already present in HTTP.&lt;/p&gt;

&lt;p&gt;HTTP methods are used to indicate what action we are using.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;GET -&amp;gt; to get details of a resource&lt;/li&gt;
&lt;li&gt;POST -&amp;gt; during creation of a resource&lt;/li&gt;
&lt;li&gt;PUT -&amp;gt; update resource&lt;/li&gt;
&lt;li&gt;DELETE -&amp;gt; delete resource&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What is a resource &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The most important abstraction in REST is called resource.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A resource is anything that you would want to expose to the outside world through your application&lt;/li&gt;
&lt;li&gt;A resource can have different representations

&lt;ul&gt;
&lt;li&gt;XML&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A resource has an URI (Uniform Resource Identifier)&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create employee -&amp;gt; POST /Employee
Delete an employee -&amp;gt; DELETE/Employee/1
Get all employees -&amp;gt; GET /Employees
Get Particular employee -&amp;gt; GET /Employee/2
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;The important thing about REST is the fact that &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We have to think in terms of resources&lt;/li&gt;
&lt;li&gt;Make proper use of HTTP methods &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  How does data exchange between applications take place &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In REST we don’t have any restriction on Data exchange format.However,JSON is very popular and widely used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also note that , transport protocol is always HTTP.&lt;br&gt;
REST is built on top of HTTP.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the service definition &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;There is no standard service definition attached with REST.&lt;br&gt;
However the service details can be provided by WADL (Web application definition language) / Swagger&lt;/p&gt;

&lt;p&gt;To Summarise the above&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2FRest.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2FRest.png%3Fraw%3Dtrue" alt="RestSketch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next,we will wrap up the basics by seeing the difference between REST and SOAP&lt;/p&gt;

</description>
      <category>rest</category>
      <category>webservices</category>
      <category>microservices</category>
      <category>learning</category>
    </item>
    <item>
      <title>Let's Learn - Week 1 - SOAP</title>
      <dc:creator>Dinakar</dc:creator>
      <pubDate>Mon, 27 Jul 2020 07:05:44 +0000</pubDate>
      <link>https://dev.to/dinakar/let-s-learn-week-1-soap-3p9h</link>
      <guid>https://dev.to/dinakar/let-s-learn-week-1-soap-3p9h</guid>
      <description>&lt;h1&gt;
  
  
  Introduction to SOAP Web Services
&lt;/h1&gt;

&lt;p&gt;SOAP is an acronym for Simple Object Access Protocol.&lt;br&gt;
SOAP defines specific way of building web services.&lt;br&gt;
We use XML as request and response exchange format. &lt;/p&gt;

&lt;p&gt;Any request that contains XML as request and response is not SOAP.&lt;br&gt;
SOAP defines specific XML request and response structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Fsoap.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2Fcsdinakar%2FSketchNotes%2Fblob%2Fmaster%2Fsoap.png%3Fraw%3Dtrue" alt="SOAP"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to create SOAP envelope that contains header and body.&lt;br&gt;
The header contains meta information like authentication , authorization etc.&lt;br&gt;
SOAP body is where we put real content of request and response.&lt;/p&gt;

&lt;p&gt;The service definition is managed by WSDL – Web Service Description Language&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples of SOAP Request , Response &amp;amp; WSDL
&lt;/h3&gt;

&lt;h4&gt;
  
  
  SOAP Request
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;

&amp;lt;soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding"&amp;gt;
&amp;lt;soap:Header/&amp;gt;
&amp;lt;soap:Body xmlns:m="http://www.example.org/stock"&amp;gt;
  &amp;lt;m:GetStockPrice&amp;gt;
    &amp;lt;m:StockName&amp;gt;IBM&amp;lt;/m:StockName&amp;gt;
  &amp;lt;/m:GetStockPrice&amp;gt;
&amp;lt;/soap:Body&amp;gt;
&amp;lt;/soap:Envelope&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  SOAP Response
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;

&amp;lt;soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding"&amp;gt;

&amp;lt;soap:Body xmlns:m="http://www.example.org/stock"&amp;gt;
  &amp;lt;m:GetStockPriceResponse&amp;gt;
    &amp;lt;m:Price&amp;gt;34.5&amp;lt;/m:Price&amp;gt;
  &amp;lt;/m:GetStockPriceResponse&amp;gt;
&amp;lt;/soap:Body&amp;gt;

&amp;lt;/soap:Envelope&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  WSDL
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;message name="getTermRequest"&amp;gt;
  &amp;lt;part name="term" type="xs:string"/&amp;gt;
&amp;lt;/message&amp;gt;

&amp;lt;message name="getTermResponse"&amp;gt;
  &amp;lt;part name="value" type="xs:string"/&amp;gt;
&amp;lt;/message&amp;gt;

&amp;lt;portType name="glossaryTerms"&amp;gt;
  &amp;lt;operation name="getTerm"&amp;gt;
    &amp;lt;input message="getTermRequest"/&amp;gt;
    &amp;lt;output message="getTermResponse"/&amp;gt;
  &amp;lt;/operation&amp;gt;
&amp;lt;/portType&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have an idea about SOAP based web services , let's move to Restful Web Services&lt;/p&gt;

</description>
      <category>restful</category>
      <category>soap</category>
      <category>learning</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Let's Learn - Week 1 - WebServices</title>
      <dc:creator>Dinakar</dc:creator>
      <pubDate>Sat, 18 Jul 2020 19:50:31 +0000</pubDate>
      <link>https://dev.to/dinakar/learners-corner-spring-boot-with-microservices-kc</link>
      <guid>https://dev.to/dinakar/learners-corner-spring-boot-with-microservices-kc</guid>
      <description>&lt;h1&gt;
  
  
  Introduction:
&lt;/h1&gt;

&lt;p&gt;Spring has really evolved a lot. It has been around for over a decade and has found a place as the &lt;em&gt;de facto&lt;/em&gt; standard framework for developing java applications. &lt;/p&gt;

&lt;p&gt;There are many exciting things in world of spring ecosystem such as Annotation, Spring MVC, REST, spring boot, spring cloud and micro services.&lt;/p&gt;

&lt;p&gt;We are going to deep dive into world of restful web services, spring boot and micro services.&lt;/p&gt;

&lt;p&gt;We will start with basics of restful web services, http request methods, how do you do exception handling, and validation and so on&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction to Web Services:
&lt;/h1&gt;

&lt;h4&gt;
  
  
  What is a web service?
&lt;/h4&gt;

&lt;p&gt;W3C definition : &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Software system designed to support interoperable machine to machine  (application – application )interaction over a network"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e4Mn8yXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/csdinakar/SketchNotes/blob/master/Web%2520service.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e4Mn8yXj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/csdinakar/SketchNotes/blob/master/Web%2520service.png%3Fraw%3Dtrue" alt="webservice"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we know what a web service is, let’s see the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;How does data exchange between applications take place&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consider a quiz application wants to  communicate with security application to know whether an user is authorised to be admin or not&lt;/li&gt;
&lt;li&gt;So quiz application needs to send a request and security application will send a response
&lt;/li&gt;
&lt;li&gt;Data exchange happens in form of request and response&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;How can we make web services platform independent?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 popular formats – XML and JSON
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Learning&amp;gt;
    &amp;lt;Name&amp;gt;SpringBoot&amp;lt;/SpringBoot&amp;gt;
    &amp;lt;Name&amp;gt;MicroService&amp;lt;/SpringBoot&amp;gt;
&amp;lt;/Learning&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
{"Name":"SpringBoot"},
{"Name":"MicroService"}
]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;How does application know the format of Request and Response ?

&lt;ul&gt;
&lt;li&gt;Every web service offers service definition&lt;/li&gt;
&lt;li&gt;It provides whether request-response format is XML , JSON or any other format&lt;/li&gt;
&lt;li&gt;How to call the service , where is the service available &lt;/li&gt;
&lt;li&gt;What is the contract between service and consumer&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To summarise the above&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZTu7Jc5m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/csdinakar/SketchNotes/blob/master/web%2520service_1.png%3Fraw%3Dtrue" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZTu7Jc5m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/csdinakar/SketchNotes/blob/master/web%2520service_1.png%3Fraw%3Dtrue" alt="webservice_structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have seen a quick overview about web services, next let’s see about the different ways of implementing web services&lt;/p&gt;

</description>
      <category>spring</category>
      <category>microservices</category>
      <category>learning</category>
      <category>webservices</category>
    </item>
  </channel>
</rss>
