Answer the question
In order to leave comments, you need to log in
How to transfer a small project (PHP, MySql, CSS, HTML, JS - without third-party libraries) to the Symfony 3 framework?
Good afternoon everyone.
The bottom line:
there is a site written according to the MVC principle (the entire model is in separate php files, templates separately, css separately, js separately and each page has its own controller file). I don't understand how to translate the project correctly into a symphony.
In the controllers of my site, I include models. In the symphony, the models should be placed in the Project / src / AppBundle folder, as I understand it, and connected in the controller? Should css and js be placed in the Project/web folder? And how to prescribe paths to files?
ps: Until the project got too big, I decided to look in the direction of frameworks and chose Symphony. I also want to add bootstrap. Actually the second question - is it worth it to use the framework at all or to write by hand further, adding, perhaps, a bootstrap? I will be glad to any advice. Thank you.
Answer the question
In order to leave comments, you need to log in
In any case, the framework is better, at least in terms of self-education, only by working with its architecture you will learn a lot, and take a word from the symphony, it is good, although the entry threshold is higher than that of pure PHP, plus project support in the future will be much easier, both you and third-party developers if they appear.
As for the questions, I recommend to carefully read the documentation for the symphony several times, it seems to be in Russian too, although it is probably not relevant in everything, and then try to make an elementary test project like a list there and most of the questions will disappear by themselves. But in short, it is preferable to implement controllers thin - only for processing a request, selecting the necessary models, transferring data to services, in which the application logic is collected and forming the final Response object. Write paths to scripts and styles like this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question