You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+82-54Lines changed: 82 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,110 +7,138 @@ Limodou <limodou@gmail.com>
7
7
8
8
## About Uliweb
9
9
10
-
Uliweb is a Python based web framework.
10
+
Uliweb is a full-stacked Python based web framework. It has three main design
11
+
goals, they are: reusability, configurability, and replaceability. All the
12
+
functionalities revolve around these goals.
13
+
14
+
This project was created and lead by Limodou <mailto:limodou@gmail.com>.
11
15
12
-
This project was created and lead by Limodou <limodou@gmail.com>.
13
16
14
17
## License
15
18
16
19
Uliweb is released under BSD license.
17
20
18
21
## Infrastructure
19
22
20
-
Uliweb was not created totally from scratch. It uses some modules created by other developers, for example:
23
+
Uliweb was not created totally from scratch. It uses some modules created by
24
+
other developers, for example:
25
+
21
26
22
-
* Werkzeug Used to handle core processes in the framework. For example: command line tools , URL Mapping, Debug, etc.
23
-
* SqlAlchemy The ORM based on it. Developers can access databases, or use the module separately.
27
+
*[Werkzeug](http://werkzeug.pocoo.org/) Used to handle core processes in the framework.
28
+
For example: URL Mapping, Debug, Request, Response, etc.
29
+
*[SqlAlchemy](http://www.sqlalchemy.org) The ORM based on it. Developers can access
30
+
databases, or use the module separately.
24
31
25
32
I also referenced some code from other web frameworks, for example:
26
33
27
-
* The Templating system is styled after the one used in web2py several improvements were made.
34
+
35
+
* The Templating system is styled after the one used in [web2py](http://mdp.cti.depaul.edu/) several
36
+
improvements were made.
37
+
* Some code inspired from Django.
28
38
29
39
I also constructed a few new "wheels" myself. For example:
30
40
31
-
* Form processing module. Developers can use it to create HTML code, validate submitted data and convert submitted data to Python data types.
41
+
* Form processing module. Developers can use it to create HTML code, validate submitted data and
42
+
convert submitted data to Python data types.
32
43
* I18n processing including template support, language lazy process.
33
-
* Uliorm, which is an ORM module, was built on top of SqlAlchemy.
44
+
* Cache & Session modules.
45
+
* Uliorm, which is an ORM module, was built on top of SqlAlchemy. I also referenced from
46
+
GAE datastore module.
34
47
* Framework runtime process.
35
-
* Plugin mechanism, styled after the one used in the UliPad project.
48
+
* Plugin mechanism, styled after the one used in the [UliPad](http://code.google.com/p/ulipad) project.
36
49
37
50
## Features
38
51
39
-
* Organization
52
+
*Project Organization
40
53
41
54
* MVT(Model View Template) development model.
42
-
* App-based project structure.
43
-
44
-
Uliweb organizes a project with small apps. Each app can have its own configuration file(settings.ini), template directory, and static directory. Existing apps can be easily reused, but are treated as a compound. web application project if configured as such.
45
-
46
-
Developers can also reference static files and templates between apps, thus easing inter-application data exchange. All apps in a project are loaded by default if INSTALLED_APPS is not configured in the configuration file. All separate app configuration files are automatically processed at project startup.
55
+
* Distributed development but unified management. Uliweb organizes a project with
56
+
small apps. Each app can have its own configuration file(settings.ini), template
57
+
directory, and static directory. Existing apps can be easily reused, but are treated as a compound.
58
+
web application project if configured as such. Developers can also
59
+
reference static files and templates between apps, thus easing inter-application data exchange.
60
+
All apps in a project are loaded by default if INSTALLED_APPS is not configured in
61
+
the configuration file. All separate app configuration files are automatically processed at
62
+
project startup.
47
63
48
64
* URL Mapping
49
65
50
-
Flexible and powerful URL mapping. Uliweb uses werkzeug's routing module. User can easily define a URL, which in turn can be easily bound with a view function. URLs can also be created reversely according to the view function name. It supports argument definitions in URLs and default URL mapping to a view function.
51
-
52
-
* View and Template
53
-
54
-
View templates can be automatically applied. If you return a dict variable from view function, Uliweb will automatically try to match and apply a template according to the view function name. And now, Uliweb also support Class View style. I hope you can enjoy it.
User can easily define a URL, which in turn can be easily bound with a view function.
68
+
URLs can also be created reversely according to the view function name. It supports
69
+
argument definitions in URLs and default URL mapping to a
70
+
view function.
57
71
58
-
Each view function will be run in an environment, which eliminates the need to write many import statements. Plus there are already many objects that can be used directly, for example: request, response, etc. This is DRY and saves a lot of coding
72
+
* View and Template
59
73
60
-
Developers can directly use Python code in a template, the Python code does not neede to be indented as long as a pass statement is added at the end of each code block. Uliweb also supports child template inclusion and inheritance.
74
+
* View templates can be automatically applied. If you return a dict variable from
75
+
view function, Uliweb will automatically try to match and apply a template according
76
+
to the view function name.
77
+
* Environment execution mode. Each view function will be run in an environment,
78
+
which eliminates the need to write many import statements. Plus there are already many
79
+
objects that can be used directly, for example: request, response, etc. This is DRY and saves a lot of coding
80
+
* Developers can directly use Python code in a template, the Python code does not neede to be indented
81
+
as long as a pass statement is added at the end of each code block.
82
+
Uliweb also supports child template inclusion and inheritance.
61
83
62
84
* ORM
63
85
64
-
Uliorm is the default ORM module but not configured by default. Developers are free to use any ORM module as preferred. Uliorm supports basicly orm functionalities, and also support multiple databases. The important thing is Uliorm has designned a configurable settings so that user can easy config models even replace old model with new one.
86
+
* Uliorm is based on SQLAlchemy package, so you can use Model layer and SQL
87
+
expression layer both.
88
+
* Uliorm integrates with alembic package, you can use it to migirate database
89
+
automatically.
65
90
66
91
* I18n
67
92
68
-
Can be used in python and template files. Browser language and cookie settings are supported including automatic language switching. Provides a command line tool that developers can use to extract .po files. This can happen either at the app level or project level process. It can automatically merge .pot files to existing .po files.
69
-
93
+
* Can be used in python and template files.
94
+
* Browser language and cookie settings are supported including automatic language switching.
95
+
* Provides a command line tool that developers can use to extract .po files.
96
+
This can happen either at the app level or project level process. It can automatically merge .pot files to existing
97
+
.po files.
98
+
70
99
* Extension
71
100
72
-
Dispatch extension. This is a dispatch processing mechanism that utilizes different types of dispatch points. So you can write procedures to carry out special processes and bind them to these dispatch points. For example, database initicalization, I18n process initialization, etc.
73
-
74
-
* Middleware extension
101
+
* Dispatch extension. This is a dispatch processing mechanism that utilizes different
102
+
types of dispatch points. So you can write procedures to carry out
103
+
special processes and bind them to these dispatch points. For example, database
104
+
initicalization, I18n process initialization, etc.
105
+
* middleware extension. It's similar to Djangos. You can configure it in configuration
106
+
files. Each middleware can process the request and response objets.
107
+
* Special function calls in the views module initial process. If you write a special
108
+
function named __begin__, it'll be processed before any view function can be processed,
109
+
this allows developers to do some module level processing at that point, for example:
110
+
check the user authentication, etc.
75
111
76
-
It's similar to Djangos. You can configure it in configuration files. Each middleware can process the request and response objets.
77
-
78
-
Special function calls in the views module initial process. If you write a special function named begin, it'll be processed before any view function can be processed, this allows developers to do some module level processing at that point, for example: check the user authentication, etc.
79
-
80
112
* Command Line Tools
81
113
82
-
* Create app, and include the basic essential directory structure, files and code.
83
-
* Export static files, you can export all available apps' static files to a special directory.
114
+
* Creates project, creates apps, and include the basic essential directory
115
+
structure, files and code.
116
+
* Export static files, you can export all available apps' static files to a
117
+
special directory. Also supports css and js combinition and compress process.
84
118
* Startup a development web server thats supports debugging and autoreload.
119
+
* Apps can also have its own command line tools. For example: orm, auth, etc.
85
120
86
121
* Deployment
87
122
88
-
* Supports easy deployment on the GAE platform(but uliorm doesn't support datastore).
89
-
* Also support dotCloud, heroku, .etc.
90
-
* Supports mod_wsgi, cgi, fast_cgi, scgi, uwsgi.
123
+
* Supports mod_wsgi in Apache.
124
+
* Supports uwsgi.
91
125
92
126
* Development
93
127
94
-
Provide a development server, and can be automatically reload when some module files are modified.
95
-
96
-
* static file serving support.
97
-
98
-
Uliweb supports static file access directly, and it can also process HTTP_IF_MODIFIED_SINCE and return static file content in trunk.
99
-
100
-
## Principle
128
+
* Provide a development server, and can be automatically reload when some
129
+
module files are modified.
130
+
* Enhanced debugging, you can check the error traceback, template debugging is also supported.
101
131
102
-
* Simple and easy to use web framework.
103
-
* Reusability and configurable are the main ideas about Uliweb.
104
-
* The web framework should be flexible and easy to extend.
105
132
106
-
## Documentation
133
+
## Commuity
107
134
108
-
You can see the DOC at https://github.com/limodou/uliweb-doc
0 commit comments