简体   繁体   中英

Client server application - Best approach in Java

Need to create a client server application, both have to communicate with Database. Which approach suitable for this,RMI, Socket programming etc....

If server communicates with database, I think that client should not (according to layers/tier ideology: http://en.wikipedia.org/wiki/Multitier_architecture ). Or if your client works directly with database, than you could avoid usage of server. For client-server communications you could use a lot of options: RMI, sockets, webservices, etc. If you have an experience with java web applications, I suggest to use webservices, if not - RMI.

When I took my 1st module about client server application in my University, they taught me about RMI & Socket programming. In my opinion, if you want to have basic knowledge about client-server communication, RMI & Socket programming should be useful. However, if you need a solution that you will bring into production system, you should take a look at EJB with JSP/JSF.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM