Bascis of NancyFx Bootstrapper - nancy

I am a beginner in Nancy application develpment.
Can any one explain about what is the role of Bootstrapper in a Nancy application.
Thanks.

I think the Nancy documentation explains it well.
the bootstrapper is for application wide configuration. That includes setting up your DI container, adding hanlders to Before, After and Error pipelines, setting up any special conventions you may have and so on. The modules are discovered automatically by Nancy on startup. If you don't have any particular setup, you don't need a bootstrapper.

Related

NancyFX and adding another project as reference doesn't work

I created a nancyfx iis host solution from the nancyfx templates. I was wanting to put my domain in a separate project but found that adding that project to the nancyfx project resulted in a the yellow exclamation point beside of the reference and at compile time I was getting errors about the reference to the namespace.
I likely have overlooked something very simple but I can't figure out why this is happening. (I may be able to compile the domain project and add the dll reference but I prefer to just reference the project.)
This doesn't sound like a Nancy issue - are you sure both projects are targeting the same version of the .net framework?

Silverlight / Prism / RIA : How to create the optimal infrastructure?

Since days I am reading and researching and still struggling how to create the perfect infrastructure. Since there are no Prism 4.0 templates as such, I came up with a strategy, but I need to be sure this is the right strategy and I would appreciate an advice from experienced PRISM/RIA developers.
I use PRISM 4.0, RIA Services 1.0 Sp1 Beta, Silverlight 4.0, Entity Framework 4.0
1) Client side
I created first a "Silverlight Business Application", which creates a Web.host and a Silverlight client application with implemented RIA authorization. The initially created Silverlight client application shall be used as the Shell project.
2) Infrastructure project (Common)
This project would contain some common Prism MEF attributes and perhaps the entity models that are auto generated by RIA as well as the Service Interface. The idea is to create a simple Silverlight Class Library, and under Properties of the project, I would select for the dropdown ‘WCF Ria Services Link ’ to point to the host.Web project that contains the Ria Services. Then after the rebuilding, I am able to see the entity models within the Class Library and these could then be shared between the prism modules to feed their ViewModels etc.
3) Service layer
Should I create the EF4 Model on the Web.host project and add the Domain Service in there? Then I would extract an interface from the Domain Service and put the interface into the Infrastructure (Common) project. The Web.Host therefore needs to reference the Infrastructure (common) project to get access to the interface. On the client side the interface may be used by MEF to retrieve or mock the service . However I am concerned about the service referencing a common project that contains also the client-side generated entities.
4) Authorization
Also a bit concerned about the authorization, shall I leave everything on the Shell project? Or do I have to move anything to the Infrastructure (common) project to share it?
Since this is my first time designing with PRISM, I might have misunderstood or forgotten some aspects. Please feel free to improve my suggestions.
Your help is highly appreciated
Kave
After two weeks of intense research, this blog couldn't put it better together:
http://blogs.msdn.com/b/dphill/archive/2009/08/17/prism-and-net-ria-services.aspx
There're nice Quick Start templates for Prism, I found it at blog http://blogs.msdn.com/b/dphill so it looks quite nice, I used it also created RIA Service library so everything now is separated:
1) WEb project
2) Ria Service on web
3) generated RiaService client code as separate and shared assembly and it is used by modules. that's it.

Deployment Options for Prism Apps for

Does anyone have any experience with deployment options for Prism Apps?
I tried ClickOnce and found it to be too buggy and too hard for my users (With Prism 4 and .NET 4).
Clearly I could just go make a normal installer using installshield or something. But what I really want is something that lets me leverage the fact that my app is in modules.
Something that will allow me to re-deploy a single changed module/dll and not have to require re-deploying the whole application.
Is there anything out there (besides ClickOnce) that works that way?
How about this:
http://wyday.com/wyupdate/
Though you might have to use wyBuild to use it.

Adding link to Web Reference from a Project - ChannelBase not found

I am building a Silverlight app. As I have classes to be consumed by Silverlight and .NET modules, I have created a Silverlight project with all the classes in it and then, a .NET project linking('Add Link') to the classes in Silverlight project. This way, I have one class file compiled separately as Silverlight and .NET assemblies. I want to replicate the same for web service references. Meaning, I have web references in the Silverlight project. I am trying to 'Add Link' to reference.cs from Silverlight project into the .NET project. When I compile the .NET project, the ChannelBase class doesn't get resolved it seems due to disparity in definition of the class in Silverlight and .NET framework libraries. This results in compilation error stating unresolved ChannelBase. Sounds like a dead end to me. Do you see a way around this problem?
I'm afraid this is not possible. Both proxies are completely different: one of them is synchronous while the other one is not.
The best thing you can do is to share the service defined classes, not the whole proxy. Just create those classes beforehand, use "Add as link" to reuse them in both projects, and then when you add the service reference, mark the option "Reuse types in referenced assemblies".
Just in case someone else stumbles on this. I had a similar problem. I was generating the proxy using slsvcutil.exe and trying to compile it for .net and monotouch. I kept getting ChannelBase not found. Which made no sense at all. Finally I commented out the CookieContainer property in the proxy client class and low and behold the compile error went away and the proxy works for monotouch.

Is the System.Web.Silverlight reference needed?

We are just getting into Silverlight development at my workplace. Somehow two of our dev machines have been configured differently. I noticed that one of them has access to System.Web.Silverlight in the reference list, and the other doesn't. Both can create and run Silverlight applications from scratch.
What does System.Web.Silverlight do? Is it a legacy reference? If we need it, where do we get it from?
This dll provided the ASP.NET Silverlight server control which was designed to make it easier to create the object tag needed to describe the silverlight plug-in.
This server-side control was removed as of Silverlight 3, you are now expected to build the object tag yourself.
So yes its legacy so you don't need it.
Anthony is correct. If you are having trouble after you upgrade your products to Silverlight 3 - or just want an example on how to insert your SL app in to a page, create a new SL3 project and check out the sample ASPX and HTML pages (which are pretty much the same as each other now...)

Resources