New Posts New Posts RSS Feed: Using DevForce Object mapper breaks Prism Application
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Using DevForce Object mapper breaks Prism Application

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

Joined: 09-Jan-2010
Location: Canada
Posts: 7
Post Options Post Options   Quote BruceKu Quote  Post ReplyReply Direct Link To This Post Topic: Using DevForce Object mapper breaks Prism Application
    Posted: 04-Feb-2010 at 5:39pm
I am building a silverlight application using Prism . I started with the Best Practices template and have created a solution with 6 projects.
I am using immediate load and demand load modules. The system uses menus (buttons) to move module to module and view to view.
It comes up and I can navigate correctly.
Now I want to introduce login and I want to test DevForce for doing this.
However, I cannot use your template to create the correct web.config. I did this my hand my generating a silverlight app using your template and copying the pieces in. I also crated a log folder in the web project (server). I introduced the ideabalde devforce modules into the references folder in Web app.
 
I was able to create the EF model.
 
I then used the DevForce Object mapper, attached to EF model, used pluralizer feature and saved the domain model.
No errors. However, when I run the app no views are put in the regions - the shell is shown in its 'raw' form. I tried both discovery and injection and even activated the view in the region (which should not be necessary)
Nothing! I traced and all the initializing code is being done.
 
Next problem - remove all the pieces created - and it still will not work - I cannot trace what is left that is changing the environment. so that the regionmanager no longer functions.
 
I noticed in running your Prism Explorer example that you are using UnityContainerExtensions, registering Gateway Entity Manager, etc. You also are using a loggerfacade.
 
Do I need all these pieces to run correctly? If so can you give me a list of necessary setup modules for DevForce to work in a Prism Container?
 
I ask this question in this general way since this may be a known 'issue' and you may have a quick answer and guide to assist me.
 
I can provide as much detail as you want - it just would take a lot of space without some guide as to what you would like to see.
 
I hope I have made myself clear.
 
Any help would be appreciated.
 
 
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: 08-Feb-2010 at 10:33am

For trolling forum readers, let's get the title of this post out of the way. The DevForce Object Mapper does not break a Prism application. Nothing in your tale indicates that the mapper is causing trouble. 

DevForce helps you build, maintain and persist your business model. Prism helps you build compositional apps. These technologies contribute along different dimensions and hardly intersect. DevForce cannot interfere with the RegionManager.
 
---
 
I can find no mention of "UnityContainerExtensions" in the code.  Perhaps you mean UnityExtensions which are standard issue Prism. That's where the UnityBootstrapper lives. If you intend to use Unity for dependency injection, you're going to use this assembly.  You must use some kind of container if you are using Prism.
 
The loggerfacade is standard Prism. The Gateway for encapsulating the EntityManager is our recommended pattern but not required; the likelihood that this has anything to do with views not showing in regions is near zero.
 
--
 
There are too many moving parts in your question to provide an answer. Can these technologies work together? Yes. Are there any known problems integrating them. None to my knowledge. That might be comforting but it's not an answer.
 
My sense is you are throwing all the ingredients into the pot at once and hoping it works. That doesn't happen often enough in my experience.
 
I recommend a more deliberate process. Start smaller, ask intermediate questions, and answer them ... with tests ... as you go.
 
I would back up to the point where things seemed to work. Go all the way back. Make your view bind to a fake business objects. Get it working.
 
In a separate solution, I would make my DevForce business model work ... with a minimal UI. Forget about Login for now; do that last. Get a working Silverlight DevForce app running.
 
Then bring the DevForce business model into your silverlight application solution but do not hook it up into your application in any special way. Make sure it is still functioning.
 
I wish I could tell you precisely how to bring these together. I don't know what the "Best Practices" template is. In fact, I am suspicious of anything that bills itself as such. In any case, I do not know what pieces are involved. I know that you will have to solder together the sections that are in your app.config (Silverlight side) and web.config (Server side). If you are using app.config to configure Prism behavior of any kind, maybe you overwrote those sections of the config. Who knows. You'll have to look carefully and move slowly, verifying as you go.
 
I would create a simple layout view ... the simplest view possible ... and make sure that my Prism app can show that view. It should have nothing in it. It should show in the region just like any other view in your app.
 
Then I would take the DevForce model and make it appear in that view. Forget the Gateway and MVVM. Do it straight up in the code behind.
 
When you have that working, refactor.
 
Good luck.
 
 


Edited by WardBell - 08-Feb-2010 at 10:38am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down