Beginners Guide to Symfony 2.7 Routing and Controllers

preview_player
Показать описание

In this video we take a look at how we can use Controllers and Routing inside a Symfony2.7 application to direct traffic around based on what URI the site user is requesting, and then 'control' what that user ultimately can see or do once the page renders.

You may have heard of the MVC / Model View Controller software architectural pattern and found yourself left with more questions than answers.

A Controller is a somewhat confusing term - the first time I heard of it I was left wondering what is being controlled, and why?

A Controller is an apparently relatively straightforward concept. It controls things.

We have discussed in the previous video how Symfony is primarily concerned with handling Requests, and returning Responses.

A controller takes Requests, does something with them, and then returns a Response. That is the job of the controller in a nutshell.

The something it does is specific to your application. If you need to register a new User, that's the something. If you need to delete a record from the database, that's the something.

Remember - a Controller is concerned with taking our Request and generating some sort of Response.

A Controller must always return a Response.
Рекомендации по теме
Комментарии
Автор

Thanks, Very well explained. It was really very easy to understand

luckysharma
Автор

You provided some very helpful explanations. Thanks.

billc
Автор

Thank you very much for the video! The thing for the bootstrap amazed me! I watched your videos previously and had to install MopaBootstrapBundle in order to have the Bootstrap. And it was very time-consuming. But now I see that Symfony 2.7 is great! Could you please proceed with videos and for example build a nice small application to see how the relations between entities work, how the whole picture can be done?

Many thanks for your work! I appreciate it!

KostadinProsenikov
Автор

thanks, this video really helped me..

mohamedsamet
Автор

Thanks, you have explained very easy way.
PhpStrom has to be paid, what is an alternative for it?
Subscribing your channel :)

RaghuKT