Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Peter's high level design

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In one of the post above Peter den Haan had made an analogy about
Client ===== Server ===== database. I cannot find that post, but the analogy seem to say that you need to clearly seperate these three. I do have a question about it.
The database part of the design is given to us by sun correct?
The server has to be a wrapper for the database, with the server managing the connections, locks etc...
The client would have two parts, one would be the GUI portion while the other will be some sort of Facade/Adapter that can adapt to the DataAccessInterface.
Am I on the right track with this?
-Amish
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The diagram is not quite right... it was
User Interface <==> Business Logic <==> Database
Originally posted by Amish Patel:
The database part of the design is given to us by sun correct?
Yes, partly. The Data class is definitely part of the Database layer...
The server has to be a wrapper for the database, with the server managing the connections, locks etc...
...But there's a design decision to be made exactly where and how your networked server should fit in. Sun strongly steers you towards making the networked server a glorified version of Data, in other words, it lives entirely in the Database layer as well.
The client would have two parts, one would be the GUI portion while the other will be some sort of Facade/Adapter that can adapt to the DataAccessInterface.
The second component is much more than an adapter -- it would be your business logic layer. To the GUI, it probably exposes high level, abstract, application-specific methods such as bookFlight and perhaps findFlights. It would implement all the logic behind this and in turn call the database to get things done. In some (but not all) designs, this business logic layer is also the Model in MVC.
There are two key points to the little three-tier diagram. The first is to recognise that these layers exist in any application and that it's usually a good idea to keep them separated. It helps you to understand why it's a bad idea to put a book() method in Data. The second key point is that it immediately highlights two "natural" places to put your client/server RMI interface. Only one of these is consistent with Sun's requirements.
- Peter
PS. In a J2EE project, the Database tier would probably be an RDBMS, the Business Logic tier might consist of EJBs and the UI tier could be a JSP or Swing application.
[ January 23, 2003: Message edited by: Peter den Haan ]
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter! This helps.
-Amish
 
aadhi agathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Peter den Haan:
In some (but not all) designs, this business logic layer is also the Model in MVC.
- Peter

Peter,
could you please eloborate on this. i believe that the business logic layer will always be the Model in MVC. i mean, the Model should always expose the businnes logic in MVC. :roll:
Thank you.
 
aadhi agathi
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
could you please explain this some more
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this case, the Business Logic is probably also the model (although some use an adapter class to turn their business-layer model into a TableModel, on the grounds that GUI concerns shouldn't propagate into the business layer).
In larger systems, when the business logic is implemented in an EJB tier, the web-tier model is fairly loosely coupled with the business tier for performance reasons.
But that is outside the scope of this assignment
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic