Review: Force.com And Eclipse Head For The Cloud

CloudSoftware

Salesforce.com’s Eclipse plugin for targeting the company’s Force.com platform provides seamless development for organisations aiming for the cloud

Yet another language: Apex

Development for Force.com requires programmers to use a new language called Apex, which runs on top of the Apex framework. The Apex framework is fundamental to the Salesforce.com servers and was not new to Force.com – it had been part of Salesforce.com for several years. At first, I was a little concerned when I heard that the development would require the use of a new language. Fortunately, the language has traditional C-style syntax and looks very similar to Java and C#, so I felt quite at home in the language.

However, Apex does differ from C# and Java in certain respects, as conceptually it behaves in a similar way to a database language, such as T-SQL or PL/SQL. Apex includes database constructs such as data select statements, transaction support and triggers. I think that Salesforce has done a beautiful job of integrating data access right into the language, which is something I’ve longed for more than once in my programming career. Take a look at the Apex developer site for more information.

Because Apex code runs on multi-tenant servers that are in the cloud, it’s vital that the code doesn’t get out of control, thereby hogging resources and causing other problems on the platform. With that in mind, the Apex language was built to be monitored by what Salesforce calls a “governor.” If you’re familiar with .NET managed code or the Java runtime, think of either of those on steroids. The governor carefully manages and monitors the running code – not just its data aspects, but all aspects, including loops and other control structures, to keep it within isolated boundaries. The documentation refers to Apex as a “virtual, virtual machine,” which seems fitting.

Other Features

The Eclipse plugin is certainly full-featured. One particularly cool feature is that for running “anonymous” code right on the remote server, on the fly. Most developers have probably done this kind of thing before in other languages (albeit in a locally-run debugger) when the developer inspects an object, calls a member function right in the inspector, and watches the code run right then and there. Similarly, with the “Execute Anonymous” pane that the Force.com plugin provides for Eclipse, I could execute code right on the fly on the server, and see the results right in a Results text box.

The Apex language includes support for unit testing, and the Eclipse plugin supports this as well. By creating unit tests right in my classes, I could easily test out my classes on the remote server from within Eclipse. Another interesting feature is the Schema Explorer, which allows developers to browse and inspect their database model on the server, graphically, right from within Eclipse.

The Force.com development site is huge, and the Eclipse plugin is only one small piece of it. For those who aren’t keen on writing code, the site makes available various designers that can be used to piece together an entire application right on the website. The resulting application will run on the Force.com cloud as a set of web pages. There are other design tools available for building Force.com applications that run inside Adobe Flash or Adobe Air runtimes.

What’s more, Force.com applications can be readily integrated with other cloud services providers including Amazon’s Web Services, Google’s App Engine and Facebook. There are toolkits that work together with Java, as well as .NET. There are plenty of developer-contributed libraries (such as AJAX support), as well as standalone tools such as a data explorer.

Click to read the authors bio  Click to hide the authors bio