Building a new application, using RESTful architecture, suddenly some things become difficult. Why?
When faced with only CRUD methods on controllers, not only objects must be modeled. The process of creating objects must modeled to fit into CRUD. No longer can a happy programmer delegate the process of creating & relating objects to the controller layer of the application.
For example:
We need a process for someone to sign-up for an account.
In the old school: create a controller action for each step of the sign-up; put the logic in the controller.
In the new school: create a SignUp object with methods to model the process; call the steps as Read (of CRUD) alternate variations from the controller.
Leave a Reply