I want to create my very first web app using HTML, MySQL, PHP and the Model View Controller. It will be very simple for starters: a couple of pages that allows users to input/delete data to/from the database and display the contents of the database.
However I am new to MVC, and I really wish I could have found MVC tutorials appropriate for beginners like myself on how to actually implement it using simple code examples. I only found advanced examples which makes the learning curve unnecessarily steeper. I guess I will have to create one here.
My questions are, how do I get started with designing this MVC from scratch for a very very simple web app? How do I separate the Model, the View and the Controller in code? What steps should I take and how? How do I implement the model as business entity classes, the view as HTML, and the controller as scripts that glue everything together? (assuming my understanding of this is correct) Can anyone recommend clear and straight forward tutorials on how to actually implement MVC for beginners like myself? (I could not find any).
Thanks in advance.
There are plenty of frameworks to help you with this. I would recommend using CakePHP, http://www.cakephp.org. It has good documentation, a large community and a lot of tutorials!
When you want to do MVC the first time, you do not start from scratch. CakePHP is a really good recommendation by Dale to start with. When you have done it many times and understand what MVC is about, then you will be able to implement an MVC without a framework.
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