Fat models, skinny controllers and the MVC design pattern

It’s a bit tough to give you the “right” answers, since some of them deal with the specifics of the framework (regardless of the ones you are working with). At least in terms of CakePHP: Yes Anything that deals with data or data manipulation should be in a model. In terms of CakePHP what about … Read more

How does differential execution work?

Gee, Brian, I wish I had seen your question sooner. Since it’s pretty much my “invention” (for better or worse), I might be able to help. Inserted: The shortest possible explanation I can make is that if normal execution is like throwing a ball in the air and catching it, then differential execution is like … Read more

MVCS – Model View Controller Service

The service layer can be interpreted a lot of ways, but it’s usually where you have your core business processing logic, and sits below your MVC architecture, but above your data access architecture. For example, you layer of a complete system may look like this: View Layer: Your MVC framework & code of choice Service … Read more

What is the difference between an MVC Model object, a domain object and a DTO

Domain and model objects are essentially the same, and may contain business logic. Depending on implementation, domain and DTO objects may be equivalent if you remove business logic from the model into a service class. Often a key variant of the DTO is the View Model, which is used purely to transfer data between the … Read more

Fat models and skinny controllers sounds like creating God models

It might not be the best idea to look at Rails as a staple of MVC design pattern. Said framework was made with some inherent shortcomings (I kinda elaborated on it in a different post) and the community only just now has begun addressing the fallout. You could look at DataMapper2 development as the first … Read more

Difference between Observer, Pub/Sub, and Data Binding

There are two major differences between Observer/Observable and Publisher/Subscriber patterns: Observer/Observable pattern is mostly implemented in a synchronous way, i.e. the observable calls the appropriate method of all its observers when some event occurs. The Publisher/Subscriber pattern is mostly implemented in an asynchronous way (using message queue). In the Observer/Observable pattern, the observers are aware … Read more

What is a Data Transfer Object (DTO)?

A Data Transfer Object is an object that is used to encapsulate data, and send it from one subsystem of an application to another. DTOs are most commonly used by the Services layer in an N-Tier application to transfer data between itself and the UI layer. The main benefit here is that it reduces the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)