New Posts New Posts RSS Feed: Best Practices with EntityManager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Best Practices with EntityManager

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

Joined: 12-Feb-2009
Posts: 12
Post Options Post Options   Quote francois Quote  Post ReplyReply Direct Link To This Post Topic: Best Practices with EntityManager
    Posted: 19-Feb-2009 at 12:19am
Hi,
 
Thanks, this is basically what I was looking for.
 
Will clarify details through email if required.
 
Regards,
 
Francois
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 18-Feb-2009 at 1:28pm
Originally posted by francois

Hi,
I'm busy evaluating DevForceEF to replace an existing in-house developed framework. Currently we have a client - server information system that is developed in a modular pattern. The client shell provides authentication / authorization services and a desktop. The client also currently support windows authentication and forms authentication.

The client have a plugin probe directory. If a plugin is found, it is loaded with dependency assemblies and the plugin injects the menus, views etc into the Desktop (very similar to CAB). These plugins can be mixed and matched as required. Each plugin assumes an already authenticated session provided by the client. Plugins can also extend other entities like CAB.

Implementing this with DevForceEF seems to be a bit more complex as I thought. The authentication / authorization of the client can be achieved by creating a very simple domain model and to use the login with custom login credentials. But how do I cater for the plugin design?

Each plugin is in a way it's own domain model (which could potentially have dependencies on other domain models for referential integrity).

Basic architecture guidelines would be great.

Thanks


Sorry for the delay, Francois. I ran this by Ward Bell, our VP of Product Development, who had the comments listed below.

It’s a sensible question but I don’t know enough about the plug-in authentication to suggest wisely.

 

Typically, I would do as he suggested for the opening gambit … login an EntityManager at the start. No unusual complexity there.

 

Then I would put an AuthenticationService and AuthorizationService in my IoC container. Subsequent plugins are serviced from these services.

 

I’m imagining that the plug-ins have their own domain models and, therefore, their own EntityManager instances. The question might be, “how do I login these Ems without actually going back to the user again for credentials?”

 

If this actually IS the question, the solution is easy. The plug-in can ask the AuthenticationService to “new” it’s own specialized EntityManager based on the originally logged in EM that is retained/referenced by the AuthenticationService.

 

I imagine a method such as

 

                 Service.CreateEntityManager<T>() where T : EntityManager, new()

 

The implementation is a one-liner sort of like:

 

                return new T(HomeEntityManager); // HomeEntityManager provides access to the originally logged in EM

 

I don’t think I dare go further without more information about what seems to be the problem and desired outcome.

 


Perhaps Francois would like to contact us directly.     [which you can do through support@ideablade.com]


Back to Top
francois View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2009
Posts: 12
Post Options Post Options   Quote francois Quote  Post ReplyReply Direct Link To This Post Posted: 16-Feb-2009 at 10:43am

Any ideas?

Back to Top
francois View Drop Down
Newbie
Newbie
Avatar

Joined: 12-Feb-2009
Posts: 12
Post Options Post Options   Quote francois Quote  Post ReplyReply Direct Link To This Post Posted: 12-Feb-2009 at 11:40pm
Hi,

I'm busy evaluating DevForceEF to replace an existing in-house developed framework. Currently we have a client - server information system that is developed in a modular pattern. The client shell provides authentication / authorization services and a desktop. The client also currently support windows authentication and forms authentication.

The client have a plugin probe directory. If a plugin is found, it is loaded with dependency assemblies and the plugin injects the menus, views etc into the Desktop (very similar to CAB). These plugins can be mixed and matched as required. Each plugin assumes an already authenticated session provided by the client. Plugins can also extend other entities like CAB.

Implementing this with DevForceEF seems to be a bit more complex as I thought. The authentication / authorization of the client can be achieved by creating a very simple domain model and to use the login with custom login credentials. But how do I cater for the plugin design?

Each plugin is in a way it's own domain model (which could potentially have dependencies on other domain models for referential integrity).

Basic architecture guidelines would be great.

Thanks





Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down