TWiki
>
CF Web
>
Software
>
WebCapabilities
>
OdysseyApplications
>
OdysseyApplications3
>
OdysseyApplications3Structure
(2008-11-25,
IsaacMorland
)
(raw view)
E
dit
A
ttach
---+ Odyssey 3 Application Structure This page explains all the pieces required in order to implement an application that uses the Odyssey framework. ---++ Project Directory Each application has a project directory rooted at =svn+ssh://odyssey@core.cs/u/odyssey/svn/odyssey/trunk/project/[application]=. This directory is for any miscellaneous files related to development such a shell script for invoking the application and test scripts. Additionally, there is a relative symlink to the Python code and one to the SQL schema for the application. ---++ Python Code The Python code for each application follows typical Python packaging conventions. Typical subdirectories may include: * db — files containing database interface procedures * core — files containing “business rules” or other non-UI-specific implementation * webui — files containing web user interface implementation The whole directory is maintained in Subversion at =svn+ssh://odyssey@core.cs/u/odyssey/svn/odyssey/trunk/python/uw/local/[application]=. This means that applications can access each others’ code by importing the appropriate Python module named =uw.local.[application].…=. ---++ SQL Schema Definitions The SQL schema definition for an application is broken up into a number of files. There is always an =init.sql= file; executing this file as the appropriate Postgres user will create the schema corresponding to the application and assign appropriate role permissions, all within a transaction. Normally, there will be a one-to-one correspondence between applications and Postgres schemas. Regardless, the schema definitions are organized by Postgres schema. The =init.sql= file in turn includes =init_data.sql=, =init_view.sql=, and =init_perm.sql=. These are responsible for creating all objects in the schema: * =init_data.sql= — Creates all tables (and sequences). In particular, the objects created here are the ones which, if dropped and re-created, will have lost something (in particular, the data stored in the tables; current value of sequences). Typically this simply includes a number of files of the form =[section]_data.sql=. * =init_view.sql= — Creates all non-data-holding schema objects, including views and functions. The important distinction here is that these objects can be dropped and re-created in a working database without losing anything. Typically this simply includes a number of files of the form =[section]_view.sql=. * =init_perm.sql= — Assigns all role permissions. Does not create the roles themselves; that is done manually. The SQL schema is maintained in Subversion at =svn+ssh://odyssey@core.cs/u/odyssey/svn/odyssey/trunk/sql/[schema]=, where =[schema]= is the Postgres schema name. -- Main.IsaacMorland - 05 Nov 2008
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r4 - 2008-11-25
-
IsaacMorland
CF
Information in this area is meant for use by CSCF staff and is not official documentation, but anybody who is interested is welcome to use it if they find it useful.
CF Web
CF Web Home
Changes
Index
Search
Administration
Communication
Email
Hardware
HelpDeskGuide
Infrastructure
InternalProjects
Linux
MachineNotes
Macintosh
Management
Networking
Printing
Research
Security
Software
Solaris
StaffStuff
TaskGroups
TermGoals
Teaching
UserSupport
Vendors
Windows
XHier
Other Webs
CSEveryBody
Main
Sandbox
TWiki
UW
My links
People
CERAS
WatForm
Tetherless lab
Ubuntu Main.HowTo
eDocs
RGG NE notes
RGG
CS infrastructure
Grad images
Edit
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback