Software Development Mantra

Yesterday, an article by Shneiderman on “visualization mantra” provoked me to think about “software development mantra”. For last 3 years, I am involved with the development of Memento – an online bibliography management solution. During this time, I learnt a lot about software development in general and about MVC architecture in particular. To some extend, the credit also goes to CakePHP as it forces MVC architecutre (Model-View-Controller) on your software. CakePHP helped me to gain a deep understanding of MVC architecutre and appreciate it. So here is the essense of what I learnt in last three years – my software development mantra

Software Development mantra

“Thick Models, thin Controller, simple views, lot of elements

— Ritesh Agrawal

Note: I haven’t searched enough to see if anyone else proposed any such mantra. Also I do not claim that this is an original mantra as I have seen few people mentioning “thick models” in CakePHP forum. So I leave upto to figure out to whom you should give credit.


So whenever possible, try to implement data manipulation logic in models. Controller should only act as a connection between view and model, transferring data between the two. Whenever you start feeling that the controller is becoming too big and doing lot of data manipulation and data query, think of how you can push that code onto related model. The benefit of having most of the data manipulation code in model is the ability to use those functions from another controller.


Another principle that in conjunction with the above mantra can help in better software development is DRY (Don’t repeat yourself). If you will follow DRY principle you will end up implementing thick models, thin controllers, simple views, and lot of elements.

About Ritesh Agrawal

I am a applied researcher who enjoys anything related to statistics, large data analysis, data mining, machine learning and data visualization.
This entry was posted in Design Pattern and tagged . Bookmark the permalink.

One Response to Software Development Mantra

  1. varun says:

    Cakephp is a awesome piece of code.

    Even i got a solid understanding of mvc by using it

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s