on 5/8/2000 8:32 AM, Sean Legassick <[EMAIL PROTECTED]> wrote:

> This is a big win for me because I'm developing a very straight forward DB
> front end but where I have a lot of different types of objects to manage,
> and I don't want to have to rewrite the same controller logic over and over
> again for each object type.

that is why we have the Peer/DatabaseMap OR tools. this code can almost be
fully autogenerated and subclassed.

for example...take a look at some of my Scarab actions...this one is built
taking advantage of the new ActionEvent system...

<http://scarab.tigris.org/source/browse/scarab/src/java/org/tigris/scarab/mo
dules/actions/admin/security/UpdatePermission.java?rev=1.4&content-type=text
/x-cvsweb-markup>

If you look at some of the methods, you will see that they are only a few
lines of code. of specific interest is lines like this:

Permission perm = PermissionPeer.selectOnePermission(permission_id);

on the back end, that is executing a bunch of DB code, but it is all
abstracted out quite nicely into a single static method call. :-)

here is another example...

PermissionPeer.updatePermission ( modify_id, permission_text );

nice and clean.

-jon

--
    Java Servlet Based - Open Source  |        Collab.Net
        Bug/Issue Tracking System     |
       <http://scarab.tigris.org/>    |  <http://Collab.Net/jobs/>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to