I've decided to use Rails... (I hope I made the right decision)

I’ve read a ton of comparisons that compare one framework to another,
and one language to another. There’s so much conflicting advice out
there that it’s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we’ll see.

The only reason why I’m hesitant is that a lot of the big name sites
use php (facebook, wordpress, joomla, etc). At some point I’d like to
write plugins and extensions for them and integrate with their API’s
with my site, will Rails will do the trick?

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster. I guess
that’s the only reason why I’m still hesitant about choosing Rails.
From what I’ve gathered is that Rails lags in speed and performance.

So, why did I choose rails? It seems to be the easiest to code it in
and it’s very well documented. I hope that doesn’t come back to bite
me 'cause I’d rather put in extra work upfront to ensure the longevity
of my site and the least amount of headaches in the future. So the
next few months all I’ll be doing is eating, drinking, breathing
Rails, and I just wanted to say hi and sorta introduce myself to the
community. Thanks guys for all the documentation already out there
and all the support you guys provide.

AlwaysCharging wrote:

I’ve read a ton of comparisons that compare one framework to another,
and one language to another. There’s so much conflicting advice out
there that it’s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we’ll see.

You probably did, although I’ve heard the assertion made that Rails may
not be the easiest thing for someone completely new to Web development.

The only reason why I’m hesitant is that a lot of the big name sites
use php (facebook, wordpress, joomla, etc). At some point I’d like to
write plugins and extensions for them and integrate with their API’s
with my site, will Rails will do the trick?

Facebook has a public REST API that can be called from any language.
There’s even a Facebooker gem to make it easier to do that from Rails.
However, whereas Facebook is an application with a public API, WordPress
and Joomla are frameworks (just like Rails is). Both are written in
PHP. If you want to develop for them, you’ll have to work with PHP.
However, if you just want to provide a Web service for them to consume,
that can be in any language you like.

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster.

No. Django is comparable to Rails. Python is comparable to Ruby.

I’ve never heard the claim that Django is faster than Rails. Your
source?

I guess
that’s the only reason why I’m still hesitant about choosing Rails.
From what I’ve gathered is that Rails lags in speed and performance.

Maybe. Maybe not.

So, why did I choose rails? It seems to be the easiest to code it in
and it’s very well documented. I hope that doesn’t come back to bite
me 'cause I’d rather put in extra work upfront to ensure the longevity
of my site and the least amount of headaches in the future.

Then please, do everything – everything! – test-first. That’s the
single biggest step you can take to ensure long-term maintainability.

So the
next few months all I’ll be doing is eating, drinking, breathing
Rails, and I just wanted to say hi and sorta introduce myself to the
community. Thanks guys for all the documentation already out there
and all the support you guys provide.

Welcome! Good luck as you learn.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

You may have issues with RoR on your way but you’ll never ever regret
taking it up.
And believe me, its not just the language or the framework. Its the
community.

one up on test-first.

good luck!

On Aug 11, 9:21 am, Marnen Laibow-Koser <rails-mailing-l…@andreas-

Welcome to the cult. Older sites use older technology because - until 2
years
ago - Rails was a fringe player using an obscure language. Rails now
leads the
adoption rate in new projects because it showcase what a fine language
Ruby is.

Your site will easily plug into other sites’ APIs because they always
use some
interoperable format, such as XML.

AlwaysCharging wrote:

So, why did I choose rails? It seems to be the easiest to code it in
and it’s very well documented. I hope that doesn’t come back to bite
me 'cause I’d rather put in extra work upfront to ensure the longevity
of my site and the least amount of headaches in the future.

Then write lots of unit tests - preferably via Test-Driven Development.
That way
you can add new features, for a long time, without breaking existing
features.


Phlip

On Aug 10, 11:55 pm, AlwaysCharging [email protected] wrote:

I’ve read a ton of comparisons that compare one framework to another,
and one language to another. There’s so much conflicting advice out
there that it’s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we’ll see.

The only reason why I’m hesitant is that a lot of the big name sites
use php (facebook, wordpress, joomla, etc). At some point I’d like to
write plugins and extensions for them and integrate with their API’s
with my site, will Rails will do the trick?

No worries on the API front; as others have noted, writing plugins may
be harder. But given some of the amazingly sneaky things that have
been done in Ruby (case in point -
http://github.com/tenderlove/phuby/tree/master
: a PHP runtime in Ruby), anything’s possible…

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster. I guess
that’s the only reason why I’m still hesitant about choosing Rails.
From what I’ve gathered is that Rails lags in speed and performance.

There’s a lot of discussion about who’s faster; what gets lost is that
while there may be some raw differences in speed, the application code
makes far more difference. Bad programmers can write slow apps in ANY
language… Also, keep performance pretty much out of your thoughts
when you’re starting out - obviously, don’t do clearly bad things
(like doing a find(:all) and then searching the results…), but
optimization comes later.

Personally, I’ve always found Python harder to read, but that may just
be years of C/C++/Perl bias.

So, why did I choose rails? It seems to be the easiest to code it in
and it’s very well documented. I hope that doesn’t come back to bite
me 'cause I’d rather put in extra work upfront to ensure the longevity
of my site and the least amount of headaches in the future. So the
next few months all I’ll be doing is eating, drinking, breathing
Rails, and I just wanted to say hi and sorta introduce myself to the
community. Thanks guys for all the documentation already out there
and all the support you guys provide.

Well, it’s well-documented right up until you hit the bits that
aren’t. :slight_smile:

As far as general advice, here’s some stray ideas:

  • as others on this thread have noted, test. Test test test. I’m not
    entirely partial to the “test absolutely everything” school, (example:
    checking that a plain belongs_to association works) but any time
    you’re doing something out of the ordinary in a model, test. At the
    very least, write enough functional tests to smoke-test your
    controllers and views. And any time you find yourself typing the same
    thing into a form to see what happens, write a test - it’s quicker,
    and serves to check that things are still working.

  • learn source control. Most here favor Git, and most Rails plugins
    are hosted on Github now. Even if you’re working by yourself, source
    control is useful (as you’ll discover the first time you ‘rm’ a file
    that you wanted to keep…)

  • the design of Rails is focused on making doing ‘the right thing’
    easy. If you find yourself fighting against the framework and writing
    lots of messy code to work around it, take a step back and look at
    what you’re doing. Nine (or more) times out of ten, there’s a more
    straightforward way to do it. Of course, that one time, it’s a bug in
    Rails…

  • read lots of code. Understanding the Rails source, for instance,
    will teach you an amazing amount about good Ruby coding. I’d
    recommend, however, starting with something other than ActiveRecord

  • there’s some remarkable stuff there, but the metaprogramming /
    method generation stuff is tough going at first.

  • get comfortable with ruby_debug. This can help you starting out, as
    you can drop a ‘debugger’ statement almost anywhere (even in views!)
    and look at the context your code is executing in.

Hope this is helpful - welcome to the community!

–Matt J.

Nicholas W. wrote:

On Aug 11, 2009, at 6:21 AM, Marnen Laibow-Koser wrote:

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster.

No. Django is comparable to Rails. Python is comparable to Ruby.

I’ve never heard the claim that Django is faster than Rails. Your
source?

Python is faster than Ruby, it has a faster GC and generically a
faster interpreter.

Whether that’s true or not, it does not directly address the OP’s claim,
which had to do with Django vs. Rails, not Python vs. Ruby.

Now, if the Python interpreter is significantly faster than the Ruby
interpreter, that certainly would help Django be faster than Rails. But
as you yourself pointed out, there might well be bottlenecks elsewhere,
so that fact alone is not sufficient.

[…]

Of course having a faster interpreter is going to be sweet, but it’s
not something to worry about. Ruby is “fast enough” for 99% of cases.

Agreed. And there’s always JRuby for the other 1%…

ngw

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Aug 11, 2009, at 5:55 AM, AlwaysCharging wrote:

I’ve read a ton of comparisons that compare one framework to another,
and one language to another. There’s so much conflicting advice out
there that it’s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we’ll see.

Depends on the project.

The only reason why I’m hesitant is that a lot of the big name sites
use php (facebook, wordpress, joomla, etc). At some point I’d like to
write plugins and extensions for them and integrate with their API’s
with my site, will Rails will do the trick?

Of course.

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster. I guess
that’s the only reason why I’m still hesitant about choosing Rails.
From what I’ve gathered is that Rails lags in speed and performance.

I doubt that Google uses Django. I know for sure that their crawlers
and many other things (the faq system, google groups, blogger) are
written in Python, which is to be clear a wonderful language I used
for years.
And yes, probably Django is faster than Rails, because the Python
interpreter is faster than the Ruby one.
And Java is way faster than Python, with C++ being faster than both.
Honestly on the web nobody should care who’s faster of who, it’s
really a non-problem, because at some time, when you really need
speed, the interpreter has to get out the equation.
If I can give you a suggestion, worry about something when you
actually have that problem, not before. You chose a technology that
will make you productive and release your product quite fast.
Rails doesn’t lag in speed and performance, if you’re able to use it.

So, why did I choose rails? It seems to be the easiest to code it in
and it’s very well documented. I hope that doesn’t come back to bite
me 'cause I’d rather put in extra work upfront to ensure the longevity
of my site and the least amount of headaches in the future. So the
next few months all I’ll be doing is eating, drinking, breathing
Rails, and I just wanted to say hi and sorta introduce myself to the
community. Thanks guys for all the documentation already out there
and all the support you guys provide.

Welcome.

ngw

On Aug 11, 2009, at 6:21 AM, Marnen Laibow-Koser wrote:

Also, I looked into django, the framework for python. I was sorta
intrigued by python because that’s what google uses and I believe
yahoo as well. However, there is 0.00% chance of my little ol’ web
app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster.

No. Django is comparable to Rails. Python is comparable to Ruby.

I’ve never heard the claim that Django is faster than Rails. Your
source?

Python is faster than Ruby, it has a faster GC and generically a
faster interpreter.
There’s no need of any source for such claim, it’s basically 8 or 9
years that the Python interpreter produces bytecode while the MRI
builds a syntax tree and evaluates it.
This is also the reason why YARV is going to be 3x faster than the
actual implementation.
That’s the theory, and of course nobody cares because on the web
before looking at the speed of the interpreter we should look at real
bottlenecks, namely the network and the database (I have here a case
where db writes are almost the same number of db reads - this is
performance wise what I call a “pain in the ass”, and ruby is
definitely not a part of it).
Of course having a faster interpreter is going to be sweet, but it’s
not something to worry about. Ruby is “fast enough” for 99% of cases.

ngw

app ever reaching their seismic proportions, but from what I’ve read
django is quite comparable to ruby and quite a bit faster.

No. Django is comparable to Rails. Python is comparable to Ruby.

That’s what I meant, just a little bit of a typo in not finishing it
with “on rails.”

Agreed. And there’s always JRuby for the other 1%…

How hard would it be to migrate a relatively large site from ruby to
JRuby?
Rails could still be used with JRuby correct?

If I can give you a suggestion, worry about something when you
actually have that problem, not before.

I don’t know if I really agree with this. I’d rather head off a
problem far in advance of it ever becoming one, which is why I didn’t
want to doom myself at the start. However, I do agree that it may be
silly to worry about a (negligible?) speed improvement over an app
that I haven’t even started yet. I just wanted to make the right
decision from the start so that I have to never look back and would
never have to do a complete code rewrite due to the language.

And also I agree with your comments about bottlenecks. I think more
of a site’s performance relies on database optimization more than the
language itself. However, I could be wrong.

I’ve read a ton of comparisons that compare one framework to another,
and one language to another. There’s so much conflicting advice out
there that it’s hard to know what is best. Did I make the right
choice choosing Rails for my first web project? I guess we’ll see.

Depends on the project.

I guess what’s solidifying my choice for Rails is that it was pulled
from a far more collaborative site than Django (which was born from a
newspaper site). Although I’m sure both of their underlying languages
are capable of far more than that, I fear that I’m reduced to using to
a framework due to my current level expertise (which is none at the
moment).

Welcome.

ngw

Thank you!
and thanks to everyone else that’s chimed in on this thread.

AlwaysCharging wrote:

If I can give you a suggestion, worry about something when you �
actually have that problem, not before.

I don’t know if I really agree with this. I’d rather head off a
problem far in advance of it ever becoming one, which is why I didn’t
want to doom myself at the start.

“Premature optimization is the root of all evil.” --Donald Knuth

It makes sense to pick a framework that can grow with you, but (except
for certain simple cases) your performance bottlenecks may not be where
you expect. Therefore, if you optimize prematurely, you may be
optimizing for the wrong thing.

However, I do agree that it may be
silly to worry about a (negligible?) speed improvement over an app
that I haven’t even started yet. I just wanted to make the right
decision from the start so that I have to never look back and would
never have to do a complete code rewrite due to the language.

Your code should always be well enough tested and easy enough to
refactor that doing a complete rewrite (if, God forbid, you ever had to)
should be relatively easy.

And also I agree with your comments about bottlenecks. I think more
of a site’s performance relies on database optimization more than the
language itself. However, I could be wrong.

Depends on the site.

[…]

I guess what’s solidifying my choice for Rails is that it was pulled
from a far more collaborative site than Django (which was born from a
newspaper site). Although I’m sure both of their underlying languages
are capable of far more than that, I fear that I’m reduced to using to
a framework due to my current level expertise (which is none at the
moment).

It’s not a question of being “reduced” to using a framework. It’s much
easier and more maintainable to code an application with a framework
than without one. Please don’t get the idea that general-purpose
frameworks like Rails are only for novice programmers.

Welcome.

� �ngw

Thank you!
and thanks to everyone else that’s chimed in on this thread.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

AlwaysCharging wrote:
[…]

Agreed. And there’s always JRuby for the other 1%…

How hard would it be to migrate a relatively large site from ruby to
JRuby?

From what I understand, not hard at all. JRuby acts basically the same
way as any other Ruby interpreter.

Rails could still be used with JRuby correct?

Yes. So can anything else that works in MRI.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

On Aug 11, 11:20 am, Phlip [email protected] wrote:

Welcome to the cult. Older sites use older technology because - until 2 years
ago - Rails was a fringe player using an obscure language. Rails now leads the
adoption rate in new projects because it showcase what a fine language Ruby is.

I hadn’t heard this… interesting. Do you have a source for this
information?

2009/8/14 AlwaysCharging [email protected]:

never have to do a complete code rewrite due to the language.

choice choosing Rails for my first web project? Â I guess we’ll see.

Depends on the project.

I guess what’s solidifying my choice for Rails is that it was pulled
from a far more collaborative site than Django (which was born from a
newspaper site). Â Although I’m sure both of their underlying languages
are capable of far more than that, I fear that I’m reduced to using to
a framework due to my current level expertise (which is none at the
moment).

You could also say that you are reduced to using a language like Ruby
because your current level of expertise in assembly language is not
sufficient to allow you to program in that. Using a framework allows
you to build on code written by others to achieve what you want to
achieve without re-inventing the wheel. Even if you have the
expertise to re-invent the wheel there is no point doing it.

Colin

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