aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Overall Architecture Urgent!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Overall Architecture Urgent!!!" Watch "Overall Architecture Urgent!!!" New topic
Author

Overall Architecture Urgent!!!

Anurag Mishra
Ranch Hand

Joined: Sep 27, 2001
Posts: 133
Hello
According to Sun's specification:
"The application is a traditional Client/Server system.There are three key parts:
1)The server side database with network server functionality
2)The client-side graphical user interface
3)The client side database client part that handles the networking on behalf of the
user interface.
Point 1:- According to me on server "db.db" file will exist which enable users to access data from database file.
Point 2:- With the help of GUI we will connect to the network server and access data from "db.db" file.
Point 3:- Here i am confused, is one more "db.db" file will exist on the GUI side when our application is in non-network mode.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Yes, there will be two different copies of db.db. One with the server, one for use in local mode
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Anurag Mishra
Ranch Hand

Joined: Sep 27, 2001
Posts: 133
Thanks Mark
But i couldn't understand that when the user books a seat on remote mode and than moves on to local mode, than how the seats will be decreased accordingly in the local database.
Anurag Mishra
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

That would never happen. If you are using the remote database, all the reading, writing is done on that file. If you are using the local database, only the local file gets changed. No switching in the middle.
Imagine the local version is on someone's laptop, not connected to any other machine or network. How will that person book a flight, except with his/her only copy.
That is the point of local vs. remote.
Mark
Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
Mark,
From reading your posts I found you mentioned that you used a facade to the DataClient. I too do not want to use the DataClient methods directly from my gui components but want them to talk to a FNBClient that will book seats and provide other convinience methods for them. Could you expand on your implementation? Thanks.


Never be satisfied with anything less than the best and you will surely pass the test...
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Could you expand on your implementation?

Tough question. I am a big proponent of small methods. I don't think I had a method that was larger than 10-12 lines of code. So in my Facade, I thought what are the things I want the client to call on to the server, and what are the simple steps that the method needs to do. These are calls to the DataAccess Interface.
I have only 6 public methods, and 4 private methods
Public
BookFlight(flightNumber, numberOfPassengers)
getAvailableSeats(flightNumber)
criteriaFind(criteria)
getAirlines()
getArrivalAirports()
getDepartureAirports()
Private
getFieldData(String fieldName, DataInfo record)
getFieldDataArray(String fieldName)
setFieldData(DataInfo record, String fieldName, String newValue)
saveBookedData(DataInfo flight, String flightNumber, int numberOfPassengers)
And I went from there. Hope that helps, but I don't want to give everything away.
Mark
Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
Mark, I see everyone using a combo box for the fields. This looks fine but isnt the cost of looping through the entire record, to get the names of the fields rather expensive to do. I was initially concerned about the addition/deletion of a new record. However, if that were to happen everything would go haywire as then records would need to be updated etc....
Can one get by without the combo box???
Andre Mermegas
Ranch Hand

Joined: Jun 20, 2001
Posts: 158
I think you can get by w/o it, but the combo box
is part of good HCI for sure, well in my opinion at least!


--=( Andre Mermegas )=--
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Kalichar, yes in a big database the looping through the records would be very expensive, but if it was a larger database, you wouldn't be using these simple Data classes that Sun designed, you would be in a database that had indexes and such.
And as far as adding and deleting records are concerned, that will not happen in your assignment. It is not requirement for your GUI to have that functionality.
The reason why those methods are in the Data Class is for the older version of the assignment where you had to write a conversion program to move a text file of data into the db.db file.
The toughest thing with this assignment is to not over analyze the requirements. Once I got over that I took the easy way, but still took the time to make it neat and clean. Well almost all the time. I realize now that I should have seperated the Data class files into the data package, and had the RMI Connection, etc in a server package. Maybe that is where I lost the 4 points.
Oh well, to late now
Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Overall Architecture Urgent!!!