Tag Archive > dojo

dojo.store, dijits and the FB Graph API (part 1)

» 27 February 2011 » In development » 1 Comment

I’ve spent a few hours this evening checking out the new dojo object store implementation, looking to see if I could hook it up to the Graph API.

Getting id/identity and basic query data back from the Graph API took all of five minutes – using dojo.io.script to automate handling the callbacks from the Graph APIs JSONP responses. The new store is much simpler to implement than the old dojo.data interfaces. Big win there.

I’ve not managed to get full querying working just yet, as the Graph API is pretty big and the range of connections available for each of the different types in the Graph API isn’t documented particularly clearly.

I’ve also run into some snags wrapping my object store in a dojo.data store. I’ve successfully got a ComboBox populated from my friend list if I take the output from my object store, use that as the constructor for a dojo.store.Memory store and then pass that into the constructor of the dojo.data.ObjectStore, but it’s a bit messy. I’m sure there’s something I’ve just missed out as this definitely shouldn’t be necessary.

Still, not a bad effort so far. Hopefully I’ll have a full object store and data store implementation ready to roll soon, meaning you’ll be able to populate all your favourite dijits with data from your favourite social network :)

I’ll get an example online soon and put the code up on github with create a patch for dojo trunk once I’m happy with the results. Things are a bit hectic at the moment tho so it might take a few weeks…

Continue reading...

Tags: , , , , , ,

Dojo Build System Example

» 02 March 2010 » In development, tech » 2 Comments

So one of the questions that comes up time and time again on the Dojo mailing list is how to get a build working.

Like most things Dojo, it’s not that hard, but the system is designed to be flexible enough to fit around your workflow as well as providing the bells and whistles needed to optimise for more advanced use cases. This has a couple of problems:

  1. Writing documentation is tricky – it’s hard to get the basics down and cover all the extras in the same document, and
  2. there’s a steep learning curve – as a newbie it’s hard to know which knobs to turn, which to ignore, and which to tinker with

Additionally in my experience working examples are easier to understand than written documentation. They allow you to play with the options and convert them incrementally to your project.

So I created a simple example, and added it to the Dojo wiki. You can find it here (new site) or here (old site). Hope it helps!

Continue reading...

Tags: