Is it just me or is this ad on the platform at Wynyard station giving off a bing-esque vibe?
So it’s not too clear in my crappy iPhone photo, but the word above “STAY PUMPED” says, ‘search:’.
the personal blog of John BouAntoun
Is it just me or is this ad on the platform at Wynyard station giving off a bing-esque vibe?
So it’s not too clear in my crappy iPhone photo, but the word above “STAY PUMPED” says, ‘search:’.
So I’ve been doing a little playing around recently with Azure, looking at pushing some of the more processor intensive worker units out into the cloud.
I know there’s been a whole bunch of discussion about whether ‘your data’ belongs out in the cloud and all that, and on that front I’m still undecided, but pushing processor intensive modules that act on small transient blocks of data sounds like the perfect test case for a cloud app. More on what that app is to be later.
In the mean time I was looking to find an easy way to get my files onto my Azure connected account’s blob storage. Enter Codeplex Space Block.
This app supports a whole bunch of cloud storage systems, but added Azure support after it’s major release. This means you need to use the link I posted above to download the latest commit, not the latest stable rellease (0.0.2.0).
I brought the app down for two reasons, firstly to get my files up onto the blob quickly and secondly to see a non-trivial example of accessing blob storage from C#.
Points to note:
Awesome post from an Aussie no less which is a non-trivial iPhone application using c# on monotouch.
The thing I love about monotouch is that it lets me leverage my .Net Skills (not just c#, but how the .Net run time works) and marries it to the low-level iPhone development infrastructure. The hardest part about getting into iPhone development for me was Objective-C, and now I don’t need to go there.
Points to note:
Hey gang,
Just a quick update to let you all know that I just updated the about me widget over at codex to be compatible with the new WordPress Widget API. I decided to contact Sam and get access to the repository on codex, rather than host the download on my blog locally. Feel free to discuss installation or other issues in here.
I bumped the number up to 2.0 since it was a complete re-write to make it work in the new Widget API. The new API makes it incredibly easy to write regular widgets, but incredibly difficult to write plugins that require rich controls that use their own kind of ajax, tinyMCE being the candidate in this instance.
I had to do some very evil things to make the tinyMCE editor able to save it’s html into the textarea on the save button click event (since that triggers the ajax postback, not the form submit event that tinyMCE is watching for).
I also had to do some very bad things with respect to page loading and click event binding to get tinyMCE control to survive the ajax widget re-ording events. Apparently drag-and-drop destroys the underlying controls in the widget div which leaves the tinyMCE editor orphaned with no active window. The only way I was able to work around this issue was to bind the widget settings button (the down arrow) click event and literally remove the editor from the DOM, using jQuery().remove() and then re-init the editor and show it.
This is the only way i was able to get the tinyMCE editor able to both survive a sort event, and bind to the textarea. I don’t like because it means everyvtime you try to edit the about me widget you have destroy and re-create the tinyMCE editor and rebind it to the textarea. It works, it’s just not clean.
I suspect the WordPress dev’s will be changing the API to give it more hooks and mature it’s ajaxy-ness as time goes on.
Plugin link: http://wordpress.org/extend/plugins/about-me-widget/
So I’ve been migrating the about-me widget over to the new widget API in WordPress 2.8.2+ for the past week and I’ve not been having fun.
Actually I’ve had the majority of the widget done, and simplified for more than half that time, but I’ve been struggling with one issue since; how to get the rich text from the tinyMCE instance into the textarea on form submit so it will be saved. And let me tell you… it’s been a tail of one annoying discovery after another.
First let me say that the new widget API is impressively simple and a breeze to work with, however in many ways it reminds me of the iPhone, fantastic so long as all you need to do is what the original engineers thought you would ever want to do. In other words it has some limitations, and they’re mainly around the wp-admin/widgets.php page itself instead of the api.
Where to start?
Each widget admin form is rendered in it’s own form, fantastic, but the form has no id or name, boo. It took me a ridiculous amount of time to figure out the correct jQuery foo to get the form encompassing the current widget so that I could try and add a submit hook. Which brings us to the next issue, try as I might I could not find a way to actually catch the form submit event and force the tinyMCE widget to copy the html to the textarea. I soon discovered that this was because the form is never action submited, in fact the widgets admin page wires the ajax request to the onclick event of the save button. That’s right, rather than adding an onsubmit event handler to catch the form and ajax-ify it, they use an onclick event. If they’d actually used the form submit event then the tinyMCE auto detection would have worked on it’s own.
So as it stands we have a whole bunch of html foms with no id’s or names, which are ajax-submitted by an onclick event of the button. Not the best way to do it, but workable. So the next step is to register an onclick event hook on the button using jQuery and just force the tinyMCE.triggerSave() call in there.
Nope. That won’t work either, since jQuery fires all the click event’s asynchronously and the generic form submission click event is bound before my custom event. There is no way in jQuery to reorder the event bindings, you can only unbind them and add your own. Dirty, dirty, dirty.
I’m going to digress now to talk about Anthem.Net, an ajax library that knew how to integrate on both the client and server. Anthem did ajax exactly as I’d expected it above, it caught the form submit event, built an asynch request, fired it off and then updated the page with the new content. This conversion of a .net form postback concept to an ajax mechanism was named a callback in Anthem terminology, and Anthem provided a way to catch the event on both the client and server. On the client side it provided another event called onprecallback (or similarly named), which would allow the developer to hook in any client side code that needed to be run before the form was submitted. I was sorely missing this feature while working on this widget.
So now to the widget, what I have to do is unbind the save button’s click event, bind my own event that does the tinyMCE.triggerSave() call and manually call whatever functions it was that the save button’s click event was meant to call.
Not a clean solution at all, but it works
Fantastic read on publishing, and the concept of “paying for content” by Paul Graham.
Always an interesting take on things. I especially appreciated the distinction between “content” and software, both forms of information.
Over on the msmq blog, I found this awesome snippet about using the FIND command line utility to remove the noise from log files that your are looking in.
So for example, to ignore all lines with “0xC00E001B” in it you would use this command:
FIND /V "0xC00E001B" MSMQ.LOG > NEWMSMQ.LOG
We’re currently looking for a front end developer at work at the moment.
To give a bit of context, we’re looking for a front end dev in the Web Campaigns dev team which forms part of the larger Commercial Development Team that I head up.
We’re looking for someone who is fresh, and into the latest and greatest of online, including but not limited to social media, rich user experiences (ajax, flash, silverlight) and absolutely knows their way around cross browser compatible site building. The prospective candidate also still has to have their chops as an actual developer, mainly c#, vb.net and SQL Server, but I want to be clear that the position is predominantly front end development not application development.
If you think that description above is you, then hit the jobvite link and send through your resume. We also just launched a careers page on our main portal, so if you’re in the market, but this role above isn’t quite you, check it out.
Recent Comments