Thanks Jaime, As I understand it: 1) The user interface (UI) is completely managed in the browser environment. 2) The business logic (BL) is managed in a CakePHP application in the server environment. 3) The storage logic is managed partly by the CakePHP application and a database engine (MySQL). 4) Communication between UI and BL is messages with data only.
The primary issue as I see it: 1) Is the communication (messages) definitions independent of both UI and BL? If this is not the case, then yes, it will be very difficult to add new functionality without having to rewire other parts. Possible solution idea (configurable message based framework): 1) UI: sends only informative messages (I have done this message) with data. 2) BL: processes informative messages in one controller only, using request action to inform other controllers. 3) BL: uses a configurable message handling, so that new message handling can be added when new functionality is implemented. Example (simple): Use case: The UI implements the presentation of a photo album with 10 thumbnails shown per page. The user can open the photo album, turn the pages and choose a thumbnail to see the full photo. Work flow: 1) User opens the photo album. 1.1) UI sends the message "open photo album". 1.2) BL looks up the configuration for "open photo album" 1.2.1) BL invokes request action to PhotoAlbumController for action Open. 1.2.1.1) PhotoAlbumController processes the action and returns the photoalbum data. 1.2.2) BL prepares new message "photo album opened" with the returned photoalbum data. 1.3) BL delivers the message "photo album opened" with the data. 1.4) UI presents the data in the "photo album opened" message. 2) User chooses a thumbnail. 2.1) UI sends the message "photo thumbnail chosen". 2.2) BL looks up the configuration for "photo thumbnail chosen". 2.2.1) BL invokes request action to PhotoController for action Show. 2.2.1.1) PhotoController processes the action and returns the photo data. 2.2.2) BL prepares new message "photo shown" with the returned photo data. 2.3) BL delivers the message "photo shown" with the returned photo data. 2.4) UI presents the photo. Now comes the time that new functionality is requested, when choosing a photo, the photo may have a sound track associated with it, which is to be played when showing the photo. The changes are implemented as: 2) User chooses a thumbnail. 2.1) UI sends the message "photo thumbnail chosen". 2.2) BL looks up the configuration for "photo thumbnail chosen". 2.2.1) BL invokes request action to PhotoController for action Show. 2.2.1.1) PhotoController processes the action and returns the photo data. 2.2.2) BL prepares new message "photo shown" with the returned photo data. 2.2.3) BL invokes request action to SoundController for action PhotoSound. 2.2.3.1) SoundController processes the action and returns the sound data. 2.2.4) BL prepares new message "sound playing" with the returned sound data. 2.3) BL delivers the messages "photo shown" and "sound playing" with the returned data. 2.4) UI presents the photo and plays the sound. Conclusion: The important part of the above, is that the UI and the BL are independent of each other. This is done by having messages that are independent of both UI and BL, but the messages can be understood by both! Well, not easy only using text to present a message based solution :) Hope this helps you on the way, John On Apr 16, 9:09 pm, Jaime <[email protected]> wrote: > A *VERY interesting* reading on the subject: > > http://blog.fedecarg.com/2008/06/28/a-modular-approach-to-web-develop... > > "MVC is about loose-coupling, and Modular Programming takes that > concept to the extreme. A modular application can dynamically load and > unload modules at runtime, completely separate applications in their > own right, which interact with the main application and other modules > to perform some set of tasks." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
