Click here to Skip to main content
15,886,519 members
Articles / All Topics

A Programmer's Guide to Starting a Software Company and Building an Enterprise Application - Article 1

Rate me:
Please Sign up or sign in to vote.
4.19/5 (64 votes)
25 May 2009MPL7 min read 139.4K   192   79
A Programmer's Guide to Starting a Software Company and Building an Enterprise Application

Introduction

This is the first in a series of columns in which I will tell you how I started SplendidCRM Software, Inc. I hope my entrepreneurial experience will inspire you as creating a company can be a wonderful adventure.

Article 1

I started SplendidCRM Software four years ago when I was between jobs (in other words, I was out of work). I was bored all day and was looking for something challenging to do. I read the latest trade journals, which included an announcement about SugarCRM, a new, open-source application. Since SugarCRM was an enterprise application and I was an enterprise developer; I immediately thought to myself, "I can do that, and it is a good match”.

The way I approach these kinds of projects is to assume that my efforts will not be wasted. Even if my software generates no revenue, I am certain to enhance my skill set, become a better developer, and become a more valuable employee for any future employer.

With SplendidCRM Software, the best part was that all of the application design was already done. Also, as long as I followed the terms of the original open-source agreement, I was free to use the existing artwork in my implementation. I did not have to think about the details of the product; I simply had to apply all of the skills that I had learned over my career as an enterprise-software developer.

By selecting a CRM, I had a really good feeling that there still were plenty of software challenges. By way of example, an enterprise company usually has offices all around the world. Its employees live in different time zones, speak different languages, and use different currencies. Most important, they all access the same CRM and all want the experience to be localized. Therefore, an enterprise product needs to:

  1. support multiple databases
  2. support multiple platforms
  3. support multiple languages, and
  4. support multiple currencies

On top of these four challenges for a global enterprise, the resulting system would need to be fast.

Let me repeat myself. I am an enterprise developer, so I selected an existing enterprise solution and set out to create an identical solution. If you are a games developer, consider creating a game. You don't have to design a new game; instead, just find an interesting, existing game and try to duplicate it. Chances are that in the process of creating an identical game, you will learn something new. In my case, SplendidCRM is not different in functionality from SugarCRM, but it is different in technology and I believe that it has a much better software design. I learned so many new techniques that I will have to save them for future articles.

I was lucky in that SugarCRM was developed using the LAMP stack and my skills were and still are with the Microsoft stack. In the end, each product - each based upon a different stack - behaved the same, but focused upon a completely different audience. Whereas a LAMP stack product would most likely be selected by a company with an investment in Linux servers, a Microsoft stack product would most likely be selected by a company with an investment in Windows servers.

The web is filled with these kinds of opportunities. For example, DotNetNuke is a Microsoft.NET-based web application that was partially inspired by another open-source, content-management system. Alfresco is a relatively new, open-source, content-management product that is just waiting to be re-implemented in .NET. There must be a lot of these types of opportunities out there.

With the economy down, a lot of people -- including programmers – are out of work. If you are currently out of work, I suggest that you take your free time to start a new project. With SplendidCRM Software, I did no market analysis and I did not research competitors. I simply started to create a similar product. (Fortune-500 companies do this all the time; for example, Chrysler invented the mini-van, which was so successful that, in a few short years, all the major car manufacturers started to produce mini vans.)

When you are out of work, you certainly need to spend time looking for a job. Being realistic, you are not going to look for work 8 hours a day, 5 days a week. Spend an hour or two every day looking for work, but then make certain that you spend the remaining time doing something that is productive, new, and enhances your skills.

The goal of this series of articles is to inspire programmers. In order to keep programmers interested in the series, I will include in each article a technical section that describes how or why I have applied a specific design strategy in SplendidCRM.

Use of GUIDs

SplendidCRM relies heavily on the use of GUIDs (Globally-Unique Identifiers) as its primary keys. I was introduced to the GUID more than 15 years ago while developing COM interfaces for Windows 95 applications, and I have been hooked ever since. A GUID is a 16-byte array that is typically formatted as a 36-character string.

When you have been developing enterprise applications for a while, you quickly realize the benefits of using GUIDs as primary keys, as opposed to integer primary keys. While it is true that an integer-only key takes only four bytes of storage, the difference between 16 and 4 bytes is insignificant in most applications today. (Read this.)

What is more important is that an ID can be assigned a globally unique meaning without there ever being a reason to reuse the ID. Integers do not have the same luxury. When integers are used as primary keys, it becomes difficult to determine what the value means. For example, is 2077 a customer number, an account number, a case number, or a bug number? It was interesting to see SugarCRM 1.0 start with integer, primary keys. Clearly the initial developers and architects of SugarCRM did not have experience with the development of enterprise applications; otherwise they would have used GUIDs from day one. (Read this.)

One of the best reasons to use GUIDs as primary keys is that data can be imported without having to re-key. You don't realize how important this is until you have to combine and validate two databases, each containing 50,000 records.

Once you adopt the GUID, you must treat it like a religion. And one sin that you should never commit is to place a non-GUID value inside an ID field. We saw this first hand with SugarCRM. Clearly they were not followers of the religion because they -- to this day -- mix GUIDs in the Team ID field. Heresy!

Imagine that two companies are merging and each has a CRM. If both use integer primary keys, then the merge would be painful because, for example, each system could have an account with an ID of 12345. To make matters worse, the same account ID could be referenced in 1000 locations within each CRM. Not only would the merge process need to replace the ID of 12345 by a GUID, but the process would also need to search and replace the 1000 references to the new GUID.

We experienced this problem first hand when a customer requested that we to migrate their SugarCRM database to SplendidCRM. SplendidCRM was specifically designed with a near-identical database schema in order to make this kind of migration simple. However, the use of non-GUIDs in ID fields required additional work. As part of the migration process, we had to scan every ID field in every table in the entire database and convert all integer keys to GUID keys. We also had to re-key the Teams table because the clever folks at SugarCRM saw fit to place the prefix “private” in the ID field.

To be fair, it is not SugarCRM’s job to ensure that it is easy for others to steal customers away, but I do not think that is what they had in mind with their flawed design. I conclude here that SugarCRM developers do not fully believe in the religion of GUIDs.

I now come to an end of our brief introduction to GUIDs. I have a whole series of articles -- of which this is the first -- planned.

History

  • 25th May, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Mozilla Public License 1.1 (MPL 1.1)


Written By
President SplendidCRM Software, Inc.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralTo state more precisely about GUIDs ... Pin
jovdb28-May-09 9:39
jovdb28-May-09 9:39 
GeneralRe: To state more precisely about GUIDs ... Pin
Paul Rony31-May-09 10:44
Paul Rony31-May-09 10:44 
GeneralRe: To state more precisely about GUIDs ... [modified] Pin
jovdb31-May-09 12:35
jovdb31-May-09 12:35 
GeneralRe: To state more precisely about GUIDs ... Pin
Member 961-Jun-09 20:54
Member 961-Jun-09 20:54 
GeneralRe: To state more precisely about GUIDs ... Pin
Member 961-Jun-09 20:46
Member 961-Jun-09 20:46 
GeneralRe: To state more precisely about GUIDs ... Pin
jovdb2-Jun-09 9:46
jovdb2-Jun-09 9:46 
GeneralRe: To state more precisely about GUIDs ... Pin
Member 963-Jun-09 8:08
Member 963-Jun-09 8:08 
GeneralRe: To state more precisely about GUIDs ... [modified] Pin
jovdb3-Jun-09 10:41
jovdb3-Jun-09 10:41 
John C wrote:
jvdb2508 wrote:
Okay, you do not agree, but why? And you think, that my idea is horrible - again: why? The only answer I can see is "your experience", something I will not deny.

If you re-read my message which you are replying to, you will see that I gave several concrete real world examples why I think this is a bad idea.


I can't agree and I think, that you were arguing against the use of 'identification codes' as internal key, which is responsible for any process of data logic. Be sure, that the user entered unique icd is only used for matching data from different sources.

Who else, but the user can decide, whether two records from different sources, shall henceforth exist side by side or which one of them will survive while the other one will die. I like to give the user the tools and he has to handle them carefully and responsibly.

Our biggest customer uses our enterprise application to create monthly time schedules for 2,000 stuff members. There are 50,000 entries per month, wheryby each entry is linked to at least 9 master data tables in up to 4 levels. The entries are partially exported for time recording machines and partially imported back with corrected starting times and durations. Observing and clearing the time schedule - gross wage reports and invoices - will produce many additional records, because each entry is splitted into parts where each part is waged or invoiced different. At least the data is aggregated and exported for additional processes (net wage, payments, accounting, ...). All in all - including workflow management - we have 600,000 records per month, 8 millions per year.

The difference between processing integers or guids can not be recognized with a small amount of data. But in our scenario, preparing the reports - not the printing itself - and other daily tasks like searching a substitute for an omitted employee who is available and qualified to do the job was increased up to the factor 8 after we have replaced the not even sequential guids with integer primary keys. Especially the algorithm, which fills up to 80% of the time schedules handling user preferences and specifications, stuff qualifications, and minimizing costs and thereby maximizing earnings benefits from integer primary keys. And when a user is working on a time schedule, he wants to see the impacts of his planning immediately. It depends on the complexity of the queries, the number of linking levels, the overall amount of data. If your application potentially/eventually has to handle more than half a million records per month sometimes, I advise not to start with guids.

Some of our customers use a distributed database system. That's where we revert to Sql Servers built in replication capabilities, and where the database itself has added the indexed rowguid columns. Of course we provide the user with the functions to detect and handle duplicates. For automated replication guids are somehow essential, but not as the primary key in every table.

That's my experience, which is contrary to your's, isn't it? I cannot say, which of our experiences is more valuable, but be sure, that I do not work in a sandbox. Wink | ;-)

Best regards
Joachim van de Bruck

modified on Thursday, June 4, 2009 2:23 AM

GeneralRe: To state more precisely about GUIDs ... Pin
cwienands9-Jun-09 13:19
cwienands9-Jun-09 13:19 
GeneralRe: To state more precisely about GUIDs ... Pin
jovdb9-Jun-09 16:45
jovdb9-Jun-09 16:45 
GeneralAnother cautionary note on GUIDs Pin
Tom Lessing28-May-09 2:38
Tom Lessing28-May-09 2:38 
GeneralRe: Another cautionary note on GUIDs Pin
Paul Rony28-May-09 8:49
Paul Rony28-May-09 8:49 
GeneralRe: Another cautionary note on GUIDs Pin
Tom Lessing2-Jun-09 4:54
Tom Lessing2-Jun-09 4:54 
GeneralRe: Another cautionary note on GUIDs Pin
Member 961-Jun-09 20:32
Member 961-Jun-09 20:32 
GeneralRe: Another cautionary note on GUIDs Pin
FOCUSPortals.com2-Jun-09 0:34
FOCUSPortals.com2-Jun-09 0:34 
GeneralRe: Another cautionary note on GUIDs Pin
Tom Lessing2-Jun-09 3:48
Tom Lessing2-Jun-09 3:48 
GeneralRe: Another cautionary note on GUIDs Pin
Tom Lessing2-Jun-09 2:25
Tom Lessing2-Jun-09 2:25 
GeneralRe: Another cautionary note on GUIDs Pin
Member 962-Jun-09 6:27
Member 962-Jun-09 6:27 
GeneralRe: Another cautionary note on GUIDs Pin
Tom Lessing2-Jun-09 8:33
Tom Lessing2-Jun-09 8:33 
GeneralRe: Another cautionary note on GUIDs Pin
Member 963-Jun-09 7:59
Member 963-Jun-09 7:59 
AnswerRe: Another cautionary note on GUIDs Pin
csantia664-Jun-09 11:19
csantia664-Jun-09 11:19 
GeneralRe: Another cautionary note on GUIDs Pin
Member 964-Jun-09 19:54
Member 964-Jun-09 19:54 
AnswerRe: Another cautionary note on GUIDs Pin
csantia664-Jun-09 23:33
csantia664-Jun-09 23:33 
GeneralRe: Another cautionary note on GUIDs Pin
Member 965-Jun-09 20:28
Member 965-Jun-09 20:28 
GeneralRe: Another cautionary note on GUIDs Pin
wes212-Jun-09 6:36
wes212-Jun-09 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.