Why should I use Ruby on Rails

Hi sorry if this is the wrong forum please move this topic if need be.

So I am currently working on a capstone project for my senior year in
college. This project will be an inventory program for a small business
that runs out of the school. My professor has been exploring Rails and
has said he wants me to program in it.

The program will do some of the following. Check items out, check items
back in, create user profiles, and track items.

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

Darek Blankenbuhler wrote:

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

(Parenthetically, thinking you don’t have time is a “belief structure”
thing. If you instead believe you have time to research, answers will
then fall into your lap more easily.)

The reason Ruby on Rails is very useful is simple. The web was
invented with klutzy languages that put the needs of the language
designer above those of the programmer. Writing a for every
danged is just silly, but we are so familiar with that
convention we no longer question it.

Next, all the web languages were invented without bothering to apply
state-of-the-art object oriented design techniques. Getting to market,
and competing by cool features, was more important than all that
research.

Ruby is the complete opposite. It was designed from scratch to be as
programmer-friendly as possible, and to use industrial-strength OO
design concepts. So when Ruby wraps webby things, it typically makes
them much more elegant.


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

I’m sorry, I hear this all the time from Java programmers. Very
depressing.

Benefits up front…Benefits up front…everyone wants to know
benefits up front…

I just don’t see the benefit of your approach :wink:

Well one of the up front benefits is you can generate a vanilla UI by
using the rails scaffolding generator. You don’t have to spend time
creating html forms and php to process the form data, instead you
get a plain application that creates, reads, updates and deletes
users and items without needing to write any code.

Darek Blankenbuhler wrote:

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

If you really must know, RoR will get you there quicker though you
should ocnsider using COBOL for the project. COBOL on Railoids has an
unprecedented history of creating enterprise-level business
applications!

OK, I made that last bit up to throw your research into disarray :slight_smile: But
as a researcher (among other things), I find it disgusting that at
school/ college, you don’t have the time/ inclination to do your own
research for your senior year project. How long is your project
supposed to be? How much time are you allocating to planning and design
(including trade-off analyses, etc.) - though I do admire your honesty
and frankness in saying so. If you were my student, I’d seriously
consider failing you!

But, best of luck with your project. I’m sure we’ll be seeing more of
you in this group with questions like “I have this problem but really, i
don’t have the time to solve it”…

Cheers
Mohit.

On 2/14/07, [email protected] [email protected] wrote:

With that said, Ruby is bult around small-system concepts and Rails
has a lot of My-SQLisms. There has been some difficulty getting the
Ruby community to understand the benefits of things like prepared
statements. Building a transactional system is a bit (not a lot) more
difficult than I had expected, so scalable real-time systems that
pass the atomicity test require a bit of coding.

Really? Please do elaborate. Are you working with distributed
transactions, or…?

Isak

This is the right forum.

This is trivial to do in RoR.

The benefit that you get is that you can have a production ready
product in a fraction of the time that it takes you to write a
deployment descriptor in almost any other platform.

The program that you want is almost right out of the Agile book - as
the main example.

Given that programming is 90% research and 10% coding, you’re in
trouble if you don’t have time to do your own research. On the other
hand, soliciting input from more experienced developers is a form of
research. The problem is that the answer will be biased.

I disagree with my colleague’s comments about “pesky 's”.
Redundancy is necessary in any wire protocol, such as SGML (of which
HTML is a small subset). Since SGML is generic in nature, with no
knowledge of the intended contents or business of the transmitted
document, ending a with a is a clean notation that allows
the expression of any simple or complex data structure and keeps the
interpretation of data separate from the data itself.

With that said, Ruby is bult around small-system concepts and Rails
has a lot of My-SQLisms. There has been some difficulty getting the
Ruby community to understand the benefits of things like prepared
statements. Building a transactional system is a bit (not a lot) more
difficult than I had expected, so scalable real-time systems that
pass the atomicity test require a bit of coding.

PHP has the same sorts of flaws, and is painful enough to understand
that I have never actually learned it. It grew organically, so the
syntax is irregular. It has most of the same small-systemisms (can I
invent that word? please?) that Ruby does.

Does this help?

On Feb 13, 9:21 pm, Darek Blankenbuhler <rails-mailing-l…@andreas-

Darek Blankenbuhler wrote:

Hi sorry if this is the wrong forum please move this topic if need be.

So I am currently working on a capstone project for my senior year in
college. This project will be an inventory program for a small business
that runs out of the school. My professor has been exploring Rails and
has said he wants me to program in it.

The program will do some of the following. Check items out, check items
back in, create user profiles, and track items.

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

I used PHP for many years, and every time I build a project I had to do
all the steps Rails do for me:

  • Dividing the folders
  • Creating configs
  • Create/find MySQL class
  • Create/find Template Class
  • Create/find Cache Class

All these things comes with rails, that makes it fast to start a
project, and with one line it build everything for you to get started
with your project.

The scaffold is awesome to get your started with testing things from
start, rails have also other advantage like AJAX building, without
knowing anything about Javascript you can use Ajax.

Sometime while I was coding I changed column name or added, and then I
had to go through all the SQL calls and HTML pages to add that column,
but in Rails you don’t need that, it do all that for you :smiley: (Migration i
think its called).

Rails is so fast to build web application and have a lovely syntax!

These are few things I notice till now :slight_smile:

Why should I use Ruby on Rails?

Because its “THA SHIT !!”

Elaborate on which bit?

Prepared statements - It was always considered a truism that 85% of
the time spent in a Rails App is in the database. Since Rails
generates its SQL on the fly and submits it new every time, it has to
repeat the work of the “prepare” every time. When I questioned this,
I was told that “not all RDBMS’s support prepared satements”.

The RDBMS one of any note that fits that description is MySQL. Even
MS-Access has the concept, even if it is implemented oddly.

In direct measures, 50 to 85% of the time that dynamic SQL is
processed centers on the prepare phase. Use of a prepared statement
has this overhead once, then only the time in wire communications and
actual execution thereafter. An obvious and painless performance
enhancement would be to use prepared statements over SQL strings for
the bulk of Rails’ transactions.

A couple of people on this list have done so and publised timing
results, showing that Rails benefits spectacularly from the use of
prepared statements.

An additional but less important boost comes because, when using a
prepared statement, only the handle (an integer ususally) to the
statement and the parameters cross the wire on execution. Finally,
prepared statements offer a level of security and eliminate the need
for the overhead of the “sanitize” method that tries to prevent string
substitution attacks on every SQL invocation.

With all of these benefits, the resistance to adopting prepared
statements was very surprising to say the least. For the most part,
the arguments against it were “MySQL doesn’t do prepared statements
yet, so Rails won’t”

Small-systemsisms - for starters, see above. On large systems,
efficiency is important because you pay by the CPU cycle. Anything
that is a performance drag is also spending real dollars. A rails
front end, because it replicates the expensive work of the SQL prepare
on every call, is expensive to operate against a large-systems back
end.

Scalable transactional systems - see above. I could dig out more
examples, but this one example shines.

Does this help?

I think you are lucky to be in your senior year with the availability of
Rails.

I’ve have given my right arm for something like rails. I could have
finished my project in 1/10.

When i look back at what i did at college(.NET + javascript), i could
probably complete it in 1 day with rails. Damn you.

Rails also perfect for people who like to finish things at the last
minute.

Go for it. Its easier than any other framework to use.

Chris

Darek Blankenbuhler wrote:

So I am currently working on a capstone project for my senior year in
college. This project will be an inventory program for a small business
that runs out of the school. My professor has been exploring Rails and
has said he wants me to program in it.

My question is what benefits will I get out of rails? My other choice
is PHP, basically I want to know WHY I should choose Ruby on Rails over
PHP. Sorry I do not have time to do the research on my own.

Hi Darek,

I’d urge you strongly to forget about Rails. On no account do you
want to choose a language or framework for the implementation of your
senior project just because your professor has been exploring it.

If your project does not allow you enough time to understand what a new
framework or language is, you almost certainly won’t have to time to
learn it once you do understand.

If you know Java, use Java. If you know PHP, use PHP. If you don’t
know any languages for building server-side apps, please don’t do a
server-side app.

Your final year project is important. Make your own decisions, and
choose things because you’ve explored them and think they might be
interesting or appropriate.

Alan
p.s. “Sorry I do not have time to do the research on my own.” This is a
very negative trigger for a lot of folks. You may come in for some
abuse.

On 2/14/07, [email protected] [email protected] wrote:

Elaborate on which bit?

Prepared statements - It was always considered a truism that 85% of
the time spent in a Rails App is in the database. Since Rails
generates its SQL on the fly and submits it new every time, it has to
repeat the work of the “prepare” every time. When I questioned this,
I was told that “not all RDBMS’s support prepared satements”.

snip

With all of these benefits, the resistance to adopting prepared
statements was very surprising to say the least. For the most part,
the arguments against it were “MySQL doesn’t do prepared statements
yet, so Rails won’t”

Umm… A lot of us want prepared statements and bind variables, and I
think it’s even being worked on…

My personal pet peeve is how the AR validations fire off a bunch of
queries, rather than just depend on db level constraints where
applicable.

Does this help?

Not really. Perhaps I quoted a couple of lines more than I should
have, but what picked my interest was this bit here:

Building a transactional system is a bit (not a lot) more
difficult than I had expected, so scalable real-time systems that
pass the atomicity test require a bit of coding.

I.e. not the scalability part (which isn’t ), but the
transaction/atomicity issues you’ve been working on.

Isak

On 2/14/07, Isak H. removed_email_a[email protected] wrote:

snip
queries, rather than just depend on db level constraints where

difficult than I had expected, so scalable real-time systems that
pass the atomicity test require a bit of coding.

I.e. not the scalability part (which isn’t ), but the
transaction/atomicity issues you’ve been working on.

Hmm… Think (…) should have been edited out.

On Feb 14, 5:13 am, Jamal S. [email protected]
wrote:

and have a lovely syntax!

Does anyone else find that this is not sufficient to describe the
effect of Ruby language?

I’ve heard the effect distorted(minimized) by resistant Java
programmers as “syntactic sugar”.

It’s much more than that. It’s deeper, isn’t it?

But I don’t know the word or description to counter the
minimization. Mostly I’m in shock that a programmer could be exposed
to Ruby and still be spewing such distortions.

The reason I care is because I’m tired of being downstream from java
web apps!

The OP was about PHP, which I like and am productive with, but
stands a snowball’s chance in hell of recruiting Java programmers.

Some help here. Thanks.

-r

First of all Ruby on Rails is fun.
Ruby in particular will give you an exquisite way to express you
self.
The more programming languages you will learn the better is your
understanding of this virtual world we live on and you will be a
better programmer witch is something you chouse to be.
So much hype on the net and you are still wondering should you check
what all is about.
Don’t be lazy, open the door and enter in a new world.
The main benefit if you must be in those terms is that you as a young
person will learn something new and that is the biggest award you
should reach for.

dima

On Feb 14, 4:21 am, Darek Blankenbuhler <rails-mailing-l…@andreas-

Hi –

On Wed, 14 Feb 2007, [email protected] wrote:

I disagree with my colleague’s comments about “pesky 's”.
Redundancy is necessary in any wire protocol, such as SGML (of which
HTML is a small subset). Since SGML is generic in nature, with no
knowledge of the intended contents or business of the transmitted
document, ending a with a is a clean notation that allows
the expression of any simple or complex data structure and keeps the
interpretation of data separate from the data itself.

SGML actually allows unclosed tags, though, as long as it can be
inferred unambiguously (from the DTD) where the element ends. XML
makes you close every tag, which, along with the notion of
“well-formedness” and having DTDs be optional, makes it much easier to
write parsers and processors for it.

invent that word? please?) that Ruby does.
I’d be interested in hearing further thoughts about that. Do you
think it’s a Ruby thing, or more a matter of design and feature
decisions in Rails? And if Ruby, a matter of language design and/or
implementation?

David


Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
(See what readers are saying! http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)

Mohit S. wrote:

But, best of luck with your project. I’m sure we’ll be seeing more of
you in this group with questions like “I have this problem but really, i
don’t have the time to solve it”…

Farbeit from me to interfere with the need to flame, but…

I allowed, “I do not have time to do the research” to possibly mean,
“because I expect I will soon be manually configuring CGI handlers,
manually writing redundant details, manually building SQL
strings, manually copying fields out of database records, manually
copying form values out of POSTs, and manually testing.” Maybe I’m
being charitable, but he did mention experience with PHP.


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

On 2/14/07, [email protected] [email protected] wrote:

With all of these benefits, the resistance to adopting prepared
statements was very surprising to say the least. For the most part,
the arguments against it were “MySQL doesn’t do prepared statements
yet, so Rails won’t”

I think its more about knowing the Rails user base, of which
MySQL-ers are very dominant, and the fact that the Rails-dev
has higher priority concerns, like as evidenced in the latest
release, REST and Unicode (UTF-8).

Its a very sensible decision. Adopt the features that benefit all
of your user base, not just the fraction of the community trying
to run Rails on extremely rarified installs.

If DHH went mental over prepared statements he could satisfy
maybe 1% of the Rails community who care. And in the process
lose the remainder for whom UTF-8 is a deal breaker, and the
mashup community that are depending on a decent REST
framework to drive their concerns.

Rails moves fast, but its not that fast. That means you have
to prioritise your features, by maximum value to users, and
by how difficult they are to implement.

Its not actually that different to new product development, or
how a start-up might prioritise its first years activities.

johnson_d wrote:

I disagree with my colleague’s comments about “pesky 's”.

I’m sure you can think of a few more examples how legacy web languages
are klutzy…

PHP has the same sorts of flaws, and is painful enough to understand
that I have never actually learned it. It grew organically, so the
syntax is irregular. It has most of the same small-systemisms (can I
invent that word? please?) that Ruby does.

No. The best way to scale is permit a super-low line count. Ruby’s
heel is not Perl or PhP, but Java. When one language permits 10% the
line count of another, and when that ratio goes down as you add
features, that tells you which language has large-systemisms…


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs