Web Programming with Python Overview
Web Programming with Python Overview
●
A little history
●
Current scenario
●
Component selection
●
Language:
– OpenSouce
– Performance([Link]
– Learning curve
– Popularity/trends ([Link]
– Project/Manufacturer Activity
Programming Language
What is Python?
Characteristics
●
Interactive, Interpreted, and Object-Oriented Language
●
Regardless of the paradigm
● A large number of standard libraries providing extensive support.
● It is portable to different Operating Systems.
●
Very easy to learn
●
Very mature language - (1991)
●
Programming Language Cont.
WhatisCheetah?
Characteristics:
Template Structure (Page
html)withasublanguageof
data access in python.
Itcanbeusedintegrated.
in webware and as a module
independent
Example
#import time
<html>
The current time is $[Link]()
</h1>
</html>
Controller Cover
WhatisaServlet?
- Objetos que se ejecutan dentro
of WebKit
They are loaded into memory in the
first request
They can maintain status in
the application server
-Inherit from [Link]
or of any of its
descendants:
[Link]
[Link]
Cover Controller cont.
HowisaServletexecuted?
Theusermakesarequestofthetype:
[Link]
●
When inheriting from [Link], when the user performs a
the method that follows the word_action_ is called action
Example:
HTML File
<form action="gestorControl">
.....
<input type="submit" name="_action_registerMember">
</form>
Servlet Python
from [Link] import Page
class gestorControl(Page):
def registerAffiliate(self):
.............
.............
Model Cover - SQLObject
●
What is SQLObject?
●
Characteristics
– SQLObject produces the code
to access the database
– The code is not SQL, this
allows the no-SQL database to be
used in the same way
– Supported databases:
MySQL, PostgreSQL, SQLite
Firebird, Sybase, MaxDB and
MSSQLServer.
Available IDEs
●
Used Python IDEs
– SPE (Stani's Python Editor)
– DrPython
– Gvim
– Eric 3
– Eclipse
●
Used HTML IDEs
– Bluefish
– Nvu
Example of use
Questions ???
desarrollo@[Link]
Additional material
Design with the MVC pattern
● What is the MVC Pattern?
●
Model Cover
●
Cover View
●
Controller Cover
●
Advantages
– Lower coupling
– Greater Cohesion
– Easier development for wealthy clients
on multiple devices and channels
– Facilitates maintenance
– Greater scalability