|
From: Chris W. <ch...@cw...> - 2002-02-13 12:57:18
|
On Tue, 2002-02-12 at 20:08, Thomas A. Lowery wrote:
> Chris,
> I'm looking at OpenInteract as an application framework to replace
> a currently running cold fusion server.
>
> I've the "basic" installed completed, however now I'm not sure
> where to go with the product. The documentation is very confusing
> on starting a new application.
>
> Is OpenInteract about to interface with a database without
> predefining all the tables and structures? Learn what the
> database contains upon connection?
>
>
> Where do I start defining a simple interface to a person table?
>
> person (
> person_pk number not null
> , first_name varchar(36)
> , last_name varchar(36)
> )
>
>
> Out of all the "frameworks" I've reviewed (Perl based, as I enjoy
> developing in Perl), yours works (the demo site), now I need to
> know how to start an application using it!
Hi Tom,
(cc'd to openinteract-help)
Clearly, this is an area where docs would help. So here's a quickstart
guide to developing an application. Note that a good example for the
handler and templates is the 'classified' package, which ships with OI.
1) cd to your dev directory
2) $ export OPENINTERACT=/path/to/base_install
$ oi_manage create_skeleton --package=myapp
3) edit conf/spops.perl:
- set 'base_table' to your table
- set 'id_field' to your PK field
- add 'field_discover => "yes"' so you don't have to
list the individual fields
- set your appropriate DB driver in the 'isa' (e.g., change
'SPOPS::DBI::MySQL' to 'SPOPS::DBI::Pg' for Postgres)
4) edit OpenInteract/Handler/Myapp.pm to include the sample code from
OpenInteract::CommonHandler. (I don't have a template for this yet,
sorry.) Decide if you want to have search/display/edit/remove
capabilities and modify the various items as necessary.
5) create templates in template/ for the search_form, search results and
record display. (Borrow from 'classified' package where appropriate)
6) edit conf/action.perl to associate your handler with a URL
7) edit doc/myapp.pod with information about your package
8) edit Changes with the changes you've made
9) edit package.conf with contact information and a package description
10) check the package:
$ oi_manage check_package
11) if not ok, fix; if ok:
$ oi_manage export_package
$ oi_manage install_package --package_file=myapp-0.01.tar.gz
$ export OIWEBSITE=/path/to/mysite
$ oi_manage apply_package --package=myapp
12) restart your web server
The next version of OI will do much of 3-5 automatically, creating a
handler based on CommonHandler; creating templates for searching,
displaying search results, and detail/editing screens, and modifying
your SPOPS object definition. But that's a few months off.
Thanks,
Chris
--
Chris Winters (ch...@cw...)
Building enterprise-capable snack solutions since 1988.
|