I have been teaching myself Java for about a year now, and I am happy with what I've been able to accomplish thus far, but I feel like I've plateaued, and I want to get to the next level. I can make very good Swing applications using object-oriented concepts, and I use JDBC extensively to interact with well-designed underlying databases.
I use Eclipse Indigo as my IDE. For my Swing applications, I hard code all of the panels and tabs and such using the various layouts, which can get time consuming, but it works. I am looking to do two things:
1) Increase the speed of which I am able to deploy applications. I want to stick with Java, but when I see other developers using .NET and simply dragging and dropping objects from a toolbox Visual Studio, I get pretty envious of how easy that approach seems. Does anyone have any tips on this front?
2) I want to take my applications online. I've written a lot of clean code for my Swing applications, but my users are always asking for new features and such, and I have to create a new .jar file each time for deployment. I know this is not the best route to go for deployment. I would love to have the code on some type of server so that I can make the change and, once tested, have it effective immediately in their application. What are my first steps for shifting into an environment like this one?
1) I've had that kind of feeling too about Visual Studio (though I still use it), and I must admit it is a great IDE for Microsoft related technologies. But, the drag-and-drop principle of building GUIs also exists in Java IDEs. I use NetBeans extensively and it has a great GUI builder.
2) I would recommend you take a look at OSGi. Once you get familiar with the concept of developing modular applications, deploying new or updates to your existing plugins (modules, bundles in OSGi) to your client will make your life much easier.
The quieter you are, the more you are able to hear.
Joined: Jun 15, 2011
Thanks, Kemal. I am now downloading the full version of NetBeans to take advantage of the GUI builder that you mentioned. Also checking out OSGi.
Brian Batson wrote:2) I want to take my applications online. I've written a lot of clean code for my Swing applications, but my users are always asking for new features and such, and I have to create a new .jar file each time for deployment. I know this is not the best route to go for deployment. I would love to have the code on some type of server so that I can make the change and, once tested, have it effective immediately in their application. What are my first steps for shifting into an environment like this one?
Well, actually, creating a new JAR file is the minimum you're going to have to do, if you want to stick with Swing applications. And continuing with that theme, if you want to deploy your application via the web, then Java Web Start was designed for exactly that. You won't reach the level of nirvana where changes to the application show up instantly even as the user is about to click a button, but it does check for updated versions each time the user starts the application.
Or you could switch to writing web applications -- servlets and JSPs instead of Swing applications. There's no deployment to the users there, only a single deployment to your server.
Joined: Jun 15, 2011
Thanks, Paul. In your experience, is the switch from Swing to servlets and JSP an enormous undertaking, or does an understanding of core Java concepts lend itself to a fairly quick and easy transition?
Also, do you think servlets/JSP is the best web application framework, or do you prefer a different framework?
All Java web apps are built on servlets, even if the web app developer uses a framework on top of it, so an understanding of how they work is definitely helpful (and, I would say, a necessary first step). After that, you can check out frameworks like Stripes, JSF 2, Spring MVC, Apache Wicket etc. to see how you like them.
There are alternatives to JSPs (like Velocity and FreeMarker) but I don't see their allure. For starters, you'd lose the ability to use JSP tag libraries, which simplify many common tasks in web app development.
And yes, moving from desktop apps to web apps is a fairly significant step, with some stuff needing to be unlearnt, and a bunch of new stuff needing to be learnt.