News for hackers. Stuff that matters.
Re:What programming language to learn RoR or PHP? by patio11 on Saturday May 22, 2010 @11:48PM (#1371737)
Ruby is a programing language. Ruby on Rails is a web framework. That is not a pointy-headed distinction, because the reason Rails is vastly superior to regular ol' PHP for certain types of prototyping tasks is because of all the stuff it has built on top of Ruby. For example, ActiveRecord, which will save you from having hard-coded SQL calls in the middle of your prototype.

There is a certain amount of conceptual overhead which happens with Rails projects that doesn't happen with PHP. Deploying Rails apps is still an order of magnitude or more harder than doing PHP apps -- even with Passenger, which supposedly fixed deployment. There will almost certainly be more configuration in a Rails app.

On the plus side, the Rails and Ruby communities have wide and deep amounts of OSS code for you to use to accomplish typical web dev tasks. The PHP community is, ahem, well, I'm sure they're wonderful people and if you're working on Wordpress they have huge amounts of well-packaged code available for you to use to accomplish your tasks.

You don't mention if you're a programmer already. PHP is well-suited to folks with minimal programming ability. I would think doing Rails without having strong object oriented programming skills would be a recipe for disaster.

Re:What programming language to learn RoR or PHP? by ph0rque on Sunday May 23, 2010 @12:20AM (#1371779)
I mostly agree with you, except for two points:

For prototyping purposes, deploying to heroku is as easy as

  git push heroku master
Also, I learned Ruby as my first language... learning OO was no harder than learning other programming concepts.
Re:What programming language to learn RoR or PHP? by jonjonjon on Sunday May 23, 2010 @05:28AM (#1372059)
thanks. and yes,forgot to mention I am NOT a programmer.I have been exposed to programming but have not done it. The way I see it,I am the guy who can take the car to the repair shop, tell the mechanic that I know the problem is the radiator, but I am not able to fix it
Re:What programming language to learn RoR or PHP? by yourabi on Saturday May 22, 2010 @11:39PM (#1371721)
PHP? Avoid it.

Look into Python and Django or Pylons.

In my opinion Python has a better culture and community. You will also be exposed to functional topics like list comprehensions and generators that you are unlikely to come across in PHP.

Re:What programming language to learn RoR or PHP? by gmlk on Sunday May 23, 2010 @05:32AM (#1372066)
If you can avoid the mess that is PHP, do.

Don't ever try to build something in PHP that needs to be clean and clear. Messy and obscure is easy in PHP, clean and clear is hard, therefor the system will be working against you all the time.

However, you can't always avoid it. Sometimes you just can't use anything else.

RoR has as down side that it requires a lot more control over the server then PHP does. Also, you need to learn to think in RoR's MVC model. It you can, RoR will be a great assistent helping you along the way. If you can't, it will be as helpful as a bureaucrat.

Re:What programming language to learn RoR or PHP? by dget on Sunday May 23, 2010 @05:40AM (#1372071)
While PHP is incredibly messy, if you already know HTML, I'd go with it.

It's a fairly gradual step up from static HTML/CSS, and will probably be less frustrating at the start.

Re:What programming language to learn RoR or PHP? by Wolf_Larsen on Sunday May 23, 2010 @02:02AM (#1371905)
I think it depends on your ideas as much as anything else. Web Apps? Operating Systems?

For web apps, I love Drupal. Drupal is a php platform, like Rails is for Ruby. PHP was easy enough for me to be building simple Drupal modules within a year of my first install, with Very little prior experience. So, keep in mind that php is not a huge learning curve and you also have jQuery, Apache, linux, project management, etc out there, fucking up your life, ;D

Re:What programming language to learn RoR or PHP? by jonjonjon on Sunday May 23, 2010 @05:30AM (#1372061)
thanks. How far can you go with drupal? what is the more extensive/impressive implementation on Drupal that you have seen?
Re:What programming language to learn RoR or PHP? by Wolf_Larsen on Sunday May 23, 2010 @12:05PM (#1372473)
You can go very far. Facebook apps, mobile apps, SMS, Mapping,

Here are some impressive implementations: http://www.drupalgardens.com/ http://openatrium.com/ http://groups.drupal.org/aegir-hosting-system http://developmentseed.org/ -> Their projects are cool http://drupal.org/project/modules?filters=drupal_core%3A87&#... -> Modules organized by usage. Go through a few pages to see some specific use-case modules. http://2bits.com/articles/presentation-28-million-page-views... -> Drupal is NOT slow when configured properly. www.whitehouse.gov is probably pretty cool.

I recommend http://sf2010.drupal.org/conference/sessions/state-drupal for an idea of where Drupal is today.

I'm curious what other HN people think about Drupal. Would love to hear.

Re:What programming language to learn RoR or PHP? by phoenix-project on Sunday May 23, 2010 @12:14AM (#1371772)
You might want to try Python instead of Ruby or PHP. If you are willing and have the time, do give Smalltalk a shot too.
Re:What programming language to learn RoR or PHP? by brianto2010 on Sunday May 23, 2010 @12:34AM (#1371799)
Why? If you are going to give a position, at least back it up.

@jonjonjon - I'd suggest finding a quick mini-project tutorial for both languages and do them. Afterwards, see how both languages feel and judge it yourself. For Ruby on Rails, there is the Rails Tutorial by Hartl

http://www.railstutorial.org/

I don't know of an equivalent for PHP.

Re:What programming language to learn RoR or PHP? by jonjonjon on Sunday May 23, 2010 @05:31AM (#1372063)
will try that. thanks! Interested to see if anyone can suggest the equivalent tutorial in PHP?
Re:What programming language to learn RoR or PHP? by eswat on Sunday May 23, 2010 @10:17AM (#1372304)
Try a very quick project with both languages? Maybe a todo list using Ruby/Rails and PHP/CodeIgniter (language/framework). Not really answering your question but you should also see how these two work with your own eyes instead of just relying on anecdote, even if you’re just starting programming.
Re:What programming language to learn RoR or PHP? by spooneybarger on Saturday May 22, 2010 @11:42PM (#1371729)
Ruby on Rails isnt a programming language. Its a framework for web applications written in Ruby.
Re:What programming language to learn RoR or PHP? by armandososa on Sunday May 23, 2010 @01:05AM (#1371836)
I'd say, if you are not very comfortable with the command line, sockets, ENV variables and that kind of unix-y stuff do yourself a favor and grab MAMP or XAMPP and start programming PHP right away.
Re:What programming language to learn RoR or PHP? by bbastian on Sunday May 23, 2010 @12:04AM (#1371761)
I'd recommend avoiding PHP. For quick prototyping, I'd recommend Rails, though (in my opinion) Ruby/Sinatra or Python/Tornado would be better overall.
Re:What programming language to learn RoR or PHP? by techiferous on Sunday May 23, 2010 @12:24AM (#1371785)
Would this be your first programming language?
Re:What programming language to learn RoR or PHP? by jonjonjon on Sunday May 23, 2010 @05:30AM (#1372062)
Yup,but I have been exposed as Product Manager to the process of programming.
Re:What programming language to learn RoR or PHP? by techiferous on Sunday May 23, 2010 @09:19AM (#1372209)
If this is your first language, then keep this in mind: it is like learning a new human language in that you have to learn the grammar and you have to learn vocabulary. Let's say you choose Ruby on Rails. Ruby is like learning grammar: you've got to understand the core concepts of the language and how to put things together. Rails and the domain of web programming is like the thousands of vocab words you need to know: HTTP status codes, the CSS box model, Rack, XHTML, Ajax, cross-site scripting, etc. Web programming encompasses a lot of knowledge. You may be able to pick up Ruby pretty quickly, but it will take a while to learn all of the web programming knowledge you need to know to program a web app adequately. Time and time again I've seen people think it was easy, dive in, and realize it was really hard. I'm not trying to discourage you, but realize it's going to be a lot of work (probably similar to the effort of learning a new human language).
Re:What programming language to learn RoR or PHP? by jonjonjon on Sunday May 23, 2010 @01:00PM (#1372568)
I understand. I do now HTML and CSS and have played a bit with javascript. But yes, I a am aware how difficult and time consuming this will be. Would you then recommend RoR over PHP?
Re:What programming language to learn RoR or PHP? by techiferous on Sunday May 23, 2010 @04:18PM (#1372914)
I wouldn't recommend Rails as a starting point. The ecosystem has become quite large and there is a lot to learn. Plus, it's in transition from Rails 2 to Rails 3, so you'll be learning a moving target and the ecosystem is a bit unstable as a result. If you'd like a Ruby framework to start with, I'd recommend Sinatra. It has less moving parts but is still plenty powerful. http://www.sinatrarb.com/

If your web application is mostly a web site with some dynamic features sprinkled in, then PHP would be a good choice because it's easy to embed straight within the HTML. If you're building a full-fledged web app (lots of dynamic content, database-backed, user accounts, etc.) then I would choose a web framework. I don't know how PHP web frameworks compare with Ruby web frameworks since I haven't used a PHP web framework myself.

Re:What programming language to learn RoR or PHP? by wendroid on Sunday May 23, 2010 @04:23AM (#1372023)
Visual Basic sounds right for you