[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Technology solutions for Ruby?

Michael Reiland

7/16/2007 4:53:00 AM

I'm contemplating writing an application in Ruby but in order to do so I
have some requirements that I hope everyone can help me out with.

This is for a primarily windows application, however I'd like to keep
the door open for Mac/Linux.


1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
mature enough for production use. Does anyone have any experience with
this and/or can you offer alternatives that provide a native look and
feel (I

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).

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 :)


I have no experience with developing/deploying Ruby in a
"shrinkwrapped-esque" environment and would appreciate input from those
with more experience.

--
Posted via http://www.ruby-....

33 Answers

Bruno Desthuilliers

7/15/2007 10:27:00 PM

0

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).

snacktime

7/16/2007 5:25:00 AM

0

On 7/15/07, Michael Reiland <mreiland1978@yahoo.com> wrote:
> I'm contemplating writing an application in Ruby but in order to do so I
> have some requirements that I hope everyone can help me out with.
>
> This is for a primarily windows application, however I'd like to keep
> the door open for Mac/Linux.
>
>
> 1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
> mature enough for production use. Does anyone have any experience with
> this and/or can you offer alternatives that provide a native look and
> feel (I
>
wxruby is the best that I'm aware of, and I wouldn't even think of
creating a production windows gui with it.

> 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).

Not sure what you mean by uniform. Activerecord is pretty uniform
from the perspective of how you use it regardless of the database.
There is also ruby-dbi, similar to the perl dbi.

>
> 3. Binary - Are there any utilities for compiling Ruby into a binary
> executable?

No.


You might take a look at Jruby.

Chris

Travis D Warlick Jr

7/16/2007 5:34:00 AM

0

Michael Reiland wrote:
> 1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
> mature enough for production use. Does anyone have any experience with
> this and/or can you offer alternatives that provide a native look and
> feel (I

GUI isn't my thing, sorry.

> 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).

ActiveRecord does pretty well at supporting multiple types of DBs
Some currently supported adapters currently included with ActiveRecord:
DB2, Firebird, FrontBase, Mysql, OpenBase, Oracle, SQlite, MS SQL Server
(Windows only), and Sybase. However, you can always create your own by
inheriting ActiveRecord::ConnectionAdapters::AbstractAdapter

I've never seen it used, but OpenLink has an ODBC Adapter:
http://odbc-rails.rub...

> 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 :)

I believe there is one for .NET, and I know of a couple in design or
proof-of-concept stages, but that's it. (Google: ruby compiler)

--
Travis Warlick

"Programming in Java is like dealing with your mom --
it's kind, forgiving, and gently chastising.
Programming in C++ is like dealing with a disgruntled
girlfriend -- it's cold, unforgiving, and doesn't tell
you what you've done wrong."

M. Edward (Ed) Borasky

7/16/2007 5:44:00 AM

0

Michael Reiland wrote:
> I'm contemplating writing an application in Ruby but in order to do so I
> have some requirements that I hope everyone can help me out with.
>
> This is for a primarily windows application, however I'd like to keep
> the door open for Mac/Linux.
>
>
> 1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
> mature enough for production use. Does anyone have any experience with
> this and/or can you offer alternatives that provide a native look and
> feel (I

Forget native look and feel -- go for *quality* look and feel. I'd
recommend Qt4-qtruby for that. It just looks better than any other
toolkit, and it's extraordinarily well documented.

>
> 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).
unixODBC is a pain in the ass to work with ... there are very few
free-as-in-freedom drivers. I'd go with ActiveRecord, since it binds to
Oracle, MS SQL, MySQL, PostgreSQL and SQLite. It's probably not all that
difficult to extend it to other databases.
>
> 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 :)
The closest thing is the Zen Obfuscator, I think.

>
>
> I have no experience with developing/deploying Ruby in a
> "shrinkwrapped-esque" environment and would appreciate input from those
> with more experience.

Do you have experience developing *anything* in a shrinkwrapped-esque
environment? Especially Perl, because I think you'll find the
ActiveState Perl tools are quite good for this, and Perl will do
everything Ruby can do -- except be Ruby, of course. :) I won't stand in
your way if you want to do this in Ruby.
>


John Joyce

7/16/2007 6:37:00 AM

0


On Jul 16, 2007, at 12:43 AM, M. Edward (Ed) Borasky wrote:

> Michael Reiland wrote:
>> I'm contemplating writing an application in Ruby but in order to
>> do so I
>> have some requirements that I hope everyone can help me out with.
>>
>> This is for a primarily windows application, however I'd like to keep
>> the door open for Mac/Linux.
>>
>>
>> 1. GUI - Native Look and Feel. According to wxRuby the bindings
>> aren't
>> mature enough for production use. Does anyone have any experience
>> with
>> this and/or can you offer alternatives that provide a native look and
>> feel (I
>
> Forget native look and feel -- go for *quality* look and feel. I'd
> recommend Qt4-qtruby for that. It just looks better than any other
> toolkit, and it's extraordinarily well documented.
>
>>
>> 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).
> unixODBC is a pain in the ass to work with ... there are very few
> free-as-in-freedom drivers. I'd go with ActiveRecord, since it
> binds to
> Oracle, MS SQL, MySQL, PostgreSQL and SQLite. It's probably not all
> that
> difficult to extend it to other databases.
>>
>> 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 :)
> The closest thing is the Zen Obfuscator, I think.
>
>>
>>
>> I have no experience with developing/deploying Ruby in a
>> "shrinkwrapped-esque" environment and would appreciate input from
>> those
>> with more experience.
>
> Do you have experience developing *anything* in a shrinkwrapped-esque
> environment? Especially Perl, because I think you'll find the
> ActiveState Perl tools are quite good for this, and Perl will do
> everything Ruby can do -- except be Ruby, of course. :) I won't
> stand in
> your way if you want to do this in Ruby.
>>
>
>
why go to all the trouble of trying to obfuscate anything?
Just sign a licensing agreement.
If your customer violates it, your customer is in deep doodoo in court.
Lawyers will scare almost anybody out of doing stuff.

If you're worried about it too much, you could always be annoying and
put a very obfuscated phone home function in buried as an extension
of one of the higher classes. And give them a version that is
stripped of documentation.

In the end though, if you're using a scripting language, it is utter
foolishness to try to hide the code. Even compiled languages can be
decompiled well enough and often enough.

SonOfLilit

7/16/2007 6:51:00 AM

0

The ruby way is to consider building any app with the requirements you
listed as a Rails app. Is there a reason for you not to?


Aur

Michael Reiland

7/16/2007 7:16:00 AM

0

At the heart of the issue is the fact that I refuse to use Java for this
project, I prefer not to use .Net because of the portability issues, and
I'd like to get away from C++ for obvious reasons.

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).


--
Posted via http://www.ruby-....

Michael Reiland

7/16/2007 7:21:00 AM

0

SonOfLilit wrote:
> The ruby way is to consider building any app with the requirements you
> listed as a Rails app. Is there a reason for you not to?
>
>
> Aur


The project is to replace an existing desktop software solution targeted
towards small to midsized companies. I don't see any advantages to
moving it onto the web.



--
Posted via http://www.ruby-....

M. Edward (Ed) Borasky

7/16/2007 7:50:00 AM

0

snacktime wrote:
> On 7/15/07, Michael Reiland <mreiland1978@yahoo.com> wrote:
>> I'm contemplating writing an application in Ruby but in order to do so I
>> have some requirements that I hope everyone can help me out with.
>>
>> This is for a primarily windows application, however I'd like to keep
>> the door open for Mac/Linux.
>>
>>
>> 1. GUI - Native Look and Feel. According to wxRuby the bindings aren't
>> mature enough for production use. Does anyone have any experience with
>> this and/or can you offer alternatives that provide a native look and
>> feel (I
>>
> wxruby is the best that I'm aware of, and I wouldn't even think of
> creating a production windows gui with it.
>
>> 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).
>
> Not sure what you mean by uniform. Activerecord is pretty uniform
> from the perspective of how you use it regardless of the database.
> There is also ruby-dbi, similar to the perl dbi.
>
>>
>> 3. Binary - Are there any utilities for compiling Ruby into a binary
>> executable?
>
> No.
>
>
> You might take a look at Jruby.
>
> Chris
>
>

Yeah ... jRuby has a cross-platform GUI and all the database stuff. I
don't particularly like the typical Java GUI look and feel, but that's
just my personal taste.

SonOfLilit

7/16/2007 8:05:00 AM

0

> The project is to replace an existing desktop software solution targeted
> towards small to midsized companies. I don't see any advantages to
> moving it onto the web.

The advantage is that Rails gives a better API for GUI database
programming than any GUI library I know.

It also gives you absolute hiding of the source code.

You could also, BTW, implement the backend in Rails with a REST API
and the frontend with some GUI library.