Copied to clipboard

Flag this post as spam?

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


  • swc 7 posts 27 karma points
    Aug 16, 2010 @ 17:29
    swc
    0

    Using API as data source for MVC website

    We're trying to evaluate the following:

    We have an existing ASP.net MVC site.  We want to add some new pages to it which will contain content managed data.  We are thinking of implementing this as follows:

    1)  Install Umbraco as an authoring environment.  We will define the structured data formats, and allow users to log in and make/edit entries.  No template work done in Umbraco.

    2) Create the appropriate views in the .NET site, pulling in data using the Umbraco API.

     

    Questions:

    Any pitfalls to look out for doing it this way?

    Any links to articles or howtos that go down this route?

    Additional thoughts?

     

    Thanks!

  • Sascha Wolter 615 posts 1101 karma points
    Aug 16, 2010 @ 20:38
    Sascha Wolter
    0

    Hi swc,

    my 2 cents: I think this should work quite nicely. You can access the content of an Umbraco system from .Net pretty quickly by just accessing the xml cache. So using Umbraco just as an authoring environment will definitely work. There are a couple of questions though:

    - I don't know exactly but my guess is you would have to create 2 web application, so they wouldn't be sharing the same environment so you can't just access the cached content. You would probably have to implement a web service layer and grab the content from it. All fine and will work quite okay, however is another layer which will decrease performance a bit.

    - Just using Umbraco as an authoring system seems, well, kind of a waste. I completely understand that you have your MVC app already in place and obviously don't want to do the work twice/again, yet I would think very hard about this, at least if there is a way forward that will in the end have only one system (meaning Umbraco). Especially with Umbraco's flexibility of just plugging in a couple of .Net controls with which you then can do pretty much whatever you want it might make sense to think about a complete move. I have build a half-and-half solution a good year ago, it was a custom ASP.Net solution though and not MVC, so we basically created an Umbraco installation and added the pages we wanted to keep separate to the application without any problems.

    Hope my 2 cents will help you a bit,
    Sascha

  • swc 7 posts 27 karma points
    Aug 17, 2010 @ 18:45
    swc
    0

    Hi Sascha, thanks for the input.  Given how things stand right now, we feel like this is the route that makes the most sense at this point.  It allows us to quickly add the authoring front end and gain experience with Umbraco.  We may very well convert the whole site down the line, but there isn't a need for it now. 

    The plan is to have a vanilla Umbraco install set up, and turn on web services.  The existing site could then pull in the data via the web service call. 

    What I'm finding is that the webservice calls are pretty limited, compared to the access available within the Umbraco install itself.  I was wondering if there are any ways to query directly against the Umbraco db/cache from an external web app to gain some more of that capability.  If anyone can direct me towards additional info in that regard, it would be useful.

     

  • Sascha Wolter 615 posts 1101 karma points
    Aug 17, 2010 @ 19:04
    Sascha Wolter
    0

    Hi swc,

    What I am doing on a pretty regular basis is write my own web services which then get plugged into the Umbraco installation. This is the best way to my knowledge to access the cache directly and direct the data outside of the installation. To let your own web service run inside of Umbraco all you need to do is copy the asmx file into /umbraco/webservices (not necessarily though it makes sense to stick them all together) and the dll file into the /bin directory, and there you go. You can obviously hook it up to the internal authentication system and add your own configuration parameters to the web.config file (you'd have to make use of them yourself though, it's not out of the box).

    Hope that is the answer you're looking for,
    Sascha

Please Sign in or register to post replies

Write your reply to:

Draft