Page 2 - Discuss Ruby. I need help getting started. in the Ruby Programming forum on Dev Shed. Ruby. I need help getting started. Ruby and Ruby on Rails programming forum covering Ruby Tips and Tricks, Best Practices, and agile development with Ruby on Rails.
Posts: 5,538
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1050
PHP is probably the best solution because it's instaled on just about every linux server out there and it has ideal functions for what you're trying to do. I've yet to come across a shared hosting package with mod_lisp, mod_python is rare to see and even rarer is ruby/fastcgi.
Mark: I'd only write perl like that if it was a 2 minute script i never wanted to touch again. If I was designing something to be used again, i'd take the time to design it properly.
Posts: 271
Time spent in forums: 3 Days 1 h 8 m 16 sec
Reputation Power: 42
You can always ask... It doesn't cost you anything. Maybe some other users already requested that, and i'll be the one that will make admin add support.
Posts: 2,537
Time spent in forums: 1 Week 2 Days 18 h 17 m 47 sec
Reputation Power: 68
Quote:
Originally Posted by °Oblivion°King°
Excellent post, Mark
Both languages have same purpose. Why should i learn both if I'm gonna use only one? I wanna learn the one which is more powerful, and has good support. When i learn it, i'm gonna use it for everything, and i'll ~master it after some time.
Ruby is similar to Python. It has clean code, and is powerful.
Perl has the best support for regular expressions (very important feature to me).
I'm still not sure which one is better for me... I wanna develop MMORPGs like http://www.darkthrone.com , hattrick , or herowar . I already have few ideas for some MMORPGs.
How can scripting language help me here? I just learned some advanced stuff about PHP. PHP has everything i need for MMORPG. Now i'm confused...
To get a better grip on common programming practices? There is some overlap in what you'll learn from both languages but both languages can be used for the same things.
I think that the inclination is to do large application development in languages like Ruby or Python rather than Perl simply because Perl programs tend to be terser and harder to maintain.
Things like OO aren't easily explored in Perl 5, and OO is a major idea in the programming industry as you should know.
Just so you know all three languages have full support for Regular Expressions and text manipulation in general but Ruby and Perl both have them built right into the language .
PHP is really tied to one domain: writing web application. There has been some attempt to take it into the world of general purpose programming but I think this is very questionable, it just wasn't designed for it!
Finally, learning languages is a skill in itself. If you want to become good at learning new programming languages then you have to learn more than one .
Take care,
Mark.
__________________
programming language development: www.netytan.com– Hula
Posts: 271
Time spent in forums: 3 Days 1 h 8 m 16 sec
Reputation Power: 42
I wanted to learn Perl. I've heard much about it, but it has spooky code sometimes...
I don't wanna use PHP for desktop apps. I wanna use it for web apps(MMORPGs mostly).
And i see that PHP has everything i need for this purpose, so i won't need language for scripting. Maybe i'll learn Ruby On Rails later.
Quote:
Finally, learning languages is a skill in itself. If you want to become good at learning new programming languages then you have to learn more than one .
I've learned more languages than i can currently remember...
I've found this one some blog:
Quote:
PHP vs Ruby on Rails, Part 1
Over the last few weeks, I’ve been asked by both friends and clients, “So what is that thing called Rails I keep hearing about (and/or keep hearing you talk about)? How is it different from PHP?” Typically I give them a three-part answer that’ll I’ll now iterate for the blog. While this is far from a complete comparison, hopefully it will be useful to some people out there.
The first thing to keep in mind when trying to form a comparison between PHP and Rails, is that PHP is just a language. It’s a scripting language that has a lot of useful functions that make adding dynamic content to web pages easier than its predecessors. What PHP is not (and what Rails, in fact, is) is a framework. In software terms, frameworks are generally tools and pre-built objects that help you create a solution faster by not reinventing the wheel.
More specifically, Rails is a full-stack framework. Full-stack basically means that when you decide to use Rails it will provide practically all of the tools necessary all by itself. While you are welcome to use other tools for sections of Rails’ functionality, most current Rails developers are not (and for obvious reasons described below).
So PHP is just a language. When you choose to use PHP to build a significant web application what you’ll want to do is look for tools and pre-built objects that are written in PHP. Some are packaged together in frameworks. Other times you’ll assemble them ala cart (a database abstraction layer here, a template system there). Sometimes building systems this way makes a lot of sense, but other times the overhead of divided tools makes for more work than it might be worth.
In Rails, they follow a mantra of “Convention Over Configuration.” With this in mind, Rails will follow industry conventions to make your job easier whenever possible. One example where you can see this in action is with page templates.
In Rails, if you have, for example, a BlogController and it has a method called list, Rails will automatically use the list.rhtml file inside of a folder called blog in your views folder. Not only that, but Rails will automatically pass on any instance variables you were using in the controller so that the view has access to them.
Now, when I am doing something similar in my own PHP apps, I have to manually instantiate the template object, manually pass references to any variables I know the view will be interested in and then manually tell it what template file to use. While all that manual code is pretty simple and easy to write, on even medium-sized apps it starts to take a toll on the leaness of the codebase.
This is one of the many reasons I like Rails. It will follow obvious conventions when possible but allow you to override the convention with a specific command; in this case to use a template file other than list.rhtml if needed.
Conclusion for part 1: PHP is just a language. Rails is a full-stack framework. PHP has lots of useful tools; they just don’t gel as well and usually require more configuration.
Part 2 will be posted soon. In it, we’ll look into the Ruby language and how it differs from PHP.
Posts: 5,538
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1050
Quote:
Originally Posted by °Oblivion°King°
I wanted to learn Perl. I've heard much about it, but it has spooky code sometimes...
I don't wanna use PHP for desktop apps. I wanna use it for web apps(MMORPGs mostly).
And i see that PHP has everything i need for this purpose, so i won't need language for scripting. Maybe i'll learn Ruby On Rails later.
I've learned more languages than i can currently remember...
Posts: 271
Time spent in forums: 3 Days 1 h 8 m 16 sec
Reputation Power: 42
Quote:
Django and turbogears are both better than rails, why not look at them?
Because I've never heard for them... till now.
And there are no books about them. Book about Django will be released in Fall. I don't know when book about turbogears will be available.
Posts: 5,538
Time spent in forums: 1 Month 3 Weeks 1 Day 19 h 30 m 28 sec
Reputation Power: 1050
Quote:
Originally Posted by °Oblivion°King°
Because I've never heard for them... till now.
And there are no books about them. Book about Django will be released in Fall. I don't know when book about turbogears will be available.
Who cares about buying a book? The docs on the sites are fantastic!
Posts: 271
Time spent in forums: 3 Days 1 h 8 m 16 sec
Reputation Power: 42
Too much offtopic...
I'll just learn PHP&MySQL. It will be enough for MMORPG.
There are too many various frameworks available. RoR, python frameworks... i don't have time for all this. I wanna learn PHP&MySQL so i can program browser based MMO games and do some projects as a freelancer. Ajax is also plus when you're looking for programming job. Maybe i'll learn it after those two.
As you can probably see, i'm very confused with all those new languages, etc... I just started to program web apps.
Thank you both (LinuxPenguin & Netytan) for answering my (stupid) questions.