I would like to write my own (toy?) web framework as a learning experience. I want to go through the whole process from scratch. I'd like it to be served through Apache on Linux. I'm looking for the best route to understanding every step of what is happening when using a web framework. I'd like to use whatever language best facilitates this process. What is the best way for me to go about this? By "best" I mean "results in the deepest understanding of everything that happens in a modern web framework".
A web framework is a software library that enables developers to write software that runs on the web. Common areas where developers use web frameworks are: Backend: The software that runs on servers and serves web sites, web apps, and also APIs for the exchange of data.
The best web framework for PHP development should have a Model – View – Controller pattern. The Model presents the data structure through an interface, the View visually represents the content on templates of web pages and output data, and the Controller controls user requests, database communication, and HTML view.
A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web.
I am going to give a slightly tongue in cheek answer:
If I would start on this endeavour I would start with writing 3-5 web applications w/o framework support. Figure out what is always the same and factor that out. Refactor the applications to make use of it.
Then write some more web apps using your framework. Observe what you do over and over again. Factor that out and add it to your framework. Refactor the apps to see that your framework support works.
Repeat this and keep adding features till the framework becomes so large, complicated and unwieldy you just want to start over again. Then start over.
Now seriously, you are not going to learn how web frameworks work by writing a framework from scratch. You can only design frameworks when you have a pretty deep knowledge of the problem domain.
If you want to learn about what makes frameworks tick, do a couple of real projects in different frameworks/languages. See what works, feel what does not. Learn the design tradeoffs the framework developers have made. Try rails, jsf, seaside, lift, compojure, wicket, ... whatever.
Have fun and gain experience.
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