Ok, I think I am being very dense. Yes, all right, what's new? I'm looking at Ruby as I keep hearing about it & thinking it is worth looking at but I can't really see the point. Sorry, I know that sounds very dismissive but I'm trying to see an application and can't. I know it seems very powerful but if it can only be run via CLI is it just limited to playing with text files, some text manipulation and some nice math calculation? Has anyone done anything impressive with it on here?
I am hoping it is just me showing my programming n00bness. Having only used ASP, PHP, Java and a bit of VB I've never really used local scripting so I think I just can't put a grand use to it.
I think that web stuff is the real use for Ruby - Ruby on Rails has an intro to this and wikipedia also has an overview.
I think PCPro's Real World web section had a few articles on it recently but they don't seem to be on their web site.
Do you mean just ruby? or did you really mean ruby on rails?
Both :) I hate ruby itself as a language, and trying to use it on rails is even worse. The development process is just too convoluted for me. Running Webrick from terminal on obscure ports, restarting sql and/or webrick whenever you make changes to the db structure, no thanks. I prefer my PHP in Apache where I can Ctrl+S, Alt+Tab, F5 to see my changes immediately.
It depends on your own preferences and attitudes... Also, as with any job the tools you use depends on the requirements and constraints.
In terms of the syntax Ruby is vastly different from most procedural programming languages such as C, php, perl, etc. It's particularly suited to object-orientated programming.
I've had a play with the Rails framework and it's all about conformity in order to reduce development time, but that means there's a steep learning curve, especially if you're new to OO programming. I recommend it highly if you have time to learn it's principles, because it can save time. I also recommend Agile Web Development with Rails as a good book to start with, it helped me.
Ruby performance sucks. It is impossibly slow, even compared to languages like Perl or Python. Look at the performance improvements of rails 1.9, and you'll get an idea of just how bad 1.8 is.
But Rails scales very well -- in the simplest example, the default configuration for Rails is a mongrel cluster, even on a single machine. It's a really strange and perverse design where you put a load-balancing proxy in front of at least three Rails/Mongrel web servers, each listening on a different local port. And unless you've done something stupid, this will Just work, right out of the box.
But as long as your database server can handle it, you can just throw another server behind that load balancer. A lot of work has gone into making load balancers and database servers scalable, and you can take advantage of that, if you really need to.
What this means is that I probably would not write a performance-critical desktop app (like, say, a game) in Ruby. But for web apps, it makes sense. If you can write the same app twice as fast, with half the people, you can afford to throw four times the server resources at it -- and as a bonus, you got it up in half the time as your competitor, who thought scalability == performance.
I understand what you're saying about the RoR helping to reduce develpoment time through agile methods, but would it not be possible to get equally speed results from using one of the many php frameworks, rather getting down and dirty to learn an OO language that, as you say, is quite a departure from what most small-time web developers are used to with php or asp.
RoR may be scalable by design, but i think it's use has been restricted to small projects in the wild. I've not heard of any RoR projects of significant size, for larger projects requiring scalable web farms a developer will still turn to jsp or .net as the development languages and environments.
I must admit i am intrigued to have a play....but i am put off by the learning curve.
Also as a sidenote, performance boils down to the programmer a lot of the time.
take a look at Wordpress vs Moveable Type, yes PHP vs perl. Whilst wordpress is more fashionable Moveable type owns it in every way..
check this link on wordpress performance (Link
saying all that though, im not a fan of Ruby much either. like iv said previously on here, Perl has 20 years of dev time and MASSIVE modular support, it wont be beaten! :p
I like Ruby. It's a simple syntax, you can knock something together in little time, and there's a lot of community development for it.
Do you prefer mature women, too, el8linuxel8? :P
Ahhh but what somethings do you knock together? I suppose that is a better question> What have people coded with Ruby?
Originally Posted by fafster
Mainly web applications, but you can write a script in it for pretty much any purpose.
There are also libraries ported to it for creating user interfaces, but to be honest if you're making a desktop application I'd use Visual Studio.
Spiceworks is also written in Ruby.
thats quite a good comparison, you can stick to your young ladies with fancy nice looking flash websites...il have my mature static html website whos dev's "know what they are doing" ;)
Originally Posted by fafster
No, forget Flash. Apart from uses such as embedded video, I hate it.