• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Pattern - without Presentation layer

 
inr mohan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am aware of the MVC design pattern, but in my project we have a module in which the processing is done in the background and no UI (i.e presentation) is involved,

In that case which design pattern will suit my needs,

Please help.


Thanks in Advance.
[ July 30, 2007: Message edited by: inr mohan ]
 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, MVC is not a design pattern. It's more an architecture based on the Observer pattern. For example, in Swing, the GUI get updated automatically when its model changed. The GUI is an observer of its model.

If you want other modules are notified when your bacground processing module changed, make them as obervers of it. That's the Observer pattern. Java provide APIs to make things easier, please refer to Observable/Observer in Java API.
 
inr mohan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose If my application reads the data from the Message Queue and the data is validated by Business layer and stored in database using Data Layer. In this case No presentation Layer ot UI is involved.

What is the common pattern name we have? Please let me know.

I need it to update some info to others.

Thanks in advance.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How bad would it be if there was no pattern? If I didn't know one that helped me design the system, I'd happily go without for a while. Maybe one will emerge as you work.

I scanned Grady Booch's Pattern Catalog for anything with "message" in it. A Message Gateway encapsulates the message listener and treats is as one of many ways to trigger a Service Activator. Be careful not to stretch too far ... if these don't help you design or explain the system, don't misuse them.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Design Patterns work on a finer scale of granularity than you seem to be thinking. An application like the one you describe could easily make use of hands full of design patterns, to solve specific design problems.

Also take a look at http://faq.javaranch.com/view?WhenToApplyDesignPatterns
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic