I have a small project ( a shopping cart ) that was coded in PHP normally.
I require someone to get this project using MVC design. PLEASE bind at this project ONLY IF YOU ARE AWARE ABOUT MVC ( PHP/PHTML ).
An example will be provided.
MVC - Successful use of the pattern isolates business logic from the user interface, permitting one to be freely modified without affecting the other. The controller collects user input, the model manipulates application data, and the view presents results to the user.
? **The model:** The model defines the rules for the process an application is intended to represent. You can think of it as the specification responsible for both the applications data and its behaviour. For example if we were to write an application that serves as a conversion calculator, allowing users to convert from miles to kilometres, Fahrenheit to Celsius etc. The model is responsible for defining the formulas used to perform such conversions, and when presented with a value and desired conversion scenario, the model carries out the conversion and returns the result. Note that the model is ***not*** responsible for formatting the data or presenting it to the user. This is handled by the view.
? **The view:** The view is responsible for formatting the data returned by the model and presenting it to the user. It's possible for more than one view to utilise the same model, depending on how the data should be presented.
Let me know if you have questions.