The N-Tier Architecture

A free video tutorial from Nelson Jamal
Software Engineer
Rating: 4.5 out of 5Instructor rating
13 courses
81,534 students
The N-Tier Architecture

Learn more from the full course

Spring Boot For Software Engineers

Build enterprise restful API's

06:22:25 of on-demand video • Updated July 2019

Build enterprise applications
Write great APIs with Spring MVC
Write great APIs with RestEasy / JaxRS
Use Resteasy Client API
Use Java Bean Validation API to validate properties sent from client to server
Write unit tests and mocking services
Write integration tests
Use Dependency Injection
Serialise and Deserialise java objects as JSON
Use Intellij IDEA like a real software engineer
English [Auto]
In this video, let's go ahead and learn about the entier architecture, often we have clients and these can be an iOS application or an Android app or even a Web app written in react. So the entire architecture is divided into sections where each section is responsible to do only one and only thing. So the clients really they are responsible to actually talk to the restful API layer. Or often people call this as the controller layer. This layer simply takes all the requests from the clients and then it does some processing. Now to consume data from clients, we have to use the HP methods. So perhaps you've used these in the past, but we simply have the most common ones are get post put and delete. We're going to learn all about this in this course. So the restful API layer or the controller layer takes the request from the client and then it delegates that to the service layer. The service layer responsibility is simply to perform some business logic about the request that it has received. Now, when we build applications, we often have to, you know, store the requests from our clients or often we have to store some data about clients. For example, you know, if this was a Facebook application, perhaps we wanted to save comments, pictures and, you know, a bunch of information about a particular user. So if we want to save information, then we have the detail layer or the data access object layer in Java. And this, in fact, is a design pattern. And the detail layer simply interacts with databases and nothing else in the databases that you can interact. It's entirely up to you. So in the audio layer, you can say that you want to connect to your favorite database and this could be Postgres, MySQL, Mongo, DB, and you can even interact with a fake database. And to be honest, this is the entier architecture guys. Finally, just let me give you the flow so the client issues a request. So this could be a get posted or delayed and then that request goes all the way down from the restful API layer to the service layer to the detail and finally to the database. So this is where actually, you know, there's some processing, you know, whether you want to retrieve some comments about a user or a picture about user, you know, that would go in a database and then the database would simply give you back some response. And this response could actually be some data pictures or even it could be to say that your request was successfully acknowledged. For example, if you wanted to send an email, then perhaps you would like to, you know, get a response saying that your email was sent correctly. Then this response flows all the way back from the D.A. back to the service layer and then from the restful API. And then the user finally gets to see the data. And this is the end architecture guys. In this course, we're not going to focus on the client side. So we're not going to be, you know, building a react user interface or an Android application or even a swift application. So we will simply focus on understanding the rest for the service, the D.A. and then the database. And this is pretty much what you would do on an enterprise application now, because we're not going to be using clients in this course. We're going to use our rest for client called Posman. And this guy will allow us to perform these requests as if we were using a mobile phone or a react application. And essentially we can trigger get requests, put requests, post and delete. This is all for this really. Right. If you have any questions about the entire architecture, please let me know and I'll. Be more than happy to give you further explanations. Join me in the next video.