Java – How should I approach developing a Java based client-server application

javaweb-applicationsweb-development

I have been asked to develop a client-server application (requires database) for a company.

I am very handy with java so would like to go with it. Its up to me how I develop the application. It may be an JSP web application or Java Swing GUI based application.

I have following queries/doubts.

So if I go on to develop a web application, I have to teach the company personnel

  1. How to install Tomcat
  2. How to load the web application Tomcat
  3. How to start the server to start the application.

If I go on to develop a Java Swing GUI based application,

  1. It should start when the computer starts up. i.e it should be auto added into the service start-up of the OS on installation
  2. Have application shortcut in quick launch, tray bar on installation.

On Database Part:

I would like to have MS-access like DB but free one. This is because,

  1. No need to worry about installation of DB engine (like we have to take care in-case of MySQL).
  2. DB would maintained in some Drive (like .mdb file in case of MS-Acess) unharmed even if their OS crashes.

Please guide me how should I approach in developing the software.

Best Answer

Far more detail than you provide is needed to adequately answer this question.

The technologies that you use will be driven by your specific requirements, both functional and non-functional. So in order to know what will best fit your needs, you need to perform requirements engineering. Figure out exactly what the end user wants, and then you'll have a better idea of what tools you can use to get from where you are now to where you need to be. But it's important to focus on both the quality attributes and non-functional requirements as it is the functional requirements.

If you've never done requirements engineering before, I would highly recommend reading the works of Karl Wiegers. He has published two key books - Software Requirements and More About Software Requirements. The first book was required reading in the course I took on software requirements engineering. Wiegers also has a website called Process Impact, which might have some helpful resources and information.

Once you have your requirements, it will be much easier to determine which technology stack can best solve your problems.

However, I do have a few suggestions for you, in the interim:

You have experience with Java, so sticking with the Java environment is probably a safe bet. Don't use a technology to solve every problem that you come across just because you are familiar and feel safe, however. Make sure it can actually solve the problems that you are trying to solve. Otherwise, you are just creating more work for yourself and whoever else has to maintain your software.

Regardless of which solution you choose, the company is going to expect documentation. Depending on the terms of work, you will at least be expected to provide instructions on how to deploy the software and then instructions on how the end user can actually use the system you built. However, there's lots of other things that need to be documented, such as the agreed upon requirements, the design or the final state of implementation when you turn it over, defect reports, time reports, and so on. Make sure you know what you have to deliver, besides working software.

In terms of the database, you have choices between database servers (such as MySQL and PostgresSQL) and embedded databases (such as SQLite and HSQLDB). There are also the NoSQL (such as Hadoop) solutions for data stores. You might want to look into the capabilities of each one and see how you can best meet your requirements. You might need to deploy both, even, depending on the specific requirements. However, you can't choose until you have requirements.

Regardless of the database you use, you'll probably have to be comfortable with things like JDBC and various ORM layers. If you decide to go the web app route, you'll have to be familiar and make choices between Struts, Spring, and a number of other web application frameworks. Be ready to evaluate a number of competing tools, libraries, and frameworks against your requirements. And don't be afraid to throw things away. I believe it was a tip in The Pragmatic Programmer - plan to throw one away. You are going to be making mistakes, and you need to learn from those mistakes throughout this project. It'll help you in the long run.

So, in short, figure out exactly what you have to build before you even try to start thinking about technologies. Given your post, you aren't providing enough information for any reasonable engineer to give any suggestions. And if you don't know or can't specify what you are building to another engineer, there's no way you can build it.