Howdy,
I can give you a brief example I think... I can't get too detailed on Dojo as I'm just not an expert on all the inner workings....
XPages comes with Dojo built in. It's the key framework that makes things like Partial Refresh and the Date Picker core control work.
Let's look at the date picker for instance. You can drop that core control on and it will work. Or you could manually apply Dojo to an edit box for instance and they use Dojo manually. In this particular case I prefer the manual Dojo as I think it's better.
But what about DialogBox? There is no core control for that. So you could create a dialogbox manually - following the instructions on the dojo website - but that won't work in XPages straight for SSJS events as the dialogbox gets moved outside the form tag I believe. So you can't save anything back via that dialogbox. Now there is a workaround for this - Jeremy Hodge wrote a function that basically puts the dialogbox back inside the form tag. You'll need to google for it... but it's out there. It's also used on several projects. Mark Hughes's picklist project on OpenNTF has it I think.
But there's a better way. If you install the Ext. Library from OpenNTF, or the Update Pack from IBM then you'll get many Dojo tools available in your control pallet. Dialogbox is one of them. So no workaround needed. Drag that to your XPage. There's a great Demo app that comes with XPages Ext. Library that has examples. That demo might even be it's own project now... not sure.
For you wanting to do dialogbox - use Ext. Library or Update Pack. It will also be build into Domino 9.0 due out the 21st of this month I believe.
There's a lot of material out there on Dojo. though I don't think I have a lot of it on NotesIn9 yet... I know I don't really have dialogbox on there. Sometimes I prefer working with hidden/unhidden panels instead of dialogbox. It's a little more mobile friendly.
I did a session with Paul Withers - who's an XPages and Dojo Expert at Lotusphere. Slides are here - maybe they''ll help a little.
So again - you're best bet is to get Extension Library installed and dig through the sample app. they've exposed much of Dojo that way.
good luck
Dave