Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm trying to design the "main" classe(s) of a Rich Desktop Application based on NetBeans Platform 7. This application will consume HTTP services and, through a "push system" over TCP, will receive messages.

  • We are 3 developpers and we want to develop modules in parallel
  • Application will be layered (Data, Business, Presentation)
  • We'll use Presentation Model in order to separate responsibilites
  • Some granular data (a bean Person for example) will be shared by several screens (and possibly displayed on several screens at the same time)
  • ...

We are able to develop individual screens, but We don't know exactly how to organize the whole application and define each module content.

  1. So, have you any advice (a pattern / best practice / book / sample app) to coordinate/manage interactions inside of the whole application?
  2. Any advice about how to define modules content?

Thanks!


Small example to illustrate what I want to build: A Foo User Management Application

  1. Launch the application
  2. At the left [explorer] we have a list of platforms (list is stored in a local file)
  3. At the top we have button to add a new Platform (also available with right click)
  4. By double-clicking on a platform, the app calls a HTTP service a retrieve a complete list of users. This list is displayed in the [editor] (in a JTable)
  5. A background process is started: through a TCP connection we receive messages
  6. It is possible to Add new user thanks to a button in a Toolbar

If the application is launched on another PC, and if the user is connected to the same platform, its User List will be updated dynamically (add/remove/status:{offline/online}) (thanks to messages)

In the future it a Chat Module will be provided.

My question is (in other words): any advice/best practice to decide on content of each module? If PM (Presentation Model) is a good way to separate view/business and data and create screens, what is the best way to link several screens based on PM? Imagine we develop the Chat Module, how to add an entry "Discuss with..." to the Context menu available with right click on User List?

share|improve this question

migrated from stackoverflow.com Sep 12 '11 at 17:24

This question came from our site for professional and enthusiast programmers.

3  
It's not clear what you are asking. How about providing a small example to illustrate your question? –  Robert Harvey Sep 12 '11 at 16:35
    
I'll add a scenario. Thank you for your comment. –  Destroyica Sep 12 '11 at 17:46
    
Great post of Geertjan Wielenga. Contains statements of Tom Wheeler statements (NetBeans Dream Team member): java.dzone.com/news/how-to-split-into-modules –  Destroyica Sep 16 '11 at 20:33

2 Answers 2

Given your requirement, to start with the core processing stuff should be made of Command Pattern and later you can use Template patterns for request-processors. And so on and on. There is nothing called a Master pattern. If there were, they wont need us anymore.

The idea is to have a design that will allow you to evolve with requirements.

I would start by creating a base module interface and give the interface to everyone and some utilities around it. Let everyone implement their own modules based on the base-module.

share|improve this answer

I think you're looking at a pretty classic MVC pattern backed by services (RESTful I assume). The key will be to separate the service(s) from the UI. This is not because you are introducing an alternative UI, but because gives you clarity in what your service interface should be.

So when you are thinking about the getPeople service, make sure you think about how a secondary (non-Swing) UI would interact with the service. If you keep that in mind you'll come up with a fairly flexible/decoupled solution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.