Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tarunjit 103 posts 146 karma points
    Mar 09, 2016 @ 10:07
    Tarunjit
    0

    Umbraco Integration In ASP.Net MVC Project

    Hi All,

    We are re engineering our web site and are thinking of integrating Umbraco in to our ASP.Net MVC5 project using NUGet package manager. To make it more simple both Umbraco and ASP.Net MVC5 will be in the same web project.

    That is CMS editor of Umbraco and our MVC code which we will be writing will be in the same project.

    Can any one please let us know if this approach is fine, as we will be having a big sized project with many thrird party features such as Google Maps, Social Site Widget Integrations etc.?

    If above approach is fine please let us know the points which we need to keep in mind or at least be aware of points before we could start moving on. Any url mentioning these points will be of very much of help.

    Regards

    Tarunjit Singh

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Mar 10, 2016 @ 08:09
    Dennis Adolfi
    0

    Can i ask you why both applications have to be in the same web project? Cant you do them both in separate projects but in the same solution? You mention its to "make it more simple" but i think it sounds more complicated.

    I´m about to start a similar project next week, but i´m probobly gonna keep them in separate projects to avoid hazzle. :)

  • Tarunjit 103 posts 146 karma points
    Mar 17, 2016 @ 09:17
    Tarunjit
    0

    Hi Dennis,

    First of all sorry for not replying to your answer earlier as i was busy in my other project tasks.

    I had a look at your suggestion and feel that using two seperate projects will be of more advantage. As and example in our own ASP.Net MVC seperate project we will have full control on Global.asax where as if we use the single project for ASP.Net MVC and Umbraco then there could be problem.

    Similarly can you please let me know if there could be any other issues which you could foresee while trying to use ASP.Net MVC and Umbraco in the same project, i.e. not as separate projects in the same solution.

    Also won't this make our web site compilation and execution slow if we had both Umbraco and our own ASP.Net MVC project in the same solution?

    Regards

    Tarunjit Singh

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Mar 17, 2016 @ 09:57
    Dennis Adolfi
    0

    Hi Tarunjit.

    I dont say that there is a right or a wrong way, whatever feels easier for you developing wise is the way to go. I am sitting currently in an similar project, where i have a ASP.NET MVC4 application and a Umbraco 7.4.1 application, each one in separate projects but in the same visual studio solution, becaus it feels easier for me to separate the two.

    What you mentioned about the Global.asax feels like one reason yes, and theres probobly more. (Future Umbraco upgradeas and such).

    I usally prefer one project for each application instead of mixing, in terms of scalability and separations. Imagine if you client one day decides that he/she whould like to host the Umbraco application in another enviroment, but keep the ASP.NET application where it is, then you wont be happy that you mixed the to projects.

    If you have code (helpers and such) that you would like to use across the to applications, create even more projects in your solution as a sort of "in-between layer". That way, if you change a helper funtionality, it´ll be changed in both projects.

    Lastly, its always easier if your working in a team to have separate enviroments for the two different applications.

    But as i mentioned, this is just my opinion. Hope it helped.

  • Hywel Rees 56 posts 224 karma points
    Mar 17, 2016 @ 09:57
    Hywel Rees
    0

    Hi Tarunjit,

    I think separation of concerns is key here. I foresee a whole heap of problems maintaining the codebase if you try and run the two sites in the same project.

    Here are some immediate negatives I can think of:

    • A mix of Umbraco / non Umbraco views in your Views folder
    • A mix in your scripts / css folder
    • Non Umbraco scripts/styles and views may show up in the settings tab in the Umbraco back office
    • You will have to merge global.asax (as mentioned above)
    • Web.config will also need to be merged
    • Potential routing issues

    I'd recommend having a separate project for Umbraco (within the solution if you like), and having two separate websites setup within IIS. You can deploy any changes separately then, and a problem with one, won't bring down the other.

    Cheers,

    Hywel

  • Dennis Adolfi 1082 posts 6446 karma points MVP 5x c-trib
    Mar 17, 2016 @ 10:00
    Dennis Adolfi
    0

    Glad to see we think alike Hywel! :)

  • Tarunjit 103 posts 146 karma points
    Mar 17, 2016 @ 11:21
    Tarunjit
    0

    Hi Hywel,

    Thanks for the quick response.

    But issues like “merging of web.config”, “Potential routing issues” etc. will be there when we will be deploying our site to IIS. To elaborate it more as we will be deploying both Umbraco and our own ASP.Net MVC project in the same IIS web site.

    As far as Global.asax merging is concerned we can handle it by creating HTTP Modules.

    Any response on this would be of much help.

    Regards

    Tarunjit Singh

  • Tarunjit 103 posts 146 karma points
    Mar 17, 2016 @ 11:53
    Tarunjit
    0

    Hi Hywel,

    As far as "Non Umbraco scripts/styles and views may show up in the settings tab in the Umbraco back office" is concerned i think it needs to be shown as content writers may want to include certain style or script while creating a page in umbraco.

    Regards

    Tarunjit Singh

  • Tarunjit 103 posts 146 karma points
    Mar 21, 2016 @ 12:38
    Tarunjit
    0

    Hi All,

    While doing some research on Google we find the link http://stackoverflow.com/questions/9702138/integrate-cms-with-an-existing-asp-net-web-site/9702242#9702242 which says that both Umbraco Back office site and web site for outer world interface should be configured as separate sites on IIS.

    But if we go by this approach then how the pages which content writers have created through Umbraco Back Office site could be viewed as these pages will be using Templates, Document Types, User Controls (Macros) etc i.e. umbraco features. All these above features Templates, Document Types, User Controls (Macros) etc will be accessible through Umbraco Back Office site while creating pages.

    As an example suppose a content writer created a page using all above mentioned features in http://www.abc.com/umbraco (Umbraco Back office site). Now if we use separate site in IIS for outer world say http://www.def.com (Separate site pointing to different physical folder on the web server). We are not sure in that scenario how could the page created in www.abc.com/umbraco will be viewable to outer world as both www.abc.com/umbraco and www.def.com are separate sites pointing to different physical folders.

    I did some more research on this and find a link http://scottsdevblog.com/2011/07/adding-an-mvc-or-other-net-application-in-umbraco-cms-4-7/

    As per my analysis this approach won't work as our ASP.Net MVC site will also be implementing Umbraco constructs such as Templates , Document Types etc. and if we follow this approach then there will be no such Umbraco constructs available.

    Any comments on this will be of much help.

    Regards

    Tarunjit Singh

  • Tarunjit 103 posts 146 karma points
    Mar 22, 2016 @ 08:49
    Tarunjit
    0

    Hi All,

    We are reengineering our web site and are thinking of using Umbraco for building a CMS web site. Here is the braod architecture we are thinking of using :-

    1. Development Architecture :- Integrate Umbraco in Visual studio project using NUGet package manager. Here both ASP.NET MVC5 and NUGet package manager will be used in the same solution but as different web projects. To elaborate it more there will be following two projects :-

    a. First Project for Umbraco Back Office Site where content writers will be creating pages, administrators will be creating Document Types, Templates etc

    b. Second Project for ASP.Net MVC team which will be creating Partial Views, writing business rules etc. All the macros created in this project will then be integrated in to the pages to be created in Umbraco Back Office Site.

    2.Deployment Architecture :- Single site will be created in IIS in which Umbraco back office site and the site for the outer world will be hosted, i.e. all the DLLS related to both the projects described above will be copied to the single physical folder on the web server. For Umbraco back office site we will be creating a special url which will not be accessible to the outer world. Changes in Web.config of the ASP.NET MVC project will be copied to the Umbraco back office site web.config.

    Please have a look at the this broad architecture and let us know what are the pros a cons of this architecture.

    Regards

    Tarunjit Singh

  • Vineet Sharma 1 post 71 karma points
    Apr 09, 2016 @ 15:34
    Vineet Sharma
    0

    Hi All,

    After reading this posts i found that you can help me , Please spare some time and clarify my few doubts

    1. I got a project form a client with is developed fully in MVC 4.0 with one Project, Website is running.
    2. Client have one module/Controller which have many static pages now they want to use CMS to get rid of static pages, because every time there is any small change they need to update all 70-100 pages.

    Now my question is suppose website is www.xyz.com

    Static pages are like this www.xyz.com/ControllerName/FirstCSHTML View like this it happened for all the pages

    is it possible to replace all these page with umbraco? if yes how will i integrate it? can someone provide me some reference

  • Abhishek 11 posts 52 karma points
    May 26, 2023 @ 21:59
    Abhishek
    0

    Hi Tarunjit

    Great Suggestion!

    I am also working on something similar and wanted to check if the rollout was successful and ways to retain existing MVC routes with Umbraco Routes.

Please Sign in or register to post replies

Write your reply to:

Draft