Forum OpenACS Q&A: Will OpenACS make my life easier?

Collapse
Posted by Michael Teter on
Hello.

I'm currently developing small business management web systems for
clients using Java Servlets/JSP and JavaBeans (with PostgreSQL)
(loosely following the model-view-controller paradigm.)

I feel like I'm doing tedious work most of the time, especially when the
subsystem I'm working on has a moderate amount of user interface
(fields, multiple event paths, etc.)

For example, one client manages sales reps and order tracking.  To
edit a rep's record goes something like this:
1. Enter search criteria to identify the rep (RepId and/or SSN and/or
Lastname and/or Firstname)
2. If that search criteria results in multiple matches, display the list of
matches and allow the user to select the appropriate entry
3. Display details about the rep, in editable fields
4. Update rep's records based on changes, or reject changes if there's a
problem, and return user to step 3 (noting what fields were in error.)

Doing this with the tools I'm currently using is mostly mindless work,
even though I've already abstracted out much of the field validation,
presentation, and error handling.

I know little about OpenACS, and unfortunately I have little time to
research (although I would make time if I believed OpenACS was well
suited to this task.)

***
Would OpenACS help me solve problems like I this more cleanly, and
perhaps with less drudgery?

Thanks much.
Michael Teter
mailto:michael_teter@hotmail.com

Collapse
Posted by Jun Yamog on

Hi Michael,

OpenACS will help if:

  • You are developing a community based site
  • You have a need that has already an OpenACS module. You need bboard functionality... OpenACS has it and a bunch more.
  • You need to snag data from sql. Using Aolserver + Tcl + sql drivers are a lot easier than JDBC. I still find aolserver to be easy and superior when interfacing with a SQL based server.

So I think your chances of OpenACS helping you with your current development lies in item #3. But then Java platform offers or pushes you to OO which may result into more time to design. This may make your web app better designed. OpenACS is based on Tcl which has lower learning curve and you get productive in a matter of hours. Java on the other hand is the reverse it has high learning curve and you can reap the rewards only after when you have made a lot of classes already.

I hope this is some good input so you can make your decision.

Collapse
Posted by Neophytos Demetriou on
As Jun said OpenACS is not designed around the model-view controler paradigm. For the past couple of weeks, I have been looking for ways to  improve OpenACS and I have some good ideas on how we can keep the simplicity of TCL and at the same time improve flexibility. There's nothing solid yet but I would hang around if I were you.
Collapse
Posted by Jun Yamog on
Maybe OpenACS is more MVC that most people think.

M - packages/modules, V - adp, C - RP

Hehehe.

Well the real idea with MVC or Model 2 if I am correct is to
seperate code from layout.  I think OpenACS can do this, granted
that I have a correct understanding of MVC and OpenACS.

You can actually look at tcl/*.tcl as business logic.  www/*.adp
and www/*.tcl as views.  I dont really know where the Controller is
on OpenACS.  But it can and does achieve the goal of separating
layout from code.  The only problem with OpenACS is that its so
flexible that you can use Model 1 and Model 2 interchangably or at
the same time.

On Model 1 terms Java has JSP... Aolserver has ADP.  Aolserver will
win hands down.  I think if we can find to use servlets + tcl that
should rock good.  Strong type OO lang (Java) + lose and easy lang
(Tcl).

Has anybody read about Daniel Rubio's experience of Servlets and ACS?

http://www.osmosislatina.com/java/javaaolserver.htm

This is I think also the guy that made an Aolserver jdbc driver.

I am thinking of going this road.  Tomcat + Aolserver that connects
to a common database.  Probably Apache or Squid proxy in front.
OpenACS for modules that it has, servlets for existing servlets.
Does this make sense?

Collapse
Posted by Henry Minsky on
To agree with a previous poster, there are a couple of things that
really excel in ACS over Java servlets,  and PHP for that matter:

1) The "new" database API is ACS is great. with db_foreach and
friends hide all the bookkeeping with database connections and
binding SQL vars to Tcl vars. That stuff works great, and is
very compact,due to the
magic Tcl "uplevel" ability to write things that look like macros.

2) String and regexp handling is very compact in Tcl, and I tend to
do a lot of it in generating HTML, as well as scraping external
data sources.

3) shared memory in AOLserver is almost as easy to use as global
shared objects in a Java servlet engine. I don't know how PHP handles
persistent shared in-core data, since if it runs under apache, each
handler will be running possibly in a different process. DO they have
some kind of inter-process shared memory, or do they have to hit
the disk somehow (like mod_aolserver used gdbm to simulate
shared memory).

Collapse
Posted by Neophytos Demetriou on
MVC considers three roles. The model is an object that represents some information about the domain. It is a non-visual object and contains all the data behavior other than that used for the UI. In its most pure OO notion the model is an object within a Domain Model. You might also think of a Transaction Script as the model providing the Transaction Script contained no UI machinery. Such a definition stretches the notion of model, but fits the role breakdown of MVC.

-- Martin Fowler, http://www.martinfowler.com/isa/mvc.html
I agree with Jun that OpenACS fits the MVC paradigm. I would say that OpenACS stretches the notion of model by using Transaction Script as the model as Martin Fowler describes. I'm just speculating here but what if we had a domain model using Tcl...
Collapse
Posted by Robert Ezman on
Michael

If you want a thorough exposition of the benefits of AOLServer + TCL + DB as well as how OpenACS can help you check out:

Philip and Alex's Guide to Web Publishing. (The link seems to still be there despite the Arsdigit situation)

If you're working on an application that involves getting info in and out of a database via a web interface this platform will allow you to do it easily.

The book goes into all the issues including: Scripting code (Tcl) vs. compiled code(Java), the database api and the database pooling aolserver does, the importance of page flow and data mode, etc. etc.

Open ACS gives you a wealth of useful functionality right out of the box. But say you weren't going to touch one bit of OpenACS functionality and do your own application from scratch (the application I am working on has very little to do with collaborative web publishing) the wealth or information that the OpenACS community has is huge. What I mean is if the answer to your developement question doesn't already exist in the message boards or in a help/documentation file chances are that someone in the community has already had the problem you have and will know the solution. There are alot of really smart people reading these message boards. This works to everyone's advantage as the one asking question will eventually be answering.

As an example of the wealth of knowledge to be found here's the link page I use to find answers to my questions: Rob's Web Publishing Links. (Some of the links may be old. Sorry. I don't have time to fix them right now.)

In any case the application I'm working on probably never whould have been accomplished using any other platform. In addition the thought of coding the thing in Java is painful.
Collapse
Posted by Dave Manginelli on
And now for a less enthusiastic response:

While I don't claim to be superior in any way to the many fine coders who populate this forum, I do have over twenty years of professional programming experience in everything from 8051 assembly language to extensive database/SQL coding.  I mention this only so that you may put the following comments in the proper context...

When I found ACS/OACS I was looking for a tool that would allow me to apply my database experience to the internet.  I was (and still am) impressed by the strength of the underlying data model.  OACS's "home-brew" object model allows for powerful data abstractions within packages (OACS functional modules) while permitting and even encouraging integration between packages.  And, as others have pointed out, there is a vast amount of functionality already present in an "out of the box" OACS 4 installation.

Unfortunately, for those like myself, who would like to create their own packages, the sophisticated data model is both a blessing and a curse.  As mentioned in numerous other threads, the documentation is less than adequate.  Additionally, the documentation presents just enough information to make developing with the OACS seem easier than it really is (for me, at least).

The feeling I've gotten on numerous occasions is like the feeling one gets when a friend gives you directions from point A to point B.  On first glance the directions appear clear and you may even recognize a landmark or two described along the way.  However, when you attempt to actually follow the directions you realize that there are many choices and intersections that are not adequately described and you wonder if you are still heading in the right direction.

Part of the difficulty comes from the fact that much of the documentation for OACS 4 is clearly targeted at users migrating from ACS 3.x and not those completely new to 4.  And, while there are many fine folks here willing to answer questions about OACS installation and track down specific bugs, questions regarding OACS internals are usually answered less "completely."  For example, my question entitled: "What is the purpose of the Application group type under OpenACS 4" received no responses at all.

I don't seem to be the only one who's had trouble comprehending the entire scheme.  For example, Tom Jackson, a frequent contributer/poster recently had to ask for assistance in accomplishing what would outwardly appear to be a very simple task in his thread "groups and group_types massively messed up."  If Tom can't figure the stuff out then it's hopeless for a mere mortal like me!

I would also suggest you that you refer to the numerous posts by Roger Williams which point out some of the difficulties inherent in understanding and using OACS--both the object model and the UI.

Don't get me wrong.  This is not a complaint against the fine VOLUNTEERS at OpenACS.org.  They were not put here to serve me or you and we shouldn't expect them to.  I'm simply trying to ensure that you get a realistic representation of what you can expect from OACS and the community around it.

My bottom line is that OACS is a terrific and powerful system that I would like to use and eventually contribute to.  It is growing and improving daily through the hard work of some very talented people and will likely become the best system of its kind.  However, unless you are willing to live with MUCH less documentation than you are probably used to having and you are willing to do A LOT of digging into the OACS internals, you should probably wait awhile until the docs improve.

Collapse
Posted by Ben Adida on
Dave, I want to take this opportunity to thank you for reminding us
that there is a lot that remains for us to make OpenACS
accessible to more people. I mean this: honest constructive
feedback like yours is what we need to make OpenACS more
widespread and successful. You're 100% right on concerning
documentation. We need an OpenACS 4.x developer's guide.
Work has been done in that area, but more work is necessary.

I am making a commitment right now (hold me to it!) to take what
we've learned at OpenForce in the past 8 months of developing
two large applications - one OpenACS 4/Oracle and one
OpenACS 4/PG - and produce a concise, clear, practical guide to
building OpenACS 4.x applications.

If there are specific issues that confuse you, please continue to
post your questions. Sometimes, honestly *we're* confused by
some concepts introduced by ACS Classic. We need to know
what's confusing everyone and make sure we address all
issues.

Again, thanks for your feedback. This is exactly what we need
from people in the community who want to help but find
themselves at a roadblock.

Collapse
Posted by Dave Manginelli on
Thanks Ben!

I hope I made it clear that despite the difficulties I have had, I can see enough of the system's beauty to recognize that it remains a worthwhile pursuit.

I'm also sincere when I say that I hope to someday be able to contribute back to the effort.

Collapse
Posted by Don Baccus on
As an addendum to Dave's comments, it's probably worth pointing out that the existing packages we've inherited demonstrate a wide range of styles in using the core functionality, some easily branded as being "wrong", others as "right".  This is frustrating because overall they don't provide a good model for producing a well-written package.

Partly this is a natural outcome of parallel development, i.e. people being asked to produce packages as core functionality was being written.  Partly this is due to the very lack of documentation Dave mentions, and partly due to uncertainty and experimentation.  The core designers/developers hadn't yet thought things all the way through and there wasn't sufficient direction available for package implementors.  These problems stemmed from (lack of decent engineering) management, more than anything.

None of this is meant as a knock on aD developers - extreme time pressure nearly always leads to a lack of documentation, in particular.  Of course it's just my opinion (based on some conversation with a couple of folks who were at aD at the time), not gospel.

Over time we need documentation of the type Ben's talking about.  We also need to look into simplification where simplification makes sense (we don't need two separate database APIs, for instance), more higher level tools (service contract editor, easier ways to integrate workflow in packages along with some good examples, better leverage of components like the content repository by providing a better Tcl API, etc).

Lots and lots of work to be done.

Oh joy!

Collapse
Posted by C. R. Oldham on
Ben,

Thanks for being willing to have your feet held to the fire.  We are ***desperate*** for that kind of documentation.

Collapse
Posted by Michael Teter on
Since I first posted this question, I have spent some time searching, mostly in vain, for information about AOLServer programming.

I am very interested in trying it, but there seems to be a "common" function that is missing, or is not clearly explained.

Virtually all of the web development I do follows a simple pattern:

o  authenticate user (login screen)

o  display (dynamic) menu, based on user permissions

o  allow user to view data from database (reports, etc.)

o  allow user to add data to database (via forms)

o  allow user to cause programs/scripts to be run to affect data in the database

One key element to that involves session management.  Once the user has logged in, I need to be able to store and retrieve data for that user in a private session (think JSP or ASP sessions.)

AOLServer has this nsv* stuff, but I can't find much documentation on it.  I've seen some reference to nssession, but that appears to be in early development.  More importantly, various forums and links I find referencing AOLServer programming tend to be months or years old.  That doesn't make me feel comfortable.

I really do like the premise that AOLServer+Tcl (or hopefully Python with that wxPy? module) offers, but if I can't find documentation to help me even get started, I'll never get to try it.

Perhaps OpenACS would help, but I keep reading the phrase "building online communities", which seems to have no relevance to what I'm after.

Can AOLServer do sessions like I'm asking?
Is the AOLServer community dwindling?
Do I need OpenACS?

Jakarta-Tomcat+JSP+JavaBeans works great, but it definitely is a pain to develop with... stopping tomcat, ant'ing project, starting tomcat eats at least 1/4 of my time.

I just bought a really great intro book to Tomcat too (Apache Jakarta-Tomcat, by James Goodwill.)  If I could find something of that level of documentation on AOLServer+tools I would be very pleased.

Much thanks,
Michael

Collapse
Posted by Jade Rubick on
Michael, I don't know if this helps you or not, but have you looked at the new OpenACS 4.5beta docs? There's pretty good..
Collapse
Posted by Roberto Mello on
Michael,

It so happens that everybody doing common 'web development' do the same activities as you describe. And yes, AOLserver+OpenACS _will_ make your life easier.

* To develop with OpenACS and AOLserver, you will need to learn Tcl.

* OpenACS builds on top of AOLserver, and adds many APIs to make your life easier.

OpenACS has APIs for the following (and much more):

* Authenticate the user (permissions system)

* Display dynamic pages with data coming out of a database (database API and templating system)

* Create, display and process forms (templating system, ad_page_contract)

* allow user to cause programs/scripts to be run to affect data in the database (see the AOLserver ns_register_* Tcl functions, and the OpenACS cron package)

All the information above, including information on developing with AOLserver is available at https://openacs.org/doc/openacs-4/acs-dev.html

OpenACS has support for sessions https://openacs.org/doc/openacs-4/request-processor.html

When we talk about "online communities" we are usually referring to a "community" of user in a web environment. Unless you're going to be the _only_ person using your website (which doesn't seem to be the case, since you talk about users in the plural) then you'll have an online community where users will be viewing, adding and editing content to your site.

An example would be amazon.com. It's a community of shoppers. In the bookstore side, users can view books, post comments, see reviews by other users, see what other users have reviewed, enter their wishlists and see other users' wishlists, etc, etc. That's a community. That's the kind of thing OpenACS was written to facilitate.

A lot of the OpenACS community started in the ACS 2 and 3, days, usually after reading "Philip and Alex's Guide to Web Publishing". OpenACS 4 evolved from that toolkit to become what it is today.

You are welcome to post comments to our documentation (https://openacs.org/doc/openacs-4/) and tell us where you think we can improve. We are working on a "newbie" guide to OpenACS.

Collapse
Posted by Jun Yamog on
Hi Michael,

I can't say much about the Java development environment.  But I have done some sites with ASP.  I can say that aolserver + OpenACS is a lot better for medium to large sites.  ASP is just good for tiny sites or MS shop clients.  Also among all web dev enviro I have experienced: mod_perl, aolserver and IIS.  I find aolserver to be both superior and easiest to use in DB back end sites.  Especially the db API of OpenACS.  I can't say much for plain aolserver since I started straight away to OpenACS/ACS.

So if OpenACS will make your live easier, my personal experience is that yes it did make my life easier.  Also once you get a hang of OpenACS-4 higher learning curve but more productive in the long run.

I am interested to look at Java environment though.  Although not as replacement but as a complementary platform to OpenACS.  I think Tcl and Java should be good partners.  ns_javablend should be nice, hint hint hint.  I hope DanW finds more time again =)