Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The mixing of logic, content, and presentation as naïvely encouraged by PHP is an abomination. It is the polar opposite of good design practice, and should not be imported to other languages (it shouldn't even be used in PHP, and thankfully the PHP world in general is ever so slowly moving away from it).</p> <p>You should learn about <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" rel="nofollow noreferrer">Model-View-Controller (MVC)</a> which, while not the final word on good real-world design, forms an important basis for modern web development practices, and serves as common ground, or a sort of <em>lingua franca</em>, in discussions about application layout.</p> <p>Most of the time, you should be using some form of web framework, particularly one that provides templating. web2py is not a bad choice. Other popular frameworks include <a href="http://pylonshq.com/" rel="nofollow noreferrer">Pylons</a> and <a href="http://www.djangoproject.com/" rel="nofollow noreferrer">Django</a>.</p> <p>Most Python web frameworks are very modular. You can use them in their entirety for everything in your app, or just bits and pieces. You might, for example, use Django's URL dispatcher, but not its models/ORM, or maybe you use everything in it except its templating engine, pulling in, say, <a href="http://jinja.pocoo.org/" rel="nofollow noreferrer">Jinja</a>. It's up to you.</p> <p>You can even write traditional CGI scripts (take a look at the <a href="http://docs.python.org/library/cgi.html" rel="nofollow noreferrer">CGI module</a>), while still using a templating engine of your choice.</p> <p>You should start learning about all of these things and finding what works best for you. But the one thing you should <em>not</em> do is try to treat Python web development like PHP.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload