Forum OpenACS Q&A: ACS data model --> from J2EE application?

Is it possible to just use the ACS data model?  I am a Java
programmer that is developing application with Struts.  I have played
around with ACS/OpenACS in the past but had to move my development
efforts in the Java area and cannot go the TCL route.

What would be involved in using the data model from a Java/Servlet
environment?  Is the documentation avaiable on just on just the data
model?

We have project on SourceForge.  basicportal.sourceforge.net anything
we develop with the ACS data model would remain open source and be
contributed back into the community.

Any ideas on where to start and the complexity/feasability of doing
this?

Thank you,

john

Collapse
Posted by Jonathan Ellis on
red hat bought acs java and renamed it the content & collaboration management software. You may want to give that a look.
Collapse
Posted by john menke on
I have been looking at the OpenCMS project.  It is based on Java but is not exactly what I am looking for.

All I really want to do is use the data model in an MVC application where I already have existing solutions for the View and Controller - (Struts and JSTL)  We have developed a DAO layer to access database that works nicely with our View and Controller segments.

Going to back to what I remember from Arsigita - it was the data model that was supposed to be core of the ACS..

Maybe this doesn't make sense... but I'm hoping that using the Data Model alone will help me...  does this make sense to anyone else or do you think I would be better off designing my own data model.

-john

Collapse
Posted by Jun Yamog on
Hi John,

As suggested by Jonathan you can look at CCM. CCM does not require you to use all of the under pinings. I think you can still use Struts for it. You can just use CCM's PDL and data model.

For you to use OpenACS data model is not an easy tasks. OpenACS has aolserver as its app server that handles the db connections. Straight JDBC may not be something beneficial. If you are in Java, you can go like in CCM:

User foo = new User();
foo.setName("bar");
foo.save();
This will insert a new row. Although in Tcl you can go
db_dml insertuser "insert into users (name) values ('bar')"
Of course once you use the object relational things are more complex. OpenACS 4 gives you the ability to manipulate the data model directly, with great api like db_string, db_1row, db_multirow, etc. And has lots of plsql db api to make things more simpler. CCM gives you that ability to manipulate the data model as if its an Object. It highly abstracts the db. Both platforms has their uses and are equally powerful. The schema of both platforms are very similar. I hope this helps.
Collapse
Posted by defunct defunct on
It is possible to use the data model separately,however by doing so you'd lose all of the benefits of using the db API....

However, selecting out chunks you need should be quite practical... its all the supporting TCL code you'd lose.

If you're using a J2EE style environment you may want to consider running AOLServer alongside whatever serlvet engine you use (we've done this before with Tomcat)...

You could even represent AOLServer/DBN as an Enterprise Bean serving responses to your servlet engine....

After all, isn't that point of all that Enterprise Bean nonsense ;)

Collapse
Posted by Ben Adida on
John: what you're talking about is feasible but highly complex. After all, a
number of talented ArsDigita engineers spent many months doing what you're
describing.

Note that since we built query files in XML, it's also feasible to rewrite the
query dispatcher in another language - in fact that was the whole point of
using XML instead of Tcl formatting!

Finally, since I am the picky license person around here, I want to remind you
that all of this stuff is covered under the GPL: if you redistribute work based in
a significant way on OpenACS (data model, logic, and templates), you need
to do so under the terms of the GPL. If you do not redistribute (if you're doing
this for just one client or for yourself), then you're free to do what you'd like.