# ROR vs Java vs AJAX for a web application?

**URL:** <https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497>\
**Category:** Rails\
**Created:** [July 15, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497 "2007-07-15T22:36:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 15, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/1 "2007-07-15T22:36:20Z")

</div>

I’m considering developing a consumer focused web application that  
will use lots of graphs. These graphs need to be manipulated using  
controls such a sliders, increase/decrease buttons, etc and the graphs  
will need to dynamically change in real time. Drag and drop  
functionality within the graphs would be a huge plus. I am a project  
manager, not a developer, and I am exploring the most appropriate  
technologies to use. Besides the dynamic UI capability, I will need  
simple, scalable, and secure code that can be built fast and modified  
easily in a agile dev environment.

I would really appreciate someone helping understand the benefits and  
risks associated with each of the technologies listed, with a focus on  
ROR. IF you can point to relevant samples or current products/sites  
outside of the 37Signals links, that would be a big help too.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 16, 2007, 12:40am UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/2 "2007-07-16T00:40:28Z")

</div>

I’m assuming you want the graphs to be changed within the browser  
without a page reload? That should be a decision made early on. It  
sounds like your choice is between RoR/Ajax, Java/Ajax, Java/Applet,  
Java/JavaFX. If you’ve already decided to go the Ajax route for  
displaying the graphs, the choice Java or Ruby is no different than  
for any other project since they don’t affect your graphs (which will  
be done in javascript and generated in the browser).

The demo page for the PlotKit javascript library:  
[http://media.liquidx.net/js/plotkit-tests/dynamic.html](http://media.liquidx.net/js/plotkit-tests/dynamic.html)

Your best bet would be to have a technical guy you trust do this  
evaluation. There are plenty of articles evaluating RoR as an  
enterprise solution. Just look around.

Chris

---

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 16, 2007, 2:11am UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/3 "2007-07-16T02:11:35Z")

</div>

Why not use flash for the dynamic control? Sounds perfect for such a  
thing…

On 7/15/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The demo page for the PlotKit javascript library:
> 
> > will use lots of graphs. These graphs need to be manipulated using  
> > ROR. IF you can point to relevant samples or current products/sites  
> > outside of the 37Signals links, that would be a big help too.
> > 
> > Thanks in advance!
> 
> >

## –

## seth at subimage interactive

## [http://sublog.subimage.com](http://sublog.subimage.com)

## Cashboard - Estimates, invoices, and time tracking software - for free! [http://www.getcashboard.com](http://www.getcashboard.com)

Substruct - Open source RoR e-commerce software.  
[http://dev.subimage.com/projects/substruct](http://dev.subimage.com/projects/substruct)

---

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 16, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/4 "2007-07-16T15:10:19Z")

</div>

I’ve done a lot with XML/SWF charts and AJAX. There’s a plugin called  
ZiYa  
for Rails that makes those charts work great in a rails application.  
The  
charts look great cos they’re Flash, and you can customize how they  
look.

ZiYa plugin: [http://ziya.liquidrail.com/](http://ziya.liquidrail.com/)

I’ve used these charts in PHP and ASP before, works fine, just need to  
pass  
XML to them, so no matter what language you choose to use, this could be  
an  
option.

On 7/16/07, removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 16, 2007, 8:02am UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/5 "2007-07-16T08:02:02Z")

</div>

We have made some very good experiences using flex and the charting-  
package. The Charts look&feel great, are easy to setup and customise  
and if you have the time, you can tweak it to your hearts desire,  
altough it comes with rich funtionality out-of-the-box. On the last  
project we used it in conjunction with seam/jsf/jboss, which worked  
quite ok: Communication with the server can either be done via  
remoting or - as we prefer - via simple exchange of xml: This allows  
you to setup tests more easily, as the url can be invoked and the xml  
parsed without the need of some remoting-frameworks and/or  
javascript.

We recently switched from seam/jsf to rails: REST-support was the main  
reason. Most probably, you will have a need to push out your graph-  
data for various clients (eg. XML for flex and testing, json for an  
ajax-client, csv for excel-import) - this is where respond\_to comes in  
very handy: This feature really keeps your codebase very tight and  
reduces the amount of code needed signifgicantly (compared to a jsf/  
jee app). You can find some good examples for connecting flex&rails  
here: [Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/rubyonrails-ria-sdk-by-adobe/)

However, switching from java to ror is not without problems, basically  
because you have to learn your old tricks in a new way - It takes a  
while to get used to the new syntax, libraries etc. and especially  
learning how to find bugs on rails takes some time: There are some  
areas where you just notice that Java is simply more mature - until  
now, none of the issues we encountered where a real showstopper, and  
the amount of code you write _not_ with rails made the switch  
worthwhile… hope this helps. stf

---

<div class="post-metadata">

**Author:** ![reg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@reg](https://www.ruby-forum.com/u/reg)\
**Post date:** [July 16, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/ror-vs-java-vs-ajax-for-a-web-application/109497/6 "2007-07-16T15:11:19Z")

</div>

I would have to second vierundsechzig.

Though I rolled my own graphs, because I thought i would have more  
flexibility (I haven’t used the Flex graphs so i cannot tell you whats  
better).  
It was pretty easy to get lots of functionality, though i have not yet  
done a bloomberg style magnify (drag a box around the curve, then  
redraw the selected box as the whole graph), it should be easy.

However I do not need the graphs to update with change in data on the  
server, without a user action.

If you want a push information to the graph (rather than a continual  
poll of the server), perhaps for a minute by minute chart on daily  
stock chart, then you may need something like the Macromedia Flex and  
Flash Communication Server. I have not figured away to program a http  
listener in ActionScript for the client.

Alternatively Java might provide you with the easier/cheaper push  
technology, but in my opinion the backend (instead of Rails) and  
graphs stuff will be much harder to build from scratch with a Java/  
J2EE framework.

J

On Jul 16, 8:00 am, “removed\_email\_address@domain.invalid”
