Copied to clipboard

Flag this post as spam?

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


  • andles 44 posts 64 karma points
    Sep 28, 2010 @ 12:07
    andles
    0

    Non umbraco website using Umraco data access

    Hi - hopefully a simpel one:

    I haev used umraco to create the admin interface for a survey tool. Users can log in and create surveys, view survey reports and such. But the webiste(s) that end users will use to fill out those surveys will NOT be an Umraco website.

    I assume that these seprate websites will need to reference the umraco api dll's and somehow specify the location of umraco, and can leverage the data and objects I have created. My question is a) is this correct and perfectly fine to do, b) is there a particualr best practice way to do this, and c) how do I do this - I think I see which apis I need to reference but not really sure how to specify the Umraco location (is it as simple as the db connection string??)

    Cheers,
    Andles.

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Sep 28, 2010 @ 14:55
    Lee Kelleher
    0

    Hi Andles,

    I would recommend looking at using /Base:

    http://our.umbraco.org/wiki/reference/umbraco-base

    /Base provides a REST interface for Umbraco - so you could easily write a set of methods that could read/write the survey data.  Also because it's REST, you don't need to worry with the language/technology of the 3rd-party website, (i.e. PHP, Perl, Java, etc.) As long as it can do HTTP GETs/POSTs then its easy to integrate with.

    Best of luck!

    Cheers, Lee.

  • andles 44 posts 64 karma points
    Sep 29, 2010 @ 02:35
    andles
    0

    Thanks Lee - the API I have created for working with the data is fortunately designed such that is has a nice data aaccess layer I acn hopefully just switch out for one that gets its data via BASE. I am yet to look at BASE fully, but if it supports the calling of methods at the Umbraco end, then this indeed could be the solution.

    That said, is what I suggested above also possible?? Thsi may be preferable as short term solution, or even a full blown solution is soem situations??

    Thanks Lee  - I will investigate this and come back and tick this off as the solution.

     

  • andles 44 posts 64 karma points
    Sep 29, 2010 @ 03:23
    andles
    0

    Ok - so BASE has a few shortcomings for my solution. To note that the website that will presenting the surveys will be running on the same IIS server as the Umraco site (the site used to create the surveys). I'd really need to be able to work in regaular C# as opposed to doing these network calls and xml processing.

    So I guess back to the original question as to wether or not I can , from this non umraco site, drop in some Umraco dlls and soemhow make them aware of the Umraco installation to use?? My initial tries at this have failed, but I think becuase I'm not quite getting it right w/r to what is required.

     

    Cheers,

    Andles...

  • andles 44 posts 64 karma points
    Sep 29, 2010 @ 07:45
    andles
    0

    FYI: The problem I seem to be having is that in the seperate website, after importing the cms, businesslogic dll's andmy own dll which resides in the Umraco site, I think there is some confsion around which member providers are used. That is, the providers seem to be based on those sepcified in my local website config and NOT the ones in my Umraco website.

    This makes sense of course, but I am not sure how to overcome it. Even changing the provider names is of no use, becuase this site is still looking at what is loaded in its own context??

    (A part fo what happens in teh Umraco site, and my api that resides within, is the creation of members)

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Sep 29, 2010 @ 09:43
    Lee Kelleher
    0

    Hi Andles,

    I guarantee you, the time and effort you are going to put into trying to reference the Umbraco assemblies and getting them to work in the external websites, you could have wrote a small C# wrapper to make the calls to /Base and process the returned XML.  There might be a small learning curve, but it would be worth it!

    By trying to reference the Umbraco assemblies - you are correct about the context.  You'll end up having Umbraco installed on each external website instance, but pointing it back to target (master) database.

    Alternatively, you could develop a web-service (SOAP) interface along side the Umbraco website.  Reference the WSDL in your external website ... and then you'll be working in C# completely - as .NET will take care of all the XML/SOAP serialization.

    Good luck, Lee.

  • andles 44 posts 64 karma points
    Sep 29, 2010 @ 09:51
    andles
    0

    Hi Lee,

    I arrived at that conclusion about an hour ago actually - the time and effort that will be required is becoming quite clear to me now!! I pretty much see why this is so at this point, which is useful in itself. Basically, Umbraco is pretty much tied its own HttpContext which makes it less than ideal to approach in the way I had wanted to....oh well, you live and learn.

    Yes, this will be have to be a base or web service solution.

    Thanks for taking the time to look at this...

    Andles

     

Please Sign in or register to post replies

Write your reply to:

Draft