leulae Posted April 30, 2010 Share Posted April 30, 2010 I began to learn PHP and now in I can do something, Now I want to move to my development method to MVC (MVC architecture) I want to develop it by myself, I learned through web sites. But I couldn’t grasp the idea well, Please help me to build and understand How can I implement this? (Imaginary problem) When someone not logged he should display the login screen, after authentication he will display the main screen, there are two links to two separate pages. One page displays a form to enter Name, age and sex (Will call it privateInfo page) and the other page displays list of persons entered using page one. (will call viewAll page) I want to identify the classes, for M V C and implement the code using php, guide me to start If you have good simple examples direct me Thanks in advance Leulae Link to comment https://forums.phpfreaks.com/topic/200254-mvc-architecture-from-ground-zero/ Share on other sites More sharing options...
ignace Posted April 30, 2010 Share Posted April 30, 2010 First off MVC is not When someone not logged he should display the login screen, after authentication he will display the main screen, there are two links to two separate pages. One page displays a form to enter Name, age and sex (Will call it privateInfo page) and the other page displays list of persons entered using page one. (will call viewAll page) Nor is it directly related with OOP I want to identify the classes, for M V C and implement the code using php, guide me to start If you have ever used something like /profile.php /register.php In which you used functions to perform the task and then render a template using a template engine. You in fact had an MVC implementation. Creating an effective MVC OOP implementation is not so simple as you might think. You don't just create an abstract class (or interface) for Controller, Model, and View. Like any project should you give this some serious thought as what do you want to build? How is this all connected? Do all entities have a clear SoC (Separation of Concerns) and do all of them have a SR(P) (Single Responsibility Principle). So, let me start by asking: what do you want to build? Link to comment https://forums.phpfreaks.com/topic/200254-mvc-architecture-from-ground-zero/#findComment-1050922 Share on other sites More sharing options...
leulae Posted April 30, 2010 Author Share Posted April 30, 2010 So, let me start by asking: what do you want to build? I want to build (Need Skeleton) 1. My own MVC framework 2. Add login page 3. Data Entry form – (eg: Name, Age, Sex) 4. View Page (List of above 3) 5. Restrict enter or view data without logging I like to implement this in OOP style, Then how to start, thank you all in advance Leulae Link to comment https://forums.phpfreaks.com/topic/200254-mvc-architecture-from-ground-zero/#findComment-1050932 Share on other sites More sharing options...
trq Posted April 30, 2010 Share Posted April 30, 2010 This post of mine from a few years ago might help you understand the basic concept more clearly. Its simple, but could be simpler. Of course, most frameworks are allot more robust. Link to comment https://forums.phpfreaks.com/topic/200254-mvc-architecture-from-ground-zero/#findComment-1050986 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.