Sjoerd Maessen blog

PHP and webdevelopment

Archive for August, 2010

Separating your controller from your view

without comments

What is a controller?
A controller can best be described as the set of instructions and algorithms that are responsible for making your application actually doing something. Often based on user input. You could say your controller is your business logic.

What is a view?
The view is the presentation of your application, the part that our user sees. The view won’t do any processing (like math, checking data,…) it will just show data.

Why don’t you separate your logic and view?
I don’t know how or I don’t use a framework. Those are both often heard excuses when I ask someone why he doesn’t separate the logic and view of his application. Even when you Read the rest of this entry »

Written by Sjoerd Maessen

August 9th, 2010 at 12:08 pm