Copied to clipboard

Flag this post as spam?

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


  • wolulcmit 357 posts 693 karma points
    Jan 12, 2011 @ 19:49
    wolulcmit
    0

    One for the karminator.

    this is a bit of a random stab in the dark...

    I am trying to integrate some 3rd party code into Umbraco, I guess not too dis-similar from what Matt Brailsford did did with nopCommerce at the Umbraco UK Festival last year.

    I've copied over everything needed from my 3rd party app and merged the web.config's it's all good. I can now run my 3rd party app's aspx pages if I add them as exceptions in the umbracoreservedUrls'

    trouble I run in to is when I try and re-create the 3rd party aspx code from Umbraco. What are the steps required to do this exactly?  can anybody help? I've tried looking at the NopCommerce code that Matt supplied and it looks like he wrote his own dll as a go-between bewteen the two systems, which might be a bit beyond my feeble powers. 

    just asking out of curiousity really.

    - Tim

     

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 13, 2011 @ 02:54
    Aaron Powell
    0

    what do you mean by '3rd party aspx code'?

    Depending on what level of integration you want between Umbraco and the third-party system you will probably have to write some .NET code

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 13, 2011 @ 12:20
    Matt Brailsford
    0

    Hey Tim,

    I take it you mean converting the static .aspx pages into templates / nodes in umbraco?

    Really, it should be pretty straight forward in that you just create a master page for each .aspx page which will become a template, which you can then use to create a node with. In my example, I copied all the code behind into script tags in the MasterPage, but you could just as easily give your MasterPage files code behind files, and just copy any code across. The only problems I had with the nopCommerce convertion was when the code contained Page specific functionality, as MasterPages and Pages function differently. For the majority of the time though it was just a case of referencing the .Page property of the MasterPage. You can then just drop on macros and items as usual.

    The nopCommerce integration was a fairly simplistic one (ie, just converted all the pages to templates) but you could go further and break it up into macros, but this might depend on how your 3rd party app is architected.

    I shouldn't really have any special DLLs, it really was just copying and pasting, and fixing the Page to MasterPage issues.

    Matt

  • wolulcmit 357 posts 693 karma points
    Jan 13, 2011 @ 17:45
    wolulcmit
    0

    Hey Matt, 

    Yep, Exactly... its the conversion of static .aspx pages to templates/nodes in Umbraco that I'm having trouble with.
    I noticed in your solution your pages inherited your own UmbNop.Web.BaseNopPage rather than the NopSolutions.NopCommerce.Web in nopCommerce.
    I guess this is where the magic happens (I also am probably not going to have the luxury of access to any pre-compiled code-behind, so I might just have to stick to the static pages.)

    Thanks for the tutorial by the way, it's really helpful to know how Umbraco can work alongside another .net-project

    - Tim

     

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 14, 2011 @ 09:41
    Matt Brailsford
    0

    Hey Tim,

    Yea, the custom UmbNop.Web.BaseNopPage should just be a base class in the App_Data folder. Again, this only really exists as the one that comes with nopCommerce inherits from Page, which I obviously can't have when converting it to MasterPages, so it's pretty much just a straight copy, with a few things changed to allow it to work with MasterPages. There isn't really any "Magic" going on.

    If you don't have access to the source, you can always use Reflector to take a look under the hood and copy out anything you need

    http://www.red-gate.com/products/dotnet-development/reflector/

    That being said though, if you know you don't need to add any content managed areas to these pages, it may be eaiser just to leave as they are (there is nothing stopping you having these use a root umbraco master page to at least inherit the HTML markup, making them a little easier to maintain).

    All the best

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft