Re: jruby here?

Fidel Viegas
Tue, 21 Dec 2010 11:27:56 -0000

On 12/19/10, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> On 18 December 2010 21:30, Fidel Viegas
<fidel.viegas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> You use grails too?
> I''d like to have some opinions about grails and RoR.
> I use both, but lately I prefer grails to develop my applications.
> With RoR you have to think about tables, create foreign key, and so
> on, with you have to create your domain classes and that''s all.

Yes, I do use Grails as well, and at this precise moment I am working
on a project that required me to use it.

Before jumping into Rails as my primary development framework, I used
to use mainly Grails, and J2EE before that. Groovy is so much like
Java that I just picked it quickly. I also learned Ruby quickly as it
is pretty similar in syntax to Python, which I have and still use it
quite a lot for System Administration.

I think both frameworks are pretty similar and pretty good, and Grails
has the advantage of allowing you to make use of existing Java
frameworks and tons of libraries available. Specially when you need a
reporting solution or support for a certain RDBMS, which does not
happen with Active Record. I haven''t really tried DataMapper or
another ORM framework.

I often decide on what framework to use based on the target platform,
RDBMS and reporting solution. For instance, if the target platform is
Windows, there is no doubt that I will use Grails, since Rails is not
very Windows friendly. If I don''t need any special RDBMS, advanced
reporting capabilities, or Windows, then I go for Rails. In fact I
only develop with Grails on the Windows platform. Other than that, I
use Rails.

In the beginning I used Rails only for websites, but now we are using
it even for developing financial and accounting software.

Now with regards to thinking in tables terms, I prefer it over letting
a framework do everything for me. Contrary to what many people can
say, Object-Oriented programming and the Relational model are
compatible to a certain extent. There are certain OO concepts that are
hard to implement in a Relational model. Take inheritance for
instance. How many approaches do you have for that? They all have
their pros and cons, but none is a perfect match for the real concept.
So, to a certain degree you need to think in terms of tables or use an
ORDBMS, which is easier to map.

The relational model is here to stay for a very long time.

All the best,

Fidel.