Friday, 1 October 2010

Apex and Visualforce

As I explained in my last post Creating custom SaaS applications for Salesforce used to require the manual development of S-Controls, which are just simply components comprised of HTML and JavaScript. Visualforce is the new standard technology that allows you to create custom user interfaces for your force.com applications. Not only is Visualforce easier to use, it is much more powerful and has the added benefit of promoting good design and component reuse. This is due to the fact it has an uncorrupted separation between the business logic and interface involved in a custom page.  

Apex is the language aimed at creating the extension of existing Salesforce applications. This language operates similar to what you would see with JavaScript. Apex is a revolutionary application since it has complete functionality without the need for local software. The primary reason I enjoy working with Apex is because it allows me to do enhanced customizations. Developers can create new Salesforce application behavior as well as modify existing behavior. I get to use the same programs the original Salesforce development team utilizes to build commercial SaaS products.

Another tool Apex provides to the developer is the creation of triggers. These triggers initiate events when the end user performs specific operations. Apex also creates classes, which house business logic and procedural data-processing commands. The Salesforce developers can expose these classes as web services by adding a few simple keywords. The Apex language also provides is direct access to UI elements, such as buttons and events. It even facilitates the creation of transaction semantics and flow control. Basically it makes a lot of the developing I do a lot easier.

Creating an Application

The application we are going to build in the next couple of posts is a basic invoice-payment management system. This is an application a large number of business’s use to invoice for a specific amount that is be paid over a designated period of time. Once the invoice is created it automatically generates a payment schedule via Apex Code triggers. It will also maintain the payment status (Past Due, Pending, and Paid) using a combination of Salesforce’s built-in workflow engine Apex Code triggers. The invoice screen itself is a Visualforce page that utilizes both Salesforce’s native configurable page layouts and custom layout regions.


When we start designing this application in the next post, we will be working through the main administration page on Salesforce.com. All administration and customization options are listed along the left side of the screen. Click "Build" to expand the tree node, and then click the "Apps" link below it.


Get excited...we are going to start developing an application soon. Boo-yah.

No comments:

Post a Comment