I would like to program an application for my company.
Programming has been a hobby for the past few years and only background in programming is in PHP/Mysql and VBA.
I am quite keen on learning Java!
So far I've been through "java for dummies" (hey, I need to get started somewhere! ;) ) and I am quite ok with what was explained in the book. I'd now need to get to the next stage and start programming something "meaningful".
basically I'd like to program a server/client application for a small company selling investment products
Ideally I'd like the program to be remotely accessible for the users (we'll always have someone on the road and that would come in handy for this person to check the performance of a client)
basic functionnalities would be:
- login / password at startup (with users been able to interact with the data differently if it is the admin, the assistant... opening the application)
- creation of clients' profiles (name, address, date of birth, initial capital, current performance...) + attach documents to the clients' profile
- attach products to the clients' profile (product type, start/end price, start/end date...)
- pull data from the database to check the performance of clients' portfolio
I'd like to work on Eclipse (seems quite a user friendly environment)
Database: maybe H2 (it has been recommended as it is a lightweight AND it can be embedded in Java)
I think I'd need to know:
- how to create a startup screen
- how to create a GUI (swing I suppose)
- how to setup the database with this java application (H2 in that case)
- how to interact with the database (I've been told it is possible to create queries in java that would work no matter what database you plug onto your application)
Can someone give me some good/precise pointers on where to start looking for these different elements please?
time is not an issue (bu money is...) so I'd like to program it myself (and learn something interesting at the same time!)
Is swing a requirement in your app? Since you know PHP, why not make the front end web-based and the logic and DB controller all Java? We use ColdFusion to create front end web-gui logic. Then we build either a Java Socket or a Java Servlet for the ColdFusion pages to call our Java code. If you can do something similar with PHP, you could save yourself a lot of time with not having to learn Swing (right now). Swing is powerful and capable but it will save you a lot of time if you can learn how to use the other packages in the API now and tie your logic to a web GUI. If you want a really functional client, you could also use Flash as the front end, Java as the back end.
For embedded DB, I use Derby and love it. However, if you're going to make this client/server via the web, you could use any DB. If you do that, please make sure use a JDBC connector other than the default. The best package I've found for our needs is here: http://java-source.net/open-source/jdbc/jtds.
Joined: Dec 25, 2009
thanks for your reply!
to be honest: php + mysql is a "walk in the park" compared to Java at the moment
setting up a website is a process I know: set up the database, the tables, code in php, ftp the website and presto it's ready! ;)
java in the other hand is a big question mark...
I have no clue (yet! ;) ) on how to deploy a Java application...
Swing is not mandatory but it seems to be the most "natural" choice as it is well covered in the books I purchased.
in addition to that there is tons of documentation online.
Ideally I'd like to have the application accessible on and offline (so that users being on a business trip can still access the application).
I was also considering GWT but I didnt find a lot of documentation... (but it's already installed in Eclipse here! )
If you want a functional client that works both on and off-line, with a local copy of the DB, then Swing might be your best choice. If you decide to make the application purely web-based with your Java code running on your app server, PHP has a bridge for making your goal a reality. You can learn more here: http://www.phpbuilder.com/columns/marknold20001221.php3
Best of luck to you. After several attempts to learn Java and C++ starting 10 years ago, I was finally able to really learn it via the Head First books. Also, the Java for Dummies book came in handy as a developer resource. While Swing is really super cool, it was the hardest part of the API for me to learn to work with (primarily due to the power you get in laying out components in Swing).
Joined: Dec 25, 2009
Swing looks a bit daunting indeed!
I was hoping to find a free Gui builder to harness the power of Swing without having to code everything from scratch but all of these softwares are commercial.
I have already the Java for dummies and I must say that it is a good primer for me at this stage (basically I am learning to convert my php "skills" into java). I am also going through "Teach yourself java in 21 days" (not too bad)
next on my list is the "Java headfirst" that you mentionned.
I really hope these books will help me get up to speed with java so I can install the database, communicate with it, develop the Gui and the app that will be deployed (hopefully on and off line!)