Hi Scott,
my appetite is definitely being whetted!! Please see my replies below:
I come from a JBoss/J2EE/Java background and I have been working on my
first RoR project for the last several months… all-in-all it is a
pleasure! If you are new to RoR, it will take a bit to get used to the
syntax but once you do, it is amazing how quickly one can get things
done and do it in a structured, test-oriented way.
From the various docs and examples I have seen it definitely does seem like a quick development environment!
RoR has ActiveRecord that is analagous to Hibernate or EJB3. It
supports many of the features and maps relationships nicely. Some of
the features I don’t see (someone please correct me if I am wrong)
are:
- lazy-loading/eager-loading ability
- object caching (like JBoss Cache)
OK! I am using hibernate with ehcache handling lazy object caching. Can anyone else confirm whether ActiveRecord supports lazy-loading/object caching?
In your situation, I wonder, rather than do a total immediate rewrite,
seeing you are using JBoss, why not keep JBoss as your object/db
broker with Hibernate and extend it out using Web Services and call
that from a RoR front-end? That way, you could migrate slowly rather
than wholesale.
Great idea! I will look into this as a viable option.
The five main areas of concern to me are as follows:
-
Database.
I am using postgreSQL 8.1. Would rails be able to reverse engineer the required ActiveRecord maps from the dB schema? From what I understand of rails convention table names need to be pluralized. How would the reverse engineering process handle the fact that none of my table names are pluralized?!
-
Form validation
I am using Ajax to handle all form validation in cocoon. In cocoon form dev/validation would be handled by:
a. Specifying that you wish Ajax to handle validation as so:
<ft:form-template action="
login.kont" name=“Form1” method=“POST” ajax=“true”>
b. Defining your form widgets in a seperate document as so:
<ft:widget id=“password”>
<fi:styling size="30" type="password" class="keyinbox" style="background-color:#C9C4BD;" />
</ft:widget>
c. Defining your validation, against your widgest, in another document as so:
<fd:field id="password" required="true">
<fd:datatype base="string"/>
<fd:validation>
<fd:length min="5" max="20"/>
</fd:validation>
</fd:field>
- Paypal API.
I have recently come across a ruby/rails Paypal (directpayment api) so this area is covered.
- Image handling.
All artist images are stored in postgresql and read into the webapp as svg via Base64. Cocoon then allows for an svgTOpng or svgTOjpeg conversion before the image is rendered to the page. As an example I have various img calls defined as such:
So in effect the img tag is making a call to the database which in turn return the appropriate binary information, holds it in svg format before converting it to either PNG or JPEG. How would ruby/rails handle this?
- Email/Zip
I have a process where by the artist track files (mp3) a user may have ordered are pulled out from their order/order_items object, read in the file system directory and then zipped up. This zip is then emailed to the user. How would ruby/rails handle this process?