What Is MVC Architecture? » My Blogging

Let’s come to spring MUC architecture so look at here this is the MUC architecture or you can say much design pattern we have a controller view and there is one more component called model, so the controller is basically responsible to process the request and it will you know return model and view to the browser to render the page, okay, so this is you know MVC design pattern we’re going to use spring game you see.


The controller layer basically processes the request and it will get the data from the database by using service and repository layer and that and that modern data basically you know to bind to view and that that generates a web page that web page will be displayed in a browser, so this is the simple spring EMC blue that we are going to implement in this project now before implementing this project in this course.

Let’s take a look into what we are going to build in this course we are going to build a simple student management system application and this is a really simple application guy but you can make this project a little by adding other models like student management model subject management model login and registration module etc in this course I am going to implement only one module that is student management model and we create a base and based on you know student management model you can create other modules okay I am going to create a base for you.

You know to use this base and you can you know extend this project well let’s take a look into what are the features that we are going to implement in this course we are going to implement list students feature and here we list all the students and then add students so let’s go ahead and let’s add a student here the first name remains last name and email id Ramesh it gmail.com and click on submit and there we go, student, is successfully added to the leave students page let me add one more student here let’s say sam SAM last name is Jada Samantha gmail.com and hit submit button.

Now let’s update one of the student let’s say Ramesh and let me update the first name and emailed ADD also the last name and hit submit button and there we go, student, successfully updated and we have a delete button here we can delete the student, ok, so this is a pretty simple student management system application that we are going to build in this course but you can you know to add modules this project so basically we are going to create a base all right great so without further ado let’s head over said.

Let’s start coding, so this is completely a project development course in this course you will learn line by line coding you know building student management system all right great let’s jump into spring tool suite ID, and let’s start building student management system well in order to create a spring boot project go to the file new and then choose spring starter project and look at here this is a spring initializer website which is integrated into spring tool suite ID so instead of going into spring initializer website and creating a project over there and importing manually in spring tools for I’d spring team has integrated spring initializer in spring tool suite itself.

We can go ahead and we can create spring boot projects using spring initializer in spring tool suite ID itself okay so lets one let’s view project name as a student management system and choose project type as Marvin here and packaging as a jar version 16 so java version 16 is the latest as up now you can use java 11 or 8 as per your Java installation on your machine and language java and I give group ID as net dot java guides but you can give any group ID that you want and artifact type is same as the name of the project and description is something like student management system using a springboard and time lib packaging as net.javas.sms, SMS means student management system.

Once you are happy with the details click on next and here we have the spring boot version, so this is a stable line of the latest trees of spring boot which is recommended by the spring team so let’s keep this default spring boot version as it is and now we’re going to choose the dependencies so let’s go ahead and let’s choose spring web dependency so we are going to create a spring James application so let’s choose spring web dependency if you just move so around this dependency you can read the description of this dependency so spring web dependency we used to build a web application as well as bring restful web services using spring MUC and this dependency internally provides APACHE tomcat as a default embedded container we’re going to use spring data GPA to talk with the database.

Let’s pick up spring data JP dependency spring data GPA just abstraction layer on top of JPA and it provides I mean it internally uses hibernate as a GPA provider and we can use spring data JPI to reduce a lot of boilerplate code that is required to develop a dowel layer so I highly suggest you guys to use spring letter GPA and next we are going to use timeslip as I will here so let’s go ahead and let’s pick up timely template engine dependency and we are going to use MySQL database, uh to retrieve and store the data so let’s choose MySQL JDBC driver and we are going to also use spring boot or dev tool dependency, so this dependency is very useful so whenever uh we do some changes in our spring boot application we don’t have to manually restart our spring boot application.

This dependency will take care of you know live reloading and configurations for announced development experience etc so once you pick up all you know required dependencies then click on the finish all right, so Marvin will take a couple of minutes to download all you know dependencies from the internet and we’re going to add a JDK 16 to our springboard project so for that right-click on the project go to the properties and go to the build path and in a library so look at here by default java standard edition 13 is added but we are going to use uh you know JDK 16 you can use java 1 8 or 13 as per the java installer installation on your machine.

I am going to use java 16 which is the latest list of java so click on GRE system library edit and ultra GRE so I choose JDK 16 apply and close okay great now once we create the spring boot project next step is we’re gonna you know to create a standard packaging structure for our spring boot project so right-click on base package new and then choose the package and let’s go ahead and let’s create a controller package here so within a controller package we keep all our spring MSC controllers.

Let’s create one more package and let’s name it as service so we keep all our you know service packages under service classes under service package next create one more package and let’s name it as a repository so we keep all our spring data JP repository under a repository package next create one more package and let’s name it as an entity so we keep all GP entities inside a GPA pack entity package okay great so we’ll create a few more packages as required you know in project development in further steps so let’s keep these packages as of now.

Related Posts

Leave a Reply

Your email address will not be published.