New Posts New Posts RSS Feed: hookfunctions and workflow
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

hookfunctions and workflow

 Post Reply Post Reply
Author
Peer View Drop Down
Newbie
Newbie
Avatar

Joined: 31-Aug-2010
Location: Netherlands
Posts: 15
Post Options Post Options   Quote Peer Quote  Post ReplyReply Direct Link To This Post Topic: hookfunctions and workflow
    Posted: 22-Sep-2010 at 7:56am
I'm wrestling with some application design issues:

1) Is there a way  to add common behaviour (not only interfaces) but methods, properties to the entity classes. I filled the injected basetype (->BaseEntity) in the EMdesigner and created a developper  partial class with the same name. Point is the propperties of all the subclasses are not available and can't be manipulated at this time

Use case: deletion in UI is captured in VM or BO (or EM) and instead an update is executed (set active = 0). All the tables in the database have an active field.

An other use case :
The Rowversion number should be updated after updating a table.

in other words:
I'm Looking for an appropriate way  to intercept all kinds of events and relay them to all kind of methods. It would be nice to make all kind of hoofunctions which I could implement in the BO or the VM  . The VM is the most logical place for the eventcapturing, the BO for the hookfunctions.

Maybe I look in the wrong direction and should focus on the EM, subclassing / wrapping in helperclass for specific needs

The problem here is we have our own framework in VFP which has  many-many hookfunctions on critical places where every developer can put extra code. There is an Enterprise layer for common enterprise functionality\layout and an applicationlayer for  common application functionality.

A part of our quest is how we re-construct this architecture in DEvForce...

Thanks :)


Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 22-Sep-2010 at 10:51am
The easiest way to inject custom logic into any generated entity property is with "Property Interceptors". You can write interceptors that leverage your inheritance tree.
 
Here is a DRC (DevForce Resource Center) search with links: http://drc.ideablade.com/xwiki/bin/view/Main/Search?text=interceptor 
 
We also have life-cycle events all over the place including entity creation and deletion. You should be able to intercept Delete() call on a sub-class and reroute to toggle the Active flag. You'll have to take care of hiding / showing entities based on that flag.
 
Send us a list of specific VFP hooks that matter to you. We may be able to map those to DevForce functionality. Please focus on the ones that matter :-)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down