Pros and Cons of different approaches to web programming in Python

前端 未结 9 1039
孤城傲影
孤城傲影 2021-02-01 17:40

I\'d like to do some server-side scripting using Python. But I\'m kind of lost with the number of ways to do that.

It starts with the do-it-yourself CGI approach and it

9条回答
  •  生来不讨喜
    2021-02-01 18:18

    If you've never done any CGI programming before I think it would be worth doing one project - perhaps just a sample play site just for yourself - using the DIY approach. You'll learn a lot more about how all the various parts work than you would by using a framework. This will help in you design and debug and so on all your future web applications however you write them.

    Personally I now use Django. The real benefit is very fast application deployment. The object relational mapping gets things moving fast and the template library is a joy to use. Also the admin interface gives you basic CRUD screens for all your objects so you don't need to write any of the "boring" stuff.

    The downside of using an ORM based solution is that if you do want to handcraft some SQL, say for performance reasons, it much harder than it would have been otherwise, although still very possible.

提交回复
热议问题