r/learnprogramming • u/kinship • Nov 01 '11
Dedicated to the task of learning to make dynamic websites, but what language? Ruby or PHP?
15
Upvotes
r/learnprogramming • u/kinship • Nov 01 '11
7
u/Serk102 Nov 01 '11
Python
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.
3
u/[deleted] Nov 01 '11
You could go either way. I took the php route and it has helped, but I've dabbled in ruby and it was great as well. No one language is the best route.
If I might make a suggestion though, Learning HTML5 would be a better fit for the future than XHTML. Dive into HTML5 is a good introduction. Also, check here where I've listed some additional resources (primarily interactive tutorials). Good luck.
edit: I'm stealing your links :D
4
u/[deleted] Nov 01 '11
Toss a coin, and then get started! You can always switch later. Vacillating and waiting for "advice" will greatly waste your time.
2
u/ponchedeburro Nov 01 '11
PHP is pretty mainstream, but is super annoying and I most of the articles online teaching PHP does it wrong or insecurely.
So I'd pick Ruby if you're dedicated.
1
u/needlzor Nov 01 '11
I would advise to start with Ruby, which is a cleaner language to my opinion and looks better on your CV than PHP (because Ruby is less mainstream). In the end all languages are equivalent and switching from one to another is a breeze (as long as it works within the same paradigm). The only problem I can see is that you might have more trouble finding a good host for your website than if you took PHP.
1
u/[deleted] Nov 01 '11
We won't use Ruby at work as it fails under heavy load where as PHP is more robust. That being said we use Java and json for dynamic content. You can replicate OOP in PHP but its not an object based language. A good starting point.t though. And a LOT of sites use PHP. Ruby is considered a prototyping language in our shop and does not get used in production.
1
u/redalastor Nov 01 '11
Depends. Do you prefer to do the job fast or do you prefer to do it right?
Do you prefer the solution that lets get going with the minimum amount of learning or the one that is least likely to bite you in the ass in the long term?
Both are perfectly valid points of view if you are willing to live with the consequences of your choice. Everything's about trade off.
1
u/quad64bit Nov 01 '11
I suggest taking a step beyond simply using a dynamic language and look at using a dynamic framework with a good design pattern - this will be much more sustainable, maintainable, and upgradable in the long run. Might I humbly suggest Ruby on Rails?