This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have an inventory system that I created with OpenOffice that I would like to port to a browser interface. I have a Linux web server that has MySQL installed for a co-workers use. I have a few months of Java programming behind me. From what I have gathered, I am to use the MySQL to serve the data & then I use JDBC to interface with html pages. Is this it? There's a lot of holes that I would like to fill so that I can plan out what to do & how to do it. For example, I just read something about Java ODBC drivers but I'm not sure if I need those for MySQL. Maybe I do but Postgres would be easier. A contact of mine says that PHP is the way to go, but I thought that since OOO has Java in the background, queries, etc would be easier. Considering the size of this task, if I could get a 'nudge' in the right direction, I'd appreciate it a lot. Ross
If you choose Java, there will be a fair number of moving parts involved.
You'll need a web server with a Servlet plugin. The simplest free one is probably Apache plus Tomcat. There are many frameworks that build on this, but I'd suggest going with the bare minimum for your first exposure.
Google for a servlet tutorial. Some simple examples come with Tomcat. It's not trivial, but it's not rocket surgery either. I'd suggest stay very simple and avoid frameworks like Struts for your first try. See how far you get, then roll up the page to the Servlet, JSP and JDBC forums with specific questions.
Lemme know if that helps!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
If you would rather stick to JSP over Tapestry you might want to check out Spring
Personally I really like Tapestry.
There are also other DB frameworks, but hibernate is a pretty good one. And you will need a JDBC/ODBC driver for whatever DB you use.
Joined: Mar 17, 2004
Thanks Stan & Steven! I have started to look at the information that both of you indicated(except for Spring, which was far too cryptic/complicated). From what I understand(and your drawing was helpful Stan), a combination of your suggestions will make a wonderful result. I don't suppose that there's an easy port from the OOO Spreadsheets to any of this? I love OOO's ability to export to an html document. But to use what I have as opposed to a complete copy/paste or re-type would be a nice-to-have time saver. Ross
Joined: Dec 29, 2004
I know you can hook OOo to a database, such as MySQL, with a JDBC driver, but I don't think there is any way to connect to an OOo spreadsheet other than finding/writing some kind of parser.
I found this that might help (search for java or look for the 'Document Explorer'). It appears to be a way to read the XML OOo files in Java.
Joined: Mar 17, 2004
Thanks again, Steven. For anyone referring to this post for a similar issue, this is a lot of reading & investigating for the not-incredibly-Linux-oriented persons in the world. To get Tapestry, you need to make sure that there's a JRE, to make sure that works, you need to deal with plug-ins and a compatible Mozilla browser. Don't forget that there is the ODBC driver link to a database. The hibernate pages refer to an Eclipse IDE...what's that? A minimum of 8 components that you'll need to configure & know a bit about....some I guess I'll need to know a lot about. Whew! A nice-to-have that's become an in-depth project.
The generated code is ready to go... there's no special runtime libraries, etc.
Finally, from your description of your project objectives, I suggest you concentrate on the user requirements - that means you should concentrate on the data that the end-users want to see on their screens. This might sound obvious, but it's often easy to get sidetracked by the technology rather than focus on the results.