[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Technology solutions for Ruby?

Bruno Desthuilliers

7/15/2007 10:27:00 PM

vasudevram a écrit :
(snip)
>>To me this means Ruby, Python, or, as mentioned above, Perl. If anyone
>
> can tell me of a way to meet the above requirements in either Python
> or
> Perl, I'm all ears (I just prefer Ruby).

>>1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
> mature enough for production use.
(snip)
> wxPython has this (Native Look and Feel), I think

It does - just like wxRuby, since both are language-specific bindings to
the C++ wxWidgets toolkit.

And FWIW, wxPython has been used on production for many years, so I
think it qualifies as "production ready" !-)

(snip)
>>2. Databases - contemplating using ActiveRecord, but I would like to use
> ODBC to support multiple types of DB's in a uniform way (if you know
> of
> alternatives to ODBC or ActiveRecord, please let me know).

In Python, you may want to have a look at SQLAlchemy, which offers lots
of things from the "db abstraction layer" to the full-blown (and
possibily somewhat ActiveRecord-like, cf the Elixir project) ORM.

(snip)
>>3. Binary - Are there any utilities for compiling Ruby into a binary
> executable? The issue is twofold, speed, and not handing the
> customer
> the source :)

<OP>
IIRC, Ruby is actually still an interpreted language. Python is much
like Java wrt/ this issue : it's byte-compiled (the difference being
that this step is automagically managed by the VM).

IOW, you won't gain any speed from the existing packaging systems(but
then, if your project is mostly a GUI/DB tunnel, the two most critical
parts are already somewhat optimized). And the level of protection
gained from these packaging systems is very debatable at best (which,
FWIW, is also the case with Java).
</OP>

(snip)
> I first learned Python, have been using it for some time for various
> projects, and then learned Ruby, and have done some projects with Ruby
> too.
>
> I've been reading both the Ruby Cookbook and the Python Cookbook
> rather thoroughly in the last few weeks (and trying out and modifying
> many of the recipes), and what I've observed is that the two languages
> are roughly similar in features.

Yes.

(snip)
> For more advanced language features related to object-orientation,
> metaclasses / metaprogramming, both have some support,

s/some/great/g

Both Ruby and Python are known for this.

> but you might
> or might not be able to do in one, what you can do in the other.

I'd say that - wrt/ "advanced" programming tricks - *most* of what you
can do with one can be done with the other - but usually in a *very*
different way. While Ruby and Python have similar features and may look
very similar at first sight, their respective object models are totally
different.

<OP>
Basically, it's a matter of
- which language *you* prefer
- which one has the best libs for your app

It seems that, in your case, you prefer Ruby but Python may *or not*
have the best/more mature toolkit. So the best thing to do would be to
first try to write a quick 'proof of concept' program in the language
you prefer. Then, if you're still in doubt, write the same program in
Python.

My 2 cents (and friendly salutations to the Ruby community).
2 Answers

Bruno Desthuilliers

7/21/2007 1:00:00 PM

0

vasudevram a écrit :
> Bruno Desthuilliers wrote:
>
>
>>s/some/great/g
>>
>>Both Ruby and Python are known for this.
>
> Thanks for the info.

This is not exactly a scoop, you know ?-)

>>I'd say that - wrt/ "advanced" programming tricks - *most* of what you
> > can do with one can be done with the other - but usually in a *very*
>> different way. While Ruby and Python have similar features and may
>> look very similar at first sight, their respective object models are
>> totally different.
>
> Can you briefly explain what you mean by "their respective object
> models are totally different"? Do you refer to how the object-
> orientation (classes, objects, etc.) is implemented in the two
> languages?

Obviously, yes.

vasudevram

7/24/2007 6:25:00 PM

0


Bruno Desthuilliers wrote:

>s/some/great/g

>Both Ruby and Python are known for this.

Thanks for the info. (I don't know much about metaprogramming etc. in
either languages - just started exploring those topics recently.)


>I'd say that - wrt/ "advanced" programming tricks - *most* of what you
can do with one can be done with the other - but usually in a *very*
different way. While Ruby and Python have similar features and may
look
very similar at first sight, their respective object models are
totally
different.

Can you briefly explain what you mean by "their respective object
models are totally different"? Do you refer to how the object-
orientation (classes, objects, etc.) is implemented in the two
languages?

Thanks
Vasudev