• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

design consideration

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

We have a java app which follows the typical layered approach (controller - business - data access - OR Mapping).
My question is about how to go about the business layer in order to achieve maximum modularity.
The business logic has to cater to different types of business scenario (say bizType1, bizType2 and bizType3) and each request to the app will be one of them. Each bizType will have a custom java object input type so we have inp1, inp2 and inp3 respectively. All the input types inp1,inp2 and inp3 inherit from a common base class (inp).
We have some business logic common to all biz types as well as custom business logic to these types so we want to modularise the common behavior. Should we create a base class for the same or we should not be having a base class approach in the business layer.
Should we have separate business logic classes representing each biztype or we should be handling it within one class.

Let me know your viewpoints.

Uday

 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry, but I have the feeling that this question is impossible to answer reasonably at this level of scope. Depending on the complexity of your business logic, I would expect a system to use much more than just one class to represent a unit of business behavior, and to likely use a combination of inheritance and composition to achieve a good level of design quality.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic