Differences between revisions 1 and 2
Revision 1 as of 2014-04-21 08:25:29
Size: 974
Editor: techtonik
Comment: explain the idea behind routing
Revision 2 as of 2014-04-21 08:34:21
Size: 1339
Editor: techtonik
Comment: add info bout python web frameworks
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:


=== Routing in Python Web Frameworks ===

Usability of routing component can be estimated with the help of the following questions:

1. How easy is to get overview of all URLs that web application processes?
2. How easy is to make reverse mapping (code to URL)?

3. How easy is to serve static content URLs (css, js, images) by external server (cache)?

Routing is mapping URLs to code that handles them.

Why routing is important? By directly connecting the content that you see on a web page (especially if it is an error), good routing drastically reduces time (and money) that required to improve this content (or fix the error). That's why Django has this link on its front page.

Ever heard of spaghetti code? Web applications is a good example of that. When we start reading a book - we have only single entrypoint - start of the book. If you read source code of web applications - there are usually no defined entrypoints, so the first thing you do is find some webpage and the run search to find out where is the code for it. Clearly defined routing not only saves you time on searching, but URLs gathered in one place give a good overview of application capabilities.

Good routing map is a like a map of the city you're going to explore.

Routing in Python Web Frameworks

Usability of routing component can be estimated with the help of the following questions:

1. How easy is to get overview of all URLs that web application processes? 2. How easy is to make reverse mapping (code to URL)?

3. How easy is to serve static content URLs (css, js, images) by external server (cache)?

Routing (last edited 2014-09-17 17:10:46 by techtonik)

Unable to edit the page? See the FrontPage for instructions.