As you can probably guess from the title, this follows on (belatedly) from my previous
As more and more of Salesforce development revolves around the Salesforce1 mobile application, it's becoming increasingly obvious that roundtrips to the server with Visualforce are not the way to go, sending and receiving everything that's required for your controllers is slow, and so remoting is the way to do things. If you've not tried it already then you'll be surprised at just how fast it is when compared to the more traditional Visualforce techniques.
But I Love jQuery!
Sure, so do I. In fact, I'd go so far to say as the overwhelming majority of developers on the platform have used jQuery at some stage, but it only goes so far. When it comes to dealing with updating data on your page and making everything reactive in real time it can get unweildy very quickly, which is why there are frameworks like Angular, Ember and Knockout.
I've played with a few of these frameworks now, and they all have their strengths and weaknesses. The reason why I've become particulary fond of KnockoutJS is that it's designed to work really well with single page apps, and that's what the form that the majority of Salesforce1 mobile apps take. It also requires very little in the way of boilerplate code, and it keeps everything neat, compact, and compartmentalised, and also happens to work very well with remoting.
Let's Get Started!
Sure, though not here in this post. As it happens I've written up a KnockoutJS workshop (which was originally intended to be content for Dreamforce) that is available on GitHub and takes you through the process of building a simple account rolodex from scratch.
Hopefully it conveys just how quickly you can put something together with KnockoutJS, and also how little effort it takes to hook things up. Sure the CSS is a tad ugly, but check it out and let me know what you think, all feedback is appreciated!
- Easy Handling of Static Resources with MavesMate
- Visualforce Fun: Two Handy Tips
- Increasing Your Worth In The Developer Economy