Win a copy of Modern frontends with htmx this week in the Spring forum!
  • 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Where goes business logic?

Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where can I put business logic?? in a fa�ade?? in a Business Object?? or in a Business Delegate??

Thanks, in advance!
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A large part of architecture thinking is about separation of concerns. We try to isolate businessy stuff from other stuff. You'll often see discussions start with three layers:

presentation <-> business <-> persistence

It's challenging to keep business rules out of presentation, but well worth while. One classic benefit is that you can plug multiple presentations into the same business. My project has a web presentation for humans and a SOAP presentation for other systems. Keeping business rules in the business layer assures that any client will get the same results.

You can break business stuff down again. You mentioned Facades. They give a simplified interface for presentations to call, but shouldn't do much business unless you're sure you can force all clients through the same facade. There are many other ways to slice up business logic - common objects that are used by multiple applications, application-specific objects, objects responsible for individual business transactions, etc.

Is that a helpful start? Does it raise new questions?
[ September 24, 2004: Message edited by: Stan James ]
    Bookmark Topic Watch Topic
  • New Topic