views:

135

answers:

5

I only know the basics of HTML/CSS. The only experience with web development I have is whatever I learned in Web Development 101 at my university, aka "OMG - CSS u guise, 101".

I'm mainly interested in building simple dynamic sites. That's the whole reason I got into this in the first place. I'm at the point now where I realize that it's not enough to only know HTML and CSS.

I realize that I'm going to have to go through a learning curve no matter what programming language I choose to learn, so I figure I should learn something that will be most the beneficial in the long run. I'm all about putting in the sweat equity now to build a better future. PHP seems like the easy and obvious first choice, but I keep reading over and over and over again how people have switched from PHP to Python and never been happier. Or how you should skip PHP altogether and just learn Python or Perl.

But I don't understand why that is!

I keep looping back to thinking "F___ it, I just need to learn PHP so I can be a WordPress ninja." But then I do some more reading, and I walk away feeling like PHP is more of a 'temporary fix' language, and that the REAL languages are Python/Perl/Ruby. But I'm very split because I really don't need to do anything complicated. I just need to build basic 50-page web sites with some database interactivity.

Do you have any advice? What would you learn if you were in my spot??

A: 

Start with PHP.Its easy to learn.Having knowledge in PHP will help you to get skills on Ruby/PERL.

Shyju
+1  A: 

They're all about the same. PHP is definitely easier to get started with. I recommend just starting with PHP and than once you feel comfortable creating things in it look into doing it with Python. I feel that Python for web development may be frustrating to someone just getting started. That said if it frustrates you to the point of giving up it doesn't matter if Python is a better language or not.

blcArmadillo
+2  A: 

For a good dynamic site, you need Javascript (and a good framework for it, such as jQuery, to sweeten your life by taking care of browser issues, adding functionality, etc) -- without that, with just a server-side language such as PHP, Python or Perl, your site will never be good (since every change to the page will require round-trips to the server).

If your purpose is to minimize the amount of learning you have to do, it's actually sensible to use Javascript on the server as well (not my favorite language -- I'm a Python guy -- but not an absurd choice for server-side functionality today). Specifically, node.js has made server-side javascript quite interesting. Finding a cheap shared hosting provider supporting it can still be a problem, so, depending on how you want to deploy, that might cramp you a bit... but, the situation appears to be rapidly improving, so, by the time you've learned all you need and built your first deployment-worthy site, it might not be that bad a problem any more;-).

Alex Martelli
I'm actually reading the vpsBible by Guvnr because I think it would be more beneficial long-run to learn some sysadmin with Nginx right now. I realize it's overkill but I intend to get set up on VPS.NET hosting.I was just looking into node.js a few minutes ago. But fking A, I cannot for the life of me figure out how it applies to building a simple dynamic site. It's sort of the same story with Python and Perl.For me it's all about what scales most effectively in the long-run. Node.js looks cool as hell, but I can't figure it out.
Alex
Saying that javascript is necessary for a good dynamic site is like saying that windshield wipers are necessary for a car. Yes, they're good to have, but just because you have windshield wipers doesn't mean you have a car. You cannot build anything short of a client-side application with javascript, which is hardly what I would call a "dynamic website".
Stargazer712
@Stargazer, you say that """Saying that javascript is necessary for a good dynamic site is like saying that windshield wipers are necessary for a car.""" -- no, it's like saying they're necessary for a **good** car. And, you seem to be confusing "necessary" with "sufficient"; and, are utterly wrong when you state "You cannot build anything short of a client-side application with javascript": the meteoric rise of Node.js (which is obviously in Javascript **and** obviously server-side, **not** client-side) should start showing you exactly how incredibly **wrong** you are.
Alex Martelli
@Alex, for a trivial example of a simple dynamic site coded in Python (and deployed on App Engine), see for example http://code.google.com/appengine/docs/python/gettingstarted/usingusers.html . Re node.js, the tutorial at http://net.tutsplus.com/tutorials/javascript-ajax/learning-serverside-javascript-with-node-js/ does make a substantial dynamic site in Step 4 (I wouldn't call it "simple", it's pretty rich and complete); the tutorial series at http://www.robsearles.com/2009/11/29/first-steps-with-node-js-exciting-stuff/ gets to a simple dynamic site in part 2, liked from the URL I gave.
Alex Martelli
@Alex, in the part of your answer that I was commenting on, you said that Javascript is necessary for a good dynamic site, and even mentioned JQuery, solidifying the fact that you were referring to client-side scripting. Javascript is simply not necessary to create a dynamic site and I pointed that out. Node.js, while neat, is not practical. PHP, ASP, ASP.NET, Ruby, and Python all offer much more mainstream support, and for someone who only knows HTML and CSS, learning one of those languages is much more practical.
Stargazer712
@Stargazer, the OP knows no programming language and appears to want to learn as few of them as he can (and still create dynamic sites). Since Javascript is needed for a good dynamic site, then obviously **knowing** JS (as well as HTML and CSS, which the OP says he already knows) is needed -- and, given not just node.js but all the common.js standard implementations, I disagree that knowing just JS (plus HTML and CSS of course) is insufficient, i.e, that any of PHP (etc) Python are **needed** (learning >1 one language may indeed be better, but the OP seems to want just one: then, JS be it).
Alex Martelli
Once again, referring back to his question, he stated, "I figure I should learn something that will be most the beneficial in the long run." Javascript is most assuredly not that language. If he wants to learn just one, then I suggest something that is practical. While there are pros and cons to most server-side languages, I assure you that Javascript is not on the table for most serious developers.
Stargazer712
A: 

Just pick one and go with it. You can add database connectivity and dynamic gizmology to your web pages in pretty much any language.

For what it's worth, I am one of those people who abandoned PHP for Python, and I'm very happy with that choice. I like Python because it's easy to learn, it's useful as a general-purpose programming language (not just for web development) and also it feels better to separate the programming (Python) from the presentation (HTML/CSS). Plus, Python is easily extensible with new libraries. But of course, I'm biased ;-) Other people could probably tout the benefits of PHP the same way I've done here with Python. The point is, you can't really get one definitive answer about which language is better.

David Zaslavsky
A: 

Check out Jeff Atwood's thoughts on PHP: http://www.codinghorror.com/blog/2008/05/php-sucks-but-it-doesnt-matter.html

The point is, in the grand scheme of things you can build great software with either PHP or Python. Why not take the extra time to implement a site in each, and choose for yourself based on that?

MikeG