On 10/5/06, Owen Densmore <[EMAIL PROTECTED]> wrote:
> On Oct 3, 2006, at 2:13 PM, Giles Bowkett wrote:
> > I'm using it with Rails. Regular Ruby; I know the JRuby guys got hired
> > by Sun. Rails is the main thing I do these days.
>
> Hi Giles.  Rails does seem to have hit a sweet spot, from what I hear.
>
> Could you say a bit more about its architecture?  I'm not sure what
> its all about.
>
> We've used php, servlets, lucene, tomcat, and so on, .. and have
> looked at semi-cms type systems like wordpress and textprocessing.
> But mainly we've just wrapped up our own "web pipes" so to speak.  So
> I'm not very clear on what Rails and its similar spin-offs have to
> offer.

It's all about MVC and making everything obvious automatic. Rails sets
up models, views, and controllers in such a way that putting things in
the right place is very intuitive. Good, clean application structure
is very easy to maintain, and anything a million web developers have
had to do before is almost entirely automated.

You can easily use Rails to do all your database development without
ever even looking at SQL. I do this all the time. Database migrations
are handled with a DSL that allows you to specify database design in a
database-agnostic way. So if you upgrade from MySQL to Postgres, for
example, the only thing you have to change is a single line in a
config file. You can have thirty files describing your schema and
alterations to it, and only one line in a config file needs to change.
Similarly, you can roll migrations backwards and forwards, which is
very useful during development, as it allows you to start coding
immediately and change your schema on the fly with zero headaches. You
can even use it to alternate between variations on a schema and
explore the benefits and limitations of each one.

Likewise Rails is set up to autogenerate code for an amazing variety
of things, and it's very easy to modify most autogenerated stuff if
the need arises. So you get a great deal of things done for you, but
anything you need to do yourself, or in an idiosyncratic way, it's
very easy to get in there and do things manually too. It also ships
with a "console", which is like the irb interactive interpreter,
except it also loads all of Rails and your entire application as well.
So you get all the benefits of an interactive interpreter, and you get
to see exactly what your code is doing programmatically. You could in
fact code an entire Web application in the console and not even bother
with the Web at all until you were ready to do the CSS.

It's a gigantic productivity boost. There's a demo where they build a
Flickr search engine with all kinds of Ajax eye candy in the space of
five minutes:

http://media.rubyonrails.org/video/flickr-rails-ajax.mov

Because it's organized so cleanly, building a tiny site takes minutes,
and building something gigantic results in a very neatly partitioned
system which is very, very easy to maintain. That's why it hit the
sweet spot. PHP developers ditch PHP for Rails because it gives them
superior maintainability. Java developers ditch Java for Rails because
they can create their apps much more quickly.

Anyway, sweet spot is definitely the term. Ruby books now outsell both
Perl books and Python books.


-- 
Giles Bowkett
http://www.gilesgoatboy.org

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to