Forum OpenACS Q&A: Re: Augmenting acs_objects - Add package_id, name, overview, etc. to it

If PL/SQL is unusable - which is in essence the claim - can either you or Branimir educate me as to why Ars Digita chose to architect ACS 4.x around the principle that object system details should be hidden as much as possible within PL/SQL functions and procedures?

Branimir - surely no one wants to do 50 queries per page, one wants to execute a single query that returns 50 rows ...

<blockquote> If PL/SQL is unusable - which is in essence the claim
</blockquote>

It is not.  The claim is that functions that perform SQL queries are
unusable (most of the time) within SQL queries.  They are also
dangerous because people using it often don't realize what
they are doing when they use it.  It looks like one neat SQL query
whereas in fact it may easily be 1000.  An especially nasty example
is trying to use it in the WHERE clause, say:

select count(*) from acs_objects
where acs_object.name(object_id) = 'Foo'

Don't try this on a site with any substantial number of objects.  You
*will* have to kill the database process!

<blockquote> why Ars Digita chose to architect ACS 4.x around the principle that
object system details should be hidden as much as possible within PL/
SQL functions and procedures?
</blockquote>

Well, abstractions always sound like a good idea.  And I do think there
is some merit to the hiding in PL/SQL functions for things like constructors and destructors.  Accessors on the other hand simply don't work. I think that people
who designed all that weren't aware of the performance issues back
then.

Actually I think we even abandoned constructors in some parts of
scripts to migrate from an ACS3-based system to an ACS4-based
one.  But even in that case constructors were useful because you could
treat them as documentation.