Author Archives: Wes

5 Open source Force.com projects for Admins and Developers


I’ve previously mentioned the growing popularity of Force.com projects on github and I wanted to call out a few that are likely to be interesting to most developers out there.

Infinite Scroll

Infinite scroll has been a popular concept on the web for a while now, and is a neat alternative to pagination in some cases. This Force.com project allows you to add the infinite scroll capability to your Visualforce pages by dropping the required components into your project.

https://github.com/joeferraro/InfiniteScroll

Stratosource

Stratosource is an incredible project that aims to be your one-stop-shop for backup, source control and release management on Force.com.

https://github.com/StratoSource/StratoSource/wiki/What-is-StratoSource%3F

Milestones

Milestones is has been around for a good while now and is an incredibly competent project management tool from Force.com Labs.

https://github.com/ForceDotComLabs/Milestones-PM

Find Nearby

Another great application from Force.com Labs, this one (in it’s current form) allows you to find and map Accounts, Contacts and Leads within a certain area.

https://github.com/ForceDotComLabs/FindNearby

Automated Testing for Force.com

Getting fully featured Continuous Integration up and running can be complicated. Automated Testing for Force.com gives you many of the features of CI, but in an easy to install and configure package!

https://github.com/mbotos/Automated-Testing-for-Force.com

If there are any other great open source projects out there that you’ve found useful I’d love to hear about them too.

Tagged , , , ,

The Force.com Streaming API


The Streaming API isn’t new but I thought I’d put together a post to document my experiences and get some source code onto Github to help you get started.

Streaming APIThere are different ways to interact with the Streaming API i.e. from within the Force.com Platform using Visualforce, or from outside the platform using the language of your choice. Either way you’ll need to implement the Bayeux protocol, which is easier than it sounds because there are many libraries out there to help you out.

At it’s core all you need to do is create a push topic – which is the registration of an SOQL query for use with the Streaming API – that the client subscribes to. The client then waits for updates or inserts and handles the data appropriately. I’m not going to go into too much detail since a lot is covered in the docs, but if you’re interested in a working example you can get my source code here. Note that for my source code to work you’ll need to create a push topic more or less in the following way:

PushTopic pushTopic = new PushTopic();
pushTopic.Name = 'AllAccounts';
pushTopic.Query = 'SELECT id, name FROM Account';
pushTopic.ApiVersion = 26.0;
pushTopic.NotifyForOperations = 'All';
pushTopic.NotifyForFields = 'Referenced';
insert pushTopic;

You’ll need to execute this code using the System Log or the Execute Anonymous capabilities of any appropriate app.

Lessons Learned

  • The API will only feed through information that is inserted/updated after the page/app implementing the API opened/started.
  • You cannot use aggregate queries e.g. you could not create a running total of the sales amount this month.
  • You cannot use it with Chatter objects.
  • You can only have 10 concurrent subscribers i.e. only 10 instances of your page/app could subscribe to a topic.
  • You can use Workbench to experiment with the Streaming API as shown below:

Workbench and the Streaming API

If you’ve had any interesting experiences or projects where you’ve had to use the Streaming API let us know in the comments!

Tagged , ,

Large data volumes and the Force.com Data Architecture


A few weeks back I shared a salesforce.com whitepaper that gives the high-level details of the architecture underlying the Force.com platform. For those looking to learn more about the database underpinning the platform you can find even more information in another whitepaper titled “Best Practices for Deployments with Large Data Volumes” [PDF, 629KB]. As someone who does a fair amount of writing I can confidently say this is one of the best salesforce.com whitepapers I’ve ever read. The content is great but the format is what makes it.

The Virtual Database Structure

The Virtual Database Structure

The primary purpose of the document is to give architects the options and approaches when dealing with orgs that have, or will have – you guessed it – large amounts of data. As a byproduct though it ends up revealing information about the virtual database shared by all tenants. Salesforce.com has literally built a database within a database (databasception?!) with its own optimising features such as divisions, virtual indexes and skinny tables!

In short, if you ever have to deal with large amounts of data on the Force.com platform, or if you’re just the inquisitive type, I bet you’ll learn at least one new thing from this great whitepaper!

Tagged , , , ,

Multi-Org vs Single-Org strategies


Tquila works with some of the largest enterprise companies in the world. Often we’re brought in to discuss architectural strategy whether this is before the first Salesforce project kicks off or some way down the line when they’re looking for some feedback on their current state.

A common question that comes up from our larger customers is the question as to whether they should have one or several Orgs, and I was in the process of creating a whitepaper when I noticed that salesforce.com has done this already!

I would however add one more line to their “Single Org versus Multiple SF Orgs Capability Matrix” which would be:

Capability Single Org Multiple SF Org Other Considerations
Development process & team organisation Complex if there are several delivery teams especially if release cycles differ. Simple if there is a single team on a single release schedule Simpler but may result in redundant code and libraries Both approaches need an enterprise architect but in slightly different coordination roles

Perhaps you have some lessons that you’d like added to the whitepaper too?

Tagged , , , ,

jQuery VS Backbone VS Ember VS Knockout VS Spine VS Batman VS exploding-brain


Todo MVCJavaScript is one of the most popular kids on the block these days, and with this rise in popularity has come a proliferation in frameworks and libraries to aid JS development. This leads to the (frequent) questions, which one is the best and in what particular situation(s)?

Thankfully Addy Osmani – JavaScript Hipster Overlord – has created a github project that demonstrates these differences through implementation. As you may or may not have noticed the unofficial way to showcase your JS framework is through the creation of a Todo/Task app and this particular project, called TodoMVC, aims to do just that for many of the popular JS MVC tools out. Where a single library on it’s own might not be the right architectural choice for this type of app e.g. jQuery, the apps have been created through combining JS libraries/frameworks.

So if you’re the kind of person that learns by working through examples then this is perfect for you!

Tagged ,

The Force.com Multitenant Architecture


Salesforce.com’s platform landscape is ever-growing, and I’m sure that many of you have often wondered how the heck they’ve devised an architecture capable of supporting it all. You might be surprised to know that this (perhaps slightly out-of-date e.g. the document states 47k+ orgs) information is available in the form of a whitepaper on the Developerforce website!

Not only does this give you insight into the architecture of their multitenant platform but it becomes clear very quickly why the platforms works in the way that it does e.g. why use metadata or governor limits.

It is a heavy read but at 15-pages long it won’t take too long, and for anyone using the platform day-in-day-out it’ll give you a new-found appreciation for the tools you use.

Tagged , ,

The rise of the Force.com Platform


“The Force.com Platform is growing.”

For anyone in enterprise development this is an obvious statement, what might not be so obvious is why it’s growing. Or how the heck it’s growing at such a frenetic pace. There are some great, recent articles out there that postulate on this point. “Great vision” they say, or “Great execution”. Of course these things are true, salesforce.com is unique in its sales, marketing, vision and execution putting it leagues ahead of others, but I think that there is a greater factor that eclipses all other points.

If a developer doesn’t care for your platform and platform tools then you won’t have anyone to deliver, a dead-end that many companies have found the hard way. But with the Force.com Platform – for the first time in the history of the world (I’m taking liberties) – enterprise software development is cool. And not just a little bit cool either, we’re talking jQuery-Ruby-zomgHowCuteIsThatCat cool.

But don’t take my word for it. Go out there and ask the community, or even better just look at the Apex page on github.

Apex on Github

Apex on Github

69th position might not seem all that good but let’s see where ABAP (SAP-proprietary language) is featured in the list, hmmm. Oh it’s not, what a surprise. The exact ranking is not that important though (it’s was in 70th position 1 week ago so it’s climbing folks!), what is important is that a very young, proprietary programming language has seen wide enough adoption to gain its own category on github at all, and that the open source community is building with it!

Developers drive the state of the Internet, they’re the people who see new trends emerging ahead of others and are typically the early adopters that determine whether a technology makes it to the business-viable stage. The developers of the enterprise world have given the Force.com Platform their blessing, a rare and powerful thing, and salesforce.com is now reaping the incredible benefits.

If you’d like get a great overview of the platform capabilities the VP of Dev Relations will be in London next week and he’s talking about the platform at a free public event that you’re all invited to!

Tagged , , ,

London Force.com Meetup featuring VP of Developer Relations, Adam Seligman


Adam Seligman giving a BOSS of a talk.

There’s only a week and a half to go until the next London Force.com Meetup where we’ll be discussing some of the great technology we’ve seen or heard about at Dreamforce 2012. This year was a whopper of an event so be sure to RSVP and remember that developers, admins and all other Force.com-ites are welcome!

As an added bonus we’ll have the VP of Developer Relations for Force.com and Heroku at the event to give a short talk about his great passion for both platforms. Registering for the event is super simple, and the event detail are:

Headline: Teardown of what happened at DFX and a special guest from salesforce.com!

Date and time: Wed Oct 10 at 6:45 PM

Location: 116-120 Goswell Road London, EC1V 7DP, London

RSVP link

Hope to see you there!

Tagged , , , ,

Chatter + GPS = Tquila Loco for iPhone


Here at Tquila Labs we have a few brand-spanking new mobile apps that we’re showing off, let me whet your appetite by telling you about Tquila Loco for iPhone.

Our team has built an incredible location-based app that lets you check into your Salesforce Accounts, Contacts or Opportunities using Chatter and your iPhone’s GPS – think of it as foursquare for Chatter. We’ve thrown some gamification into the mix too taking user adoption to a nearly addictive level!

Internally we’ve been using the app with enormous success. We have people working all around Europe and now it’s easier than ever for them to know who’s nearby, often letting them draw on the skills and connections of one another. What does this mean for the bigger picture? Sales close quicker and our network of knowledge is better lubricated, business couldn’t be better!

If you’re in or around London and would like a demo just let me know.

Tagged , , , , , , ,

Force.com: Top Testing Tips Session at Dreamforce 2012


After an 11-hour flight from London the Tquila team has arrived in San Francisco for DFX! I hope to see many of you around town, and if your schedule isn’t already full it would be great to see you at an awesome session I’m delivering on Tuesday, September 18th: 4:00 PM – 5:00 PM at Moscone Center West, 2024.

Ami Assayag and I will be talking about “Top Testing Tips” on the Force.com Platform. We believe that our talk will help you take your Apex code testing to the next level with sample code and open source libraries that make these advanced topics easy. You’ll learn to save time with SmartFactory, which automatically creates complex test data for tests isolated from your regular data, and how to test web callouts cleanly and completely using interfaces and mocks. Finally we’ll talk about how to make sure all your team’s tests run regularly with native Force.com automation that takes a fraction of the time of full continuous integration.

You can register for the session here, and feel free to grab me after the talk if you have any questions or just want to say hi.

Tagged , ,
Follow

Get every new post delivered to your Inbox.

Join 49 other followers