Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
deimos
Nov 30, 2006

Forget it man this bat is whack, it's got poobrain!

epswing posted:

I just want to make a quick note here.

RonaldMcDonald's php code is less than 15 lines of simple, easy-to-follow php.
Novo's ruby/rails code is almost 30 lines spread across 4 files (and ends his post with "Simple." :v: ).


Yeah but RonaldMcDonald's code only does one thing. Novo's code is set up so that you can add another part for the page very easily.

Novo's code is:
- Readable
- Very extensible (much easier to implement pagination on Ruby than on PHP, for example)
- Lazy (select * from people, c'mon, every loving PHP person does this, EVERYONE, when they only need certain fields, it's fine when you have 10 records, but when you have 100k, not so fine.)

Not to mention Novo's code produces valid html. :colbert:

Another thing not shown is that Neither Novo's code nor RonaldMcDonald's do any database setup. In php you setup the connection, RoR takes care of that for you.

RoR saves in complexity when the application gets a bit... beefier. I would say that your average large RoR application is smaller than "grep -i 'select ' *.php" from your average smaller php application.

Adbot
ADBOT LOVES YOU

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply