Friday, October 30, 2009

IOC by BaseImpl

In this post I am going to provide some why’s on DevExpress.ExpressApp.BaseImpl assembly.

Why it is not signed?

It is not strongly typed signed cause no module is referencing it. By doing so DevExpress encourages users to modify that assembly up to their needs. BaseImpl is only referenced at your front end. Most of Xafers i know have their own version of baseImpl .

If you have your own version of baseimpl development of your domain classes would be much easier
eg.instead of writing code to add a new property to a user though a controller , you could just describe/add that property to user class.

Why persistent classes are there

Xaf has been design to provide a an IOC approach to us. By that I mean that Xaf modules not use or know anything about persistent classes but only for interfaces that are hosted at DevExpress.ExpressApp.Base assembly which is signed and Dv discourages us from modifying.

So when you design a reusable module you should work with interfaces not with real objects


The only drawback i found is that you cannot use linq to xpo cause you do not know the types only interfaces , maybe dx will provide a smarter way in doing so when they release their DC components

The following should also be true your BaseImpl assembly can reference your modules but your modules as I said cannot reference the Baseimpl.

After realizing what I said above the most obvious question came into my mind


modules know only interfaces and core can also be configured to use your own datalayer, objectspaceprovider so maybe some people out there have already manage to do so. Sounds achievable!!!

Technorati Tags: ,

Subscribe to XAF feed
Subscribe to community feed

blog comments powered by Disqus