Click here to Skip to main content
Click here to Skip to main content
Go to top

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

, 22 Jun 2009
Rate this:
Please Sign up or sign in to vote.
This is the third in a series of columns in which I will tell you how I started SplendidCRM Software, Inc.

Introduction

This is the third in a series of columns in which I will tell you how I started SplendidCRM Software, Inc. I hope that my entrepreneurial experience inspires you. In my opinion, the creation of a company can be a wonderful adventure.

Article 3

What does it cost to start a company? Not much. If you already have a computer, you have what you need. From a legal perspective, forming a company can be done for $100 over the internet. If you are forming a non-profit, then the type of business entity becomes easy. However, as a small business, you will likely narrow down to either an S Corp or an LLC. I personally prefer the S Corp, but this is probably due to my age and previous experience. It may be useful to note that my accountant prefers an LLC. Your best bet is to do the research yourself. One place to start is here.

The real cost to start a company is the cost to create and deliver your first product. This means that the real cost is the software required to create the application and the hardware required to test the application. You need to be smart about how you spend your money. When it comes to development software, Microsoft provides lots of free development tools. If you are developing a software-as-a-service solution, then Microsoft can provide free production licenses for Visual Studio and SQL Server as part of their BizSpark program. You can read the BizSpark FAQ. If you don't qualify for BizSpark, then your next best option is the Microsoft Action Pack Subscription (MAPS).

Both the BizSpark and the Action Pack licenses provide a MSDN subscription, which includes lots of software. We use the MSDN to obtain various versions of Windows in the most popular languages. We have tested SplendidCRM on Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008 and even Windows 7. We have tested SplendidCRM on both the 32-bit and 64-bit version of all of the previously mentioned operating systems. Added to the mix, we have tested SplendidCRM in French, Italian, German, Spanish, Portuguese, Chinese and Japanese. It takes some effort to install Windows in a language that you can't read, so our trick was to run the English install at the same time. The screens are almost identical, so while you may not be able to read the words, you will understand what you are being prompted for.

The interesting thing about testing one’s application across multiple platforms and multiple languages is that you end up doing more testing and you end up uncovering more bugs. In the end, you achieve a more robust application. But with such a large test matrix, you will need to make the best of virtualization. I am sure that you have heard of virtualization, but for those who that have not, virtualization allows you to run multiple operating systems on a single server. We have been using VMware for more than 8 years, so we are biased toward their VMware Server product. You should seriously consider the VMware Workstation product because of its powerful snapshot abilities. Microsoft also has a new Hyper-V product in Windows Server 2008, but we found VMware much easier to use. Therefore, get a dual processor quad-core machine with 12G RAM and lots of hard disk space and you will be able to run a bunch of VMs simultaneously.

When it comes to computer hardware, you are not going to get anything for free. The real trick to getting good deals on hardware is to purchase new hardware at outlet prices. At SplendidCRM Software, we are big fans of HP hardware; we have lots of ProLiant servers and lots of HP Workstations. All of the hardware was purchased at outlet prices with a 40% to 50% discount. You could get refurbished hardware directly from HP, but this hardware typically only has a 1-year warranty. When you purchase hardware at resellers, you get the full new-machine warranty, which is typically 3 years for servers as well as workstations. So, check the outlets at PC Connection, CDW and Provantage. eBay is also an option, but we have had better luck with hardware from certified resellers, which have a no-restocking-fee return policy.

That’s all the business advice I have for this article. Now prepare yourself for an abrupt transition to a programming topic.

Stored Procedures

SplendidCRM relies heavily upon SQL Stored Procedures and SQL Views. I believe that you may be interested as to why I made this choice. If you do a search on Bing for “Stored Procedures vs Dynamic SQL”, you will see that a raging debate has gone on for many years. At the top of the list is Andres Aguiar’s Weblog. While it is not my intent to add to this debate, I believe that it is useful to document how and why I used stored procedures within SplendidCRM.

Let me set some ground rules first. Anytime we pull data out of a database, we do so using a SQL View. Anytime we put data into the database, we do so using a SQL Stored Procedure. As a general rule, we put the business logic inside the stored procedures and the views. There are rare exceptions to these rules, such as the use of a stored procedure to read IMAGE or BLOB data, or the use of direct UPDATE statements when dealing with custom fields.

The primary motivation for putting the business logic in the database is to increase performance by reducing the network traffic and by letting the database do what it does best. A relational database is all about relations, so the best place to put relationship logic is in a SQL view, where the relationship can be defined in the language of the database. Some individuals believe that it is never a good idea to put business logic in the database, and to these individuals I present SplendidCRM as the example of the right time to do so.

Another key motivator for using SQL stored procedures and SQL views is to allow each database platform to have its own implementation. SplendidCRM currently supports the following database platforms: SQL Server, Oracle, PostgreSQL, MySQL and DB2. The procedures and views then become the data-access layer, whose definition provides the necessary separation between logic and data. While there is a little code in C# that handles the differences between the database platforms, the major difference is handled by a separate set of stored procedures and views.

Now that we have the database completely abstracted, the fun can begin. We can query the metadata of the database and create C# wrappers around all stored procedures. The C# wrappers provide strongly-typed functions that can ensure that the right data type is used at all times. And, in the event that the data type changes, the C# compiler will generate an error at compile time instead of at run time. We also use this metadata when importing data. It allows us to ensure that the proper field names are used without having to manage our own list of available fields. The SQL views provide a similar amount of metadata and allow us to dynamically provide lists of available fields so that we can provide our users with a Report generator.

One of the biggest debates regarding stored procedures vs dynamic SQL has to do with performance. The best evidence that I can provide is a comparison between SplendidCRM and SugarCRM. We have found SplendidCRM, which uses stored procedures, to be twice as fast as SugarCRM, which uses dynamic SQL. If you don't believe me, then I encourage you to experiment for yourself. While SugarCRM has been optimized for the LAMP stack, you can install the SugarCRM Community Edition on a Windows Server using a Microsoft SQL Server database. That would rule out the operating system and the database platform as possible reasons why SplendidCRM is so much faster. While some individuals may argue that C# is faster than PHP, I am going to assume that they are equal. This assumption leaves only the difference in architecture, and then the conclusion proves my point that stored procedures are better.

I hope that you have enjoyed this third article in the series. Please watch for article 4 within the next few weeks.

History

  • 22nd June, 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)

Share

About the Author

Paul Rony
President SplendidCRM Software, Inc.
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

 
SuggestionWorst business advice you could possibly dole out on incorporating. PinmemberSammy Moshe29-Dec-12 18:59 
GeneralRe: Worst business advice you could possibly dole out on incorporating. PinmemberPaul Rony29-Dec-12 21:56 
QuestionWhat about art. 4? PinmemberSebaSuper28-Jul-09 1:02 
AnswerRe: What about art. 4? PinmemberPaul Rony28-Jul-09 1:42 
Article 4 was posted yesterday.
Programmer's Guide to Starting a Software Company and Building an Enterprise Application - Article 4[^]
AnswerRe: What about art. 4? PinmemberPaul Rony20-Sep-09 11:44 
QuestionBusiness logic in SPs? Pinmemberrgruchalski30-Jun-09 7:39 
AnswerRe: Business logic in SPs? Pinmemberfoxjazzdude6-Jul-09 7:51 
GeneralThanks for sharing PinmemberHemant.Kamalakar29-Jun-09 22:26 
GeneralGood work PinmemberChris Nguyen26-Jun-09 4:53 
QuestionAny customers yet? PinmemberSoundman32.222-Jun-09 23:46 
AnswerRe: Any customers yet? PinmemberSebaSuper23-Jun-09 0:44 
AnswerRe: Any customers yet? PinmemberPaul Rony25-Jun-09 20:56 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140922.1 | Last Updated 22 Jun 2009
Article Copyright 2009 by Paul Rony
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid