I'm currently in the process of converting a fairly large Umbraco 4.* site to Umbraco 7. I'm aware that the concept of user controls from a web forms perspective is not really relevant in MVC but I'm researching how we might be able to replicate a development process that has included a lot of user controls.
I've installed Umbraco 7 via nuGet, created the project with models/controllers/partials and experimented quite a bit getting partials to do various bits of functionality, all works, all fine, love it. Currently the way we have managed the development of user controls is to have a separate solution just to hold the controls, with an individual project for each control.
This has allowed to maintain several developers working on individual controls, using TFS, then building each control to it's own dll, publishing it and including it in Umbraco 4 where necessary. We don't have to touch the main Umbraco project. It's been a system that's worked well, for us anyway.
As far as I can tell, when including a model/controller/partial into a main Umbraco 7 project it requires building and publishing the entire project. Does anyone have any ideas how we can achieve something like I have mentioned, similar to the way we have been developing?
Sorry if I've missed something completely obvious but Umbraco7/MVC development is very new to us.
Nope, you can follow the exact same process, just put your models and controllers in a project, I think the view would need to be added to the Umbraco Views folder, so that's basically the same thing you're currently doing with your masterpages.
You might be able to get away with embedded views in the seperate projects that your devs are making (I've not had a play with that so I'm not entirely sure).
Views just rely on a dll being present so in that regard they're the same as masterpages with a codebehind directive.
This good to know. I will experiment with this, the only thing I'm not sure of, without even trying anything, is how we would interact with the SurfaceController. But we'll play with that.
Partials vs. User Controls
Hi
I'm currently in the process of converting a fairly large Umbraco 4.* site to Umbraco 7. I'm aware that the concept of user controls from a web forms perspective is not really relevant in MVC but I'm researching how we might be able to replicate a development process that has included a lot of user controls.
I've installed Umbraco 7 via nuGet, created the project with models/controllers/partials and experimented quite a bit getting partials to do various bits of functionality, all works, all fine, love it. Currently the way we have managed the development of user controls is to have a separate solution just to hold the controls, with an individual project for each control.
This has allowed to maintain several developers working on individual controls, using TFS, then building each control to it's own dll, publishing it and including it in Umbraco 4 where necessary. We don't have to touch the main Umbraco project. It's been a system that's worked well, for us anyway.
As far as I can tell, when including a model/controller/partial into a main Umbraco 7 project it requires building and publishing the entire project. Does anyone have any ideas how we can achieve something like I have mentioned, similar to the way we have been developing?
Sorry if I've missed something completely obvious but Umbraco7/MVC development is very new to us.
Thanks.
Nope, you can follow the exact same process, just put your models and controllers in a project, I think the view would need to be added to the Umbraco Views folder, so that's basically the same thing you're currently doing with your masterpages. You might be able to get away with embedded views in the seperate projects that your devs are making (I've not had a play with that so I'm not entirely sure).
Views just rely on a dll being present so in that regard they're the same as masterpages with a codebehind directive.
This blog post might also help you get a bit of perspective: http://umbraco.com/follow-us/blog-archive/2013/7/14/moving-from-webforms-to-mvc.aspx
This good to know. I will experiment with this, the only thing I'm not sure of, without even trying anything, is how we would interact with the SurfaceController. But we'll play with that.
Simply put: The view uses
BeginUmbracoForm
which specifies which SurfaceController to post to, so that's how it interacts.is working on a reply...