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?
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
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, 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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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.
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..
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!
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?
Gordon, you can just follow the steps from our tutorials (http://usitebuilder.vegaitsourcing.rs/tutorials) with a few changes:
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
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!
Hey Gordon,
Hit me up on twitter and I'll work out a way of getting it to you.
Rich
I'm now following you ... if you follow me I can DM you!
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.
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
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
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
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
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.
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
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.
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
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.
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
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..
Hey Barry,
Sure, I'll try to get the fixed code from Gordon, then I'll get it to you.
Rich
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 :-)
Hey,
Barry if you can DM your email I'll get the code over (thanks Gordon).
Rich
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
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
Hi Rich,
I'm following you on twitter can you DM or follow me?
Neil
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
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.
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
That's great Rich h5yr!
I'll give it a try with one of our older Umbraco projects.
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!
is working on a reply...