CodeSmith Community
Your Code. Your Way. Faster!

NetTiers customization?

Latest post 02-15-2007 9:10 AM by Pluginbaby. 6 replies.
  • 02-08-2007 1:38 PM

    • Pluginbaby
    • Top 500 Contributor
    • Joined on 01-24-2007
    • Montreal, Canada
    • Posts 17
    • Points 385

    NetTiers customization?

    Hi,

    I'd like to know the best way to customize the templates.
    I want to add some actions during the generation, creating web folders, etc...
    But I want to be able to update the templates with the latest version of NetTiers without loosing my changes.

    Are there any recommandation for that ?
    For example can I add a property in an external file (without editing netTiers.cst) ?
    Or maybe the solution is to create a whole new cst for my needs and add it to a csp project file containing NetTiers.cst, then run NetTiers.cst + run my template ?

    Thanks for your help.

    Laurent Duveau MVP ASP.NET
    • Post Points: 35
  • 02-12-2007 8:40 AM In reply to

    • Pluginbaby
    • Top 500 Contributor
    • Joined on 01-24-2007
    • Montreal, Canada
    • Posts 17
    • Points 385

    Re: NetTiers customization?

    Hi,

    Nobody has an answer for this ?
    Maybe just a link..?
    What's your experience with NetTiers customization and how do you deal with updates and keeping your changes ?

    Thanks to share.

    Laurent Duveau MVP ASP.NET
    • Post Points: 5
  • 02-12-2007 10:09 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: NetTiers customization?

    My advice would be to try and keep your customisations to a minimum.

    I manually hack the templates and keep a log of what I've done so I can reapply it the next time I get a new copy of the templates.  Generally my hacks have been either to fix bugs (which are quite often then fixed in SVN) or to the admin website (which I don't update from SVN anymore).  It's not very rocket science, but I try not to change too much and its relatively quick.

    Whist in the main development phase of my current project I would refresh my changes from SVN every couple of weeks and then reapply my changes, but now I'm at a stage where I need stable consistent generations so I've frozen the templates I use apart from any urgent bug fixes (which have been almost non existent!).

    I'm sure I'll be at a stage soon where I can get the "latest and greatest" but I'll just have to reapply my hacks again.

    If you want to do things like creating folders and other environment/system type tasks you might be better wrapping the gen in a NAnt or MSBuild script where you can do pretty much what you like.

    What do you mean by "Can I add a property in an external file"?

    Your last suggestion may be the best route to go if you're going to make many changes.

    hth

    swin 

     

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 02-12-2007 3:32 PM In reply to

    • JJmartin
    • Top 25 Contributor
    • Joined on 05-22-2006
    • Phoenix, AZ
    • Posts 164
    • Points 3,275

    Re: NetTiers customization?

    I also do similar to swin.  I have bug fixes and a few customizations.  SVN is fairly good at leaving my changes in when I merge, but I leave a comment in the files at each change so that I know where it was and what it was doing.  I generally have to manually merge several files when i update netTiers through SVN.
    -Jeff Martin C# MCSD
    • Post Points: 35
  • 02-13-2007 8:20 AM In reply to

    • Pluginbaby
    • Top 500 Contributor
    • Joined on 01-24-2007
    • Montreal, Canada
    • Posts 17
    • Points 385

    Re: NetTiers customization?

    Hi guys,

    Thank you very much for sharing.
    My goal is just to add some customizations, mainly for the website project generation, the other layers are good as is for me.

    > swin: what I mean by "Can I add a property in an external file"? is I'd like to have some custom properties in the NetTiers template like "11 - Use company skin file" but not having to define it in NetTiers.cst then I can update this one without having to add again my property. But I did not manage to do that.

    In fact I wanted to be sure if there is a better way than update templates with latest version and manually reapply my changes each time which I found painful and dangerous!

    I do not use SVN for now, does it have merging options ?

    Laurent Duveau MVP ASP.NET
    • Post Points: 35
  • 02-14-2007 8:08 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 922
    • Points 34,710

    Re: NetTiers customization?

    I agree with you that making manual updates is painful and dangerous, but I'm not sure what the alternatives are.

    Maybe with your option (Use Company Skin file) you could make it more generic and perhaps submit a patch so maybe it'll make it into NetTiers proper?

    swin 

    ------------------------------------------------- Member of the .NetTiers team -------------------------------------------------
    • Post Points: 35
  • 02-15-2007 9:10 AM In reply to

    • Pluginbaby
    • Top 500 Contributor
    • Joined on 01-24-2007
    • Montreal, Canada
    • Posts 17
    • Points 385

    Re: NetTiers customization?

    Hi,

    My website template has too many customizations and would change often, so I'll go with a VS Project Template, and disable website part generation from NetTiers. I think this is the best solution for me.

    Laurent Duveau MVP ASP.NET
    • Post Points: 5
Page 1 of 1 (7 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems