<?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: Devanshu Yadav</title>
    <description>The latest articles on DEV Community by Devanshu Yadav (@blackwatch1910).</description>
    <link>https://dev.to/blackwatch1910</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%2F226202%2Fcfad0334-43e3-457e-9b66-df845b5b792d.jpg</url>
      <title>DEV Community: Devanshu Yadav</title>
      <link>https://dev.to/blackwatch1910</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blackwatch1910"/>
    <language>en</language>
    <item>
      <title>Spring boot hello world</title>
      <dc:creator>Devanshu Yadav</dc:creator>
      <pubDate>Fri, 27 Aug 2021 09:21:45 +0000</pubDate>
      <link>https://dev.to/blackwatch1910/spring-boot-hello-world-22bg</link>
      <guid>https://dev.to/blackwatch1910/spring-boot-hello-world-22bg</guid>
      <description>&lt;p&gt;Hi everyone, today we're writing a hello world project in spring-boot application. I had always loved java as a programming language, and I wanted to expand my skill set in the domain. Recently, we were given a task to write a basic application of CRUD operations in spring boot, but let's keep that for another day. &lt;/p&gt;

&lt;p&gt;Today, we'll learn how to start with this amazing technology framework. Let's begin!&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools you need:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;java version 1.7&lt;/strong&gt; or above: You can check that by writing

&lt;code&gt;java -version&lt;/code&gt;

inside your terminal or command prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eclipse IDE&lt;/strong&gt;: &lt;a href="https://www.eclipse.org/downloads/" rel="noopener noreferrer"&gt;Eclipse download&lt;/a&gt; Go for Java EE version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maven or Gradle&lt;/strong&gt;: For this tutorial, I'll be going with Maven. Check your maven version

&lt;code&gt;mvn -v&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the screenshot for reference:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1c61xbezz202ekz1zwp.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1c61xbezz202ekz1zwp.png" alt="Screenshot of what output of above commands should look like"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to follow:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://start.spring.io" rel="noopener noreferrer"&gt;Spring starter kit&lt;/a&gt;. It is by far the most comprehensive way to get started with a spring application.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgsjb9eqzd74rjzbs5icv.png" alt="start.spring.io landing page"&gt;
&lt;/li&gt;
&lt;li&gt;Fill in group, artifact ID (most probably, your project name) and description (optional). Also, don't forget to check the spring version, although you need not to worry as it is checked to the latest stable one by default.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add dependencies, by clicking the button on right top side. Type in web, then select spring web. Have a look at below screenshots for reference;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0brstirikcil8a6sa8aq.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0brstirikcil8a6sa8aq.png" alt="Add dependencies"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiax4jcuduszueo8mc22a.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiax4jcuduszueo8mc22a.png" alt="Spring web"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on generate, you'll see a .zip getting download with your artifact ID.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7cbp0fh3a3m9xr60uwf.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy7cbp0fh3a3m9xr60uwf.png" alt="Spring project downloaded"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extract the file and open Eclipse.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import the project using below steps:&lt;br&gt;
File -&amp;gt; Import -&amp;gt; Existing Maven Project (you can type in the search box too) -&amp;gt; Next -&amp;gt; Browse -&amp;gt; Select the Project Folder -&amp;gt; Finish&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you should see your project in your project explorer as below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgj6jb28jm9lh214k1js.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgj6jb28jm9lh214k1js.png" alt="Project Structure"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now that we've our main application template ready, we need a controller class that'll control our application, as to what should my application should render or do upon handling a request. Basically, A controller controls the flow of the data. It controls the data flow into model object and updates the view whenever data changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For this to achieve we create a package to associate our controller classes in a single package for easy and practical access. So, go to your project explorer and make a new package inside your &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;src/main/java&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now,give it a name and write your controller class as given below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnts30cjw1ri3wq2dol3.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnts30cjw1ri3wq2dol3.png" alt="Controller class"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now let's add controller functions and annotations to give it a meaning.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffw0hfgbfx656sw51s018.png" alt="Controller class meaning"&gt;
You can see the annotations

&lt;code&gt;RestController&lt;/code&gt;

and

&lt;code&gt;RequestMapping&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RestController specifies that a RESTful web service is being created. RequestMapping maps the URL associated with the application and renders the function as per the requested URL. In this we've specified just the landing page("/")&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the project by clicking run as &amp;gt; java application.
Alternatively, you can choose spring boot suite in eclipse marketplace by which you can start and debug the application easily.
You'll see the hello world screen. Go on and have a look at &lt;strong&gt;localhost:8080&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>maven</category>
      <category>spring</category>
      <category>beginners</category>
    </item>
    <item>
      <title>HacktoberFest 2020 Experience</title>
      <dc:creator>Devanshu Yadav</dc:creator>
      <pubDate>Tue, 03 Nov 2020 07:26:09 +0000</pubDate>
      <link>https://dev.to/blackwatch1910/hacktoberfest-2020-experience-5fo0</link>
      <guid>https://dev.to/blackwatch1910/hacktoberfest-2020-experience-5fo0</guid>
      <description>&lt;p&gt;Contributing to open source seems to be a very hard thing to do especially for beginners. Every year, hacktoberfest is organised to help open source community to learn and grow. It benefits all new comers and professional workers equally. While some might find this as an opportunity to grab a t-shirt and some cool stuffs, but that is not the purpose of hacktoberfest.&lt;/p&gt;

&lt;p&gt;While looking for some really cool projects like industry-level code bases to beginner-friendly projects, I find the latter one a bit easy to begin with. So I started out with some repositories that included SPOJ and Leetcode solutions. I contributed to them with some of my submitted and accepted solutions. &lt;/p&gt;

&lt;p&gt;How did I contribute?&lt;br&gt;
Of course, there's a fancy word "pull request" for contributing to open source repos. Suppose You make local code changes and then submit those changes to a remote project maintainer for review before those changes are implemented, or merged. Now, This is called a pull request; you are requesting that someone reviews and approves your changes before they become final. Once the code review is completed, it is merged in the final code base by the maintainer, after it is merged, your PR is accepted. &lt;/p&gt;

&lt;p&gt;The beautiful thing about open source is, you can contribute to almost anything. Take this challenge not for the t-shirt and goodies, but to learn git and write quality code which would be eventually used in the enterprise world, sounds cool, right? &lt;/p&gt;

&lt;p&gt;See you all next year!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>java</category>
      <category>python</category>
      <category>git</category>
    </item>
    <item>
      <title>Integrating vanilla js code with react</title>
      <dc:creator>Devanshu Yadav</dc:creator>
      <pubDate>Wed, 08 Apr 2020 09:20:32 +0000</pubDate>
      <link>https://dev.to/blackwatch1910/integrating-vanilla-js-code-with-react-fjm</link>
      <guid>https://dev.to/blackwatch1910/integrating-vanilla-js-code-with-react-fjm</guid>
      <description>&lt;p&gt;I'm trying to integrate a js component with my react application. Appended the script src files in index.html still didn't work.&lt;br&gt;
Please help!&lt;/p&gt;

&lt;h1&gt;
  
  
  react #web-dev #project
&lt;/h1&gt;

</description>
    </item>
  </channel>
</rss>
