Adventures of the web programmer in Applicationland (or the necessary practical Java help)

Okay, so I'm a compsci college student who, while in college, is not yet branched out for a particular specialization. I have been programming since I was a young teenager, of course, I know my stuff - I am well versed in eight different languages, as well as compsci theory, etc. In addition, I have about four years of web programming (mainly PHP) behind me, I started freelance work in this area, since web 2.0 got hot.

My summer job as an intern is to write an application for industrial, not software. This application will be used to manage production lines and logistics flow. I chose Java for my language because I do not want to shoot in the leg.

I am well versed in Java syntax, its data structures, language theory, etc., but I donโ€™t know where to start. I perfectly represent the program in my mind, I clearly understand this problem and attached the theory of solution. Namely, I have no idea which libraries to use, and was afraid that they would not be well documented.

Here are some general outlines of what I'm going to do:

  • Two applications, one server and one client (which will be a lot of copies).
  • The server and clients will obviously communicate via (I don't know).
  • Both server and client software will have graphical interfaces.
  • The server software will need to query the MySQL database.
  • Client software must be live in the sense of updating the GUI when changes are made to the database. This is one of the reasons this cannot be a web application.

I'm not even sure if the framework suits me or not. I have used MVC many times in my work on the Internet, but I do not know how this will be broadcast for desktop applications.

In short, I am looking for the right libraries for the job, as well as tips on whether I should use the framework (and if so, which one). Thanks.

+6
java
source share
6 answers

Is this a summer intern work? Honestly, it sounds more like a big project if you ask me. Are you saying that the launch is not software related? Who came up with this idea? Do they have any idea of โ€‹โ€‹the (huge) volume that could lead to something like this?

A software development business is something completely different than the syntax of a language and library. It is about collecting requirements, defining specifications, writing code, ensuring the quality of this code, testing it, etc. This is not what you would expect from an intern. For something like this, you need to be more experienced with supervision, with whom you can learn, someone who has done this before.

Speaking of which, if you really have a good reason, I would probably do something like a website and not a desktop application. Desktop applications are much more complex in many ways. You need to encode both the client and server. Communication is a little more complicated. You need to worry about the problem of maintaining state in several applications, about how to handle update flows, etc.

In short, this is a lot of work. Even a website is a lot of work, but many of these problems go away. You can do it using Java. I definitely encoded my fair share of Java websites, but PHP can be a lot easier.

Also, Java desktop development is, well, torture. Swing is (imho) experienced, but also incredibly painful to develop. Other desktop libraries (for example, Netbeans RCP, Eclipse SWT) are more modern, but have other features.

Desktop remote access libraries include features such as Spring Remote Access, even web services and other things like Burlap. For the server side, I would use either Tomcat or the application server (Glassfish is my preferred choice), servlets and Spring. Persistence can be accomplished through Hibernate or Ibatis (or many other options).

But to be honest, the desktop option is much more complicated than the web interface. You will probably be working much faster with PHP + jQuery + MySQL.

If you do this, make it as simple as possible. Try to determine the absolute minimum that you need to complete and do first. Someone once had that they would have a better idea of โ€‹โ€‹what works for them and what doesn't. Basically, itโ€™s easier to clarify what already exists and to define something that does not.

+7
source share

I recommend that you only create a web application. A web application can be live in the sense that you describe it using AJAX. It would be much easier to build just one. If you also want to have a rich client, you need to create a user interface in a technology that you are not familiar with (for example, Swing or SWT), and also develop / implement a communication mechanism.

Take a look at Hibernate (ORM tool) and Spring (IoC framework). They have some kind of steep learning curve, but they will make your life easier in the long run. For part of the user interface, JSF may be easier for beginners.

As a final note, I think you have a too ambitious plan. What you describe is not a simple project and requires experience with many technologies. Do not try to do everything with one shot.

+3
source share
  • Java Desktop 6 (JRE)
  • JDBC (built-in to any JRE)
  • MySQL JDBC drivers (free downloads)
  • for communication you have several options: RMI (built-in), however these days I recommend | learning something like Java Web Services (JAX-RS)
+2
source share

Well, it can go as wild as you can think, or you can go and do KISS .

If you want something really simple (as with any framework): * On the server side, you can use RMI. This server side will use simple JDBC to connect to your MySQL database. But some said it was kind of old, so if you want to get funky, you can try JAX-RS, which can return JSON / XML objects to your client. * Your client can be created using Swing (provided that you are developing a desktop) or Servlet + JSP (provided that you are developing a webapp) and connect to your server by calling RMI objects / JSON / XML objects that are displayed on server.

If you want to get an unpleasant answer that will help you in terms of maintainability of the code, you might want to connect the Spring + Hibernate module to this application.

Good luck

0
source share

Library?

JDBC for the database. You can see ORM mechanisms like Hibernate

I would recommend the Apache Commons libraries for all of your office work (file processing, IO, etc.). There's a lot of material to save you reinventing the wheel.

A standard logging framework, such as Log4j , allows you to log in many different ways, filter your logs and connect to monitoring solutions easily.

You are not saying whether browser-based client / server GUI solutions are acceptable, and this solution will drive a large architecture.

If you are looking at browser-based solutions, I would suggest justifying servlets , regardless of any framework that you ultimately choose (no doubt, a lot will be recommended here).

At this stage, it will become a major project. You may need to focus on working with the basics (client / server functionality), and worry about the GUI later. Otherwise, this is a huge amount of work (and working with a graphical interface can draw a huge amount of time).

0
source share

Only one nitpicking:

Both servers and client software will have graphical interfaces.

I advise you to have a mute (in awt parlance) server with a graphical admin interface and not a GUI server.

0
source share

All Articles