top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Begin Web Development with Python ?

+1 vote
509 views

I have learnt python and used it for various purposes for scietific computing using sage and GUI development using Tkinter and lots more. I want to start web development using python My goal is to learn the web development in python from the basic level and understand the big web development projects like Django , MoinMoin Wiki , Plone and network programming further with twisted.
I have found Web2Py to be an easy library to quickly use and develop the web application. Is there any other library to start my development with. anddoes my plan of learning Web2Py is good for Web development and getting involved in the big projects like Django , MoinMoin Wiki , Plone.

posted May 31, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Each web framework is kind of its own niche. I wouldnt learn one for thepurpose of learning another. For example to use Django effectively requires knowledge specific to Django. Aside from some casual similarities betweenvarious web frameworks theyre all pretty different. If you feel comfortable with web2Py and it does what you need - use the heck out of it!
Ive heard good things about Web2Py but not used it myself.
I used Django for a while but found it to usually be over complicated for mostof my needs. In other areas it wasnt advanced enough. (For instance I had an unusual requirement once for composite foreign key support, something DjangosORM couldnt handle at the time. I also disliked the template language. By the time I replaced the ORM and the template language the only thing I was reallyusing was the URL routing so I jumped ship. (Dont get me wrong, I know people who love Django - just not me.)
Cherrypy is neat but I found it to be more spartan than I prefer. Ive sincesettled on Flask with SQLAlchemy and am liking it very much. Its a nice middle ground. It also has extensive documentation and example files too. Of course itreally helped that I already knew SQLAlchemy, thus pairing it with Flask was cake.
While not a web framework, learning SQLAlchemy is useful in its own rightbecause it can be used in a wide variety of projects and is used by some web frameworks. Its also an excellent package that lets you use most of thefeatures of your specific database backend. For web apps staying abstract is usually a good idea, but honestly how often do you change SQL backends? I thinkIve done it once in my career. Ive found the advantage of using database specific features generally outweighs the drawbacks. This is especially true ifyou have more than one client/website accessing the same database. SQLAlchemygets me the best of both worlds. I can define check constraints and enumerations and all the other goodies and have them match between database clients.
If you dont already know this from scientific computing, learning some raw SQL is quite useful too! Sometimes you need a non-trivial query.

answer May 31, 2013 by anonymous
0 votes

I am largely in the same situation as you, i.e. I used Python mostly for scientific applications, using scipy. I wanted to create a website to publish my research (see my signature for the result, but keep in
mind it's still work in progress!).

I chose CherryPy as my web framework, largely because it's simple and gets out of the way. I have found that the documentation can be somewhat lacking in certain respects but overall it's very easy to do what you want.

CherryPy does not specify a template library so I chose mako which is fast and very simple to use. The only problem I had with it was getting meaningful tracebacks when an exception was raised by the in-template code, but I was able to rectify it once I read the relevant documentation section carefully.

Modulok suggested using ORM software. ORM should not really be needed if you are aiming at scientific content for your application, you should be fine with straight SQL (many consider ORM a hindrance rather than help for any project [1], [2]). But if you do find the need for ORM then SQLAlchemy is very good and is considered pretty much a de facto standard in the Python world.
[1] https://en.wikipedia.org/wiki/Object-relational_mapping#Controversy
[2] http://goo.gl/ECNSp

answer Jun 1, 2013 by anonymous
Similar Questions
0 votes

I want to use python for creating dynamic database driven websites. and I don't want to use existing web frameworks for my work. I am learning things so I wont feel lazy to write all the code myself because I want to learn.

could anyone suggest me any books/site from where I can start. I want to follow MVC architecture. so please suggest me some links/book or anything

...