Monday, August 4, 2008

OOP 101 - Models & Data Transfer Objects

Great article on creating Models and DTO's ( Data Transfer Objects ), also known as Value Objects. nwebb, explains how to separate your interface from your logic, by creating a bindable Model that is constantly updating the view. He also goes through an explaination of why it is good practice to follow this type of methodology. Good read, and it explains object oriented programming on a very basic level.

Consider Models to be your API. It is your global reference for all your logic. Your DTO's are just references to objects. Noticelby useful when your doing some type data transfering with the database. Your view is mainly the UI elements (eg. TextField).

No comments: