File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes IS this  Interface design OK Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "IS this  Interface design OK" Watch "IS this  Interface design OK" New topic
Author

IS this Interface design OK

Farouk Mohamed1
Ranch Hand

Joined: Jul 26, 2001
Posts: 113
hi
In my application the user start the application and before he can do anythign he has to connect and for that the following information is needed.
1. Local or Remote
2. If local ,DNS name of the RMI server, portNo is not required as it is all local.
3. If remote, DNS name of the RMI server,portNo is required to connect to the RMI Server.
4. Database file location, the user is allowed toselect the database file location using the file chooser swing component.
5. Finally he will be allowed to connect to the Flight Manager.
6. The flight Manager is a Facade for the system use cases and
a factory for location of the connection object based on the information the user provided for the session(Remote or local, portNo,databaselocation,DNS server name)
7. Using this design I think you canmake even a local file be remote accessed and allow multiple users to update your local file
Apart from this i have a small RMI Server start up user interface to gracefully start and stop RMI Servers which will accept two parameters to start a RMI Server
1. Server DNS Name
2. Port No
Appreciate and reply with your comments ,badly need your opinion on this before i proceed any more.
Thanks in advance
Farouk
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

My comment would be that you don't need RMI for local mode. as a matter of fact, I believe that that is against the requirements, meaning that local mode is just opening the db.db file on that machine.
I also don't think that you need to give the RMI Registry a DNS name, doesn't DNS automatically convert a URL to the ip address. If you aren't using the default port, then you still need to pass that.
Let me know if I'm wrong on my thinking.
Mark


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

Joined: Jul 26, 2001
Posts: 113
Hello Mark
Thanks for your reply.
When user starts the application by default just by specifying th database location he would be able to connect as the default port of 1099 and DHS name localhost will be assumed and he need not type anything the textboxes will be disabled in local mode.
Only if the user want to connect to some remote Registry and when he selcts the radio button remote those fields (Hostname and Port no ) are enabled and he will be able to connect remotely.
In either case he has to select the database location usign Swing File chooser component
Please reply with your comments
Farouk
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

That sounds good, but the only thing I really would point out, is that it sounds like you are using RMI, and the registry in local mode.
I don't use it in my local mode, and it works perfectly.
I think the difference between local and remote versions is remote uses a server, and local does not.
In your case of using RMI and the registry in local mode, you still have to start the server.
Mark
p.s. See Peter's last response to you in your Remote Data class post. It sounds like he is saying the same thing about local mode.
[This message has been edited by Mark Spritzler (edited October 31, 2001).]
Farouk Mohamed1
Ranch Hand

Joined: Jul 26, 2001
Posts: 113
Hi Mark and peter
I am not using RMI in local mode and I dont start any server in local mode. The local connection is a straight connection without any Registry or remote object.
Why do you and peter say i use registry for local mode, i dont get it. The user has a option to select local or remote. If he selects local then he just have to locate database file and click connect and it creates a new LocalData(data) and the client will use that as the interface for Data object
Is this ok Mark
Please repyl
Farouk
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

That is correct. but in your first post on this thread you wrote:

>>> posted October 30, 2001 08:54 AM
>>>-------------------------------------------------------------->>>------------------
>>>hi
>>>In my application the user start the application and before >>>he can do anythign he has to connect and for that the >>>following information is needed.
>>>1. Local or Remote
>>>2. If local ,DNS name of the RMI server, portNo is not >>>required as it is all local
#2 states If Local, DNS name of the RMI Server.
That is why we think you are using RMI and Registry in Local mode. Otherwise, your last post it right. You just use your data access class to point to the db.db file only. No DNS.
Thanks
Mark
Farouk Mohamed1
Ranch Hand

Joined: Jul 26, 2001
Posts: 113
Good
Next i have a separate RMIServer swing interface which is useful for starting/stopping RMIServer on a port and a DNSName.
Say if the person who is testing the application in MACHINE1 uses the RMI server applciation and runs it in MACHINE1, can he start the RMIserver in a remote location(MACHINE2) from his MACHINE1 by specifying remote DNS Name and port no to the applicaion which just does the binding of object at a Remote DNS Name and port No.
Is that possible to bind a object to a remote DNSName and port no from a MACHINE1 ?
Also how can i start a registry at a remote location specified in the RMIServer applcaition before i do the bind.
I appreciate your comments
Please reply
Farouk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IS this Interface design OK