This site uses cookies. By continuing you accept the use of cookies.I Accept

At Mindbite we develop web applications and websites using SiteFactory CMS as a content engine. In almost every project we develop custom modules or enhancements that extend the existing features of the system. For every module we create Class Libraries with objects reflecting the contents of each project’s database. All SiteFactory CMS websites use Microsoft SQL Server as a database server, and when the solution is hosted at Mindbite we specifically use Microsoft SQL Server 2008 R2 which is a fast and powerful database server.

We have a saying at Mindbite that we never do the same thing twice, and to live up to that we have different methods. For one, code re-use is a major part of our work method, as I’ve written about earlier. A more concrete way of incorporating this is our own tool Mindbite Code Tools.

Mindbite Code Tools is a Windows application designed to perform recurring time consuming tasks in just seconds. The smallest feature is a SQL Query parser that parses queries cutting off unnecessary query data. Another tool takes a list of privates and creates a set of properties in c# or vb. The major tool is a Class Library Builder which is kind of an Entity Framework lite.

Class Library Builder

The Class Library Builder (or as Microsoft should have shortened it; CLB) lets our developers connect to any Microsoft SQL Server and retrieve a list of databases. When selecting a database the user is presented with a list of tables. From here the user selects a table and specifies a Class Library name and in less than a second the builder sets up a new Class Library in c# or vb that contains:

  • Proper Namespace references.
  • An “Item” class containing:
    • Fields for all columns in the table.
    • Properties for all columns in the table.
    • Several useful constructors (based on our development model)
    • Fully functional methods for saving changes to the database (INSERT, UPDATE & DELETE).
    • All data input/output is automatically configured with the SiteFactory CMS Data Access Layer.
  • A class containing an “Items” property which is a List of Item.

The code that is generated is ready to use instantly, without any compilation errors.

The Class Library Builder is used on a daily basis by our developers, and it saves us a lot of time and money for our customers. Instead of doing the same thing twice in every project we can focus on what really counts, and that is creating smart solutions for the customers.

Closing comments

Before Mindbite Code Tools we spent hours creating the same kind of code structure in every project. Now, we don’t have to, and I couldn’t work a single day without this tool. Code Tools has been a part of our work method for a few years now and it’s being enhanced regularly. And for every new feature we get to focus on the things that matter.

Post a comment

Post a comment