Hornet Quickstart
1. Install Product
# cd /path/to/zope/Products
# tar zxvf Hornet-version.tar.gz
Requirements
- A Zope Database Adapter. We have currently only tested with ZMySQLdb (We internally use a custom ZMySQLdb adapter modified for speed, however the standard one will work)
- If using MySQL, you need to use mysql-python > 2.0.
0.9 is distributed with many linux distributions and will *NOT* work. You can download both mysql-python and the Zope MySQL adapter from http://sourceforge.net/projects/mysql-python/
2. Configure Plone (Optional)
We intend Hornet to be able to function completely independant of CMF/Plone,
However the current pre-alpha builds work best in plone.
An install script will soon be
written to automate the following steps
2.1. Setup Types
- Go To portal_types
- Select 'Factory-based Type Information' from the drop-down list (top right), and click `Add`
- Choose 'Hornet Mount Point' from the `Use default type information` list and click `Add` (Leave ID Blank)
- Repeat for
'Hornet Folder'and'Hornet Record'
2.2. Setup Skins
- Go to portal_skins
- Select 'Filesystem Directory View' for the drop down list (top right) and click `Add`
- Choose 'Hornet/skins/Hornet' and click Add (leave Id blank)
- Repeat for 'Hornet/skins/Hornet_widgets'
3. Setup Hornet
- Create a `Hornet Mount Point` at the root of your portal;
id can be anything but we recommend using db_dbname (where dbname is your database name)
- Inside the Hornet Mount Point, choose the tab 'Setup'
- Choose DB Connection to use
If none are defined, you can create a MySQL connection using the `Add New` button,
or any standard Zope Database Adapter using the Zope Management Interface
After you create your connection, return to the Hornet Mount Point 'Setup' Tab.
- A list of available tables should be displayed. Select all that you wish to mount
and click 'Create Hornet Folders'
- Hornet will attempt to guess a Folder name and primary key, however you can override if required.
Once you are happy click 'Mount'
- A Hornet Folder should now exist in your Mount Point for each table you mounted. You can now browse
the database using the `Contents` Tab, and access each object programatically as if it were
a zope object*
* (Currently you must treat a Hornet Folder as a dictionary (i.e. folder[record]) rather than
folder.record; this is due to problems with Aqcuisition which we are attempting to overcome).
As a test, try creating a page template to view/edit your records and call it in context
(i.e. /mountpoint/table/id/template_name).
You can edit any record by posting form data to manage_main in the context of a record
You can create new records by posting to folder/create/manage_edit
(i.e. hornet_articles/articles/create/manage_edit)
You can delete records by deleting the corrosponding record object from the Hornet Folder
(You can safely delete the Hornet Folder or Mount Point without deleting your entire table)
The standard Zope objectValues/objectIds etc methods will work, and any standard folder view
(i.e. folder_contents) will work.
Hornet support subclassing the standard types to create archetypes style objects. API Documentation
for this is still pending
id can be anything but we recommend using db_dbname (where dbname is your database name)
If none are defined, you can create a MySQL connection using the `Add New` button,
or any standard Zope Database Adapter using the Zope Management Interface
After you create your connection, return to the Hornet Mount Point 'Setup' Tab.
* (Currently you must treat a Hornet Folder as a dictionary (i.e. folder[record]) rather than folder.record; this is due to problems with Aqcuisition which we are attempting to overcome).
As a test, try creating a page template to view/edit your records and call it in context (i.e. /mountpoint/table/id/template_name).
You can edit any record by posting form data to manage_main in the context of a record
You can create new records by posting to folder/create/manage_edit
(i.e. hornet_articles/articles/create/manage_edit)
You can delete records by deleting the corrosponding record object from the Hornet Folder (You can safely delete the Hornet Folder or Mount Point without deleting your entire table)
The standard Zope objectValues/objectIds etc methods will work, and any standard folder view (i.e. folder_contents) will work.
Hornet support subclassing the standard types to create archetypes style objects. API Documentation for this is still pending
Last modified 2005-05-17 11:41 PM


Hosting