The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Yes and cholocate ice cream *is* the best! You claim a fact where there isn't one, and just as you can have a favourite colour you can have a favourite
programming paradigm.

I didn't say that it's the best. Read carefully.

No, I don't agree and I was already explicit about this. Different paradigms fit different situations, no paradigm is universally "more expressive" than another.
Your kiddy examples (you do love these sorts of examples) don't show anything interesting. I personally don't feel either paradigm is better for web development, well actually I do prefer OO or procedural languages for web work. Now, if you are writing algorithms on inductively defined structures than a language like ML is awesome.

I do love these examples because they show that blocks/closures make the procedure easier to express. Cool that a language like ML is awesome if you write certain algorithms, but how does this relate to what I posted? I personally prefer a mix of OO/procedural/functional so you can use the right tool for the job. Database abstraction? OO. HTML generation? Functional. GUI? OO. Collection handling? Functional. Etc, etc. I personally think that a functional programming style is very good for web development. Why? A web request is like a function that takes GET/POST data and returns HTML. You don't need complex interactions like in GUI programming (where OO shines) so you can easily express large parts of your program as functions.

Different paradigms fit different situations, no paradigm is universally "more expressive" than another.

This is why Ruby supports multiple paradigms. Oh, this "argument" can be used against any paradigm, and it can be easily generalized to refute anything. It doesn't show anything interesting.

Ugh, it was an analogy (i.e., its logically equivalent in nature to your claim).
Read carefully.

This is why Ruby supports multiple paradigms.

To call Ruby a functional language is pretty silly, Ruby only supports OO good and isn't a procedural language in any sense. If you want a language the supports multiple paradigms switch to ocaml.

I do love these examples because they show that blocks/closures make the procedure easier to express.

They don't show anything interesting because they are toy examples, but Ruby/Rails is all about toy examples.

I personally prefer a mix of OO/procedural/functional so you can use the right tool for the job.

Mixing paradigms in the same code base tends to create a big mess, at least from what I've seen.

I personally think that a functional programming style is very good for web development. Why? A web request is like a function that takes GET/POST data and returns HTML.

You could say the same but replace "functional" with "procedural". I don't know, but it seems you are confusing functional languages with languages like Ruby that offer a few "functional" like abilities. If a language doesn't treat functions as first-class objects and doesn't allow "inductive definitions" then it can hardly be called functional.

Anyhow, this discussion doesn't have utility anymore. But at least some people said a little about the "Benefits of Ruby".

Ugh, it was an analogy (i.e., its logically equivalent in nature to your claim).
Read carefully.

It was not "logically equivalent in nature". If you substitute "better" for "best" then it is.

To call Ruby a functional language is pretty silly, Ruby only supports OO good and isn't a procedural language in any sense. If you want a language the supports multiple paradigms switch to ocaml.

Ruby has language constructs usually found in functional languages, like closures. Ruby supports procedural constructs. OCaml is a great language! (and very fast). But if I use OCaml I'm constantly thinking "this would be cleaner in Haskell" (mostly because of the syntax).

They don't show anything interesting because they are toy examples, but Ruby/Rails is all about toy examples.

An absurd claim.

Mixing paradigms in the same code base tends to create a big mess, at least from what I've seen.

You are going to implement constructs found in languages that support more than one paradigm, badly, if you have only one paradigm (e.g. closures as objects). Maybe you've been using a language where the paradigms don't integrate very well. Try Oz: it's a language that supports a lot of paradigms and it's easy to use them together.

You could say the same but replace "functional" with "procedural".

No you cannot. Maybe you don't understand the difference between "functional" and "procedural"?

I don't know, but it seems you are confusing functional languages with languages like Ruby that offer a few "functional" like abilities. If a language doesn't treat functions as first-class objects and doesn't allow "inductive definitions" then it can hardly be called functional.

I didn't say that Ruby is a functional language.

I don't think that Ruby is the best language. I don't even think that Ruby is good compared to the ideal language I can think of now. There are lots of things that can be improved or should be completely changed. Maybe I'm going to create a language that "fixes" these things someday. I do think that Ruby is a better language than PHP (and better than Java & Perl for some things), but most languages are.

You know (and this goes back to the original question about benefits of learning RoR) Sqarissta had some interesting things to say about speed and things to look out for on the RoR horizon:

Originally Posted by Sgarissta

...
But the bigger problem is that there STILL isn't a solidly performing deployment scenario for Rails.

The current "winner" is a mongrel (a really cool C/Ruby web server) cluster, behind a load balanced proxy of some sort. While this is well and good, it doesn't scale extremely well. The Ruby interpreter, with the entire Rails stack loaded takes up a good chunk of memory (around or over 20mb if I remember correctly), that's PER instance, a typical mongrel setup is 1 or 2 mongrel instances PER processor, so you can easly have 80-100mb of RAM taken up, for JUST mongrel processes, not even the overhead of the loadbalancer processes to hand them off to mongrel.
...

I'm using mongrel on my laptop and it does indeed take up a big chunk of Ram just idling. It doesn't seem to really consume much more while fetching requests but as this is just a laptop with InstantRails on it and it won't be for production, I haven't load tested it or anything. In no way does this discount RoR as a framework but it's something that we can look forward to seeing improvements in.

I don't think there is any question that Ruby code is slower than other languages but in the big picture of serving pages over the internet, there are larger bottlenecks to consider like databases, slow connections and bloated code on the server or bloated code on the client. At least with the way RoR has evolved and the "DRY" method, there is no need for bloat (by developers) on the server.

Another thing that I appreciated in Squarissta's post was the following:

Originally Posted by Sgarissta

...
Ruby/Rails is a lot closer in deployment currently to .NET/Java than it is to PHP. While Rails apps aren't compiled like .NET/Java, they both require some fairly heavy lifting by some form of application server. Rails problem thus far is that because of the way the Ruby interpreter currently works it's "hard" to have a true application server. But after YARV/Rubinius/JRuby get stable, you'll begin to see some really interesting work being done on the current mess of Rails deployment such as a useful mod_ruby that caches bytecode instead of having to relaunch the interpreter with every request, much like mod_python.
...

Ruby/Rails is similar to ASP.NET. Mind you .NET is huge in size & capabilities and is compiled while RoR is quite compact and interpreted but from a web development approach they are similar. I think perhaps some people (myself included) have looked at RoR as something competing with PHPNuke or Drupal, etc... whereas it really is a full stack solution. You can really use it for developing (almost) any type of web application, not just a blogger or CMS site.

An advantage of Rails over other frameworks is that while you are provided with a very neat structure and practices, it doesn't require you to type out the enormous list of dependencies. I was just looking over some C#.NET code which reminded me of that. I think that this might provide a good track for very new developers to follow because they don't have to remember all of the classes required just to display a page yet they do have to get their feet wet with design patterns, unit testing and structured coding.

I've bought the book and am thoroughly enjoying the read.
Rails really is an impressive framework and one that I will learn because as it boasts - it's fun to build a rails application. The tedious tasks that you have to handle in other languages are simply built into the framework.

The hands down best feature of rails though for me personally is that it is written in Ruby.

Having not written in Ruby before it was very interesting typing in the first commands - but I love the intuitiveness of the code. It's the simplest and easiest to learn language that I have come across.
The language has really been though hard about so that there is as small a learning curve as possible and i'm enjoying programming in Ruby.

I am also confused about ROR and other frameworks (including php ones). I just don't get it. I've looked through several 'get started' tutorials, and sure, it takes hardly any time to come up with an application... but I just hate the way everything is done for you. I want control over that myself - I don't want to take a short amount of time to come up with an application, and then spend a longer amount of time getting it how I want! It seems to impose certain things on you (editing, deleting, adding, updating are always there - no flexibility), and I don't feel like I'm in control as much as I'd like. Personally, PHP gives me the right level of control - and developing applications using PHP is hardly slow anyway.

Someone please convince me that there is another reason to use ROR than development time - do people just like it because it means they can be lazy and get everything done for them? Or is there a more compelling reason to use it?

Holy crap, it's like you read my mind. I just took Ruby for a first test drive - and was way not impressed. I could have typed exactly what you said! Ruby seems to be too simple! I would like full control over what the hell is going on in a programming code. I don't like how Ruby automatically creates a bunch of folders, and automatically creates the ability with buttons to update, delete, and modify some row in MySql! And I hate it when I create a new application it makes a stupid heading automatically, and the heading <h1> even displays cut off in IE7.

You see, I want to enjoy programming. I don't want to type just a few lines of code or something and it automatically generates a blog system or whatever. I want to make my own from scratch. By this way, I can really enjoy the elegant art form of programming, and understand everything of what's going on.

So basically, for me, Ruby is just too simple. It'll probably be suitable for people who really want to get to building their own websites in the shortest amount of time.

EDIT: Whoever said that Microsoft is trying to increase their software so that they can have more money is a complete moron. You know Bill Gates? You know what his goal is? His goal is to give away all his money to those who needs it the most. So think aobut it. For those who are diehard microsoft haters who think Microsoft is dominating too much, think about it: Who entered the sucessful computer market first?

AirForceOne, I think you mean Rails and not Ruby. Ruby is a programming language where you have as much control as in any programming language. Rails is for people who want to get things done, not for people who insist on doing everything on their own (but why aren't you using assembly or building your own computer in that case?).

You see, I want to enjoy programming. I don't want to type just a few lines of code or something and it automatically generates a blog system or whatever. I want to make my own from scratch. By this way, I can really enjoy the elegant art form of programming, and understand everything of what's going on.

So basically, for me, Ruby is just too simple. It'll probably be suitable for people who really want to get to building their own websites in the shortest amount of time.

EDIT: Whoever said that Microsoft is trying to increase their software so that they can have more money is a complete moron. You know Bill Gates? You know what his goal is? His goal is to give away all his money to those who needs it the most. So think aobut it. For those who are diehard microsoft haters who think Microsoft is dominating too much, think about it: Who entered the sucessful computer market first?

Off Topic:

I must have missed the dig against MS. It doesn't have anything to do with whether or not RoR is worth looking at but it always seems to become part of the debate anyway. Oh well...

I think you and the Stormrider miss the point of the ability to automatically create your folder structure and the editing buttons. They are for very different puposes. The folder structure is to give you a consistent development approach. If you can't appreciate this, you must be relatively new to programming and/or development. The directory structure provides you with development, testing and production environments. It also provides you or any rails developer a common ground for collaborating. It's the same for any development framework you might work with.

In your second point, I think when you speak of the auto-created buttons for editing, deleting, etc... you might be referring to scaffolding which is temporary code to get your application up to speed during development. Generally this is one line of code that gives you a full featured if not generic CMS.

Again, this is not for production... It's to get you by until you develop the admin tools yourself. Personally, I think it's genius. It's generated with one line in the controller "scaffold :name_of_object". Whenever I build a data driven app, I need some data to help in development so I either whip together an interface (form of some type) or I write a SQL file and load it in the database. Using a scaffold during development will save several hours of temporary data generation and that just makes sense.

The statement about people looking at RoR because they are lazy is well.... (searching for the right adjective.... Don't want to be rude... Got it... The word is...) Uninformed. To take the time to learn a new technology and learn it well enough to apply it to your professional development takes motivation, drive and commitment. Those of us advocating RoR are not producing toy scafolded apps. We are looking at Rails to provide custom web apps tailored to the requirements of specific projects. We're looking at Rails because perhaps it will provide the flexibility and/or scaleability that we don't find with .NET, Struts or procedural one off development.

PHP. ASP, .NET, xml/xslt, etc... They're tools and I'll continue to use them when they fit. RoR is another tool that might be helpfull. I can code all day and night with the languages I know. I'd be lazy if I didn't make the effort to learn new technologies.