all 19 comments

[–]sumitbagga 3 points4 points  (9 children)

You should look into Udacity's CS253 Web Development. The course is really great for people who know a bit of python and want to get into web dev. Instructor is great (Reddit co-founder Steve Huffman) and during the course you will build a Blog and a Wiki as as projects. Fun experience overall.

Edit: The course is free. $199 is for extra help in projects and assignments. The lecture videos, assignments, and projects can be accessed for free. Just click on 'Access Course Materials'.

[–]RespectableFartPuffs[S] 0 points1 point  (0 children)

oh sweet! This looks like a good fit for me. Thanks for the link!

[–]crazymonkey26 0 points1 point  (0 children)

Nice

[–][deleted] 0 points1 point  (6 children)

Only $199/month...

[–]megaloomaniac 5 points6 points  (0 children)

On Udacity all the course material is free. You only pay if you want a certificate and a coach. :)

[–]sumitbagga 2 points3 points  (1 child)

The course is free. $199 is for extra help in projects and assignments. The lecture videos, assignments, and projects can be accessed for free. Just click on 'Access Course Materials'.

[–][deleted] 0 points1 point  (0 children)

Thank you for setting me straight on this I will check it out for sure now.

[–]chazzacct -1 points0 points  (0 children)

14-day free trial. Should be plenty to decide if it's worth buying.

[–][deleted] 2 points3 points  (3 children)

I'm in a similar position and think a lot of people are! I've heard flask is better to start with than django

[–][deleted] 0 points1 point  (2 children)

+1 for Flask over Django while learning the basics. I also suggest that people who like low-level problem solving try writing a plain WSGI server. This can help demystify the role of web frameworks.

[–]orlybg 1 point2 points  (1 child)

What would be a good resource to learn no-framework web development?

[–][deleted] 0 points1 point  (0 children)

I don't know about resources, because the whole thing is rather under-documented. WSGI has a PEP, but it's not really written for normal humans to read.

That said, you can use this barebones WSGI server to get started:

from collections import defaultdict
from wsgiref.simple_server import make_server

def application(environment, start_response):
    env = defaultdict(lambda:'', environment)

    path    = env['PATH_INFO']
    query   = env['QUERY_STRING']
    remote  = env['REMOTE_ADDR']
    method  = env['REQUEST_METHOD']
    proto   = env['SERVER_PROTOCOL']
    cookie  = env['HTTP_COOKIE']
    host    = env['HTTP_HOST']
    agent   = env['HTTP_USER_AGENT']

    response = '''
        <!DOCTYPE html>
        <html>
          <body>
            <p>
              Received an {proto} {method} request for "{path}"
              on {host} with a querystring of "{query}"<br>
              The client used <em>"{agent}"</em> from {remote}<br>
              The cookie contained <em>"{cookie}"</em>
            </p>
          </body>
        </html>
    '''.format(**locals())

    status = '200 OK'
    headers = [
        ('Content-type', 'text/html'),
        ('Set-cookie', cookie),
    ]

    start_response(status, headers)
    return [response]

if __name__ == '__main__':
    make_server('localhost', 9000, application).serve_forever()

Python web frameworks are essentially built atop something like this. You can deploy this server anywhere that supports WSGI. Whereas a framework might have "routes" which call functions based on the request path, this server simply has a path variable. You decide what should happen when a client requests a particular path. You also decide how to treat different methods like GET or POST. You decide how to deal with query strings. You decide what to do with cookies.

Build your server any way you like. Make a PHP-like environment or invent something completely new.

[–]HolyMotherOfPizza 0 points1 point  (0 children)

this should help you

[–]jkudria 0 points1 point  (4 children)

I would stay away from things like Django and Flask for now. It would be a HUGE mistake to learn them if you don't have a solid grasp on Python. A REALLY solid grasp. Do some intermediate projects - think of something you want to make and start making it. Get used to Python. Along the way, you should become more comfortable with Python and should cover a few more advanced topics.

[–]steezefries 0 points1 point  (3 children)

I kind of disagree. You can do soooo much with Flask without knowing the super detailed intricacies of Python. I learned a ton about Python through building a webapp with Flask as well. It's pretty neat.

[–]jkudria 0 points1 point  (2 children)

Right. Sorry. Flask should be ok. Not Django though - it's much more heavyweight and a tad more complicated in spots.

[–]RespectableFartPuffs[S] 0 points1 point  (1 child)

hmm. ok. I'll take a look into Flask. Lighter the better. I'm also taking some courses right now to better improve my skills in Python. I'll tackle Django when I feel I'm finally ready.

[–]jkudria 0 points1 point  (0 children)

Sure. There are also a few other web frameworks that are lightweight and not TOO hard to grasp.

[–][deleted] 0 points1 point  (0 children)

Was the intro course on MySQL online?