r/learnprogramming • • Nov 01 '11

Dedicated to the task of learning to make dynamic websites, but what language? Ruby or PHP?

[removed]

14 Upvotes

32 comments sorted by

View all comments

8

u/i8beef Nov 01 '11

Want a job? PHP

Want to learn some useful conventions? Ruby / Rails, but really look into WHY they have those conventions.

Want something more applicable than just web? Python.

2

u/IthinkIthink Nov 01 '11

The majority of hits I've had from companies/people looking for web-related talent over the last year or so has been RoR-specific. I'm not sure if that's the norm, but I definitely see a trend in that direction. I'd recommend Rails; there's most certainly a market for it.

1

u/i8beef Nov 01 '11

Really? What part of the country? Just looking at overall job listings, the rankings are usually Java, .Net, PHP for skill sets. RoR and Python are pretty scarce here in Ohio unless you are from the Dayton or Columbus region.

1

u/IthinkIthink Nov 02 '11

I'm in Boston. There's a lot of RoR going on here.

1

u/[deleted] Nov 01 '11

[removed] — view removed comment

2

u/thoughtpunch Nov 01 '11

Ruby is opinionated. There are strong opinions about how you should go about accomplishing a task = conventions. You can see 1000 different ways to go about doing the same thing in PHP, which slows down comprehension IMO.

1

u/[deleted] Nov 01 '11

[removed] — view removed comment

2

u/i8beef Nov 01 '11

Conventions are ways to do things. Best practices are kind of more general, but I'm nitpicking. Ruby developers are big on convention (if everyone does X the same way, then no one gets confused). It's a good idea in theory.

The other usage is as agreed upon rules, for example, Thing is the default instance of the interface IThing, etc. Theres nothing TECHNICALLY limiting that, but convention says that's how you do it.

There are FRAMEWORKS that exist for each of these languages that have their own conventions. Ruby has Rails, Python has Django, and PHP has Zend, Cake, Kohana / CodeIgnitor, etc.

Looking at one of these systems, and the conventions they use for doing things, is a good way to start building up your knowledge of best practices though by giving you examples of ways people farther down the line have decided to implement things.

1

u/[deleted] Nov 01 '11

[removed] — view removed comment

2

u/i8beef Nov 01 '11

Any documentation on the framework in question. Ruby will be very big on people saying "You do it this way".

2

u/Danikar Nov 01 '11

generally if you read a tutorial or book on how to use a language or framework, you will learn the conventions from there.

1

u/anti-anonymous Nov 01 '11

I do web dev for a living and this is the correct answer.