Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Jul 12, 2011 @ 00:50
    Gordon Saxby
    0

    Is there a process to introduce uSiteBuilder mid-project?

    I have a project which is under development (in Visual Studio) but not currently using uSiteBuilder. Is there a process or set of steps to allow the introduction of uSiteBuilder without having to start the project again?

     

  • Sasa Popovic 77 posts 367 karma points
    Jul 12, 2011 @ 09:00
    Sasa Popovic
    0

    Gordon, you can just follow the steps from our tutorials (http://usitebuilder.vegaitsourcing.rs/tutorials) with a few changes:

    • if you already have a Visual Studio project for your website then skip creation of a new project/solution and just add reference to uSiteBuilder DLL in your existing web application project
    • you will have to code/type classes that represent your existing document types
    • you can optionally change existing implementation of templates that you have to use uSiteBuilder methods for retrieval of content; or you can leave existing implementation and implement new templates using uSiteBuilder and its helper methods
  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 09:38
    Rich Green
    1

    Hey,

    I've built an import tool built to convert an existing project to uSiteBuilder, it's rough but it works fine.

    Basically it converts all existing DocTypes & Templates into the uSiteBuilder class files, is this what you need, or are you just talking about restructuring the VS solution?

    Might take me a little while to check it but let me know if you're interested.

    Rich

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 12, 2011 @ 10:23
    Gordon Saxby
    0

    Rich, yes that is what I mean ... I am currently using Visual Studio to write the XSLT, CSS, etc so need to create the classes to represent the doc types, etc.

    I'd be interested to see / try your import tool!

     

  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 11:38
    Rich Green
    0

    Hey Gordon,

    Hit me up on twitter and I'll work out a way of getting it to you.

    Rich

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 12, 2011 @ 11:57
    Gordon Saxby
    0

    I'm now following you ... if you follow me I can DM you!

     

  • Sasa Popovic 77 posts 367 karma points
    Jul 12, 2011 @ 13:25
    Sasa Popovic
    0

    Rich, we planned to make such feature part of uSiteBuilder but if you already made it maybe you can share it with community? It would be great if you would open-source it as a codeplex project.

  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 13:50
    Rich Green
    0

    Hey Sasa,

    Would be happy to share it, however it's in no fit state right now as it was a quick hack. I'm sending it to Gordon so possibly after that we can see if it's useful enough.

    I imagine your tool would a lot slicker and I know you mentioned Visual Studio integration, my 'tool' so far is simply some .net code that loops through the db and outputs a bunch of class files to a directory.

    Rich

     

     

  • Sasa Popovic 77 posts 367 karma points
    Jul 12, 2011 @ 14:07
    Sasa Popovic
    0

    Hey Rich,

    It sounds like your tool is doing exactly what it needs to do so I would suggest you think more about sharing it with others. Having it available in Visual Studio would be nice but it's not really necessary.

    Sasa

  • Rich Green 2246 posts 4008 karma points
    Jul 12, 2011 @ 14:16
    Rich Green
    0

    Hey,

    Cool, I'll look into it.

    I know one issue I had after I ran the script was that if there was an allowedTemplate and a default template, then the default template never got set?

    Something like that I can't remember 100%, do you remember what I was talking about, I think you said you were aware of it, is there a patch to fix this.

    Rich

  • Rich Green 2246 posts 4008 karma points
    Jul 14, 2011 @ 09:44
    Rich Green
    0

    I now have some code to send out if anyone else is interested, depending on feedback / testing I'll clean it up and get it up on here as a project and upload the source code somewhere.

    Rich

  • Gordon Saxby 1461 posts 1883 karma points
    Jul 14, 2011 @ 11:02
    Gordon Saxby
    0

    Hi Rich, I looked at the project last night ... and realised that it was MS SQL specific! The immediate project I have is based on MySQL ... I will see if I can make it work on both, although it will be a few days before I get chance.

     

     

  • Rich Green 2246 posts 4008 karma points
    Jul 14, 2011 @ 11:06
    Rich Green
    0

    Hey Gordon,

    Ahh, ok, we only use SQL Server.

    You could possibly do a conversion of your db to SQL Server just for the purpose of running the tool and then in theory you have the project set up (though no good if uSiteBuilder doesn't work with MySQL)

    Rich

  • Vladan Ostojic 94 posts 210 karma points
    Jul 15, 2011 @ 13:26
    Vladan Ostojic
    0

    Hi Rich,

    About defaultTemplate when AllowedTemplates is set - that's fixed. It's already on codeplex so if you need it urgently you can get and build new uSiteBuilder (v1.2) from source code. It's production ready already and we are now testing it the couple of projects. In the next week or two we'll release it officially.

  • Rich Green 2246 posts 4008 karma points
    Jul 15, 2011 @ 13:45
    Rich Green
    0

    Hey Vladan,

    Many thanks.

    I managed to get around it in the script by making sure the default template was listed first in the AllowedTemplates list as this set the default template too.

    I'll test the script against the 1.2 source and adjust if necessary.

    Cheers

    Rich

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 15, 2011 @ 16:54
    Gordon Saxby
    0

    I finally got round to fully trying this out over the weekend - the creation of Doc Types, etc works pretty well, but it did take quite a lot of effort to "import" these into the existing project, but I got it all working eventually!

    The website was already being developed in Visual Studio (master pages, css, XSLT). I used Rich Green's code to create Doc Types and Templates. I copied them into the project and ran StyleCop & ReSharper over the code.

    One issue was the "master" template was not created correctly, another was that the template names did not come out the same as the existing ones. There was nothing major to fix, it just took a few tries to find all the issues.

    Note: this was using a modified version of Rich's code to work with MySQL.

  • Rich Green 2246 posts 4008 karma points
    Aug 15, 2011 @ 17:03
    Rich Green
    0

    Hey Gordon,

    Glad you got it working.

    If there's any interest out there I'll get the fixes from Gordon (and the tidy ups...) and release it as a package.

    Rich

  • Barry Fogarty 493 posts 1129 karma points
    Sep 20, 2011 @ 15:51
    Barry Fogarty
    0

    Hey Rich, I am interested in this - have you got round to packaging it?  Otherwise send me over what you have and a few quick steps to get me started.  Happy to contribute to it if it still needs some work..

  • Rich Green 2246 posts 4008 karma points
    Sep 20, 2011 @ 15:54
    Rich Green
    0

    Hey Barry,

    Sure, I'll try to get the fixed code from Gordon, then I'll get it to you.

    Rich

  • Gordon Saxby 1461 posts 1883 karma points
    Sep 20, 2011 @ 16:09
    Gordon Saxby
    1

    Hi Rich, I will try and send it to you this evening, or tomorrow. I made some notes somewhere too ... I'll try and find them :-)

     

  • Rich Green 2246 posts 4008 karma points
    Oct 03, 2011 @ 12:34
    Rich Green
    0

    Hey,

    Barry if you can DM your email I'll get the code over (thanks Gordon).

    Rich

  • Neil Killen 17 posts 37 karma points
    Oct 13, 2011 @ 13:49
    Neil Killen
    0

    Hi Rich,

    Was wondering if you had got round to releasing this as a package?  Would really like to have a play with it...

    Neil

     

     

  • Rich Green 2246 posts 4008 karma points
    Oct 13, 2011 @ 14:02
    Rich Green
    0

    Hey Neil,

    Not as a package but I have something that works just about, hit me up on twitter and DM me your email and I'll get it over to you.

    Rich

  • Neil Killen 17 posts 37 karma points
    Oct 29, 2011 @ 23:39
    Neil Killen
    0

    Hi Rich,

    I'm following you on twitter can you DM or follow me?

    Neil

  • Rich Green 2246 posts 4008 karma points
    Oct 30, 2011 @ 09:59
    Rich Green
    0

    Hey Neil,

    Now following you, fire me a DM with your email and I'll get it over.

    I will just get around to releasing as a package on here!

    Rich

  • Murray Roke 503 posts 966 karma points c-trib
    Nov 21, 2011 @ 22:46
    Murray Roke
    0

    I've used Rich's tool, it works pretty well, I have issues because my template aliases have spaces but If I fix that up it works well.

    Cheers.

    Murray.

  • Rich Green 2246 posts 4008 karma points
    Nov 26, 2011 @ 13:44
    Rich Green
    0

    Released the code as a package, thanks to Gordon for some much needed refactoring and Murray for testing.

    http://our.umbraco.org/projects/developer-tools/usitebuilder-import

    Hopefully it should be of some use, I've not tested it in the latest uSiteBuilder but should be fine, or least a good base to tweak from.

    Rich

  • Sasa Popovic 77 posts 367 karma points
    Nov 27, 2011 @ 18:53
    Sasa Popovic
    0

    That's great Rich h5yr!

    I'll give it a try with one of our older Umbraco projects.

  • Gordon Saxby 1461 posts 1883 karma points
    Nov 29, 2011 @ 11:20
    Gordon Saxby
    0

    Hi Rich, you should mention on the project page that it works with MySQL databases too ;-)

    I have used it on 3 existing sites now (2 x MySQL, 1 x SQL Server) and it's great! There are lots of places where it could be improved and there is one issue I've noticed - but not debugged yet. However, it has saved me a MASSIVE amount of time - thanks again Rich!

Please Sign in or register to post replies

Write your reply to:

Draft