• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Large Work Project

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

So I am 5 months into my first Software job, I have my B.S. in Software Engineering and am pretty good with Java. All my experience has been on the desktop with just a bit of JSP experience.

Well now my company wants me to build an online application that runs on an Apache web server. The thing is I am just not sure what technologies to use. I'm the only Software Engineer and have no experience in the web programming world.

I know JSP is all server side, and that presents a problem for me as the page needs to update as users are viewing it. To me this indicated something like AJAX, but there are issues there too.

I also need to have a real-time trend graph on some of the pages. From what I have read AJAX is weak at graphing. So I was thinking of making that piece of the page be a Java applet perhaps since I can do graphics fairly well in J2SE.

However, they also want it to be viewable from Pocket PCs and Smart phones. Which I don't think support Java Applets. I also don't know if they support JSP or Ajax....

Basically I am kind of confused and really don't want to have to use ASP .Net everything .Net leaves me with a bad taste in my mouth. The software has to be cross platform anyways, so .Net is out from that.


So in short I need to build:

An application to run on a small industrial PC
An application to run on a web server
Both need to have real time data updating and graphics/graphs
Also database connectivity is a must

What should I build this on? Suggestions would be great.

Thanks,

Jon
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might a lot of varying opinions on this, but I would recommend the following:

Java
Tomcat (your JSP container)
Spring Framework
Jasper Reports (for any reporting only - I think it has some graphing capabilities as well)
FreeChart (if JasperReports doesn't have it)

The above is pretty lightweight.
 
Jon Parise
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am guessing you would use Java for the portion running on the industrial PC.

That part I can handle pretty well.

I am not familiar at all with the Spring Framework, Jasper Reports or FreeChart.

I'll probably write my own reporting engine, as I will need to customize it a lot and it's just rather simply reports.

I am also familiar with tomcat. Could you explain what each parts specific role would be?

Also is Jasper Reports Dynamic in the page?
 
Ed Thompson
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Spring provided an MVC framework, and is a good way to learn best practice design styles.

JasperReports is easier to use than writing your own engine. (and you can use it from Spring!)

I haven't worked with FreeChart myself, I just know about it as a good graphing tool.

Yes they are dynamic.

Spend a day with each and see what you think. Spring itself is well worth learning - try the MVC tutorial to get you started!
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ed Thompson:
Spring provided an MVC framework, and is a good way to learn best practice design styles.

Not everyone agrees. The big frameworks can frequently serve as a way to avoid learning basic principles. You might want to start off small and get good web design principles under your belt before deciding to adopt a framework.
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Jon Parise:]   was thinking of making that piece of the page be a Java applet perhaps since I can do graphics fairly well in J2SE.

I have a great deal of experince on massivly large projects ( not software, just large projects generally ): If you do nothing else, nor gain anything here: START IN ANY AREA YOU UNDERSTAND sorry for the hollerin, but this is the real world.

need to have a real-time trend graph on some of the pages AWT in an applet should be able to expose the data, given B.S. in Software Engineering and six months field experience. I suggest a brief prototyping in AWT ( just modeling the thing with some function signatures ) then go read and look into whatever sophisticated tools may be mentioned. Ajax is extremely popular, and there are some degreed respondents at jr who hold deep, nuance-splitting knowledge of how it works. My Team Lead reports that it is defacto standard for open-wire pages.

Pocket PCs and Smart phones use Micro Edition: Java Micro Edition Programming for that chip in your saloon. Today's topic at ten am was: Speech recognition .... is that powerful enough ? BTW - Java Micro Edition uses AWT ~ not JPanel and the javax.swing stuff.


[Jon Parise:]   Basically I am kind of confused and really don't want to have to use ASP .Net everything .Net leaves me with a bad taste in my mouth. The software has to be cross platform anyways, so .Net is out from that.

Welcome to Java Ranch, mosey around awhile.



Trust me, the theme is remarkably crude when contrasted with the caliber of help I have gotten. Just be prepared for 6-grader beginners working with world-class Ph.D's ... I know, I can tell Ph.D grade work wherever I see it.

I pick on them sometimes, I won't pick on you - I promise, you are suffering Vipera aspis, a venomous viper found in Europe and therefore qualify for the medical exemption.
 
Jon Parise
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all the tips guys.

I know phones run J2ME on apps. I phrased the question badly. What I really need to know is can they run applets? If so what do I need to do to mae it happen? Just use AWT? Also, can they run Ajax at all? I know it depends on the phone, but I am asking in general.


I still think I will be building my own report framework. I want to get more experience building it.

This system should be great experience for me as I have to build lots of Network I/O to talk to devices in the factory, threading database and reporting. Then the whole webserver portion as well.




Here is what I am thinking, tell me if I am crazy.

1) A java app that runs on the Industrial PC and polls the machinery for data and puts it into a database. It also allows data to be pushed back
to the machines.


2) An applet that can be embedded into pages to chart on various data from the database.


3) An Ajax page that can view and write data to the machines through 1.

Does that sound crazy? It makes sense in my mind.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Jon Parise:]   A java app that runs on the Industrial PC and polls the machinery for data and puts it into a database. It also allows data to be pushed back to the machines.

Sounds like something I could really get interested in, send me a few private messages about what it is you have tried to do and what your routine duties are and how your boss would feel about it and so on.

[Jon Parise:]   An applet that can be embedded into pages to chart on various data from the database.

This is starting to get a little involved, but most definitely do-able.

[Jon Parise:]   An Ajax page that can view and write data to the machines through 1.

I just googled ajax and the machine hung, too many people trying to do too many marvelous miracles, but ajax is the web-engine of choice today - and because it is to one extent or another open source the work can be adapted one way or another. We would have to do a reality check to ascertain the achievability of this idea. If nothting else, aj would provide user-interface prototyping out of the box.

[Jon Parise:]   Does that sound crazy? It makes sense in my mind.

Define crazy.
 
Jon Parise
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone,

Just a quit update on the project status.

I did manage to get a good start on the J2SE portion. This is a lower priority project much to my dismay, so I haven't been pouring too much time into it.

The communications stack has been finished, I can now read and write data to the equipment over the Ethernet. Each piece of equipment gets it's own thread and I incorporated retries and disconnect/reconnect protection. It seems to be running well, I was logging for 5 pieces of equipment today no problem. The data that gets reported on is kept in various tables in the Database.


I also have a basic database abstraction layer written, lets me query either postgres or derby using the same code. Pretty standard, change one parameter and switch databases without changing anything else.

Also, the current values for the equipment are kept in the Database and those tables are updated every 10 seconds. The plan is to have the web application pull the data out of those tables for display. I also may use a table for the web app to send requests to the standard app.


For the reporting I have begun and application using the Open Office API. Basically I have it writing to Calc. I can set Title, write blocks or cells of data. Charting is on the agenda next. The user can save either in .ods or .xls(Excel) format. The higher ups wanted Excel support.

Soon I will start on the web portion of this thing. Any thoughts on how to make a J2SE Application and a web application "talk" I am thinking of using the database as the communication layer, but is there something better I could try?

Thanks,

Jon
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jon Parise:
...(SNIP)...
Soon I will start on the web portion of this thing. Any thoughts on how to make a J2SE Application and a web application "talk" I am thinking of using the database as the communication layer, but is there something better I could try?
...(SNIP)...



The J2SE will be the interface between the applet and the database, java is stuffed with database tools - Start with:

  • JavaRanch Cattle Drive - Servlets
  • JavaRanch Cattle Drive - JDBC

  • With your experience, you will appreciate the gradient introduction.
    reply
      Bookmark Topic Watch Topic
    • New Topic