For writing larger apps that you need to keep the buslogic separate, I would:
1. Keep the action beans (controller?) for interacting with the user interface (presentation layer). 2. Use a service layer that takes requests from action beans, and returns what the UI needs, often dao/model objects or recordsets in the form of dao/model arraylists. You can encapsulate your business rules in this service layer, requiring neither presentation (UI) or data (dao/model) layer to know about each other. 3. Use service layer to interact with the data (dao/model) layer, keeping the UI layer From having to know about the presentation layer. I can mock up an example if you'd like.... Tom C. -----Original Message----- From: Dan King [mailto:[email protected]] Sent: Monday, November 09, 2009 2:05 PM To: Stripes Users Subject: [Stripes-users] Where to put the logic? Hi, I'm in the process of learning stripes and to that end I'm putting together a simple module, but I'm stuck on where to put my "business logic." If anyone can point me in the right direction I'd appreciate it. Currently I have: 1. A controller that receives form information 2. A model that only reflects a database table 3. A DAO that using jpa/hibernate performs a simple select query based on the form information received by the controller. Thanks. -Dan ------------------------------------------------------------------------ ------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
