<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nishanthi Grashia Suresh on Medium]]></title>
        <description><![CDATA[Stories by Nishanthi Grashia Suresh on Medium]]></description>
        <link>https://medium.com/@ngrashia?source=rss-2083563d2d91------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sq7r-Ky9bTysyNmgX5hUdA.jpeg</url>
            <title>Stories by Nishanthi Grashia Suresh on Medium</title>
            <link>https://medium.com/@ngrashia?source=rss-2083563d2d91------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 22:11:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ngrashia/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My First Python Code — Consume a Rest API.]]></title>
            <link>https://ngrashia.medium.com/my-first-python-code-consume-a-rest-api-832382d0f7f0?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/832382d0f7f0</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-services]]></category>
            <category><![CDATA[myfirsttechseries]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Tue, 09 Nov 2021 23:58:39 GMT</pubDate>
            <atom:updated>2021-11-10T00:01:10.001Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python Code — Consume a Rest API.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Km1bEH2pXa0MYEvg.png" /></figure><p><a href="https://www.numpyninja.com/blog/hashtags/MyFirstTechSeries"><em>#MyFirstTechSeries</em></a><em>: My First Tech Series is a series of technical topics. It includes step by step instructions along with screenshots. All the steps beginning with software installation is mentioned in the articles. My vision is to help developers to easily follow the steps and get the tech topic working in his/her system. This working demo will save them a lot of time spent collating information from different tutorial sites and YouTube videos.</em></p><p>In this post, we will be installing python and PyCharm from the scratch. And, we will be creating a project that will consume a public API and parse and print the JSON output. The URL which we will be using for this example is : <a href="https://api.genderize.io/?name=Nisha">https://api.genderize.io/?name=Nisha</a></p><p>There are 2 versions of python and both can be installed in your system. The python 2 series is the older version of python with limited support. The python 3 series is the newer version of python.</p><p>The only difference between 2 series and 3 series is the support and some minor syntax changes here and there.We will be installing and working with python 3.</p><h3>Step 1: Installing Python:</h3><ul><li>Check if your system already has python installed. Goto Command Prompt and type</li></ul><pre>python --version</pre><ul><li>My Mac has 2.7 version of python installed out of the box.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GV9bjCsx6fzleP5a.png" /></figure><ul><li>We will install the latest version using brew. The command in brew is:</li></ul><pre>brew install python@3.10</pre><p>It might take a couple of minutes to install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gMyEkvT833jtR9B3.png" /></figure><p>As I mentioned earlier, system can have both 2.x and 3.x version of python installed. To check if a version is installed, use following command.</p><pre>python2 --version<br>python3 --version<br>python --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oUB9xBxj0VAy11ZP.png" /></figure><p><strong>OPTIONAL:</strong></p><ul><li>The below step is completely optional and for Mac only. But, if you want the default python version to be set to the 3 version, then try the following command for Mac.</li></ul><pre>echo &quot;alias python=/usr/local/bin/python3.10&quot; &gt;&gt; ~/.bashrc<br>source ~/.bashrc</pre><ul><li>Now, when you try running python — version in your terminal, the default version will be changed to <strong>python3.10</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*idYENKuXV4aCm82a.png" /></figure><h3>Step 2: Installing PyCharm (Python’s Text Editor):</h3><ul><li>Navigate to<a href="https://www.jetbrains.com/pycharm/download/"> https://www.jetbrains.com/pycharm/download/</a> and download the community version of pycharm. It is free to download.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3SeN99S7DIibuSB1.png" /></figure><ul><li>Install the PyCharm editor in your system. For Mac, just drag to Applications folder and you are done :)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/0*Qx-pj8K4AZOytWRq.png" /></figure><h3>STEP 3: Open PyCharm</h3><ul><li>When you open the pycharm for the first time, you will get an error message like below. Click “Open”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*n5arG3cAUGBRehHn.png" /></figure><ul><li>Agree to the terms and conditions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kau2y7daemQ3icUU.png" /></figure><ul><li>Once you agree, you will get this landing page of PyCharm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y_36RHhcvEsh4hRw.png" /></figure><p>Click <strong>New Project</strong>. In the New project window that opens, give the project name in your location. I have given as “<strong>myFirstPython</strong>”.</p><p>Base interpretor contains the list of all available python installations in your system. I am choosing python3.</p><p>All python filenames end with “<strong>.py</strong>”. The program execution begins with the <a href="http://main.py/">main.py.</a> I am having the checkbox checked for “Create a <a href="http://main.py/">main.py</a> welcome script”</p><p>Click on <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GWePaYTHexQYMy8U.png" /></figure><ul><li>The project and <a href="http://main.py/">main.py</a> has been successfully created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZbwSNauIie1fKZht.png" /></figure><h3>STEP 4: Code</h3><p>The next step is to write code to consume our API and print the output.</p><p>To read the API, we need to import request from url lib. Also, for parsing the json, we need to import json library.</p><p>Copy and paste this code in your <a href="http://main.py/">main.py</a></p><pre>from urllib import request<br>import json</pre><pre>testName = &quot;Nisha&quot; #This name can be any name</pre><pre>api_url = &quot;https://api.genderize.io/?name=&quot;+testName</pre><pre>reqres = request.urlopen(api_url)<br>if (reqres.getcode()):  #We get a response code of 200 - Success<br>    jsonResponse = json.loads(reqres.read())<br>    print(f&quot;\nJson Response is =   {jsonResponse}&quot;)<br>    gender = jsonResponse[&quot;gender&quot;]<br>    probability = (jsonResponse[&quot;probability&quot;])<br>    print(f&quot;\nWith {probability * 100}% probability, the name {testName} is a {gender}.&quot;)<br>else:<br>    print (f&quot;Invalid status code {reqres.getcode()}&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cppPqxcW72eYgGbF.png" /></figure><p>To Run the code, click the Run Symbol or goto <strong>Run → Run ‘main</strong>’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6X0q8NiBzMbKiwJ2.png" /></figure><p>When you run the code, you get the following output in the console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0IqhuU8jIOvY672J.png" /></figure><p>Congratulations!! We have successfully consumed an API, parsed the JSON object and printed the response. Now you can play around with the code and build further on this. Happy exploring…!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832382d0f7f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Entity Relationship Diagram using Eclipse]]></title>
            <link>https://ngrashia.medium.com/create-entity-relationship-diagram-using-eclipse-b1330cb921d5?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1330cb921d5</guid>
            <category><![CDATA[eclipse]]></category>
            <category><![CDATA[myfirsttechseries]]></category>
            <category><![CDATA[er-diagram]]></category>
            <category><![CDATA[er-diagram-tools]]></category>
            <category><![CDATA[dbeaver]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Wed, 01 Sep 2021 04:41:53 GMT</pubDate>
            <atom:updated>2021-09-01T04:41:53.025Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.numpyninja.com/blog/hashtags/MyFirstTechSeries"><em>#MyFirstTechSeries</em></a><em>: My First Tech Series is a series of technical topics. It includes step by step instructions along with screenshots. All the steps beginning with software installation is mentioned in the articles. My vision is to help developers to easily follow the steps and get the tech topic working in his/her system. This working demo will save them a lot of time spent collating information from different tutorial sites and YouTube videos.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzP7Vsm5-yaYMp-NAoyMVQ.png" /></figure><p>When I tried to create an Entity Relationship Diagram, I was overwhelmed by the number of ER diagram tools available in the market. The good news is, there are so many tools which help us create the ERD easily. The bad news is, most of the tools are either paid and/or do not allow for collaboration. And then I stumbled upon this eclipse plugin to create an ERD. In this article, I am going to guide you with step by step instructions to create your first ERD using eclipse.</p><p><strong>Step 1:</strong> Install the eclipse plugin (DBeaver Community Edition).</p><p><strong>Step 2</strong>: Create a project for the ERD in eclipse.</p><p><strong>Step 3</strong>: Open the DBeaver Perspective.</p><p><strong>Step 4:</strong> Open DB Connection.</p><p><strong>Step 5</strong>: Create the ER diagram.</p><h3>Step 1: Install the eclipse plugin (DBeaver Community Edition)</h3><p>More information about DBeaver can be found here: <a href="https://marketplace.eclipse.org/content/dbeaver">https://marketplace.eclipse.org/content/dbeaver</a></p><ul><li>Navigate to <strong><em>Help -&gt; Eclipse Marketplace</em></strong>. Search for ERD</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wao-L3fSsaUs3iKd.png" /></figure><ul><li>Choose and install <strong>DBeaver Community edition</strong>. The version at the time of installing is <strong>DBeaver 21.2.0</strong>. Hit <strong>Confirm</strong> with the default selection.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D6jdpVefL6WIjbcJ.png" /></figure><ul><li>Hit <strong>finish</strong> after selecting <em>Agree to the terms and conditions</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TJLSDFQw5oBncKOw.png" /></figure><ul><li>Software will start to install.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JxID5VjcYVZ_g5B6.png" /></figure><ul><li>Midway during installation, you will get an exception alert. Hit <strong>Install anyway</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oUko-Gwa350fS73t.png" /></figure><ul><li>Eclipse will ask if you trust the certificates. Hit “<strong>Accept Selected</strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*ZYfLLG0WWc_7-R_g.png" /></figure><ul><li>After installation, eclipse will ask for restart. Hit “<strong>Restart Now</strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*26zFKYxEdW0cn7qU.png" /></figure><h3>Step 2: Create a project for the ERD in eclipse</h3><p>Click <strong>File -&gt; New -&gt; Project -&gt; DBeaver -&gt; Project</strong>. Hit <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iZemO04WY70SptC1.png" /></figure><ul><li>Give Project name as <strong><em>DemoERDiagram</em></strong>. Hit <strong>Finish</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_-rCQ7hJO4ZCxrBk.png" /></figure><h3>Step 3: Open the DBeaver Perspective and create DB connection.</h3><ul><li>Goto <strong>Window -&gt; Open Perspective -&gt; Other</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EqwXbfVDF5CWG2t8.png" /></figure><ul><li>Choose <strong>DBeaver </strong>and click <strong>OK</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/0*QWXrUFQkfOYVDUE7.png" /></figure><ul><li>An eclipse perspective as shown will be opened.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VQ0niGPgw89zChFk.png" /></figure><h3>Step 4: Open DB Connection</h3><ul><li>Goto <strong>Database -&gt; New Database Connection</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*6FVh7E0NqKfoSE8_.png" /></figure><ul><li>Search, find and choose the DB that you want. In our case, we are going to use <strong>PostgreSQL</strong>. Make sure your project “<strong>DemoERDiagram</strong>” is selected in the <strong>Project</strong> Dropdown. Hit Next.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PLH-XQ0rciZ7jogN.png" /></figure><ul><li>A window pops up. Click “<strong>Download</strong>” button. This should happen only during the first time.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2OK13oqE6Y1XJ8RN.png" /></figure><p>Give your Postgres <strong>credentials</strong> and Hit <strong>finish</strong>. In our case, we just had to specify the password as “<em>admin</em>” and didn’t have to change any of the auto-populated values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fyt-xLRu4-pSzBQx.png" /></figure><ul><li>After the DB connection is created successfully, the Database navigator looks like below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*0_-XoKuk-fDnKoAO.png" /></figure><h3>Step 5: Create the ER diagram</h3><ul><li>Goto <strong>File -&gt; New -&gt; Other -&gt; DBeaver -&gt; ER Diagram</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*15jNTpdAyIUkqjFr.png" /></figure><ul><li>Give a name for your ER diagram. I have given it as “<strong>DemoDiagram</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8ajAFxnj_6I4lVx1.png" /></figure><ul><li>An <strong>.erd</strong> file will be created as shown:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*42GWZ9qqiXtz4WtY.png" /></figure><h3>*** MAKE SURE YOU HIT SAVE FREQUENTLY WHEN YOU PERFORM THE FOLLOWING STEPS ***</h3><ul><li>Now Right Click on <strong>Tables</strong> under Public in the Database Navigator. And select “<strong>Create New Table</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/0*pzKVPXYNDozxvtCz.png" /></figure><ul><li>A view opens to configure your new table. Make all the relevant changes. I am creating a “<strong>Customer</strong>” Table and “<strong>Customer_Order</strong>” Table.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pW3JQDSUqvGDjid8.png" /></figure><ul><li>Right click on the table -&gt; <strong>Create New Columns</strong> and keep adding columns and the datatypes. I have added <strong><em>customerid, customername, customeremail. customerphone </em></strong>as columns.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ocq1AFXzzuF18MEG.png" /></figure><p>Under Constraints, Right click -&gt; <strong>Add New Constraint.</strong> Use this to create a <em>Primary Key constraint</em> for the customer id. Any other relevant constraints (for example: Email unique) can be added here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/0*bVGvhhdf2SJ58iV7.png" /></figure><ul><li>Next, I created the <strong>customer_order</strong> table and added the fields. Again, add the primary key constraint for customerid in this table too,</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0LLLqFRaR12B6ymL.png" /></figure><ul><li>Create a <em>foreign key constraint</em> too. Just goto Foreign Keys, Right Click -&gt; <strong>Create New Foreign Key.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DtQ_dMGPUoH7NHN1.png" /></figure><ul><li>Once you click ok, the foreign key constraint will be created as follows:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0zv62Z-Z5eg7K149.png" /></figure><ul><li>We just have one step left. Go back to the <strong>DemoDiagram.erd</strong> and <strong>drag and drop</strong> the two tables we just created. And voila, an ERD is created with all the dependencies :)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5Zx8gl5dnmIIyTm6.png" /></figure><p>That’s it. We have successfully created the ER diagram. :) Its super simple, connected and very easy (Thanks to the drivers :) )</p><p><strong>ADDITIONAL INFORMATION:</strong></p><p>The following is additional information:</p><ol><li>If you check the <strong><em>PGAdmin</em></strong>, you can see that the tables are created there too.</li><li><strong>To share the ER diagram (Editable)</strong> : You can export the project “DemoERDiagram”. Your teammates can import it easily and also work on their system.</li><li><strong>To share the ER diagram (Non Editable)</strong>: You can also export the diagram as a png file. This diagram can be used in your project documents.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1330cb921d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Never Under-estimate the estimation process]]></title>
            <link>https://ngrashia.medium.com/never-under-estimate-the-estimation-process-3e73e2d3ebdd?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e73e2d3ebdd</guid>
            <category><![CDATA[estimation-techniques]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[task-management]]></category>
            <category><![CDATA[estimations]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Fri, 20 Aug 2021 00:01:48 GMT</pubDate>
            <atom:updated>2021-08-20T00:01:48.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQECdEMZoYUNQP0lIedeNA.jpeg" /></figure><p>Estimation is the fine art of guessing when the environment is ambiguous. It is nothing different from shooting an arrow with blindfolded eyes. But, we can use some common sense to shoot as close to the target as possible. Sounds easy, right? But the problem is, common sense is not as common as you think. And so, estimation is never as accurate as anyone would want it to be. The more we avoid under-estimating the estimation process, the better our prediction will be.</p><p>In workplaces, we will have to come up with an estimation of timelines and we will have to remain committed to the timelines. A generous estimate will not be accepted by the management whereas a tight estimate will force developers to work overtime and face burnouts. Hence, a just right estimate is the ream estimate which we all would want. However, this just right estimate won’t come without previous estimation errors and learning from previous mistakes. Over time, our estimation skills improve.</p><p>Below are a few tips which will help you improve your overall accuracy.</p><p><strong>Tip 1: Use your numbers instead of words:</strong></p><p>Stick to your spreadsheet. This sounds too basic. But, oftentimes, people tend to avoid the spreadsheet thinking that it’s over complicating a simple situation. They prefer to talk in the air. But, unless we “do” the math, our estimations keeps moving away from reality. Also, spreadsheets gives a clearer picture of how we came up with a number, and helps us tweak and play around with the numbers.</p><p><strong>Tip 2: Make way for a leeway:</strong></p><p>Oftentimes, there are so many unexpected hurdles which tend to come in a project. From scope creep to integration issues, anything is possible. While we do classify some of these as known risks and plan for mitigation accordingly, there is still a possibility of something unexpected to crop up. Especially, when the team or technology or process is new. Hence, it is always advisable to include a buffer — as a leeway in case something went unpredictably wrong.</p><p><strong>Tip 3: Plan for unplanned vacations:</strong></p><p>Employees are human beings with a life outside of work. When life happens, work cannot happen. A good manager must take this into account. While we know that a task will take X number of hours and a person can work for Y hours per day, we should realize that it does not always translate to delivering in X/Y days. The delivery date will almost always be greater than X/Y days because unplanned time-offs are inevitable.</p><p><strong>Tip 4: Granulate the tasks:</strong></p><p>An activity contains “n” number of tasks. Make this “n” as indivisible as possible. Treat each task as independent. Common sense might suggest, there are n tasks, assume each task will take m hours, and that the activity will be complete in n*m hours. This is a trap. Some tasks may take above m and some below m and the time per task may even average out to m hours. But, when you assign the tasks to individuals, the person getting the ‘above m’ task might not be happy about it. Hence, consider the complexity of individual sub-tasks and estimate accordingly.</p><p><strong>Tip 5: Use efficiency effectively:</strong></p><p>All 5 fingers aren’t the same. Likewise, not all developers are the same. They have different productivity indices. In your spreadsheet, have a quantifiable value for developer efficiency or member productivity and factor it into your project estimation. Keep modifying this factor based on most recent numbers(delivery results).</p><p>Sometimes, we will be under time pressure and will not have reliable data to begin with. In cases where we need an approximate estimate or a guesstimate, the following tips will be helpful.</p><p><strong>Tip 6: Rely on the known devils:</strong></p><p>What can we do when we are asked how far is the moon or how tall is the building? We can use the data which we know as a reliable starting point. For example, in this case, we know how tall we are, and how tall a tree is compared to us, and how tall a building is compared to a tree, and so on.. Identifying just one known or a sure parameter helps us get a better sense of things. By reading things down and beginning with the reliable known devils, we can estimate the unknowns more accurately.</p><p><strong>Tip 7: Expert’s opinion matters:</strong></p><p>In real-life scenarios, when we are tasked with estimating a task, we will be clueless about it. But, there might be the experienced and experts who will have better idea of the task. Listening to them gives a great idea of how long it might take. Based on their inputs, combined with internal knowledge of our team’s abilities, we can come up with a better estimate when the situations are super ambiguous.</p><p><strong>Tip 8: History to the rescue:</strong></p><p>Imagine you are a manager in the middle of a meeting. You are asked to give an estimated timeline and commitment on the spot. What would you do? Of course, you will rely on historical data from your previous experience. A similar activity previously done took X hours, and so this activity might take almost X hours is a great way to come up with ball park numbers for estimates. This is like a realtor gauging the value of a home based on comparable homes in the neighborhood.</p><p>As you can see, the estimation process is not too complicated but when it is overlooked, it is a sure-shot recipe for a failure. Your developer’s well-being, your team’s morale, your unit’s attrition rate etc. are dependent on numbers you come up with. Make it count!</p><p>Originally published on : <a href="https://www.numpyninja.com/post/never-under-estimate-the-estimation-process">https://www.numpyninja.com/post/never-under-estimate-the-estimation-process</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e73e2d3ebdd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Micro-service using Spring Boot]]></title>
            <link>https://ngrashia.medium.com/my-first-micro-service-using-spring-boot-2f57cb1445a1?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f57cb1445a1</guid>
            <category><![CDATA[spring-boot-project]]></category>
            <category><![CDATA[rest-microservice]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[myfirsttechseries]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Tue, 03 Aug 2021 22:10:46 GMT</pubDate>
            <atom:updated>2021-08-04T06:55:59.691Z</atom:updated>
            <content:encoded><![CDATA[<h3>#MyFirstTechSeries — Micro-service using Spring Boot</h3><p>Originally published in : <a href="https://www.numpyninja.com/post/my-first-microservice">https://www.numpyninja.com/post/my-first-microservice</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vEUqa-NFKs16XcHQg8MYKw.png" /></figure><h4>Welcome back to My First Tech Series (<a href="https://www.numpyninja.com/blog/hashtags/MyFirstTechSeries">#MyFirstTechSeries</a>). Today we will see how to create a simple micro service. Our service will perform CRUD operations on customer data such as customer name, city and email address. We will use Postgres SQL as our backend and use swagger for testing.</h4><h3>STEP 1: INSTALLATION OF SPRING PLUG-IN</h3><ul><li>To begin, we need to have <a href="https://marketplace.eclipse.org/category/free-tagging/spring-tool-suite">Spring Tool Suite</a> installed in our IDE. For that, navigate to <em>Help → Eclipse Marketplace</em>. Search for “<strong>Spring Tools</strong>” and hit Go. Choose to install <strong>Spring Tools 4</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ymoSDJzPqOdpDUuu.png" /></figure><ul><li>Hit <strong>Confirm, Accept Terms and Conditions and hit Finish.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XtctEh_sRewen7SB.png" /></figure><ul><li>Please wait till the software is installed. Look out for the progress bar in the bottom right corner of eclipse IDE.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/0*XDW7iBoxGTAkC4rd.png" /></figure><ul><li>After installation, eclipse will ask for restart. Click <strong>Restart Now</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FRsr_5yYXTGjaNUt.png" /></figure><h3>STEP 2: CREATE THE FIRST PROJECT</h3><ul><li>Navigate to <strong>File</strong> → <strong>New</strong> → <strong>Other</strong> → <strong>Spring Starter Project</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b8ga8Tr-RCfO1T7i.png" /></figure><ul><li>Give a name for your micro service. I have chosen <strong>demo-rest-service</strong>. Also give the group and package name. I have given <strong>com.ninja.demo</strong>. A general best practice is to give <strong>com.companyname.projectname. </strong>Also modify the description if necessary</li><li>Hit <strong>Next</strong>..</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q6qVyz-asSrOWLKe.png" /></figure><p>Add necessary dependencies. You can add them directly from here or you can later add in to the pom.xml file. For this project, I am choosing the following:</p><ol><li><strong>Spring Web</strong> —</li><li><strong>Spring Data JDBC</strong> — for having a JDBC Connection for data access.</li><li><strong>Postgres SQL Server</strong> — this is the DB we will be using. You can choose based on your DB.</li><li><strong>Spring Data JPA</strong> — to avoid unnecessary boilerplate code. This helps in significantly reducing our coding efforts.</li><li><strong>Lombok </strong>— generates code using easy annotations. to avoid boilerplate code. Example: It automatically creates getter setter methods for entity object.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oqG_dfSjjNJE_pGN.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EhLC25SY16jP_2fS.png" /></figure><ul><li>Add all the dependencies. Click <strong>Next &gt;</strong> and <strong>Finish</strong>.</li></ul><p>Project is created successfully in eclipse with all our chosen dependencies available in <strong>pom.xml</strong>. This is our created project structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*1GTVQAPKBzhSHXjN.png" /></figure><p>We are done with the project creation. We will move on with the next step.</p><h3>STEP 3: SETTING UP THE POSTGRES SERVER</h3><ul><li>Download the Postgres SQL from here based on your OS and install in your system : <a href="https://www.postgresql.org/download/">https://www.postgresql.org/download/</a> At the time of writing, the version is 13.3. If you use this installation method, ignore the next bullet about brew.</li><li>As applicable, give the following details:</li></ul><p>Username: postgres</p><p>Password : admin</p><p>Port : 5432 (This is default port for postgress, advisable not to change this)</p><ul><li>Alternatively, You can also use brew to install in your system. I used brew. Note: It does take a few minutes to install using brew. If you use brew, then the installation command is</li></ul><pre>brew install postgresql<br>brew install --cask pgadmin4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kRwWDgsayjBfo4q0.png" /></figure><ul><li>Now open pgAdmin 4 in your system. Provide a master password for pgAdmin. I have given the password as “<strong>admin</strong>”. I know it’s not safe, but it is easy to remember.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8aKdfvMxlrVyFO7F.png" /></figure><h3>STEP 4: STARTING THE SPRING BOOT SERVER</h3><p><strong>Set up Application Port:</strong></p><ul><li>Often times, we get exception that “Port is already in use”. To avoid this, it is always a best practice to have a dedicated port for the server. Port Number can be anything. I chose 1234. To set this port number, goto <strong>src/main/resources </strong>→ <strong>application.properties . </strong>In that file, type</li></ul><pre>server.port=1234</pre><ul><li>Then, we have to give Postgres SQL properties. (Username, password, url etc). Also, we have to In the same file, also type create tables in Postgres and keep modifying the table based on our entity object definition.</li></ul><pre>spring.datasource.url=jdbc:postgresql://localhost:5432/postgres<br>spring.datasource.username=postgres<br>spring.datasource.password=admin</pre><pre>spring.jpa.hibernate.ddl-auto=update</pre><ul><li>The final application.properties file is as follows:</li></ul><pre>#Server Properties<br>server.port=1234</pre><pre>#PostGres Properties<br>spring.datasource.url=jdbc:postgresql://localhost:5432/postgres<br>spring.datasource.username=postgres<br>spring.datasource.password=admin</pre><pre>#To create tables in PostGres if not already created<br>spring.jpa.hibernate.ddl-auto=update</pre><ul><li>Save the application.properties file.</li><li>Now let us test if the server is running. Navigate to <strong>src/main/java</strong> → package <strong>com.ninja.demo</strong> → <strong>DemoRestServiceApplication.java</strong>.</li><li><strong>Right click </strong>→ <strong>Run As</strong> → <strong>Spring Boot App</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hS-GfYdAe_JwE7Jr.png" /></figure><ul><li>Console output’s last line should be: “<strong><em>Started DemoRestServiceApplication</em></strong>”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5lK8HhG2S0SFyHQQ.png" /></figure><h3>If you have reached this far, then you have successfully finished your project setups. Give yourself a pat on your back, as you have crossed more than half the sea.</h3><h3>STEP 5: CODING THE APPLICATION- PACKAGE AND CLASS CREATION</h3><ul><li>The best codes often lie in organized packages. So, let us create packages first and then create classes within. Under <strong>com.ninja.demo</strong> package, <strong>Right click</strong> → <strong>New</strong> → <strong>Package. </strong>The packages to be created are:</li></ul><p><strong>com.ninja.demo.controller</strong> ← This is for the controller</p><p><strong>com.ninja.demo.entity</strong> ← This is for entity / object / model layer</p><p><strong>com.ninja.demo.jpa</strong> ← This is for the service repository and database access layer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JGXoiyFJ8IuHVGlk.png" /></figure><ul><li>After creating packages, create java classes under the respective packages. The filenames to be created are:</li></ul><p><strong><em>DemoController.java</em></strong> under <strong>com.ninja.demo.controller</strong></p><p><strong><em>DemoEntity.java</em></strong> under <strong>com.ninja.demo.entity</strong></p><p><strong><em>DemoRepository.java</em></strong> under <strong>com.ninja.demo.jpa</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*laaLh-nMYbiJPmse.png" /></figure><h3>STEP 6: CODING THE APPLICATION- DEPENDENCY CONFIGURATION</h3><p>We must add a few dependencies manually to our <strong>pom.xml</strong>. Remember to Clean and Build the project after any modification to the <strong>pom.xml</strong></p><ol><li>Spring boot starter validation → Necessary for Entity Validations</li></ol><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-validation&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>2. javax.persistence → Necessary for Entity, ID auto generation etc.</p><pre>&lt;!-- <a href="https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api">https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api</a> --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;javax.persistence&lt;/groupId&gt;<br>    &lt;artifactId&gt;javax.persistence-api&lt;/artifactId&gt;<br>    &lt;version&gt;2.2&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>3. Jpa → Necessary for JPA repository</p><pre>&lt;!-- <a href="https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa">https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa</a> --&gt;<br>&lt;<strong>dependency</strong>&gt;<br> &lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;<br> &lt;<strong>artifactId</strong>&gt;spring-boot-starter-data-jpa&lt;/<strong>artifactId</strong>&gt;<br> &lt;<strong>version</strong>&gt;2.5.3&lt;/<strong>version</strong>&gt;<br>&lt;/<strong>dependency</strong>&gt;</pre><p>4. Springfox — Swagger and Swagger UI</p><pre>&lt;<strong>dependency</strong>&gt;<br>   &lt;<strong>groupId</strong>&gt;io.springfox&lt;/<strong>groupId</strong>&gt;<br>   &lt;<strong>artifactId</strong>&gt;springfox-swagger2&lt;/<strong>artifactId</strong>&gt;<br>   &lt;<strong>version</strong>&gt;2.7.0&lt;/<strong>version</strong>&gt;<br>&lt;/<strong>dependency</strong>&gt;<br>&lt;<strong>dependency</strong>&gt;<br>   &lt;<strong>groupId</strong>&gt;io.springfox&lt;/<strong>groupId</strong>&gt;<br>   &lt;<strong>artifactId</strong>&gt;springfox-swagger-ui&lt;/<strong>artifactId</strong>&gt;<br>   &lt;<strong>version</strong>&gt;2.7.0&lt;/<strong>version</strong>&gt;<br>&lt;/<strong>dependency</strong>&gt;</pre><ul><li>After adding all dependencies, our final pom.xml code will be as follows. Make sure to clean the project for any changes in pom.xml to be reflected in the build.</li></ul><pre>&lt;?<strong>xml</strong> version=<em>”1.0&quot;</em> encoding=<em>”UTF-8&quot;</em>?&gt;</pre><pre>&lt;<strong>project</strong> xmlns=<em>”http://maven.apache.org/POM/4.0.0&quot;</em></pre><pre>xmlns:xsi=<em>”http://www.w3.org/2001/XMLSchema-instance&quot;</em></pre><pre>xsi:schemaLocation=<em>”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</em>&gt;</pre><pre>&lt;<strong>modelVersion</strong>&gt;4.0.0&lt;/<strong>modelVersion</strong>&gt;<br>&lt;<strong>parent</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-parent&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;2.5.3&lt;/<strong>version</strong>&gt;</pre><pre>&lt;<strong>relativePath</strong> /&gt; &lt;! — lookup parent from repository →</pre><pre>&lt;/<strong>parent</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;com.ninja&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;demo-rest-service&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;0.0.1-SNAPSHOT&lt;/<strong>version</strong>&gt;</pre><pre>&lt;<strong>name</strong>&gt;demo-rest-service&lt;/<strong>name</strong>&gt;</pre><pre>&lt;<strong>description</strong>&gt;Demo project for Spring Boot — First Microservice&lt;/<strong>description</strong>&gt;</pre><pre>&lt;<strong>properties</strong>&gt;</pre><pre>&lt;<strong>java.version</strong>&gt;11&lt;/<strong>java.version</strong>&gt;</pre><pre>&lt;/<strong>properties</strong>&gt;</pre><pre>&lt;<strong>dependencies</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-data-jdbc&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-web&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.postgresql&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;postgresql&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>scope</strong>&gt;runtime&lt;/<strong>scope</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-test&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>scope</strong>&gt;test&lt;/<strong>scope</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;! — &lt;dependency&gt;</pre><pre>&lt;groupId&gt;org.projectlombok&lt;/groupId&gt;</pre><pre>&lt;artifactId&gt;lombok&lt;/artifactId&gt;</pre><pre>&lt;optional&gt;true&lt;/optional&gt;</pre><pre>&lt;/dependency&gt; →</pre><pre>&lt;! —  https://mvnrepository.com/artifact/org.projectlombok/lombok →</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.projectlombok&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;lombok&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;1.18.20&lt;/<strong>version</strong>&gt;</pre><pre>&lt;<strong>scope</strong>&gt;provided&lt;/<strong>scope</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-validation&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;! —  https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api →</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;javax.persistence&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;javax.persistence-api&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;2.2&lt;/<strong>version</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;! —  https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa →</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-starter-data-jpa&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;2.5.3&lt;/<strong>version</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;io.springfox&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;springfox-swagger2&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;2.7.0&lt;/<strong>version</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>dependency</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;io.springfox&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;springfox-swagger-ui&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;<strong>version</strong>&gt;2.7.0&lt;/<strong>version</strong>&gt;</pre><pre>&lt;/<strong>dependency</strong>&gt;</pre><pre>&lt;/<strong>dependencies</strong>&gt;</pre><pre>&lt;<strong>build</strong>&gt;</pre><pre>&lt;<strong>plugins</strong>&gt;</pre><pre>&lt;<strong>plugin</strong>&gt;</pre><pre>&lt;<strong>groupId</strong>&gt;org.springframework.boot&lt;/<strong>groupId</strong>&gt;</pre><pre>&lt;<strong>artifactId</strong>&gt;spring-boot-maven-plugin&lt;/<strong>artifactId</strong>&gt;</pre><pre>&lt;/<strong>plugin</strong>&gt;</pre><pre>&lt;/<strong>plugins</strong>&gt;</pre><pre>&lt;/<strong>build</strong>&gt;</pre><pre>&lt;/<strong>project</strong>&gt;</pre><h3>STEP 7: CODING THE APPLICATION- CREATE THE MODEL/ENTITY/OBJECT</h3><ul><li>First let us create the model / entity. We create 3 fields — Customer Name, Email and City along with autogenerated Customer ID. All annotations necessary for the Entity (Getter, Setter, Constructors etc.) are also included.</li></ul><pre>package com.ninja.demo.entity;<br>import javax.persistence.Entity;<br>import javax.persistence.GeneratedValue;<br>import javax.persistence.GenerationType;<br>import javax.persistence.Id;<br>import javax.validation.constraints.NotBlank;</pre><pre>import lombok.AllArgsConstructor;<br>import lombok.EqualsAndHashCode;<br>import lombok.Getter;<br>import lombok.NoArgsConstructor;<br>import lombok.Setter;<br>import lombok.ToString;</pre><pre><em>@Entity</em><br><em>@Getter</em><br><em>@Setter</em><br><em>@NoArgsConstructor</em><br><em>@AllArgsConstructor</em><br><em>@ToString</em><br><em>@EqualsAndHashCode</em><br>public class DemoEntity {<br> <br> <em>@Id</em><br> <em>@GeneratedValue</em> (strategy = <em>GenerationType</em>.<strong><em>AUTO</em></strong>)<br> Long customerID;<br> <em>@NotBlank</em> (message = &quot;Customer Name is mandatory&quot;)<br> String customerName;<br> String customerEmail;<br> String customerCity;<br>}</pre><h3>STEP 8: CODING THE APPLICATION- CREATE THE REPOSITORY/SERVICE</h3><ul><li>Next up is the <strong>DemoRepository.java</strong>. If the logic is complicated, we may require an additional file <em>DemoService.java</em>. But since we are having a simple logic, just DemoRepository.java is sufficient. JpaRepository has inbuilt functions. The code is as follows:</li></ul><pre>package com.ninja.demo.jpa;</pre><pre>import org.springframework.data.jpa.repository.JpaRepository;<br>import org.springframework.stereotype.Repository;<br>import com.ninja.demo.entity.DemoEntity;</pre><pre><em>@Repository</em><br>public interface DemoRepository extends JpaRepository&lt;DemoEntity, Long&gt; {<br> <br>}</pre><h3>STEP 9: CODING THE APPLICATION- CREATE THE CONTROLLER AND DEFINE REST ENDPOINTS/METHODS</h3><p>We have to define the service endpoints for different methods(Get, Post, Put, Delete) in the controller DemoController.java. The code is as follows:</p><pre>package com.ninja.demo.controller;</pre><pre>import java.util.List;<br>import java.util.Optional;</pre><pre>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.web.bind.annotation.DeleteMapping;<br>import org.springframework.web.bind.annotation.GetMapping;<br>import org.springframework.web.bind.annotation.PathVariable;<br>import org.springframework.web.bind.annotation.PostMapping;<br>import org.springframework.web.bind.annotation.PutMapping;<br>import org.springframework.web.bind.annotation.RequestBody;<br>import org.springframework.web.bind.annotation.RequestMapping;<br>import org.springframework.web.bind.annotation.RestController;</pre><pre>import com.ninja.demo.jpa.DemoRepository;<br>import com.ninja.demo.entity.DemoEntity;<br></pre><pre><em>@RestController</em><br><em>@RequestMapping</em>(&quot;/&quot;)<br>public class DemoController {<br> <br> // DemoEntity is the Customer Object<br> <br> <em>@Autowired</em><br> DemoRepository demoRepository;<br> <br> // Get All Customers<br> <em>@GetMapping</em>(&quot;/customers&quot;)<br> List&lt;DemoEntity&gt; all(){<br> return demoRepository.findAll(); <br> }<br> <br> // Get Single Customer<br> <em>@GetMapping</em>(&quot;/customers/{id}&quot;)<br> Optional &lt;DemoEntity&gt; findCustomer(<em>@PathVariable</em> Long id){<br> return demoRepository.findById(id);<br> }<br> <br> // Create New Customer<br> <em>@PostMapping</em>(&quot;/customers&quot;)<br> DemoEntity createCustomer (<em>@RequestBody</em> DemoEntity newCustomer) {<br> return demoRepository.save(newCustomer);<br> }<br> <br> // Update Customer Information<br> <em>@PutMapping</em>(&quot;/customers/{id}&quot;)<br> DemoEntity updateCustomer (<em>@RequestBody</em> DemoEntity updatedCustomer, <em>@PathVariable</em> Long id) {<br> return demoRepository.save(updatedCustomer);<br> }<br> <br> // Delete Single Customer<br> <em>@DeleteMapping</em> (&quot;/customers/{id}&quot;)<br> void deleteCustomer(<em>@PathVariable</em> Long id){<br> demoRepository.deleteById(id);<br> }<br> <br>}</pre><h3>STEP 10: CODING THE APPLICATION- TIE IT ALL TOGETHER</h3><ul><li>Finally, the spring application’s main class should know the packages containing the entity, service and controller. Hence, we should add a ComponentScan annotation in the <strong>DemoRestServiceApplication.java</strong>. Also, we must include swagger specification here. The source code is as follows.</li></ul><pre>package com.ninja.demo;<br></pre><pre>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br>import org.springframework.context.annotation.Bean;<br>import org.springframework.context.annotation.ComponentScan;<br></pre><pre>import springfox.documentation.builders.RequestHandlerSelectors;<br>import springfox.documentation.spi.DocumentationType;<br>import springfox.documentation.spring.web.plugins.Docket;<br>import springfox.documentation.swagger2.annotations.EnableSwagger2;<br></pre><pre><em>@SpringBootApplication</em><br>//@ComponentScan({ &quot;com.ninja.demo.controller, com.ninja.demo.entity, com.ninja.demo.jpa&quot; })<br><em>@ComponentScan</em>(basePackages=&quot;com.ninja.demo&quot;)<br><em>@EnableSwagger2</em><br>public class DemoRestServiceApplication {<br></pre><pre> public static void main(String[] args) {<br> SpringApplication.<em>run</em>(DemoRestServiceApplication.class, args);<br> }<br> <br> <em>@Bean</em><br>   public Docket demoApi() {<br>  return new Docket(DocumentationType.<strong><em>SWAGGER_2</em></strong>).select().apis(RequestHandlerSelectors.<em>basePackage</em>(&quot;com.ninja.demo&quot;)).build();<br>   }<br>}</pre><h3>STEP FINAL: TEST THE SERVICES</h3><ul><li>Start the server.</li><li>Test the different methods using a rest client such as postman. We have already included coding for Swagger and hence we can use swagger to test our services.</li><li>The Swagger UI URL is : <a href="http://localhost:1234/swagger-ui.html">http://localhost:1234/swagger-ui.html</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tGBmD8Tr5LBnNX7V.png" /></figure><ul><li><strong>Create / POST JSON sample body for single entry is:</strong></li></ul><pre>{<br>    &quot;customerName&quot;: &quot;Jane Doe&quot;,<br>    &quot;customerEmail&quot;: &quot;janeDoe@ninja.com&quot;,<br>    &quot;customerCity&quot;: &quot;Seattle&quot;<br>}</pre><ul><li><strong>Create / POST JSON sample body for multiple entries is:</strong></li></ul><pre>[<br> {<br>	 {<br> 		&quot;customerName&quot;: &quot;Ron Weasley&quot;,<br> 		&quot;customerEmail&quot;: &quot;Ron@hp.com&quot;,<br> 		&quot;customerCity&quot;: &quot;London&quot;<br> 	 },<br>	 {<br>		 &quot;customerName&quot;: &quot;Harry Potter&quot;,<br>		 &quot;customerEmail&quot;: &quot;Harry@hp.com&quot;,<br> 		&quot;customerCity&quot;: &quot;Dallas&quot;<br> 	},<br>	 {<br>		 &quot;customerName&quot;: &quot;Hermione Granger&quot;,<br> 		&quot;customerEmail&quot;: &quot;EmmaWatson@hollywood.com&quot;,<br> 		&quot;customerCity&quot;: &quot;New York&quot;<br>	 }<br>]</pre><ul><li>When we look at the <strong>Postgres DB</strong>, a table named demo_entity has been created automatically and our data has been successfully.</li><li>Note that all our table names and field names are automatically snake_cased.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gbW_kwUeIEvEaQe2.png" /></figure><p>Thats it…. You have reached the end of the tutorial..</p><h3>Congratulations on this great achievement..</h3><p>And I hope this saved you a lot of time.. See you soon in the next post..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f57cb1445a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[#MyFirstTechSeries — Cucumber Test]]></title>
            <link>https://ngrashia.medium.com/myfirsttechseries-16d1ea36738a?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/16d1ea36738a</guid>
            <category><![CDATA[myfirsttechseries]]></category>
            <category><![CDATA[behavior-driven-dev]]></category>
            <category><![CDATA[cucumber-tutorial]]></category>
            <category><![CDATA[bdd]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 06:04:35 GMT</pubDate>
            <atom:updated>2021-08-04T06:54:57.514Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>#MyFirstTechSeries — Cucumber Test</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAhWh2hYK-Eyvg2K5Bl9Aw.png" /></figure><p>My First Cucumber test. Read article from <a href="https://www.numpyninja.com/post/my-first-cucumber-test">https://www.numpyninja.com/post/my-first-cucumber-test</a></p><h3>My First Cucumber Test</h3><p>Cucumber is a testing tool that supports Behavior Driven Development (BDD). The main advantage is, it is written in plain simple English which clients and business users with limited technical knowledge can easily understand.</p><p>Let us see, how to create a simple cucumber test in java where we check if google search is working as expected.</p><p>Before we begin, the following should be installed in your system.</p><ol><li>Java</li><li>Eclipse IDE</li><li>Maven</li></ol><p>After installing, lets proceed with the following steps to create our first test.</p><ul><li>In eclipse, navigate to Help → Marketplace. In the search, type in “<strong>Cucumber</strong>” and hit “Go”</li><li>Choose the Cucumber Eclipse Plugin 1.0.0.202106240526 and click “Install”. Agree to the terms and conditions.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vZwfwxOvcpi1mWr0.png" /></figure><ul><li>You may get security warning. Click on “Install Anyway”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ppy_4UrUmcxJx-eS.png" /></figure><ul><li>You will be prompted to restart eclipse after installation. Restart eclipse.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5LoURPO7nuDJTJpF.png" /></figure><ul><li>Now, goto “File” menu → “New” → “Other” → “Maven Project”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZMtQYI9km5U6r4Ji.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vsJfvgPrRuE2OBfB.png" /></figure><ul><li>In the POM.xml include the dependencies. At the time of writing, these are the versions of Dependencies added from <a href="https://mvnrepository.com/">https://mvnrepository.com</a></li><li>io.cucumber cucumber-java Version 6.10.4</li><li>junit junit Version 4.13.2</li><li>test io.cucumber cucumber-junit Version 6.10.4</li><li>test org.seleniumhq.selenium selenium-java Version3.141.59</li></ul><p>Code to be included in POM.xml is as follows</p><blockquote>&lt;<strong>project</strong> xmlns=<em>”http://maven.apache.org/POM/4.0.0&quot;</em> xmlns:xsi=<em>”http://www.w3.org/2001/XMLSchema-instance&quot;</em> xsi:schemaLocation=<em>”http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</em>&gt;</blockquote><blockquote>&lt;<strong>modelVersion</strong>&gt;4.0.0&lt;/<strong>modelVersion</strong>&gt;&lt;<strong>groupId</strong>&gt;CucumberDemo&lt;/<strong>groupId</strong>&gt;&lt;<strong>artifactId</strong>&gt;CucumberDemo&lt;/<strong>artifactId</strong>&gt;</blockquote><blockquote>&lt;<strong>version</strong>&gt;0.0.1-SNAPSHOT&lt;/<strong>version</strong>&gt;</blockquote><blockquote>&lt;<strong>name</strong>&gt;CucumberDemo&lt;/<strong>name</strong>&gt;</blockquote><blockquote>&lt;<strong>description</strong>&gt;CucumberDemo&lt;/<strong>description</strong>&gt;</blockquote><blockquote>&lt;<strong>dependencies</strong>&gt;</blockquote><blockquote>&lt;! — <a href="https://mvnrepository.com/artifact/io.cucumber/cucumber-java">https://mvnrepository.com/artifact/io.cucumber/cucumber-java</a> →</blockquote><blockquote>&lt;<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;<strong>groupId</strong>&gt;io.cucumber&lt;/<strong>groupId</strong>&gt;</blockquote><blockquote>&lt;<strong>artifactId</strong>&gt;cucumber-java&lt;/<strong>artifactId</strong>&gt;</blockquote><blockquote>&lt;<strong>version</strong>&gt;6.10.4&lt;/<strong>version</strong>&gt;</blockquote><blockquote>&lt;/<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;! — <a href="https://mvnrepository.com/artifact/junit/junit">https://mvnrepository.com/artifact/junit/junit</a> →</blockquote><blockquote>&lt;<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;<strong>groupId</strong>&gt;junit&lt;/<strong>groupId</strong>&gt;</blockquote><blockquote>&lt;<strong>artifactId</strong>&gt;junit&lt;/<strong>artifactId</strong>&gt;</blockquote><blockquote>&lt;<strong>version</strong>&gt;4.13.2&lt;/<strong>version</strong>&gt;</blockquote><blockquote>&lt;<strong>scope</strong>&gt;test&lt;/<strong>scope</strong>&gt;</blockquote><blockquote>&lt;/<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;! — <a href="https://mvnrepository.com/artifact/io.cucumber/cucumber-junit">https://mvnrepository.com/artifact/io.cucumber/cucumber-junit</a> →</blockquote><blockquote>&lt;<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;<strong>groupId</strong>&gt;io.cucumber&lt;/<strong>groupId</strong>&gt;</blockquote><blockquote>&lt;<strong>artifactId</strong>&gt;cucumber-junit&lt;/<strong>artifactId</strong>&gt;</blockquote><blockquote>&lt;<strong>version</strong>&gt;6.10.4&lt;/<strong>version</strong>&gt;</blockquote><blockquote>&lt;<strong>scope</strong>&gt;test&lt;/<strong>scope</strong>&gt;</blockquote><blockquote>&lt;/<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;! — <a href="https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java">https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java</a> →</blockquote><blockquote>&lt;<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;<strong>groupId</strong>&gt;org.seleniumhq.selenium&lt;/<strong>groupId</strong>&gt;</blockquote><blockquote>&lt;<strong>artifactId</strong>&gt;selenium-java&lt;/<strong>artifactId</strong>&gt;</blockquote><blockquote>&lt;<strong>version</strong>&gt;3.141.59&lt;/<strong>version</strong>&gt;</blockquote><blockquote>&lt;/<strong>dependency</strong>&gt;</blockquote><blockquote>&lt;/<strong>dependencies</strong>&gt;</blockquote><blockquote>&lt;/<strong>project</strong>&gt;</blockquote><ul><li>Now Clean and Build the Project for the dependencies to be reflected in the project.</li><li>It’s time to get more organized and create some folders and packages.</li><li>Under src/test/resources, Right click → “New” → “Folder” → Give folder name as “<strong><em>Features</em></strong>”</li><li>Under the Features folder, Right click → “New” → “File” → Give name as “<strong><em>GoogleHomeTest.feature</em></strong>”. (Note: File extension should be .<strong><em>feature</em></strong>). A file with some auto-generated contents will be created. Clear all the auto-generated contents.</li><li>Under src/test/java, Right click → “New” → “Package” → Give name as “<strong><em>stepDefinition</em></strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pqh6lpOYnjzrgbdC.png" /></figure><ul><li>Under src/test/java/stepDefinition, Right click → “New” → “Class” → Give filename as “<strong>GoogleSearch</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RqGCI3habQOt5QjC.png" /></figure><ul><li>Organizing done, let’s get back. Goto the feature file that we created. After clearing all the auto generated content in the file, enter the following code.</li></ul><pre>Feature: feature to test google search</pre><pre>Scenario: Validate google search is working</pre><pre>Given browser is open</pre><pre>And User is on google search page</pre><pre>When User enters a text in a search box</pre><pre>And hits Enter</pre><pre>Then User is navigated to search feature</pre><p>Note: To format it, just Right Click → “Pretty Format” and the system will automatically format the file for you :)</p><ul><li>Now, select <strong><em>GoogleHomeTest.Feature</em></strong> → “Run As” → “<strong><em>Cucumber Feature</em></strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/0*wnj_eqnA6UnV-KHP.png" /></figure><ul><li>When you see the console, it will be something like below. Note that it says “You can implement missing steps with the snippets below”. Copy the code below it and paste it in “GoogleSearch.java”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kRiLddfzpYIEWByI.png" /></figure><ul><li>After pasting in “GoogleSearch.java”, clear all the exceptions by importing the relevant classes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KR_d-ZspubzfHw9z.png" /></figure><ul><li>Note that the “<strong>And</strong>” condition in our feature file was not reflected. Instead, “Given” and “When” comes twice. Change the second occurrences to “And” annotation. Also, clear all the exceptions. Your Java file will look like below.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*B_ITLYfFrNn4_WJo.png" /></figure><ul><li>Now, create all the implementations. Mention what has to be done at each step under the relevant method.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SxCIvmvJfTbDLgHo.png" /></figure><ul><li>This will be the final source code of <strong>GoogleSearch.java</strong></li></ul><pre>package stepDefinition;</pre><pre>import org.openqa.selenium.By;<br>import org.openqa.selenium.Keys;<br>import org.openqa.selenium.WebDriver;<br>import org.openqa.selenium.chrome.ChromeDriver;</pre><pre>import io.cucumber.java.en.And;<br>import io.cucumber.java.en.Given;<br>import io.cucumber.java.en.Then;<br>import io.cucumber.java.en.When;<br></pre><pre>public class GoogleSearch {</pre><pre> WebDriver driver = null;<br> <br> <em>@Given</em>(&quot;browser is open&quot;)<br> public void browser_is_open() {<br> // Initiate the Chrome-driver and open the browser.<br>  System.<em>setProperty</em>(&quot;webdriver.chrome.driver&quot;, &quot;/Users/macuser/Selenium/Drivers/chromedriver&quot;);<br>  driver = new ChromeDriver();<br>  driver.manage().window().maximize(); <br> }<br></pre><pre> <em>@And</em>(&quot;User is on google search page&quot;)<br> public void user_is_on_google_search_page() {<br>  // Navigate to google.com<br>  driver.navigate().to(&quot;https://google.com&quot;);<br> }<br></pre><pre> <em>@When</em>(&quot;User enters a text in a search box&quot;)<br> public void user_enters_a_text_in_a_search_box() {<br>  // In the google search box, enter any text - Say &quot;Cucumber Test&quot;<br>  driver.findElement(By.<em>name</em>(&quot;q&quot;)).sendKeys(&quot;Cucumber Test&quot;);<br> }<br></pre><pre> <em>@And</em>(&quot;hits Enter&quot;)<br> public void hits_enter() {<br> // Simulate the clicking of enter key<br> driver.findElement(By.<em>name</em>(&quot;q&quot;)).sendKeys(<em>Keys</em>.<strong><em>ENTER</em></strong>);<br> }<br></pre><pre> <em>@Then</em>(&quot;User is navigated to search feature&quot;)<br> public void user_is_navigated_to_search_feature() {<br> // The test case should pass if the resulting page <br> // contains an expected text - Say &quot;&quot;What is Cucumber Test&quot;<br> driver.getPageSource().contains(&quot;Test automation Software&quot;); <br> <br> // Finally, closing driver after test is complete<br>   driver.close(); <br> <br> }<br>}</pre><p>Now, goto GoogleHomeTest.feature and Right Click → “Run As” → Cucumber Feature. This will be the console output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8hSt3B0V6GM539UD.png" /></figure><p>Notice that our scenarios and steps have passed.</p><h3>CONGRATULATIONS…!!!! You have successfully created the first Cucumber test :)</h3><ul><li>Now, to Run the cucumber test as a JUnit, you need a Runner. For this, under src/test/java/stepDefinition, Create new class named “MyRunner.java”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y0EaBHE0zfwxp87-.png" /></figure><ul><li>The source code for <strong><em>MyRunner.java</em></strong> is as follows:</li></ul><pre>package stepDefinition;<br>import org.junit.runner.RunWith;<br>import io.cucumber.junit.Cucumber;<br>import io.cucumber.junit.CucumberOptions;</pre><pre><em>@RunWith</em>(Cucumber.class) <br>//Cucumber options:<br> // Path of our Feature file(s)<br> // Glue contains the package(s) where we have implemented our step definitions <br><em>@CucumberOptions</em> (features=&quot;src/test/resources/Features&quot;, glue={&quot;stepDefinition&quot;}) </pre><pre>public class MyRunner {</pre><pre>}</pre><ul><li>Within the MyRunner.java, Right Click → “Run As” → “<em>JUnit Test”</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/0*TevSpmVNxDisuttX.png" /></figure><ul><li>After execution, you will get an output as follows.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/0*omQw2E-XfEifXwch.png" /></figure><p>Its time to pat yourself on your back… Yessssss! You have successfully implemented and executed your first cucumber test.. One down, many more to go…….!</p><p><a href="https://www.numpyninja.com/post/my-first-cucumber-test">My First Cucumber Test</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16d1ea36738a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Save Time with compiled SOAP WSDL URL lists.!]]></title>
            <link>https://ngrashia.medium.com/save-time-with-compiled-soap-wsdl-url-lists-669c5d369b60?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/669c5d369b60</guid>
            <category><![CDATA[wsdl]]></category>
            <category><![CDATA[soapui]]></category>
            <category><![CDATA[lists]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Mon, 07 Jun 2021 20:07:17 GMT</pubDate>
            <atom:updated>2021-06-07T20:07:17.529Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.numpyninja.com/post/save-time-compiled-list-of-free-wsdl-urls">Save Time..! Compiled list of free WSDL URLs.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=669c5d369b60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compiled list of free and working WSDL URLs.]]></title>
            <link>https://ngrashia.medium.com/compiled-list-of-free-and-working-wsdl-urls-a7a54be6b91?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7a54be6b91</guid>
            <category><![CDATA[free-samples]]></category>
            <category><![CDATA[wsdl]]></category>
            <category><![CDATA[working-wsdl-url]]></category>
            <category><![CDATA[wsdl-url]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Mon, 07 Jun 2021 20:02:55 GMT</pubDate>
            <atom:updated>2021-06-07T20:21:10.331Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*9yGp2QkTMht7R8BF5b6a7g.png" /><figcaption>WSDL Files</figcaption></figure><p>A big challenge in learning more about SOAPUI testing is first finding a good publicly available WSDL file for testing. When I wanted to learn SOAP UI testing, I had to spend more than an hour trying to find a couple of WSDL files. Most of the links provided were either not working or not supported. Hence, I decided to compile my own list of working WSDL files. I hope it will benefit other curious SOAP UI Learners like me.</p><pre>URL 1:</pre><pre><a href="http://www.dneonline.com/calculator.asmx?WSDL">http://www.dneonline.com/calculator.asmx?WSDL</a></pre><p>This is a very simple WSDL file which has 4 operations — Add, subtract, multiply and divide. This is recommended for beginners since everything is straightforward.</p><pre>URL 2: <a href="http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL"><br>http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL</a></pre><p>This WSDL file offers a nice big learning playground. Few of its several services include fetching the country’s capital, currency, flag (as jpeg image), phone code etc.</p><pre>URL 3:<a href="https://www.w3schools.com/xml/tempconvert.asmx?WSDL"><br>https://www.w3schools.com/xml/tempconvert.asmx?WSDL</a></pre><p>This super simple WSDL file provides just 2 services — to convert a temperature from Celsius to Fahrenheit and vice versa. This is recommended when you would like to expand and get an in-depth view of all the structures in the soap project explorer. It will be less confusing given that there are only 2 services.</p><pre>URL 4:<a href="https://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL"><br>https://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL</a></pre><p>This is another simple WSDL file which provides 2 services. A numeric which you input will be converted into its number name and dollar amount in words.</p><pre>URL 5:<br>http://www.learnwebservices.com/services/hello?WSDL</pre><p>This is the “Hello World” WSDL of SOAP UI. Basically, it has just one service where you input your name and be greeted with a hello. :)</p><p><em>Originally published at </em><a href="https://www.numpyninja.com/post/save-time-compiled-list-of-free-wsdl-urls"><em>https://www.numpyninja.com</em></a><em> on June 7, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7a54be6b91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rest API for dummies explained using mommies]]></title>
            <link>https://ngrashia.medium.com/rest-api-for-dummies-explained-using-mommies-f923382a5f02?source=rss-2083563d2d91------2</link>
            <guid isPermaLink="false">https://medium.com/p/f923382a5f02</guid>
            <category><![CDATA[first-post]]></category>
            <category><![CDATA[rest]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Nishanthi Grashia Suresh]]></dc:creator>
            <pubDate>Fri, 04 Jun 2021 04:27:45 GMT</pubDate>
            <atom:updated>2021-06-04T04:27:45.999Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>REST API </strong>is an application programming interface which can be used by multiple clients to communicate with a server. Rest API is a kind of web-service which stores and retrieves necessary data. It provides great flexibility to developers since it does not need any dependent code libraries to access the web-services. Amongst the many protocols supported by REST, the most common one is <strong>HTTP</strong>. When a request is sent from the client using a <em>HTTPRequest</em>, a corresponding response is sent from the server using <em>HTTPResponse</em>. The most widely used machine readable format supported for requests and responses are <strong>JSON</strong> (Javascript Object Notification) and <strong>XML</strong> (Extensible Markup Language)</p><p>REST APIs can be used to perform different actions. Based on the actions, the relevant method should be used. The following are the 5 methods supported by REST.</p><ol><li><strong>GET</strong> — This method is used to <em>retrieve</em> a data from database / server.</li><li><strong>POST</strong> — This method is used to <em>create</em> a new record.</li><li><strong>PUT</strong> — This method is used to <em>modify / replace</em> the record. It replaces the entire record.</li><li><strong>PATCH</strong> — This method is used to <em>modify / update</em> the record. It replaces parts of the record.</li><li><strong>DELETE</strong> — This method is used to <em>delete</em> the record.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*iDq9WkZDedlMW_1bCtZo_w.png" /></figure><p>Let us see this with an example. We know that mothers never get enough rest. But lets take these rest-less mommies as an example and see how they use Rest API. :)</p><p>Amongst the plethora of demands by a newborn, diapering cements its place in the leaderboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*86LeMlTBypp3Q8lSpBYXKA.jpeg" /><figcaption>Image Source: Pinterest</figcaption></figure><p>A mother wants everything best for the baby. So, its obvious that the mother would want to choose the best diaper for her baby. So, she goes to a shopping website(assume: amazon) and searches for diapers. This will send a HTTP Request to amazon’s server to <strong>GET</strong> the list of all diapers. Amazon’s server responds with a HTTP Response which will be a JSON object(assume) containing a list of diapers with some basic details. Amazon’s website reads this Response and converts to human readable format and displays it on the webpage for the customer aka. mother to see it.</p><p>After performing several GETs, ie, browsing through several diapers, she chooses a particular diaper for her newborn baby and adds it to her list. This creates a <strong>POST</strong> request where a new record is created in amazon’s database containing the diaper brand, size, quantity, price etc.</p><p>Her baby keeps growing and soon outgrows the newborn size. Suppose, the mother still likes the diaper and just wants to size up, all she has to do is just choose the new diaper size. When she updates the diaper size from size newborn to size 1, this triggers a <strong>PATCH</strong> method where everything else remains same and only the size of the diaper is changed.</p><p>It is very common for the mother to not be delighted with the current brand and decide to switch to an alternate the brand. Here, the mother will initiate a <strong>PUT</strong> request where the entire data containing previously chosen brand is modified and replaced with data corresponding to the newly chosen brand.</p><p>Finally, after a series of experiments involving several GETs, POSTs, PUTs and PATCHs, it’s time for the mother to potty train the child. If she succeeds in training the child(Hurray!!) , then the diapers will no longer be required. This triggers a <strong>DELETE</strong> request.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f923382a5f02" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>