Reference: "In this mode, the database and GUI must run in the same VM and must perform no networking, must not use loopback networking,.... " [Non-Networked Mode Description]
Shahriar Husain wrote:Is it correct to instantiate the Data Access Class from the Server package and use it in the Standalone Client Mode for the data operations ?
Is it correct to instantiate the Data Access Class from the Server package and use it in the Standalone Client Mode for the data operations ?
At the back of my mind i am thinking about a reusable data access component that can be used by both the Network Server and Client depending on the usage scenario, after all everything is going into the same runme.jar file, just different packages
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Johnny Barbosa wrote:Hi guy!
"Database" refer to your x.db file. Your DBMAin Interface, is only the main access to the DB.
Shahriar Husain wrote:Is it correct to instantiate the Data Access Class from the Server package and use it in the Standalone Client Mode for the data operations ?
Yes, no problem. It's up to you. Since than not use the networking... however, as you saw in others topics, do you have only explaining about your design choices.![]()
Guy, as you just read your spec, so, try to understand all thing in your spec, first of all. Start to code something, and give you a chance learning about all thing that will show up during of the developing. You will see, that, will the hope overcame fear...![]()
Hum... you're going to instantiate the Data class from the server package to use in standalone mode? Well, remember that the server code must be entirely bypassed when running in standalone mode.
So, you'll essentially have GUI -> Business layer -> Data class -> .db file.
At the back of my mind i am thinking about a reusable data access component that can be used by both the Network Server and Client depending on the usage scenario, after all everything is going into the same runme.jar file, just different packages
Well, you are correct! Remember that the Data class doesn't have to know if the application is running in client or standalone mode. So, you can have a business interface, with 2 implementations (one for standalone mode and another one for client mode), which just sends data to your Data class. Then, your GUI will use it (and it also doesn't have to know what is the implementation being used) and you'll be able to keep everything flexlble and easily maintainable!
Its nice to hear from you and to see you around.
So I think you are also considering it as a potentially dangerous idea. Is it?
So I am actually wondering about how do most people solve the Data Access part for the Standalone mode. Do they reuse the server code ?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
It feels good to be here, my friend!
And it is even better when we can help good people, like you!
![]()
One of the implementations use the Data object directly (that is, in standalone mode),
and the other one makes calls to the server (that is, in client mode)................................................... the Data class.
did you say a data object for which the actual class file resides in the client package ?
Cheers, Roberto Perillo
SCJP, SCWCD, SCJD, SCBCD
Hum... the Data class should only be located in the suncertify.db package, but please confirm that. This class should be located in the same package as the interface that is provided in the assignment.
The difference is that, when running in client mode, the GUI will request information to the server, and the server will deal with the Data class. In standalone mode, the GUI will retrieve information from the Data object directly, or via a business layer, which is even better.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
|