hi
i am new to here and plz help me
i have created a stand alone application and i wanted to change the application for lan use ....how should i change the connection code in java......
..
..
..
i used mysql...for database
Printable View
hi
i am new to here and plz help me
i have created a stand alone application and i wanted to change the application for lan use ....how should i change the connection code in java......
..
..
..
i used mysql...for database
i guess some kind of abstraction between the application and the database is a good start, instead of working with JDBC (or what ever database mapping tool specific things) create a manager interface, or interfaces, implementations of these, that invoke data accessors, that invoke the database operations. Where the manager interface has methods that take on beans specific to the business function and independent of the database or any networking, and invoke the query and package the results back into response beans.
The trend lately appears to use SOAP (XML-RPC) web services as the transport mechanism for serializing the data (request/response beans), but any other mechanism over HTTP is likely a good fit. The modern problem of everything being web based and that single web ports typically being always opened thru firewalls allows for ubiquitous access of the client to the server side.
It's not a simple task actually in simple words. Basically you have to learn about how to communicating between two host over the network. What sockets are and how they behave and so on. Then you've confidence on that you may need to change the design of your original application as well.
So to get a start read the following, which the basis of all you need. At the same time you've to study about communication protocols such as HTTP and so on.
Lesson: All About Sockets (The Java™ Tutorials > Custom Networking)
thnx guys for your replies .....