Oh my god. It's full of code!

jQuery, Apex, and Visualforce – 1 Intro

Seems like I totally missed the boat on how awesome jQuery and it’s plugins are. I have always been a ColdFusion developer, and as such have just used the various ColdFusion widgets for my various needs, without thinking about using javascript for much. Since I have been working on migrating to the Force.com platform I needed something to fill the gap being left by the lack of ColdFusion support. I found the filler I need in jQuery. It is able to create many of the UI elements I need, and do many of the things that I used ColdFusion for. It has been an invaluable tool and I cannot believe I missed out on it for so long.

The design approach I have adopted, though I’m not sure if it is “best” practice or not is to create Apex back ends that fetch the data and then deliver it to a visual force page which uses jQuery to receive the data, process it and display it. Most of the time I don’t make much use of the built in visual force functions. Using JSON to exchange the data.

Over the next few posts I plan to outline how I’ve done this, and post relevant code to try and help any other developers who may be struggling like I am/was. I’ll just get this out of the way first please read the following line carefully.

any code I post comes with no warranty, has not been “extensively” tested, and could almost certainly use some tweaking and optimization. It does however work for me and my org and if nothing else should outline techniques that you can expand upon and improve upon. At which point I hope you’ll share your progress with me 😛

Just to outline a few things, for anyone who isn’t totally up to speed on some of this gibberish…

Apex: Salesforce Java like programing language. Runs on their servers.

ColdFusion: A powerful server side programming language, not really relevant to this discussion, but I may mention it from time to time.

JSON: Javascript simple object notation. A simple lightweight data exchange format used heavily by jQuery plugins. Think XML, but easier.

jQuery: a lightweight powerful javascript framework that has all kinds of awesome built in features and endless plug-ins. If you want to do it, jQuery probably already has, and done it better.

Visual Force: Salesforce scripting for building front UI.

Over the course of the next few entries I’ll be teaching you how to build an integrated calendar application that runs entirely on Salesforce platform and rivals google calendar in appearance and functionality.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s