News for hackers. Stuff that matters.
Re:Ask YC: Learning Web Development, were should I start? by iamelgringo on Tuesday February 26, 2008 @11:22AM (#123938)
I had a similar issue a year or so ago. I tried to jump right in to a web framework, but I ran into a few problems. Like so much in the technology world, web frameworks grew in response to a certain set of problems. If you dive into web frameworks without having a least a rudimentary understanding of the problems that are being solved, you'll end up puzzled more often than not. So, when I picked up a bunch of Rails books, and started to work through them. So much of it was confounding, because so much of Rails is developed in response to problems in PHP + Java web development.

You could just say, "Screw it all," pick up a PHP book and dive in head first. You'll pick up some pretty bad habits along the way, but it depends on how you like to learn.

Here's a syllabus that I'd suggest to really get your head around web programming and understand what's going on:

HTTP--learn the basics of what the protocol does, and why. Learn the different response pages, because they are going to be your error messages.

Web servers--you just need a 100 ft overview. Learn how to setup and configure a web server.

Programming--You need to pick a language, Python or Ruby and learn how to at least do some basic programming with it. I'd recommend Python, personally. It's more explicit, and has less "magic". You probably need to understand variables, iteration or looping. You need to understand some basics of the object oriented programming concepts like methods, classes and scoping. And, if you're going to get into any of the web frameworks, you need to understand what things like a dictionary and array are. At least a basic understanding of regular expressions are necessary to learn Django's URL naming convention. The better you know programming itself, the better web developer you'll be, and more things will become possible for you to program.

CGI -- This is the ancestor to pretty much all dynamic web pages, and the foundation of most web development. Pick the language that you're learning, and go through some tutorials on CGI scripting for the language you're going to focus on. And, this will help you understand the basics of what goes on in the address bar, GET and POST methods of the HTTP protocol. You'll also get familiar with the idea of taking variables and inserting them into HTML templates dynamically, which is the basis of most web frameworks.

Learn SQL, and database basics. You need to understand what a database is, how to create a database, why databases are important, how to create and drop tables, how to do queries, etc... Having at least a basic understanding of relationships, foreign keys and constraints is helpful when reading some of the web framework documentation. You really should understand how to do a query in SQL, just so you can understand what the web framework is doing for you.

Finally, pick up a web framework, and start to work through it. After learning the above, learning the web framework will tend to make a lot more sense than if you dive into a web framework deep end first. Pick the framework that's most popular for your language, that way, you can be assured you will have plenty of documentation to work with. I'd recommend Django for Python, and Rails for Ruby.

Lather, rinse, repeat. Iterate through the above steps, and learn more and more each time you approach each subject.

Re:Ask YC: Learning Web Development, were should I start? by hernan7 on Tuesday February 26, 2008 @03:31PM (#124110)
+1 to write a couple of CGI scripts to get a feel for how pages are actually put together by the framework.

My personal experience is with Perl and Java, both of which are going the way of the dodo, or so it seems. So, I can't recommend any of them in good conscience.

But, whatever language you learn, I would first take some time to write some basic non-web programs. Once you are familiar with the basics of the language (variables, flow control, arrays, hash tables, etc.) then I would write some CGI-based web forms. That would give you an idea of how the basic functionality of a web site is chiseled from the primordial silicon.

Then, when you pick a framework you will know what is being abstracted and what parts of the web programming tasks are being streamlined.

Re:Ask YC: Learning Web Development, were should I start? by german on Tuesday February 26, 2008 @11:30AM (#123944)
Thanks a lot, you really understood my problem :) I don't want to learn PHP, now I have to decide if it's going to be Python or Ruby.

Can you please point me some of the information sources you used.

Thanks again.

Re:Ask YC: Learning Web Development, were should I start? by iamelgringo on Tuesday February 26, 2008 @11:58AM (#123963)
Honestly, if you're going to make a serious study of the subject, I'd suggest an O'Reilly Safari subscription. For $15 a month, you get access to 10 books at a time. For $40 a month, you get access to their entire library. I'm not a shill for the service, I just really like the service. It's well worth the cash.

Online tutorials are good for a quick, down and dirty overview of a topic. But, if you're going to learn something a bit more in depth, I'd think that you're better off looking at a book. It's pricey, but it's worth it for me. I figure I'd spend $40 a month on tech books anyway. I'd might as well pay them and get the whole library as well as the Lynda.com video all at the same time.

Also, if you're really serious about it, I might consider finding a web database development class or certificate program somewhere. It might be slower going than you want, but you'll have a more complete understanding of the subjects once you were done.

Re:Ask YC: Learning Web Development, were should I start? by sgoraya on Tuesday February 26, 2008 @02:06PM (#124043)
Agreed - I would also recommend taking a class or two if you have the time. Decent community colleges will have many courses for web development ranging from beginner to intermediate. Studying and learning in a classroom environment has many benefits - Who knows, you might meet a few new friends and like minded folks as well!

Good Luck!

(PS: In the Bay area, foothill college is great, IMHO, for continued education)

Re:Ask YC: Learning Web Development, were should I start? by cdr on Tuesday February 26, 2008 @04:49PM (#124184)
Also, if you're taking classes, you may have free access to Safari and other ebook collections through the school's library.
Re:Ask YC: Learning Web Development, were should I start? by mrevelle on Tuesday February 26, 2008 @11:50AM (#123956)
If you do decide to go with Python, web.py (http://webpy.org/) is simple and you'll be up and running fast.

If you're interested in how it all works, dig into WSGI. And if you find that web.py is too low level, transition to Django after you have a feel for how web apps work.

Re:Ask YC: Learning Web Development, were should I start? by ardit33 on Wednesday February 27, 2008 @01:19AM (#124566)
Unfortunately webpy is poorly documented. Not good for a beginner. It is better for those people that know python well, and like to have absolute control of what's going on, and don't like the overhead of a large framework.

While webpy is small, I found myself often looking at the code, which has little commenting, to understand what's going on, or how to use a certain feature, mainly b/c the documentation is so lacking.

CherryPy might be a better choice.

Re:Ask YC: Learning Web Development, were should I start? by food79 on Tuesday February 26, 2008 @11:51AM (#123957)
I wouldn't spend too much time deciding between the two--they are more or less functionally equivalent, so just pick one and don't look back.

Python is a little more "corporate", with a little more regimented style (e.g. significant whitespace, PEP style guide - http://www.python.org/dev/peps/pep-0008/). CherryPy is super-simple to get started.

Ruby is a little more "hacker", with a more idiosyncratic cast of characters such as DHH and _Why and a little more focus on coolness and tricks. Rails is the way to go, but you can get up and running with the basics with the Camping Framework in about 10 minutes.

Re:Ask YC: Learning Web Development, were should I start? by jraines on Tuesday February 26, 2008 @01:25PM (#124007)
You can try ruby with one of the great online interactive tutorials of all time here:

http://tryruby.hobix.com/

And from there you can start playing with Rails, which is a joy to use. I recommend starting with "Agile Web Development with Rails". I've only read excerpts from "The Rails Way" but it seems good, too.

Bottom line for me -- programming Ruby and building Rails apps is fun.

Re:Ask YC: Learning Web Development, were should I start? by aaroniba on Tuesday February 26, 2008 @02:41PM (#124073)
Out of curiosity, why don't you want to learn PHP?
Re:Ask YC: Learning Web Development, were should I start? by german on Tuesday February 26, 2008 @03:18PM (#124095)
Because I've seen PHP code and it looks too messy for me. Just my opinion.
Re:Ask YC: Learning Web Development, were should I start? by kajecounterhack on Tuesday February 26, 2008 @09:41PM (#124450)
Learn it with a framework, like CakePHP. Turns it into MVC programming like Rails or anything else.
Re:Ask YC: Learning Web Development, were should I start? by jamesbritt on Wednesday February 27, 2008 @12:25AM (#124543)
> Turns it into MVC programming like Rails or anything else.

Why not then just use Django or Turbo Gears or Ramaze or Nitro then?

In the end, you have to live with the underlying language.