A few weeks ago, I set out to build a flex-based mashup that streams the twitter public timeline (along with other social media streams), onto a map service. Of course we all know that everything will go swimmingly on a development server. Not only because the first law of development is that projects will always work in development but not production, but also because flex security restrictions aren't in the way while developing locally.
When I started out, I had assumed that twitter would place a fairly loose crossdomain.xml on their server since their API's are so easily consumable. FAIL! If you take a closer look at their crossdomain file you'll see it restricts access (to the public timeline) to twitter domains only. Doh! So now what?
After googling around for a bit, you'll see that most people will suggest you create a server-side proxy file to handle the requests. My first thought was BINGO! But you'll suffer from a major drawback. Since all requests to twitter will now be proxied through your web server, you will diminish the 150 requests per hour limit imposed by twitter in less time than it takes a monkey to eat a banana (assuming you have more than one user accessing your application - and an average sized monkey). FAIL (again)!
So now what (drum-roll please)? After hours and hours of trial and error, and digging around the internet, I discovered the solution. According to the twitter api, you have the option adding the paramater callback to twitter search api requests. But what they don't document is that you can add this same parameter to the public_timeline requests too. So what does this mean?
Using javascript/ajax, you can make cross-domain calls (with JSONP datatypes - a.k.a. callbacks). Hopefully the light is starting to come on by this point...
I wired up a framework that sends the twitter public_timeline request from Flex to Javascript (via ExternalInterface), then using jQuery I send the JSONP request to twitter (with the callback parameter), and finally send the response text back to Flex. Eureka! I just successfully queried the public_timeline from Flex (more or less), without using proxies or worrying about security restrictions on production servers.
This method is also handy for requests to Google (e.g http://maps.google.com/maps/geo), which doesn't have a crossdomain.xml policy file at all (I know, lame)!
So, those of you who know me, know that I'm a very professional and straightforward bloke... You also know my quirky side. The side that loves sarcasm, surprises, and practical jokes. For that reason, it's been a long standing goal of mine to be the number one Google hit when googling "Daniel Bradshaw loves tacos." However, it seems an LSU baseball player who shares the same name as I likes tacos too (and apparently I'm not as SEO friendly as mr. baseball taco man). So I've settled for the next best thing:
Daniel Bradshaw likes tacos.
So the next time you're sitting at your computer trying to find this site, just remember that Daniel Bradshaw likes tacos and you're golden... Or you could add a permanent side-bar link on your own blog to mine (this might help me with my taco SEO woes).
I stumbled across this almost poetic work of cinematography. The most amazing part is it's entirely CG. Makes me wish I would have stayed more on the production end of things.
The debate over macs vs pcs will never end. You're either a corporate stiff, blindly devoted to feeding the money-machine, or a kool-aid drinking hippie, in love with an image rather than a product. Everyone else out there has an opinion on the matter, so why can't I pipe in?
I grew up on a PC. Who didn't? I loved PCs. I took them apart, put them back-together, ruined a dozen motherboards (You would never dream of cracking open a mac for fear of some sort of cryogenically frozen alien popping out). I used PCs in elementary school, in high school, in college... I was a PC man. But then I started seeing these hilarious commercials on TV telling me that a Mac was just as cost-efficient as a PC, and you didn't have to deal with viruses or crashes, or this, or that. So I did the unthinkable (at least it was unthinkable to me at the time); I bought a mac. Truth be told, I now own two macs... an iMac and a MacBook Pro.
So now for my opinion on the matter: I'm a MacMan (dangit!). First and foremost, Apple produces the sexiest hardware out there. Nobody can argue this point. Their hardware is so sleek, quiet, and the single aluminum block idea just fits with my techy lifestyle. Secondly, Apple seems to design their products around the user experience. This may play into the "you just want a mac for the image" stereotype, but Apple does produce some usable software. Is it as jam-packed with features as it's Windows counter-part? No. But I do feel like Apple focuses on doing a few things very well rather than a ton of things haphazardly. Finally, I feel like Apple is constantly innovating (at least their hardware). Perhaps this is a bad comparison because the point of a PC is its customization options, but I don't find myself drooling over those ugly PC towers.
I don't mean to bag on PCs if that's the feeling your getting, but I do want to state, for the record, that macs are awesome products. If you are a consumer thinking of test-driving one, I say (whole-heartedly), go for it!
So I ran across this blog that really tells the story of my life. Or rather, the thoughts I have on about every project I work on:
The drawbacks are obvious. Knowing what's wrong with something (or thinking that you do, which, for the purposes of this discussion, should be considered the same thing) does a fat lot of good if you lack the skills to correct it. And thinking that you know what's wrong with everything requires significant impulse control if you want to avoid pissing off everyone you meet.
But much worse than that, it means that everything you ever create appears to you as an accumulation of defeats. "Here's where I gave up trying to get that part right and moved on to the next part." Because at every turn, it's apparent to you exactly how poorly executed your work-in-progress is, and how far short it will inevitably fall when completed. But surrender you must, at each step of the process, because the alternative is to never complete anything—or to never start at all.
It's funny how many designers out there will look at something they did (even just a few months ago - which at the time was top notch) and think, "holy cow, that's crap!"
This article was originally posted on CNN. Calling it their "superphone," Google unveiled the Nexus One on Tuesday, marking the online search giant's first leap into the smartphone market.
The phone, which goes head to head with Apple's darling of the market, the iPhone, is sold only through a Web store operated by Google and, unlike the iPhone and most other current smartphones, is available either with or without mobile service.
Already available Tuesday, the phone costs $180 with a contract or $530 unlocked, leaving the phone open to other carriers.
Among the Nexus One features Google announced at an invitation-only event at its California headquarters was text without typing. A voice-enabled keyboard allows users to send texts, e-mails or Facebook updates by speaking into the phone.
It is a global-system device with a 3.7-inch touchscreen, 5-megapixel camera, Wi-Fi connectivity, an accelerometer and a compass, according to Google.
I for one love the fact that Google is challenging so many markets... browser, OS, mobile devices... what's next? I've always said that Google runs the world, this is just another feather in their inevitable takeover.
ESRI, the industry leader for GIS software and services, published a little random blurb about one of the Flex applications I had previously developed (without my knowledge). I was reading through the quarterly publication of ArcNews, and BLAM, there was the url.
It's not a big deal, but it's nice to see they're spreading the love (not to mention there's nearly 700,000 subscribers for ArcNews). The application in question was an interactive election viewer for our local political races. You can also get a few more details by viewing the application in my portfolio.
Welcome to the first post of the new blog for DB Media Studios. Because this site was recently redesigned with a new CMS, I'm starting fresh with the blog as well.
Feel free to peruse at your leisure. You'll be able to find a little bit more about me and what I do, get in touch with me, or just view some of the projects I've been working on recently (and some not too recently).
So there you have it. This blog (or rather this whole site) stands before you as naked as you were in your dreams about elementary school (weren't you always naked in those dreams?). I'm slowly putting things up, line-of-code by line-of-code. I'm definitely a tweaker, so please come back often to see my latest muse.