I am required to deliver a component, inlcuding business logic and UI, to be used on a ASP.NET MVC 3 web site that is being developed by other company.
I know my way around ASP.NET WebForms server controls and how to package and distribute them to be reused across projects. I also have experience with MVC approach in general and some ASP.NET MVC experience. I did read over materials recommending use of HTML helpers and similar, but most of this deals with only UI reusability or reusability inside a single ASP.NET MVC project. I did not find any mentions of how to package and distribute such functionality for ASP.NET MVC.
The business logic is major part of this component. It is supposed to be a kind of wizard, which progresses through a lot of steps and which would also work with database using Entity Framework and send an email to the user upon completion.
How would I go about creating a control/component that encapsulates complex business logic and also renders its own UI/view output and that would be distributable in form of a standalone assembly? Is this even possible or only to some extend?
Would this somehow be doable by wrapping model, view and controller inside an assembly?
Or would it be better to approach this just as a complex model? If so, how would it be possible to connect the UI/view and controller to this component by the consumer of the component?
I also did see a couple of vendors out there, such as Telerik, who sell something along the lines of ASP.NET MVC controls/components, so I assume this is somehow possible to do.
This article tells how to call controllers from another assemblies.
To reuse only views, you can use RazorGenerator.
I recommend you to refer the MVC Control ToolKit Project page of CodePlex
Also see ASP.Net MVC Sprite Project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With