Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Moving from DBVT-Think to DRIVE-Think

Any of you who go back with me are very accustomed to seeing "DBVT" code samples, like when I posted about CSTiers, an early version of what would become the Drive Template Library for Community Server.

DBVTUser user = DBVTContext.Current.DBVTUser;
if (user.IsInBillingGroup)
    do something...

or

DBVTConfiguration dbvtConfig = DBVTConfiguration.GetConfig();
image.ImageUrl = Globals.ApplicationPath + "/images/" +
     dbvtConfig.UploadImageFileName;


When I decided to package my CodeSmith CS templates as Drive I replaced all DBVT references in the template library with "DRIVE."  Now that Drive has been released and I'm working with the actual framework every day, I feel it's time I moved away from using DBVT as well.  It's time for DRIVE.

Using examples of Drive code here and on the Drive site blog instead of DBVT is basic Marketing 101.  Coding with Drive references and in DRIVE-think will also most likely result in more frequent posts to the Drive blog with samples of the framework in action.

Below is a screenshot from a Community Server project that I transitioned to DRIVE-think.  Needless to say, there were a lot of DBVT files and references requiring update, both in the renamed "DRIVE" class library and in the Web project.  To update the client website files I used WinMerge's excellent diff ZIP function to zip-up the changed files only.

In DRIVE-think, the old DBVT code excerpt becomes

DRIVEUser user = DRIVEContext.Current.DRIVEUser;
if (user.IsInBillingGroup)
    do something...

or

DRIVEConfiguration driveConfig = DRIVEConfiguration.GetConfig();
image.ImageUrl = Globals.ApplicationPath + "/images/" +
      driveConfig.UploadImageFileName
;


Comments (6) | Post RSS RSS comment feed

Posted on 11/16/2008 9:44:13 AM by Dave Burke
Categories: CodeSmith | Community Server | Drive
Tags: No tags for this post

Related posts

Comments

11/17/2008 4:41:40 PM Permalink

Trackback from Blog

Drive v1.0.2 with Content Fragment template available

Blog |

11/18/2008 3:28:16 AM Permalink

Cool stuff, Dave!

Rob Howard United States |

11/18/2008 8:24:02 AM Permalink

Rob, thanks for visiting and the positive word.  Community Server and CodeSmith are definitely two great tastes that go well together.

Dave Burke United States |

12/2/2008 8:40:20 AM Permalink

great dave, but when I see code in your post, I think I got headache,might be to much code for today Laughing

Busby SEO Test United States |

12/2/2008 8:43:38 AM Permalink

DavidH,  Sorry for the code-strain, bud.  Yeah, there are a lot of better ways to insert code in blog posts now, but old habits.  I'll try to keep the code to a minimum. Thanks for the comment.

Dave Burke United States |

12/8/2008 2:22:54 AM Permalink

Hi Dave,
you could try SyntaxHighlighter by google - it makes code very easy to read and it's easy to add to your blog.

Web site monitoring United States |

Comments are closed

This site was built with the Sueetie .NET Open Source Community Framework. Learn more about Sueetie at Sueetie.com.