suggestion for my position about choosing a language

Discussion in 'Programming' started by __Genius__, Aug 27, 2009.

  1. #1
    Hello there, If you read my first topic which was a brief introduction I told that I'm interested in the filed of web programmin now, Ok let me give some description for better choose .
    I'm a guy who is active in the security / Hacking Scene, the web programming is an essential field for me 'cuze of the web application security which I want to learn nice.
    but, now I'm in a shit doubt to which programming language I must choose for starting the web application development, in the exams of the shit university i've been passed HTML and some java script basics, now I want to learn a language for web programming and also web security materials.
    I'm now have a good knowledge in python field of area (but not web side !)
    please with all the thingz you see here please let me know what I must choose to learn.
    thanks mates.
     
    __Genius__, Aug 27, 2009 IP
  2. __Genius__

    __Genius__ Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    no one help ?
     
    __Genius__, Aug 27, 2009 IP
  3. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you're good with Python, look into using WSGI such as mod_wsgi for apache to develop web applications with python.

    For example this test/dummy app:

    
    import sys
    import os
    os.environ['PYTHON_EGG_CACHE'] = '/home/user/tmp/python'
    import MySQLdb
    from cgi import parse_qs, escape
    
    def newPage(environ, start_response):
        start_response("200 OK", [])
        return [sys.version] 
    
    def homePage(environ, start_response):
        start_response("200 OK", [])
        try: conn = MySQLdb.connect (host = "localhost", user = "blanked", passwd = "blanked", db = "blanked")
        except: return ["unable to connect to the database"]
    
        cursor = conn.cursor ()
        cursor.execute("""SELECT id, code, title, count FROM links;""")
        rows = cursor.fetchall()
        coder = "\nShow me the rows:\n"
        for row in rows:
            for field in row: code += "   " + str(field)
            code += "\n"
        cursor.close ()
        conn.close ()
        return [coder]
    
    def detailPage(environ, start_response):
        start_response("200 OK", [])
        parameters = parse_qs(environ.get('QUERY_STRING', ''))
        if 'name' in parameters: name = escape(parameters['name'][0])
        else: name = 'unknown'
        s = "Hello %s" % (name,)
        return [s]
    
    def showEnv(environ, start_response):
        start_response("200 OK", [])
        ret = ["%s: %s\n" % (key, value)
               for key, value in environ.iteritems()]
        return ret
    
    def error(environ, start_response):
        start_response("400 Not Found", [])
        ret = ["Not Found\n"]
        ret += ["%s: %s\n" % (key, value)
            for key, value in environ.iteritems()]
        return ret
    
    dispatch = {'/': homePage,
        '/details/': detailPage,
        '/new/': newPage,
        '/env/': showEnv,
        }
    
    def application(environ, start_response):
        path = environ.get('PATH_INFO', '')
        try: return dispatch[path](environ, start_response)
        except KeyError: return error(environ, start_response)
    
    Code (markup):
     
    kblessinggr, Aug 27, 2009 IP
  4. prasanthmj

    prasanthmj Member

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #4
    Start with PHP. So many sites with PHP and numerous security holes coming to light everyday, there is lots of scope! :)
     
    prasanthmj, Aug 27, 2009 IP