Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > VB(ish) replacement

Reply
Thread Tools

VB(ish) replacement

 
 
Dave Boland
Guest
Posts: n/a
 
      07-20-2004
The other day I was asked if there is an open source replacement for VB6
that is cross-platform. I spent a little bit of time at Barnes-Noble
and looking at news groups, but don't have a good answer. Hope you can
help without geting into a language war. These will be for commercial
applications with a GUI.

What they seem to be looking for is:
1. High level language, but not necessarly VB compatible.
2. OOP
3. Reasonalble learning curve
4. Cross-platform
5. IDE and ability to graphically design windows.
6. Distribute programs as .exe's, so some sort of compiler needed.
7. Serial communications library (RS-232, 485, USB)
8. SNMP library
9. Good performance (not expected to be as fast as C/C++)
10. Windows are native to each O.S.
11. Database support of Access and MySQL

It looks like any of the three languages have most or all of what they
need, but I don't use scripting languages enough to give a good answer.

Dave,

 
Reply With Quote
 
 
 
 
Florian Gross
Guest
Posts: n/a
 
      07-20-2004
Dave Boland wrote:

> What they seem to be looking for is:
> 1. High level language, but not necessarly VB compatible.
> 2. OOP
> 3. Reasonalble learning curve
> 4. Cross-platform


Ruby has all these features. Blocks are a very handy tool for high-level
programming and Ruby's OOP model is part of its design and is very
consistently used throughout the language. The basics of Ruby are easy
to understand and I guess that new users will be able to program simple
things in it fluently in ~3 days. There'll be more to learn after that,
but it should all feel like natural extensions of the basics.

> 5. IDE and ability to graphically design windows.


There are IDEs, ArachnoRuby[1], and FreeRide[2] come to mind. There's
also a plug-in for Eclipse[3], but it still looks to be in an early
stage. AFAIK there's no way of using Ruby in a Delphi-style way for
designing windows yes, but this should be possible with Gtk[4]. (Gtk
lets you load windows from XML files and there are stand-alone editors
like Glade[5] available for that format.)

But still, I'd say that there's nothing that's as polished as Visual
Basic's IDE available yet.

> 6. Distribute programs as .exe's, so some sort of compiler needed.


This is possible with ExeRb[6] or RubyScript2Exe[7].

> 7. Serial communications library (RS-232, 485, USB)


A search on the Ruby Application Archive[8] turned up Ruby/SerialPort[9]
and Win32Serial[10] -- I've not used them yet so I don't know if they're
able to do everything you need. However Ruby lets you easily (way easier
than the other languages on your list) write extensions in C and other
languages so you could still add functionality in this area yourself in
case everything else fails.

> 8. SNMP library


I'm no expert in this area. A quick search on Google turned up
http://blog.humlab.umu.se/samuel/archives/000495.html -- it appears that
Ruby only has basic functionality for this right now, but that you can
still use the snmpget tool directly.

> 9. Good performance (not expected to be as fast as C/C++)


Ruby is slower than both Perl and Python -- I don't know if it's too
slow for you, but I'd suppose that some benchmarks might give you
definitive answers. Ruby's performance might change with Rite or a
Parrot-based Ruby. (But both won't be released in the closer future.)

> 10. Windows are native to each O.S.


This is possible with RubyGtk if you use a native renderer. Such a
native renderer for windows is WIMP[11]. I've used this and it seems to
look nifty. Here are some screen shots:

- http://noegnud.sourceforge.net/flgr/der_nativ.png (Gtk-based X-Chat2)
- http://noegnud.sourceforge.net/flgr/...r_arbeitet.png
(Freeciv, a Gtk-based game and a custom Ruby application which uses
RubyGtk. I'm using a non-standard Windows XP theme here.)

There are also other Toolkits available from within Ruby. I've heard
that wxRuby[12] (wrapper for wxWidgets) aims to look native on a lot of
platforms, but I've not really used myself yet. Another one you might
want to have a look at is FXRuby[13].

I've only really used Ruby/Gtk myself yet (for my usage it seemed to
have the nicest Ruby bindings) -- maybe somebody else can offer a
detailed comparison between the different toolkits...

> 11. Database support of Access and MySQL


You can either use MySQL directly via MySQL/Ruby[14] or you can use the
higher-level Ruby/DBI[15].

There's also the very high-level ActiveRecord[16] which tries to
abstract SQL away as efficiently as possible. It's a very impressive
project and has received great feedback.

The only way I can find for using access is directly via COM right now.
This would be done with Win32Ole[17].

Here are the URLs for the libraries and projects I mentioned:

[1] http://www.scriptolutions.com/arachno_ruby.php
[2] http://freeride.rubyforge.org/wiki/wiki.pl
[3] http://rubyeclipse.sourceforge.net/
[4] http://ruby-gnome2.sourceforge.jp/
[5] http://glade.gnome.org/
[6] http://exerb.sourceforge.jp/index.en.html
[7] http://www.erikveen.dds.nl/rubyscript2exe/index.html
[8] http://raa.ruby-lang.org/
[9] http://ruby-serialport.rubyforge.org/
[10] http://grub.ath.cx/win32serial/
[11] http://gtk-wimp.sourceforge.net/
[12] http://wxruby.rubyforge.org/
[13] http://www.fxruby.org/
[14] http://www.tmtm.org/en/mysql/ruby/
[15] http://ruby-dbi.rubyforge.org/
[16] http://activerecord.rubyonrails.org/
[17] http://raa.ruby-lang.org/project/win32ole/

Regards,
Florian Gross
 
Reply With Quote
 
 
 
 
Larry Bates
Guest
Posts: n/a
 
      07-20-2004
Others have answered most of the other questions.

> 11. Database support of Access and MySQL


Access databases can be accessed via ODBC,
DAO, or ADO interfaces on Windows. MySQL has
native interface from Python.

Questions you didn't ask:

12) Can interface to existing COM+ objects, write new
COM+ objects and write Windows services.

Python

13) Can write scripts, applications (console and GUI),
and web services with single language.

Python

14) Has extensive standard library to support email
(SMTP, IMAP), FTP, HTTP, logging, regular expressions,
arrays, and many more. Third party libraries for
imaging (Python Imaging Library), PDF generation
(ReportLab), Graphing (ReportLab Graphics) and
XML parsing (PyRXP by ReportLab). Just to name a
few.

Python

15) Easy to write C language extensions for language

Python

16) Code that you can actually understand when you
come back to read it a year later.

Python (priceless

You might want to take a look at the experience of
another company:

http://python.oreilly.com/news/disney_0201.html

HTH,
Larry Bates
Syscon, Inc.

"Dave Boland" <(E-Mail Removed)> wrote in message
news:FacLc.51848$(E-Mail Removed)...
> The other day I was asked if there is an open source replacement for VB6
> that is cross-platform. I spent a little bit of time at Barnes-Noble
> and looking at news groups, but don't have a good answer. Hope you can
> help without geting into a language war. These will be for commercial
> applications with a GUI.
>
> What they seem to be looking for is:
> 1. High level language, but not necessarly VB compatible.
> 2. OOP
> 3. Reasonalble learning curve
> 4. Cross-platform
> 5. IDE and ability to graphically design windows.
> 6. Distribute programs as .exe's, so some sort of compiler needed.
> 7. Serial communications library (RS-232, 485, USB)
> 8. SNMP library
> 9. Good performance (not expected to be as fast as C/C++)
> 10. Windows are native to each O.S.
> 11. Database support of Access and MySQL
>
> It looks like any of the three languages have most or all of what they
> need, but I don't use scripting languages enough to give a good answer.
>
> Dave,
>



 
Reply With Quote
 
Scott Rubin
Guest
Posts: n/a
 
      07-20-2004
Dave Boland wrote:
> The other day I was asked if there is an open source replacement for VB6
> that is cross-platform. I spent a little bit of time at Barnes-Noble
> and looking at news groups, but don't have a good answer. Hope you can
> help without geting into a language war. These will be for commercial
> applications with a GUI.
>
> What they seem to be looking for is:
> 1. High level language, but not necessarly VB compatible.
> 2. OOP
> 3. Reasonalble learning curve
> 4. Cross-platform
> 5. IDE and ability to graphically design windows.
> 6. Distribute programs as .exe's, so some sort of compiler needed.
> 7. Serial communications library (RS-232, 485, USB)
> 8. SNMP library
> 9. Good performance (not expected to be as fast as C/C++)
> 10. Windows are native to each O.S.
> 11. Database support of Access and MySQL
>
> It looks like any of the three languages have most or all of what they
> need, but I don't use scripting languages enough to give a good answer.
>
> Dave,
>


I'm fairly certain you can use python and glade together to make cross
platform GTK+ guis in a graphical way. I'm also fairly certain that it
meets all your requirements. There might be a way to use glade with
other gtk supporting languages. Also, KDevelop I think can do the same
with Qt stuff, but I don't know for sure since I haven't used it in a
long time. Don't you have any programmers who can make guis the "real"
way instead of drawing them with a VB type interface? it's not that hard
if you draw them on paper with a pencil and plan them out first.

-Scott
 
Reply With Quote
 
Charles Mills
Guest
Posts: n/a
 
      07-20-2004

On Jul 20, 2004, at 11:27 AM, Larry Bates wrote:
>
> 15) Easy to write C language extensions for language
>
> Python


As easy as or easier than Ruby?
-Charlie



 
Reply With Quote
 
Michael Neumann
Guest
Posts: n/a
 
      07-20-2004
Larry Bates wrote:
> Others have answered most of the other questions.
>
>
>>11. Database support of Access and MySQL

>
>
> Access databases can be accessed via ODBC,
> DAO, or ADO interfaces on Windows. MySQL has
> native interface from Python.


Ruby has this all, too

> Questions you didn't ask:
>
> 12) Can interface to existing COM+ objects, write new
> COM+ objects and write Windows services.
>
> Python


Not sure, but with Ruby you can access COM objects, script Excel for
example...

> 13) Can write scripts, applications (console and GUI),
> and web services with single language.
>
> Python


Ruby, too

Ruby has a cool SOAP implementation and WSDL.

> 14) Has extensive standard library to support email
> (SMTP, IMAP), FTP, HTTP, logging, regular expressions,
> arrays, and many more. Third party libraries for
> imaging (Python Imaging Library), PDF generation
> (ReportLab), Graphing (ReportLab Graphics) and
> XML parsing (PyRXP by ReportLab). Just to name a
> few.


SMTP, IMAP, FTP, HTTP, logging, regexps, arrays all standard in Ruby.
XML parser (REXML), YAML, SOAP and XMLRPC comes with Ruby by default.
...

> Python


Ruby

> 15) Easy to write C language extensions for language
>
> Python


Very easy in Ruby, too.

> 16) Code that you can actually understand when you
> come back to read it a year later.
>
> Python (priceless


Ruby

> You might want to take a look at the experience of
> another company:
>
> http://python.oreilly.com/news/disney_0201.html


http://www.rubygarden.org/ruby?RealWorldRuby

>>What they seem to be looking for is:
>>1. High level language, but not necessarly VB compatible.


Ruby: very high level

>>2. OOP


Ruby: pure OO (designed from the beginning on)

>>3. Reasonalble learning curve


Ruby: it's easy to get started, but there are lots of tricky details
(you only have to learn them if you're interested)

>>4. Cross-platform


Ruby. But Windows support in Ruby is not as good as in Python (AFAIK),
but there is a Windows Installer version available, which comes bundled
with lots of stuff.

>>5. IDE and ability to graphically design windows.


Arachno Ruby IDE. Commercial, but still alpha or beta release. Available
for Python, Perl and PHP, too. Lot's of features. Made in Germany

Design Windows: If Qt is an option (it costs a bit of money when used on
Windows or commercially), there's a brand new Qt/Kde binding for Ruby
based on Smoke.

http://developer.kde.org/language-bi...uby/index.html

With this, you can use all Qt and KDE widgets, and AFAIK even without
compiling any C sources (once you've compiled the Ruby-Smoke bindings).

Alternatively, there are FXRuby (www.fxruby.org), wxRuby
(wxruby.rubyforge.org), Tk or fltk bindings. But no usable graphical
designers for those.

>>6. Distribute programs as .exe's, so some sort of compiler needed.


available in Ruby: exerb

http://exerb.sourceforge.jp/index.en.html

>>7. Serial communications library (RS-232, 485, USB)


RS-232 libraries are available in Ruby. don't know about USB, but should
be easy to write a wrapper around libusb on linux. Don't know about Windows.

>>8. SNMP library


Several libraries in Ruby:

http://raa.ruby-lang.org/search.rhtml?search=snmp

Even one written in pure Ruby (brand new, only a few days old).

>>9. Good performance (not expected to be as fast as C/C++)


depends. Python is probably faster than Ruby, but not much (unless you
use psyco etc.).

>>10. Windows are native to each O.S.


wxRuby (not as major as wxPython, my personal feeling was, that's quite
slow). But I'd prefer FxRuby (Windows-like look on each platform).

>>11. Database support of Access and MySQL


Ruby/ODBC, two mysql libraries for Ruby. Ruby/DBI has ADO, ODBC and
Mysql drivers.

Of course Python is better known, and there are more commercial projects
written in Python than in Ruby.

For more libraries, Ruby's Application Archive is your friend:
http://raa.ruby-lang.org

Regards,

Michael


 
Reply With Quote
 
Florian Gross
Guest
Posts: n/a
 
      07-20-2004
Larry Bates wrote:

>>11. Database support of Access and MySQL

> Access databases can be accessed via ODBC,
> DAO, or ADO interfaces on Windows. MySQL has
> native interface from Python.


Using these new keywords I had another look at RAA and also found
Ruby/ODBC[1].

> Questions you didn't ask:
>
> 12) Can interface to existing COM+ objects, write new
> COM+ objects and write Windows services.
> Python


And also Ruby. I already mentioned that COM is possible through Win32OLE
and Windows services can be done with the Win32Utils[2].

> 13) Can write scripts, applications (console and GUI),
> and web services with single language.
> Python


And also Ruby. For web services we have eRuby (via mod_ruby)[3],
FastCGI[4]. There's a lot of templating engines and Instiki[5] is a nice
success story for using Ruby on the Web.

> 14) Has extensive standard library to support email
> (SMTP, IMAP), FTP, HTTP, logging, regular expressions,
> arrays, and many more. Third party libraries for
> imaging (Python Imaging Library), PDF generation
> (ReportLab), Graphing (ReportLab Graphics) and
> XML parsing (PyRXP by ReportLab). Just to name a
> few.
> Python


And also Ruby. Net protocol support (SMTP, POP, IMAP, FTP, HTTP, HTTPS)
and XML parsing (through REXML)[6] and a complete Web application
plattform (WebRick)[7] and also rich RPC capatibilities (via DRb[8] or
xmlrpc[9]) are part of the Standard Library.

PDF generation is available via PDF::Writer[10] and PDFLib[11], image
generation can be done with RMagick[12] or gRuby[13].

Advanced logging is usually done with Log4R[14].

There's more, but I can't list all of them, of course.

> 15) Easy to write C language extensions for language
> Python


This is actually seems to be easier in Ruby.

> 16) Code that you can actually understand when you
> come back to read it a year later.
> Python (priceless


Ruby is the clearest language I've seen yet and compared to Python some
critical things were in it from the beginning and not added as an
afterthought. (OOP comes to mind.)

> You might want to take a look at the experience of
> another company:
> http://python.oreilly.com/news/disney_0201.html


Ruby isn't widely used yet, but we already have some pretty interesting
success stories[15]: NASA, Motorola and IBM are three big corporations
already using Ruby.

More URLs:

[1] http://raa.ruby-lang.org/project/ruby-odbc/
[2] http://rubyforge.org/projects/win32utils/
[3] http://modruby.net/en/
[4] http://www.fastcgi.com/
[5] http://www.instiki.org/show/HomePage
[6] http://www.germane-software.com/software/rexml/
{7] http://www.webrick.org/
[8] http://www.eng.cse.dmu.ac.uk/~hgs/ruby/dRuby/
[9] http://www.fantasy-coders.de/ruby/xmlrpc4r/
[10] http://www.halostatue.ca/ruby/PDF__Writer.html
[11] http://www-ps.kek.jp/thitoshi/ruby/pdflib/index.html
[12] http://rmagick.rubyforge.org/
[13] http://gruby.sourceforge.jp/index.en.html
[14] http://log4r.sourceforge.net/
[15] http://www.rubygarden.org/ruby?RealWorldRuby

Regards,
Florian Gross
 
Reply With Quote
 
John J. Lee
Guest
Posts: n/a
 
      07-20-2004
Dave Boland <(E-Mail Removed)> writes:
[...]
> What they seem to be looking for is:
> 1. High level language, but not necessarly VB compatible.
> 2. OOP
> 3. Reasonalble learning curve
> 4. Cross-platform
> 5. IDE and ability to graphically design windows.
> 6. Distribute programs as .exe's, so some sort of compiler needed.
> 7. Serial communications library (RS-232, 485, USB)
> 8. SNMP library
> 9. Good performance (not expected to be as fast as C/C++)
> 10. Windows are native to each O.S.
> 11. Database support of Access and MySQL
>
> It looks like any of the three languages have most or all of what they
> need, but I don't use scripting languages enough to give a good answer.


Can't speak for Ruby, but I'm fairly sure both Perl and Python do fine
on all points but 3.

Python does fine on the remaining point. Perl fails *badly* here:

http://www.google.com/groups?threadm...%2540pobox.com


I've used a fair number of programming languages. Perl is the only
one I'd unhesitatingly call 'pathological'. And I do speak as an
admirer of the language: before Python was around and well-supported,
it served an important purpose. Now, though, it fills a much-needed
gap <wink>


John
 
Reply With Quote
 
Cameron Laird
Guest
Posts: n/a
 
      07-21-2004
In article <(E-Mail Removed)>, John J. Lee <(E-Mail Removed)> wrote:
>Dave Boland <(E-Mail Removed)> writes:
>[...]
>> What they seem to be looking for is:
>> 1. High level language, but not necessarly VB compatible.
>> 2. OOP
>> 3. Reasonalble learning curve
>> 4. Cross-platform
>> 5. IDE and ability to graphically design windows.
>> 6. Distribute programs as .exe's, so some sort of compiler needed.
>> 7. Serial communications library (RS-232, 485, USB)
>> 8. SNMP library
>> 9. Good performance (not expected to be as fast as C/C++)
>> 10. Windows are native to each O.S.
>> 11. Database support of Access and MySQL
>>
>> It looks like any of the three languages have most or all of what they
>> need, but I don't use scripting languages enough to give a good answer.

>
>Can't speak for Ruby, but I'm fairly sure both Perl and Python do fine
>on all points but 3.
>
>Python does fine on the remaining point. Perl fails *badly* here:
>
>http://www.google.com/groups?threadm...%2540pobox.com
>
>
>I've used a fair number of programming languages. Perl is the only
>one I'd unhesitatingly call 'pathological'. And I do speak as an
>admirer of the language: before Python was around and well-supported,
>it served an important purpose. Now, though, it fills a much-needed
>gap <wink>
>
>
>John


I'm going to complexify the story slightly: I'm unconvinced about
the health of the SNMP facilities for Python and Ruby. On the other
hand, VB's offerings in that category also didn't impress me in the
past ...

It's possible some or all of this has improved a lot in the last
year. I personally wouldn't mind working with SNMP under Python,
because I'm confident I can get it to do what I need. It might
frustrate a newcomer, though ...

Moreover, I perceive incoherence in the combination of 4., 6., 7.,
and 10. When you talk about ".exe-s", I wonder what "cross-plat-
form" means to you. Similarly, you really, *really* don't want to
be thinking about USB and such; with any concern for cross-platform
maintenance, you just want to read to and write from serial devices.

My first instinct would be to choose Tcl. People are doing this
sort of work happily with each of Perl, Python, Ruby, Tcl, and even
other languages.
 
Reply With Quote
 
tony summerfelt
Guest
Posts: n/a
 
      07-26-2004
On Thu, 22 Jul 2004 03:07:21 +0900, you wrote:


>My first instinct would be to choose Tcl.


i don't think there's an easier way to write a gui app than tcl/tk.
that was the main reason i chose it to write tkblog. i'm going to be
porting it to ruby, and the only thing i haven't settled on is which
ruby gui api to use...

i was going to use wxruby, but that seems to be in a bit of a flux. i
read recently that fxruby had a small(er) footprint, so i'm leaning in
that direction

> People are doing this
>sort of work happily with each of Perl, Python, Ruby, Tcl, and even
>other languages.


like rebol and lua. rebol has a wicked learning curve, but the built
in net protocols are very handy. it also has a the smallest footprint
of any of the above mentioned languages


http://home.cogeco.ca/~tsummerfelt1



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacement PSU for an ADSL Router Edward W. Thompson Wireless Networking 0 09-06-2005 10:40 AM
Replacement for FF calendar extension Dan Firefox 5 03-23-2005 08:38 PM
Replacement for AOL newsgroup access EJGroth Firefox 0 02-08-2005 02:41 PM
Calendar replacement William W. Plummer Firefox 1 07-02-2004 04:10 PM
Replacement For Access Point KS Wireless Networking 1 06-24-2004 04:40 AM



Advertisments