• Post Reply Bookmark Topic Watch Topic
  • New Topic

Final review....some doubt  RSS feed

Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!
I've developed the assignment application, but in about a final review, I have two little doubt.
I've posted this doubt about two months ago, but i'm still not sure...
Two words about the GUI implementation...
My application GUI has a data component on the center (a grid), a surfing component on the left(a tree) and a message area on the bottom. Surfing and Data component are managed by the same controller, because although they works on different model, they have the same data (flights). The purpose of a two ways of displaying the same data is that in the surfing component I can immediately see what flights are available (the tree have two node: available and sold-out), while in the center grid I see the flat list of all flights with all their attributes.
The client-server interaction is delegated to a specific component which abstract the way of retrieving data.
This component contacts a specific service (either or local) and performs the requested operations.
So from the point of view of the client, it has no knowledge of a getRecord(), modify(), criteriaFind(), etc. method. It interacts with the server calling some high level methods like book(Bookable bookable, int requestedSeats) or findByCriteria(Criteria criteria).
The object managed by the client are defined (on the client) only in terms of Bookable interface, which in turns is a Read-only interface.
Only the server (remote or local) has the read/write interface to manage the business object. I've done this because actually the only business object present is a Flight, but tomorrow I can insert a Boat into my BookMaker.
I'm saying all this because on the instructions.html it's written : "The remote client code should implements all the public method defined in the Data class".
In my implementation, the client doesn't know about a modify record (because It CAN'T modify anything, it must request to the server to modify a record for a booking for example).
The method on the Data class are equivalent to database access method and they mustn't be exposed to the client.
Furthermore, the return type of the Data method are untypized (an array od string)...the client must works with business object (a Flight, a Boat, etc...) and I think there must be a service (local or remote) who interfaces the Data class and make this transformation (String [] --> Flight,Boat, etc...).
Excuse me for my english and my madness...
What do you think about??
Posts: 17314
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I search for a specific Departure City or Specific Airline.
The center object is a JTable correct?
The JTree what is that used, or better how is it used?
the Client does not need to know the modify method.
For instance you ahve an interface that has all the public methods of Data, then that interface is implemented twice once for local once for remote, at this point you have finished the requirement of Client having access to Data methods. Now if you choose to have the client wrap this class into a Facade class, like you have, with just methods like bookFlight() that is fine and still handles the requirement.
The Facade is the class that really transforms things from String[] to DataInfo[].
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
Why should you try IntelliJ IDEA ?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!