4 ms·
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
by iamelgringo 19y ago
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.
- german 19y agoThanks 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.
- mrevelle 19y agoIf you do decide to go with Python, web.py (http://webpy.org/ 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.
- ardit33 19y agoUnfortunately 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.
- food79 19y agoI 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/ 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.
- iamelgringo 19y agoHonestly, 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.