Is Ruby on Rails for beginner programmers?

Hello,

I am not a programmer but I would like to learn and develop more
complex websites than the ones I have done in the past. I will not
learn for the pleasure of learning, but I will do it as I need to
develop my website.
I am pretty good with HTML, and I know a bit of PHP and MySQL.
I was about to plunge my head in my big PHP/MySQL book when I realized
that it may not be the best programing language to learn.
Would you recommend Rails for beginners?
If not, what language would you recommend?

Thanks a lot in advance.

Note: I am sure that some people might say that the best programing
language would depend on what type of website I want to create.
However, I am not going to learn every languages before starting.
Instead, I will just work with constrains of the language I chose.

Etilyeti wrote in post #955186:

Hello,

I am not a programmer but I would like to learn and develop more
complex websites than the ones I have done in the past. I will not
learn for the pleasure of learning, but I will do it as I need to
develop my website.
I am pretty good with HTML, and I know a bit of PHP and MySQL.
I was about to plunge my head in my big PHP/MySQL book when I realized
that it may not be the best programing language to learn.
Would you recommend Rails for beginners?

I think so. It may take you a little longer to get up to speed, but
you'll be rewarded with a very well-designed language and framework.

If not, what language would you recommend?

Rails isn't a language.

Thanks a lot in advance.

[...]

However, I am not going to learn every languages before starting.
Instead, I will just work with constrains of the language I chose.

Poor idea. Of course you can't learn every language before starting,
but it's silly to choose one that constrains you too much. Ruby
doesn't. That's why I like it. :slight_smile:

Bonus tip: do all development test-first. Get into the habit of using
RSpec, Cucumber, and Autotest as soon as possible. Also set up a
version control system (I recommend Git) and use it religiously. These
two things are essential to programming in the 21st century.

Best,

I consider Rails to be a domain specific language.

Greg Donald wrote in post #955221:

Rails isn't a language.

I consider Rails to be a domain specific language.

Parts of it are, but I think it's limiting to consider the entire
framework to be. At least the way I use it, the non-linguistic parts
(that is, the object model and request processing) are at least as
important as the DSL bits.

But I was reacting more to the common beginner's error of conflating
Rails and Ruby.

--
Greg Donald
destiney.com | gregdonald.com

Best,

If you don’t have a great deal of programming experience ruby will take some time to ramp up on. Rails is great but also has ramp up time and will require dedication as well. I also feel I should say that its not just about “programming”. Anyone can learn the constructs of an programming language and write loops to barf out html. Its about writing well structured, well designed application software. Rails is providing a framework for web application designers to engineer good software. We’ve moved beyond the days of hacking together unstructured perl scripts to spit out garbled html.

The good thing is that rails is much more than php/mysql in terms of web application development. If you do decided to stick to it and learn rails you will gain more in return than you would if you invested your time in php/mysql. I won’t say rails is/isn’t for beginners. I would say if you are willing to learn the ruby programming language (everyone is a beginner at some point) rails will provide you a solid platform to properly engineer your web application.

Cheers,
Dave

If you're going to work with ruby on rails on windows its going to be
painful afik, some plug-ins just don't work, if you're using linux or
mac things will just work.

Rails is easier for non programmer than it is for professional programmer, mainly because everything its so hard that programmers that come from other languages keep trying to make easy things the hard and so the get stuck often.

"will just work" is subjective. Don't forget that you need to install
development tools, headers and libraries to use pretty much any
library that is not provided by the OS, no matter what OS are you
using.

You must first experience the joy of apt-get or macports. They pretty much make everything “just work” Really its much easier on unix based systems. I ran rails under native windows and cygwin and always had a number of issues that you just don’t run into on a unix based system. I’ve had significant experience with both windows and unix based platforms and the term “will just work” is accurate for unix/linux.

Cheers,
Dave

I'm not putting your experience under question, but I'm talking
average joe that is coming from Java/dotNET

You're assuming that everybody will figure out which package and under
which weird package name convention is required to install and get
things to work.

Take for example ruby itself in it's a debian based distro. ruby, ruby-
dev, ruby-full and so many others. Then sqlite3, sqlite3-dev and
others.

Don't tell me that "get things working on linux is more easy" when the
user you're telling that is not familiar with Linux.

Please, don't assume the world need to convey your understanding of
reality, because again, that is subjective.

If you're going to work with ruby on rails on windows its going to be
painful afik, some plug-ins just don't work, if you're using linux or
mac things will just work.

"will just work" is subjective. Don't forget that you need to install
development tools, headers and libraries to use pretty much any
library that is not provided by the OS, no matter what OS are you
using.

yes and when you have all this, it will just work =), not so on windows!!!

if you don't know how to build from source, i assume if you are on
linux you can do this:

sudo aptitude install ruby
sudo aptitude install gem
sudo gem install rails

And now install a gem that needs compilation, like json and tell me if
it just works. Or the mysql gem, which needs mysql and libmysql-dev or
something like that. (need to install ruby-dev and other packages,
build-essentials and others)

Again, experience on this is always subjective. The learning curve
depends on each user and it's experience in the past with similar
tools added to that the documentation, lack of it and the attitude of
the community around that.

I can personally say not all what you're mentioning is true and that
you're ignoring the user and it's background and focusing in the OS as
the bottleneck.

if you don't know how to build from source, i assume if you are on
linux you can do this:

sudo aptitude install ruby
sudo aptitude install gem
sudo gem install rails

And now install a gem that needs compilation, like json and tell me if
it just works. Or the mysql gem, which needs mysql and libmysql-dev or
something like that. (need to install ruby-dev and other packages,
build-essentials and others)

Luis, i get what you're saying but still you're missing the point! some things don't build or work on window, this make for a poor experience for a newbee and a challenge for them to overcome. in that frustration i am sure many walk away.

why would anyone in their right mind build on window using cygwin? when you got a free copy of virtualbox and the choice of a real linux distro?

things just work on linux, less friction, better support all around! as a bonus no dll hell!

Maybe subjective but from both sides of the coin. You may find environment setup easier on your platform but you will run into more issues on windows when developing your app.

Cheers,
Dave

virtual rails running on virtualbox is a great way to start

I started with ASP/Access and changed to PHP/MYSQL and then Ruby on
Rails/MYSQL.
My take is that DHH developed the Rails framework for Ruby because PHP
is not object oriented and the other object oriented languages were to
code-heavy.

PHP is easy to grasp as it is a procedural language. It has low
technical requirements and is easy to find affordable hosting support.
If you are developing on a PC, you will find PHP much easier to work
with. As your projects get larger, you may ultimately "hit a wall"
where you lose momentum because of the amount of code you have to plow
through to keep going. I was never really successful with Pear, so
extending PHP was difficult.

There are many more technical hurdles to getting started with Rails,
though for large, complex projects, I find it is worthwhile. If you're
serious about Rails, you will likely prefer a VPS over shared hosting
and you will need to be comfortable working in a Unix shell. You may
need to learn about Capistrano, Webin, Apache, and Phusion or Mongrel
as well as Ruby and Rails. Ruby affords more "elegant" programming,
and there are many powerful GEMs at your disposal making Rails highly
extendable. The Rails framework leads you to a logical application
structure, though you could also achieve this in PHP if you know what
you are trying to do. The Rails console offers development tools not
found in PHP, and the Rails log files are an advantage as well.

I do understand your point and mostly agree. However, these days we have Google and a vibrant community to help you out. Just searching for “install ruby on rails <insert os + version here>” will point you to a step-by-step installation tutorial.

But agreed, the fragmented nature (even though rubygems and aptitude etc try to make your life easier) and dependency mess can sometimes spoil the fun a bit.

Best regards

Peter De Berdt

Etilyeti

I am pretty good with HTML, and I know a bit of PHP and MySQL.
I was about to plunge my head in my big PHP/MySQL book when I realized
that it may not be the best programing language to learn.
Would you recommend Rails for beginners?
If not, what language would you recommend?

Thanks a lot in advance.

I think this thread got a bit hijacked on some slightly esoteric
issues. Hopefully this didn't put you off.

I would say Ruby is a great place to start. There is loads of really
good stuff on the web that will lead you into good programming
practices (I think Marnen said that too). Also it is a beautiful
language in terms of readability. It is not a long way from Visual
Basic in a superficial readability and scripting sense, but is much
more in terms of being a fundamentally well designed Object Oriented
language. The thing I found tricky at the beginning was working out
the distinction between what was Rails and what was Ruby, but it soon
falls into place. Also you need to get used to using the API
documentation. But again that falls into place too. There are now the
RailsGuides which are excellent. http://guides.rubyonrails.org/

I actually started with a quick Rails Tutorial, and then adapted some
stuff I had done in MS access/visual basic into a Rails project under
windows. I produced some not very elegant code to begin with, but
hey some of that code is still in use after nearly 5 years - I am
trying to find time to refactor it now. Whilst Marnen is correct in
referring to test-first development, the problem with this is that it
can be a massive subject, which in my view makes getting started very
hard. I havn't looked lately, but I never really found any good
tutorials that start with test (or at a higher level, behaviour)
driven development. So learning to do TDD or BDD is important, but
don't le it put you off learning Ruby in the first place. Maybe
someone could suggest some tutorials.

It is very easy to play around with Ruby in a shell (irb) and do the
hello world type of stuff, and using the rubygems library makes doing
more complex stuff a breeze. There are not loads of things to bolt
together to get your first progams to work. You can even try the
Interactive Ruby Shell online at http://tryruby.org/.

Writing an actual program is nothing more than creating a text file
and running it under Ruby. And when you want to do something
specific, there is nearly always a Ruby gem to help you out so that
you don't have to re-invent the wheel - whether it is accessing
databases, scraping web pages, manipulating images or creating pdfs.
Just install the Gem (one line command like 'gem install pdf-
reader' ) , require it into your program and away you go.

As already stated, there are some drawbacks to using Windows, but they
are not show-stoppers. And anyway, it is not that hard these days to
set up a Linux system (I use Fedora)

As you can probably gather - I am extremely enthusiastic about Ruby
and Rails. They have allowed me to develop systems for which I was
struggling to find a cost effective solution. My biggest uncertainty
initially was "would rails become cumbersome or fall apart as I
extended my systems". In fact the opposite has been true. The
framework really holds together as your system develops and evolves.
There was loads of talk about such things in the early days, but now
it is pretty much just taken for granted. Something that used to
amaze me was that when I added some functionality into my code, the
number of program lines actually went down, because adding the new
function often resulted in me doing things in a better or more
efficient/effective way. Again these days I take such things for
granted, although I do still find occasions when for example, I
produce a nice object that builds a super report, or I manage to
create a nice object oriented structure to something I am trying to
solve.

hope this encourages you
Tonypm

I completely agree with Tonypm. I would have liked to type out a clear well-written post like that myself.

I myself started with Rails (before Ruby) and it took me a while to realize the beauty of Ruby.

Best Regards,
Mohit.
23/10/2010 | 10:21 PM.