Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
add comment

6 Answers

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.

share|improve this answer
    
Thanks Thomas, for guiding elaborately. I beleive yes I have not asked some questions in the requirement gathering. <br/> Software is for a small factory manufaturing (where are mainly labourers) plastic and the software has to keep track of material used in each process of manufaturing plastic. Data has to be entered by company persons at the end of each process. I dont know whether the company has software/network administrator. Work would be created by a senior level manager.<br/> I am just wondering what to do if the IP keeps changing as it would be a Intranet client server application. –  Venkattesh B Jun 6 '11 at 11:29
    
The best thing to do would be to get some kind of requirements done, either in the form of an SRS or user stories or use cases, and then ask very specific questions about how to address situations that you don't know, with mentions of the specific requirements that are driving and/or constraining your solution. –  Thomas Owens Jun 6 '11 at 13:13
add comment

If you go with the web development in JAVA I recommend you to use one of the popular MVC frameworks. My favorite is STRUTS2.

struts apache

Why go with the framework, because development with JAVA servlets is slow and inefficient.

Now, you need a database, I recommend you to organize your code based on model oriented design. Where you will have model separated from web application and then you can use object - relation mapper to map that model into relation database. My favorite OR mapper is Hibernate.

hibernate turorial

Basically you can use XML mapping, or java annotations, I usually use java annotation because it is easier to make it work.

Once you have model mapped you just make ant file (there are tutorials on web) to export schema into database you have chosen. I recommend mysql. It is easy to use and it has good features.

For the client side there is JSP, AJAX, JavaScript, jQuery you can use all of these depending what you need.

For the server you can use tomcat, jboss etc.. Simply download eclipse jee and import server (there is wizard for that in eclipse) and than import your created web app into tomcat. Start tomcat and access your web application.

That is short cook book for java based web application. I hope so I covered most of the things.

share|improve this answer
    
Thanks Shake, I was not aware of hibernate till now. One more question. How can clients connect to server in a intranet based application if IP keeps changing. –  Venkattesh B Jun 6 '11 at 11:38
    
+1 for using frameworks -1 for using struts2 –  Farmor Jan 30 '12 at 17:49
    
+1 for frameworks, but -1 for struts and ant. Spring and maven are much more popular and for good reason I think. I personally prefer spring's JDBCTemplate over hibernate but that's a completely separate holy war. –  Kevin Jan 30 '12 at 19:19
    
If your organization cares about security, then internal IP will not change. Because the network administrator will have a MAC to IP mapper. In order to access the network, you have to give him the MAC address of your device's network interface. This is what happened to me back in undergrad. And even if you don't want change, you can still use IP range. –  randomA Jun 14 at 5:50
add comment

Sounds like you are starting basically from scratch without having an experienced developer to mentor you. This may not be the optimal solution in terms of time and money.

You will need to learn how to use JDBC to talk to a database from Java, and you will need a JDBC driver for Access to use Access as the database.

share|improve this answer
    
Thanks for reply, but your answer was out of the question. –  Venkattesh B Jun 5 '11 at 18:13
1  
-1 For the negative energy. Don't be afraid. You will use Hibernate as an ORM to abstract the db. No need to learn JDBC at all. –  Farmor Jan 30 '12 at 17:46
add comment

You may also choose a modern approach to JAVA web development.
For example if you choose Play framework you don't need Tomcat, you will start it as a normal app (Over course: A python launcher).

It will come with a configuration file you can easily modify to connect to your database. All dependencies are already taken care for in the case of a simple client-server-db app.

I wouldn't start a 2012, edit saw this was an old question but I wouldn't start a 2011, project with STRUTS2 as you have been recommended :) Struts2 is an old framework chosen by many devs because almost everybody knows it and are afraid of change. But you are free of this backpack.

share|improve this answer
add comment

If you decide to write a JVM-hosted web app, I recommend using Groovy and Grails. Writing GSPs is much easier than writing JSPs. You could also use HAML. You will get the application done with about 20% as many lines of code.

share|improve this answer
add comment

Using the J2EE technological stack is a very good solution. But should use some other technologies as well.

I would advise the following...

  1. Apache-Tomcat on Linux
  2. Maven - for building your application and managing library dependency
  3. Spring 3 - framework for all applications
  4. Wicket 1.4 - fast and simple web framework
  5. Hibernate - ORM for database access
  6. Postgres 9.0

After selected the appropriate technological stack start designing modules and layers your application.

share|improve this answer
    
Thanks intimax. Currently I am knowing 1) Java, Servlets Jsp 2) Tomcat on windows. I think I have to learn a lot –  Venkattesh B Jun 6 '11 at 11:31
    
@VenatteshB: learning spring and maven will help you immensely. Really its not very hard either. –  Kevin Jan 30 '12 at 19:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.