is Ruby the right language for these projects?

R

Ruby Baby

Please forgive my self-centered question. I've been learning all about Ruby
for the past month, but had one main question on my mind, that I don't know
how else to answer. So I have to ask the experts on the list....

I have two pretty-big programming projects coming up that I'm in complete
control of. I can decide the language, requirements, and everything.

I'm not a "real" programmer that went to college for this or has years of C.
I'm just a person that learned HTML then PHP then had my PHP projects grow to
the point where I realized I needed the benefits of OOP.

I just finally really understood OOP only a month ago. It took a few books,
but I really "get" it now, and love it.

I started learning Ruby then, as a way to force myself into OOP style, instead
of sticking with PHP and accidently slipping back into procedural style.
(What better way to learn object-thinking than with a language that is ALL
objects?)

So now it's time to start my two big projects:

#1 - a web-store. (http://www.cdbaby.com - It's pretty popular. A lot of
traffic.) Right now the code is 5 years of spaghetti, started when I only
knew HTML and slowly built with PHP as I was learning it. It's such a mess
that it needs a total overhaul, which I'm really excited about.

It's not your usual embedded-bits-in-HTML, it's fully 100% PHP-driven now,
with all HTML being pulled from templates dynamically merging with MySQL
data.

I'm ready to re-do it from scratch, using whatever language and tools are
best.


#2 - a standalone app for downloading and converting-or-burning hifi audio
files (like WAV). A little free GUI program that would have to run on
Windows, Mac OS X, and Linux, using each OS's native GUI look & feel.



Neither project is any big rush. The DOING & LEARNING is more of the point
than the end-product. (That's why I don't just hire an expert. I like to
learn for myself.)

I *like* Ruby. I don't mind that it's not so popular. I don't need to
impress any boss or investors. I'd *like* to use it for both of these
projects...

... but I can't tell if I would be making a big mistake, in the end.

Though I want to learn and use Ruby for these, I shouldn't do it if the
end-result will not also be the best.

SO:

Should I stick with PHP for the web-store, but rewrite it with an OOP style?
Should I hire someone that knows C or Python for the standalone audio app?

What do you guys think?

Any opinions appreciated.
 
G

gabriele renzi

P

#1 - a web-store. (http://www.cdbaby.com - It's pretty popular. A lot of
traffic.) Right now the code is 5 years of spaghetti, started when I only
knew HTML and slowly built with PHP as I was learning it. It's such a mess
that it needs a total overhaul, which I'm really excited about.

It's not your usual embedded-bits-in-HTML, it's fully 100% PHP-driven now,
with all HTML being pulled from templates dynamically merging with MySQL
data.

mod_ruby is quite fast, and many people said that ruby+fastcgi is
awesome. You mai like to look at eruby, amrita and cgikit, they're
incredibly powerful for web dev, imho


#2 - a standalone app for downloading and converting-or-burning hifi audio
files (like WAV). A little free GUI program that would have to run on
Windows, Mac OS X, and Linux, using each OS's native GUI look & feel.

You could use Tk (that may fit your needs, cause you don't need
something too fancy) or wait for wxruby to become more mature. I don't
think there are other choiches available ATM that would give you
native L&F.

(Well, you may even write a common GUI class and redefine it on any
platform using native widgets..)
 
P

Phil Tomson

I just finally really understood OOP only a month ago. It took a few books,
but I really "get" it now, and love it.

I started learning Ruby then, as a way to force myself into OOP style, instead
of sticking with PHP and accidently slipping back into procedural style.
(What better way to learn object-thinking than with a language that is ALL
objects?)

So now it's time to start my two big projects:

#1 - a web-store. (http://www.cdbaby.com - It's pretty popular. A lot of
traffic.) Right now the code is 5 years of spaghetti, started when I only
knew HTML and slowly built with PHP as I was learning it. It's such a mess
that it needs a total overhaul, which I'm really excited about.

It's not your usual embedded-bits-in-HTML, it's fully 100% PHP-driven now,
with all HTML being pulled from templates dynamically merging with MySQL
data.

I'm ready to re-do it from scratch, using whatever language and tools are
best.

I'll leave this one to others to answer - web programming isn't my area of
expertise.

(BTW: I just heard about cdbaby a few weeks ago - cool site :)
#2 - a standalone app for downloading and converting-or-burning hifi audio
files (like WAV). A little free GUI program that would have to run on
Windows, Mac OS X, and Linux, using each OS's native GUI look & feel.

Why not? Seems like a good Ruby project. The main problem is to choose a
GUI toolkit that will work on all three. It sounds like wxRuby (wxWindows
GUI toolkit) would be the one to use in this case: it runs on all three
platforms and uses native widgets (as I recall). Note: wxRuby's still a
bit young, but it's probably usable at this point and it's being actively
developed.
Neither project is any big rush. The DOING & LEARNING is more of the point
than the end-product. (That's why I don't just hire an expert. I like to
learn for myself.)

I *like* Ruby. I don't mind that it's not so popular. I don't need to
impress any boss or investors. I'd *like* to use it for both of these
projects...

.. but I can't tell if I would be making a big mistake, in the end.

Though I want to learn and use Ruby for these, I shouldn't do it if the
end-result will not also be the best.

SO:

Should I stick with PHP for the web-store, but rewrite it with an OOP style?
Should I hire someone that knows C or Python for the standalone audio app?

Regarding the audio app: Initially you said there is no rush for this, but
you're considering hiring someone. Is this going to be a commercial app?

If there's no big rush, I think wxRuby would fit the bill for you (see:
http://rubyforge.org/projects/wxruby/ ). I qualify the statement because
the wxWindows bindings for Ruby are still young, so you may need to work
with the project leaders to help iron out any problems you (might) find.
But like I said above, wxRuby is an active project and they seem to be
pretty motivated.

Phil
 
D

Dave Brown

: Should I stick with PHP for the web-store, but rewrite it with an OOP style?
: Should I hire someone that knows C or Python for the standalone audio app?
:
: What do you guys think?

I'd say go with Ruby for both of 'em, but do the audio app first, to
get you used to thinking in Ruby.

One of the most powerful things about Ruby is that it makes it
super-easy to do a quick prototype to see if an idea is going to
work, and then fill in the details afterwards. You could
certainly use that to great advantage in the web-store app.

--Dave
 
R

Robert Klemme

Phil Tomson said:
Why not? Seems like a good Ruby project. The main problem is to choose a
GUI toolkit that will work on all three.

Is that really the main problem? What about doing the conversions and
burning? If it's not done by some external command line tool that simply
has to be controlled by the Ruby app, it's likely that you have to develop a
C extension for the conversion / burning work to get the speed you need.
Additionally burning is likely to be heavily platform dependend.

Just my .02 Euro

robert
 
R

Ruby Baby

What about doing the conversions and
burning? If it's not done by some external command line tool that simply
has to be controlled by the Ruby app, it's likely that you have to develop a
C extension for the conversion / burning work to get the speed you need.

Sorry - to be clear:

I'm not going to write Yet Another CD Burner.

It's just going to download FLAC files (http://flac.sourceforge.net/)
then let the user convert them into Ogg (http://www.vorbis.com/) or MP3 using
the LAME mp3 converter (http://lame.sourceforge.net/).

For burning, I'll probably just let the user select tracks then make an audio
ISO image, for them to open in whatever CD burning app they want.
 
R

Robert Klemme

Ruby Baby said:
Sorry - to be clear:

I'm not going to write Yet Another CD Burner.

Well, ok, that makes it simpler. Then ruby can surely do the job.

Regards

robert
 
A

Aredridel

So now it's time to start my two big projects:
#1 - a web-store. (http://www.cdbaby.com - It's pretty popular. A lot of
traffic.) Right now the code is 5 years of spaghetti, started when I only
knew HTML and slowly built with PHP as I was learning it. It's such a mess
that it needs a total overhaul, which I'm really excited about.

It's not your usual embedded-bits-in-HTML, it's fully 100% PHP-driven now,
with all HTML being pulled from templates dynamically merging with MySQL
data.

That sounds like what I'm coding in ruby with fastcgi right now. It's
working great so far.

I use Amrita as a template engine, a model-view-controller structured
framework for the app, and mysql as a backend database, with a -very-
light object-relational layer that I hacked together on top.
#2 - a standalone app for downloading and converting-or-burning hifi audio
files (like WAV). A little free GUI program that would have to run on
Windows, Mac OS X, and Linux, using each OS's native GUI look & feel.

Sounds like a job for wxRuby. API's a bit weird, but it works...

Ari
 
G

gabriele renzi

I don't know if Ruby would stand up to the performance but I _WISH_
there were an implementation of Zope <http://zope.org> and Plone
<http://plone.org/>

That would make a splash, imho.

There is a ruby application server on rubyforge,cerise, that is under
heavy development. It is based on webrick+amrita+soap4r and IIRC a db
persistence layer. It may become something really impressive, if
people start to use it and hack it :)

It seem that there is even an application server written in ruby from
a greek company, navel.gr . Looking at their website it seem really
impressive, coupled with an OODBMS and many usual features like rss,
authentication etc.. and I remember the 'opensource' concept someway
related to this..
 
M

Martin DeMello

gabriele renzi said:
There is a ruby application server on rubyforge,cerise, that is under
heavy development. It is based on webrick+amrita+soap4r and IIRC a db
persistence layer. It may become something really impressive, if
people start to use it and hack it :)

Has anyone done performance tests on webrick vs apache+mod_ruby?

martin
 
D

Dan Janowski

This is a good question, but you are asking devotees so are guaranteed
a bias in the answers.

Having said that, I have been actively developing for the web with
Ruby, mod_ruby, fastcgi and clearsilver (www.clearsilver.net). I do not
dig the eRuby style; I try to keep my code far away from presentation.
Clearsilver is a great templating system, although it takes a little
while to figure out how to integrate it well. I have written some
apache handlers with mod_ruby and they are super powerful.

fastcgi with session affinity blows away everything I have seen for
maintaining state and in memory caches and works with lots of
languages. It is fast, flexible and easy to debug when running the app
as an external server.

I used to do web with PHP and Java. Java is a pain in the arse for too
many reasons to list. PHP is an annoyingly weak language (bogus OO,
inconsistent interfaces) even if it does have all kinds of useful shit
stuck to its carriage. I am converting a site from pure PHP to all Ruby
(www.strandbooks.com).

Ruby's cgi class (in 1.6 at least) has some shortcomings (e.g. URL
variables are parsed for GET and not POST), which I have fixed locally.

Dan
 
J

jbritt

Dan said:
...
I used to do web with PHP and Java. Java is a pain in the arse for too
many reasons to list. PHP is an annoyingly weak language (bogus OO,
inconsistent interfaces) even if it does have all kinds of useful shit
stuck to its carriage. I am converting a site from pure PHP to all Ruby
(www.strandbooks.com).


Ooh, sweet. One of my most-favorite bookstores to be Ruby-powered.

That site makes me miss my home town :(


James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top