Updating to VistaDB Express 3.4

-   Feb 19, 2009 -   BlogEngine.NET, Development -   ,

As I’ve stated in the past, I use VistaDB Express to store the data for this blog. I really like the clean gui interface and the fact that it matches the SQL Server data types so well. It has been a pleasure to work with from my perspective. I have not taken the plunge and purchased a full license as I don’t need it.  I have been checking in on VistaDB’s blog and forums however.  They have been busy making updates and fixed a minor issue I had been having with the express edition.  While the progress was great news, it didn’t help me as the express edition hadn’t received any of these updates.  Finally, last week, just a few days as I was planning a workaround to my issue, the updated Express edition was released. Tonight, I finally got around to updating my blog from VistaDB Express 3.3 to 3.4.  The process was pretty simple. Backup your blog. Not really needed, but skip at your own peril. Download and install VistaDB Express 3.4 to get the updated VistaDB.NET20.DLL. Edit your web.config and change the VistaDB assembly from “3.3.1.54” to “3.4.2.77”.  My web.config had this in information in 4 places.  The DbProviderFactories section, the runtime section, and the system.web assemblies section. Upload and overwrite the edited web.config (root) and the VistaDB.NET20.DLL (Bin folder). There aren’t a lot of benefits to the this update that you’ll notice in BlogEngine.NET 1.4.5, but BlogEngine.NET 1.5 setup will be expecting the latest version in the default config.

 Thoughts on SQLite and VistaDB

-   Aug 04, 2008 -   Development -   ,

I started working with VistaDB Express this spring as a data backend to use with BlogEngine.NET.  I wanted to make a new data provider for a session I was giving at code camp and wanted to get familiar with a database I didn’t know.  I ended up choosing VistaDB because it looked interesting and because I found so little information about using it.  I also wanted to know why Telligent picked it for Graffiti over something else.  While I was considering what database to use, SQLite was recommended to me be two different people.  I had recently read a few articles on getting started with it.  It looked interesting and was the other choice I gave consideration to.  Since doing my talk and spending a nice amount of time working with VistaDB, I’ve also had a chance to work with SQLite a bit and thought I’d share my thoughts on the two databases.  Both SQLite and VistaDB Express are lightweight file based databases that work very well.  They are similar but different enough that there are a few things to consider when thinking about them.  Both have .NET support via ADO.NET data providers and I’ve had no problems with either of them.  Both are small in size and in the small data sets I’ve worked with both have performed very well.  (I read somewhere that SQLite performs better with larger data sets, but I’ve never seen any real stats on the matter.)  SQLite and VistaDB both have nice GUI admin tools available to work with and both databases have been easy to use overall.  Both have small runtimes, work in mono, and support transactions, I believe as well.  Now onto the differences…  Cost SQLite is free to use for any purpose.  VistaDB is a commercial product and VistaDB Express is a free for non-commercial use product that requires a link back to the company.  This is a huge difference for some people and is the main strike I have against VistaDB.  If I had a paid commercial product however, the cost of VistaDB is minimal enough that I would not let it sway me too much.  For my personal consulting work, I’m not too excited about the $299 price.  VistaDB Express is a nice alternative for non-commercial use, but the required link isn’t ideal for every circumstance.  (You’ll notice I have the link in the footer of my blog.) Data Types I’ve found that VistaDB mirrors SQL Server’s data types very well.  Since I’ve done most of my database work using SQL Server, this suits me very well.  SQLite is more similar to MySQL as far as that goes.  I’m not a MySQL expert (or to be honest even a fan) so take that with a grain of salt.  There is nothing wrong with the data types being different, they just are and it is a distinction.  For me, I’m more comfortable with the SQL Server similarity, but I will freely admit it is a minor issue. Scripting Both SQLite and VistaDB support most of the standard SQL I’ve run against them.  I recently noticed that SQLite did not support the ability to change a column in a table via ALTER TABLE which I found to be a bit of a nuisance.  (It seems lame to tell BlogEngine.NET users they have to manually change a data type in a table in the new upgrade.)  Other than that however, I’ve had no issue with either one. GUI differences As I said earlier, both SQLite and VistaDB have nice GUI admin tools.  As an open source product with a big following, SQLite has a few GUI admin tools to choose from.  I personally have only ever tried SQLite Administrator.  I have no idea if there are better tools so what I say is based on my work with this tool.  From a functionality perspective, I’ve been able to do basically what I’ve needed to do in both interfaces.  I can honestly say they are both fine tools for the job.  That said, I much prefer my SQL Server Management Studio to both of them.  Just as in the data types though, VistaDB’s Data Builder tool is a little more SQL Server like.  The look is more similar as is the organization.  It felt a little more comfortable to me as it was more like what I’ve been using for years.  I particularly liked the Data folder under each table for getting to my table’s data quickly. There are a few quirks however including an annoying laptop issue.  (When I have a second display on my laptop, I often move the VistaDB window to the secondary display and close it from there.  When I next open it when the second display is not connected, it opens off the screen and I need to edit the registry to bring back over.) As I said, the SQLite admin tool was very nice too.  While the look and organization was a bit different, the Edit Data tab in the query area is very nice.  It is a handy way to edit and view/filter data.  There was also a possibly helpful export to excel option easily available.  The interface didn’t seem to have as many quirks but I have spent less time in it.  I found an oddity with editing a table, but it was very minor. Encryption One other thing of interest that I found was that VistaDB has an encryption option which will encrypt your database with a password.  In a file based database, this seems nice.  I didn’t see that SQLite had this built in, but I could be wrong about it.  I did see some commercial tools to help with this though. Documentation I’ve spent only a little bit of time searching for documentation, looking for examples, and reading forums for each of these products.  My little experience however tells me that SQLite has VistaDB beat in this area.  My google searches regarding SQLite usually brought me right to what I needed and likely had the answer below it as well. I found a bunch of getting started guides for SQLite and nothing for VistaDB Express besides what comes in the download. It wasn’t hard to get started with VistaDB however, but a bit more information would have been nice. Summary As you might guess from my notes above, I have a slight preference for VistaDB overall.  The cost of VistaDB is an issue and the express version is not an option in many situations you find yourself building software.  There were a number of small things I liked better about VistaDB though and they add up.  The information out there on the web about VistaDB is lacking however.  Hopefully, this will improve with time. SQLite is very solid and other than the ALTER TABLE issue, I’ve really enjoyed using it too.  It has many things going for it.  I know I can pick up a mac admin tool and as I have a MacBook Pro, this might be a nice option down the road. Both options are very good and I’ll likely be using both in the future.

 Using VistaDB Express with BlogEngine.NET 1.4

-   Jul 03, 2008 -   BlogEngine.NET, Development, Screencasts -   , , ,

Now that the latest version of BlogEngine.NET is out, it is easier than ever to get your blog running with VistaDB Express.  I’ve been using VistaDB Express with BlogEngine.NET for a little while now and just love it.  I’ve become a fan of the lightweight, file based database for a single user blog.  I think it is a perfect way to store your blog data.  Enough of my gushing already, let’s get on the real info. Getting BlogEngine.NET 1.4 to work with VistaDB is super easy, but will require you to upload a few more files.  I’ve put together a new screencast that will walk you through the steps, show you exactly what to do and what changes are being made. It is incredibly simple however.  You simply download the BlogEngine 1.4 VistaDB Express Pack, unzip it, upload 3 files, and enjoy the goodness that is VistaDB Express and BlogEngine.NET 1.4.  In the screencast, I also take a little time to walk you through the main changes made to the web.config to make this work. If you are starting a new BlogEngine.NET blog, I strongly recommend it.  If you already have a BlogEngine.NET blog and want to convert over to it, I’ll get to that soon.  I promise. :)

 BlogEngine.NET VistaDB Providers update

-   May 28, 2008 -   BlogEngine.NET, Development -   ,

I found a small bug in my initial release of the VistaDB providers DLL that I released on Friday.  I have made the correction and updated the download.  If you are already using the VistaDB provider, it is only the BlogEngine.VistaDB.dll file that needs to be updated in your site. Please download the latest version to get the update.

 Using VistaDB Express as your BlogEngine.NET back end

-   May 23, 2008 -   BlogEngine.NET, Development -   ,

It is a day later than I had hoped, but I now have my blog running with a VistaDB back end.  I'm thrilled. I've never been a huge fan of putting my personal blog data in SQL Server and I feel free. I had never intended to move my data to VistaDB Express when I started work for this presentation a few weeks ago, but after working with it for a while and making the providers, I realized I really wanted to use it for my data storage.  VistaDB has a lot going for it as it is managed code, runs in medium trust, runs on mono and is very lightweight.  I'm really most pleased with the xcopy deployment and the nice graphical management tool.  I have heard from others that speed might be an issue, but it seems fine with the small tests I've run.  Inside BlogEngine with the caching we do, I don't see it as an issue. As I was making some small changes to the code to make it more secure and getting it ready to make available, I decided to go for it.  I fired up my rough migration tool, made a few small changes, and I had a complete copy of my blog posts, pages, comments, settings, and other stuff in a VistaDB database.  I had to manually add my user name in, but since I'm single user it was no big deal.  My small blog database is less than 1 MB and even easier to copy around than a few directories full of XML files. If you are interested in playing around with it, or following in my footsteps to using VistaDB Express for your blog data, I'm making it all available now.  Complete with instructions.  If you wish to use it, you are required to meet the license agreement of VistaDB Express which states that it is for non-commercial use.  (If you are a commercial operation, you can purchase VistaDB and then use it with BlogEngine without restriction.) Download this file: BlogEngine131VistaDB33.zip Unzip the file and place the 2 dll files in your blog's bin folder.  (Note: one is the VistaDB Express dll and one is the BlogEngine VistaDB providers.) Place the BlogEngine.* files in your blog's App_Data folder.  These 2 files are your initial VistaDB database. Make changes to your web.config to let BlogEngine know to use VistaDB.  I've included samples of the relevant areas below. As per the VistaDB Express license, you should place a link back to VistaDB somewhere on your blog.  (I placed mine in my footer.)   Near the top of your web.config

<BlogEngine>
<blogProvider defaultProvider="VistaDBBlogProvider">
<providers>
<add name="XmlBlogProvider"
 type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
<add name="MSSQLBlogProvider"
 type="BlogEngine.Core.Providers.MSSQLBlogProvider, BlogEngine.Core"/>
<add name="VistaDBBlogProvider"
 type="BlogEngine.Core.Providers.VistaDBBlogProvider, BlogEngine.VistaDB"
 dataSource="~/App_Data/BlogEngine.vdb3"
 password="" />
</providers>
</blogProvider>
</BlogEngine>
Down under system.web

 <membership defaultProvider="VistaDBMembershipProvider" >
<providers>
<clear />
<add name="XmlMembershipProvider"
type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core"
description="XML membership provider"
xmlFileName="~/App_Data/users.xml"/>
<add name="VistaDBMembershipProvider"
type="BlogEngine.Core.Providers.VistaDBMembershipProvider, BlogEngine.VistaDB"
dataSource="~/App_Data/BlogEngine.vdb3"
password="" />
</providers>
 </membership>

 <roleManager defaultProvider="VistaDBRoleProvider"
 enabled="true"
 cacheRolesInCookie="true"
 cookieName=".BLOGENGINEROLES">
<providers>
<clear />
<add name="XmlRoleProvider"
type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core"
description="XML role provider"
xmlFileName="~/App_Data/roles.xml"/>
<add name="VistaDBRoleProvider"
type="BlogEngine.Core.Providers.VistaDBRoleProvider, BlogEngine.VistaDB"
dataSource="~/App_Data/BlogEngine.vdb3"
password="" />
</providers>
 </roleManager>
 
That is it.  If you are interested in checking out the VistaDB database or want to encrypt the database with a password, you can download VistaDB Express.  (User passwords are encrypted inside the database in the User table, but you can encrypt the whole file if you'd like.)  The initial database has the default settings and the initial welcome post you come to expect.