[jboss-dev-forums] [Design of JBoss Identity] - typed interface of identity api

tom.baeyens@jboss.com do-not-reply at jboss.com
Wed Feb 11 04:13:11 EST 2009


after integrating the identity api in jbpm, i have 2 remarks:

1) typed interfaces are nice in oo design, but i believe they are counterproductive in this api.   before i can do a query that involves a user and a group, i have to fetch the identity-object and group-object from the api.  only then i can supply those objects into the query method.  

this means 3 api calls instead of just 1.  probably this will lead to 3 times DB access instead of 1.

in the jbpm api, we take primitives (id's) as method parameters in our session facade apis.  and we provide typed objects as the return value.  in case you would have the typed object and need to invoke a method, then you can always supply the id by doing someObject.getId().

2) i believe there should be no difference between a role and an association.  role should be just an optional property of an association.  this would make the whole model and the related api managers a lot simpler.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4208892#4208892

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4208892



More information about the jboss-dev-forums mailing list