+1! Ivo made a nice plugin architecture for Webical.org. I think we can reuse that?
On Thu, April 12, 2007 12:30, Wouter Huijnink wrote: > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > </head> > <body bgcolor="#ffffff" text="#000000"> > Hi List,<br> > <br> > I think we should aim for a neat and lean core OpsAdmin, that provides > hooks for plugins to act upon.<br> > <br> > Right now, we assume OPS email and OPS timesheet to be present, and > hard code checks on IMAP and timesheets into the DAO / manager that are > responsible for Projects. This is very inflexible - some users may want > to use OPS email, but not the calendars, or the other way around, or > want to add their very idiosyncratic plugin. <br> > <br> > The OpsAdmin core should only be responsible for basic > create/update/remove functionality, and check with plugins whether they > have any objections to any of those actions or whether they want to do > something in addition. > <br> > <br> > <b class="moz-txt-star"><span class="moz-txt-tag">*</span>Example<span > class="moz-txt-tag">*</span></b> > <br> > With OpsAdmin we create a new project. All the core application does, > is > <br> > 1. check with the plugins whether they have a problem with the new > project-to-be using an onCreateProject hook > <br> > 2. no objections? persist the new project (including tasks, members, > etc.) > <br> > 3. notify the plugins of the successful creation of the project: > onProjectCreated hook > <br> > <br> > Same for project deletion: > <br> > 1. check with the plugins whether they have a problem with the project > being deleted, using an onDeleteProject hook > <br> > 2. no objections? delete the project > <br> > 3. notify the plugins of the successful deletion of the project using > an onProjectDeleted hook > <br> > <br> > Now we have a plugin configured: the OpsTimesheet plugin, which > implements the following functionality: > <br> > 1. onCreateProject: no objections > <br> > 2. onProjectCreated: nothing, I guess... > <br> > 3. onDeleteProject: check whether hours have been registered on this > project in any of the project members' timesheet - if so: object to > deletion, if not: let deletion take place > <br> > <br> > (ofcourse, in the end this plugin also needs to handle the > onRemoveTaskFromProject, onOpsEnableUser, onUserOpsEnabled, > onOpsDisableUser, and onUserOpsDisabled hooks...) > <br> > <br> > So: neat core with basic functionalities, very flexible plugin > structure. When will the project be refactored accordingly? :P > <br> > <br> > regards,<br> > w<br> > <pre class="moz-signature" cols="72">-- > Wouter Huijnink > Func. Internet Integration > W <a class="moz-txt-link-freetext" > href="http://www.func.nl">http://www.func.nl</a> > T +31 20 4230000 > F +31 20 4223500 > </pre> > </body> > </html> > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________ > Ops-developers mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/ops-developers > -- Zoran Kovacevic Func. Internet Integration W http://www.func.nl T +31 20 4230000 F +31 20 4223500 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Ops-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/ops-developers
