I am making my own MVC framework (please do not downvote me because everyone wants to make a framework.) and so.. I want to make a bootstrapping class like I have seen in many frameworks. I am making this because I have decided to move to the next level by started learning a framework from the inside. But I am facing few problems getting through them. But I will separate them in different questions. Now to clarify my question:
What features should a Bootstrapping class have? And Can you give me articles that could help me?
There should not be a "bootstrap class". It is a straightforward process, which can be contain in a simple script, which would serve as entry point for your application. PHP is not Java, therefore you are not require to contain everything within a class.
Usually bootstrap stage of application would have following responsibilities:
The bootstrap stage in you application is where all the wiring between objects should be set up. It would also be the place where you set up such things as loggers, access control and error handling structures.
You could say that front controller is a part or bootstrapping.
P.S.: also, you might find this answer of mine relevant, since it also contains an example of bootstrap file.
The last two links cover two of 3 major MVC-inspired patterns (Model2 MVC and MVP), since classical MVC is actually highly impractical (and actually, almost impossible) to be used for web applications.
Bootstrapping is just a piece of code that will by executed for each requests.
You can place a function or an object whenever you like more according to your framework dir structure.
It must not have some particular features
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With