
More limits
Before we get too far into the Apex execution limits, we do need to bring up some other limits that you need to keep in mind. As we mentioned in the previous chapter, Apex is not a general programming language. It is specifically designed for use with the Salesforce1 Platform. While it might be technically possible to write code and build an application that behaves like the latest social networking website, a group coupon website, or even search engine, you shouldn't.
We're often approached by companies who want to copy an existing website or application. They select the Salesforce1 Platform for the backend because they know applications can be built on it very rapidly. What they don't know is that Salesforce and the Salesforce1 Platform are purchased on a per user subscription basis. It is much too cost prohibitive to purchase a license for every person in the world to access your service. We always try to break the bad news gently rather than take on the project. While we might have crushed someone's dream, we saved them a lot of money and future frustration.
Data storage is also an often overlooked consideration. The most popular sites on the Web consume vast amounts of data. On the Salesforce1 Platform, each user license includes a set data allocation. Each record you create takes up exactly two kilobytes (KB) of your allocated storage space. This number is calculated based on the cost associated with storing your data, replicating it across redundant hardware, and backing it up for disaster recovery. Regardless of whether a record has one field populated or 500 fields populated, it will only use up two KB of data storage. Given the ability to create multiple long-text area fields on a single sObject, this arrangement is usually a great deal for customers, even without taking into account the replication and backup. In addition, for each sObject there can be supporting tables for sharing and field history that use up a lot of data, but are not counted against your storage allocation.
The data storage allocation included with your licenses is more than enough to run the average business, but it's definitely not enough to catalog every picture and video of a cat on the Web and all their attached comments. This is an important factor to keep in mind before starting development of your code. If your legitimate business application requires a lot of data, you can purchase additional storage from salesforce.com or purchase additional licenses.
Note
All of the limits, including the Apex governor limits are cataloged in detail in the Salesforce limits quick reference guide located at http://developer.salesforce.com. This downloadable document is updated three times a year with every major release. The limits include everything from valid date ranges for date fields to the maximum number of characters in an Apex class and everything in between.