MVC framework

GetGoing: Introduction to Golang Introduction to API development with Go
1 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
This is a free item
$0.00
د.إ0.00
Kz0.00
ARS$0.00
A$0.00
৳0.00
Лв0.00
Bs0.00
B$0.00
P0.00
CA$0.00
CHF 0.00
CLP$0.00
CN¥0.00
COP$0.00
₡0.00
Kč0.00
DKK kr0.00
RD$0.00
DA0.00
E£0.00
ብር0.00
€0.00
FJ$0.00
£0.00
Q0.00
GY$0.00
HK$0.00
L0.00
Ft0.00
₪0.00
₹0.00
ISK kr0.00
¥0.00
KSh0.00
₩0.00
DH0.00
L0.00
ден0.00
MOP$0.00
MX$0.00
RM0.00
N$0.00
₦0.00
C$0.00
NOK kr0.00
रु0.00
NZ$0.00
S/0.00
K0.00
₱0.00
₨0.00
zł0.00
₲0.00
L0.00
QR0.00
SAR0.00
SEK kr0.00
S$0.00
฿0.00
₺0.00
$U0.00
R0.00
ZK0.00
Already have an account? Log In

Transcript

Hi everyone. In the last video, we looked at this diagram where there is an API. And we have defined a web application interface and a mobile application interface. So both of these are called clients. Now how they talk to the API is through rest calls, or API calls. Right.

So in this video, we're going to be talking more about the architecture of the API, and what is inside this white box. So take a look at this diagram. So this is what resides inside an API, there is a model we want a controller. This is called the MVC or the model view controller architecture. There are many different architectures, but we're going to be looking at this architecture for the sake of this tutorial. So the view architecture is where the clients can talk to the API.

So whatever the clients or the web application and the mobile applications See, comes out of the view layer. And the model layer is where all of our database updates happen. So if a user were to create a blog, then how client will Do it, our client would talk to the API is he would notify the API that yes, I want to change something in the blog. And here is the request structure. What the API is going to do is it's going to take the request of the view layer, it's going to pass it down to the controller, and then the controller act as an intermediary between the model and the view. So the controller is going to update the model.

And the model is going to notify the controller that an update has been received. So now the task of the controller is to let the user know that a change has occurred in the database, the state of the model has been changed. So this is how the MVC structure works in, in the perspective of API, in perspective of a web and a mobile API, in our MVC paradigm. Thank you guys and see you in the next video where we are going to be talking about creating a server in golang

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.