Forum .LRN Q&A: Creating new ETP application

Collapse
Posted by Sandhya Subash on
Hi All, I am doing my first project with OpenACS and creating a ETP application that follows Docbook Schema DTD. I found while reading the code that news,faq,default are examples of ETP applications and news, faq are packages as well. Also there is a procedure that etp::define_application which lets you to create ETP applications. But I want to find out which file is this procedure called from.... Is it /sql or /tcl directory.

My understanding is that I need to create a new package called Book and I decided to have the following Content Items

Create a bookinfo has attributes
title
author
copyright
edition
pubdate

Create a chapter has attr
title
para

create a section has attr
title
para

create a subsection has attr
title
para

I think I have to create tables to store bookinfo, chapter, section, subsection
create table bookinfo( book_info_id integer,
owner_id integer
creation_user
creation_date
last_modified
title varchar(255)
author varchar
copyright varchar
edition varchar
pubdate date

similar tables for chapter, section, subsection with their respective attributes.
Please give me feedback on the above data model. This is my understanding so far.
Thanks Sandhya
Collapse
Posted by Jun Yamog on
Sandhya,

If you think you can understand CR I would suggest you create a custom CR app.  Anyway from what I can see the table is not properly extending the CR data model.

owner_id, creation_user, creation_date, last_modified are already covered by acs_objects. While title and pubdate are covered by cr_revisions.  If you use CR you can create a content type by content_type__new then add the custom attributes author, copyright and edition.

You can read more about the CR here http://your host/doc/acs-content-repository/

In particular understand this diagram well.

http://yourhost/doc/acs-content-repository/object-model.html

If you still decide to use ETP the above is still applicable.  I believe the define app is called at etp-init.tcl ... not sure though its been a while since I handled ETP.  This makes use of acs_attributes table I believe.  Good luck.