MVC which stands for Model-View-Controller is a pattern I have been intrigued with lately. I first got introduced to the concept when I began experimenting with Ruby on Rails. It enforces a separation of responsibility.
The view should not need to know what the database is. It should focus only on what it needs to display content to the screen. The model contains database specific code to perform the basic CRUD options (Create, Read, Update, and Delete). Lastly the controller contains business logic and bridges the gap between the view and model.
I found that separating code into these 3 layers is not always a straight-forward process, but it does have its long term benefits.
Twitter
Follow me on Twitter to keep up to date!
RSS Feed
Keep up with all of our updates by subscribing to our RSS feed!
FaceBook
Join our group on Facebook and become a fan of us!