
My name is Jason Ouellette, from Appirio. As part of the Developer Preview program, I recently built a demo app on Salesforce's new Visualforce platform.
I've written some complex S-Controls, including a SPA with 7,000 lines of JavaScript. I never wanted to do so much heavy lifting inside the browser, but until Visualforce I didn't have much of a choice. I'm happy to report that Visualforce exceeded my expectations, even in its early form.
First, the development environment. It's slick and usable - a splitter panel that shows up at the bottom of the browser window like Firebug when you edit a Visualforce page. It's got syntax highlighting, command completion, and online help. It worked well, although it was sluggish at times with all of the JavaScript wizardry going on behind the scenes. It also needs some work to improve code formatting and clipboard operations. But with the code so close by, it encourages a rapidly iterative development process (also known as Trial and Error) which was critical for being productive in the unfamiliar world of Visualforce.
An OnDemand user interface for development doesn't seem like a big deal, and power users of Eclipse will get frustrated with it. I was too. Then my 5 month old Windows laptop's motherboard died right in the middle of intense Dreamforce deadline-driven, trial-and-error demo-building. I dug up my 5 year old Apple PowerBook G4 and continued plugging away. No fat IDEs to install, repository paths to configure, code to checkout, bless the OnDemand cloud-gods.
Visualforce has many features to support building UIs that look and feel like Salesforce. I tried building a UI that *doesn't* look like Salesforce but more like a corporate intranet application. This exposed me to the most basic components available in Visualforce. As with any new "framework" I encounter, I was initially concerned about the flexibility of Visualforce, especially where look-and-feel is concerned. Easy and codeless is good, but falls short for projects with quirky UI requirements.
Fortunately I found I had complete control over the look-and-feel of my Visualforce pages. I relied on my old-school PHP/ASP/JSP habits of template-driven page development and Visualforce didn't fight back. I made heavy use of the repeat and outputText components. To build the Ajaxy eye-candy expected of a demo app, I found it worthwhile to learn the Visualforce approach. For example, wrap an outputPanel around a region of HTML and specify it as a reRender target for a button or link. The HTML dynamically updates, no JavaScript necessary.
So far I've only mentioned the UI side of things. For the business logic, you write a class in Apex Code called a Controller. I'm not an Apex Code guru, but it's so much like Java that I only had to look at the manual once (for the List object). Again the development environment helped out by showing the controller code in its own tab alongside the page code. So it was easy to switch back and forth between the user interface and logic. I also tried editing the code in Eclipse, which worked fine too.
Once I got the hang of the page syntax and the way page and controller interact, the demo was far easier to build than the equivalent S-Control. Visualforce greatly expands the realm of what is possible to do in Salesforce. I look forward to using it on customer projects.
Jason Ouellette, Appirio
9 October 2007 (PDT)