Apr 06

Originally posted on the dynamIt Blog.

While using the Tweetie 2 Twitter client on my iPhone a couple of weeks ago, I realized the app developer saw fit to include the option of using any URL shortening service I might desire if the shortening service provided an appropriate API.

API stands for Application Programming Interface. An API allows software to interact with other software. Twitter clients use the Twitter API to implement features of Twitter and access tweets, Twitter uses the Bit.ly API to shorten links using the Bit.ly service, and we have made creative use of various APIs on sites like Columbus College of Art and Design (which uses the Google Calendar API to power its deep set of event and news listings).

Since dynamIt already has a URL shortener built into our site, all we needed was a suitable API. I was able to use the existing scripting to generate and store the shortened URL, and only needed to adjust how the shortened URL was returned for suitable API use.

TinyURL has set a precedent for the simplest response possible—just the new shortened URL. Try calling the following action in your browser where [URL] is the URL you would like to shorten:

http://dynamit.us/url/api.dT?url=[URL]

The response will be the resulting shortened dynamit.us URL in plain text. You can optionally include the title of the page whose URL you are shortening as well:

http://dynamit.us/url/api.dT?title=[TITLE]&url=[URL]

While this simple plain text response can be interpreted by most applications, some developers may prefer a Bit.ly / JSON style response that looks something like this:

{ "shortUrl": "http://dynamit.us/222" }

If so, just add the URL variable “json=true” to the API call (with or without the optional [TITLE] variable):

http://dynamit.us/url/api.dT?json=true&url=[URL]

The Tweetie 2 application I use on my iPhone will accept either format. In Tweetie 2, go to Settings > Services > URL Shortening > Custom and enter:

http://dynamit.us/url/api.dT?url=%@

Or if you want to use the Bit.ly / JSON format just for fun:

http://dynamit.us/url/api.dT?json=true&url=%@

Tweetie URL SettingsTweetie URL API

Tweetie recognizes “%@” as where it should include the URL in the API call. Now whenever I am tweeting from my phone and want to include a URL, Tweetie will automatically use the dynamit.us URL shortener to shorten the link for me!

Test Tweet

Are there other places where you might like to use our URL shortener?

Sep 25

It’s been almost a week since my last post, but I’m gonna go with the excuse that I was pretty sick the past few days.  Aren’t you glad that there is a computer screen between us now?

I’ve been making some good progress on the new redesign that I had mentioned for the COSI.org home page.  One of the issues I am going to have to deal with as we embark on a redesign of COSI.org is that of web standards including usability and accessibility.  I have to consider how those accessing the content by alternative means will see it…those using mobile devices, those wanting to print out pages, and those who can’t see the page at all and instead have the computer read the page out loud to them.  This issue was brought to public prominence by a 2006 lawsuit brough against Target.com by the National Federation for the Blind.  Their web site was not usable by blind web visitors, and by refusing to change it, they were violating California’s Americans with Disabilities Act (the internet equivalent of  not having a wheelchair ramp in a building).

So this brings me to my current concern: how, when, and where to make use of Flash on our site.  Adobe loves to declare that Flash content reaches 99% of web users.  Flash certainly can be used to create some extremely cool interactive experiences like the new “Got Milk?” campaign.  It can be used to entertain like at Home Star Runner.  It has even become a superb video delivery tool (YouTube anyone?).

We have used Flash in the past to create some special experiences like many of our online activities.  Even a good potion of our in-building exhibit activities are built with Flash.  However, such experiences are expensive and time-consuming to create, expensive and time-consuming to update, usually involve some sort of navigational learning curve, and can’t easily be read and navigated by those with sight limitations.

The most important blind visitors to any web site are search engines like Google which use automated web “spiders” to catalog site content.  Although some search engines have made advances in being able to “read” Flash content, they are still unable to link to the specific point in the Flash movie where that content occurs since the entire Flash movie uses the same browser URL!

Next comes the concept of “graceful degredation.”  In short, this means that when a visitor to your site has limits to viewing the content you provide (no Flash, no JavaScript, no CSS, or even no images), they will still be able to understand and navigate the content you are presenting.  Flash does not degrade well at all…it tends to either work or not.  I have become especially sensitive to this since I purchased an iPhone, which displays web content in all of it’s desktop browser glory, but does not support Flash.  When I visit the current COSI.org home page on my iPhone, I get a big white block with an error icon where the billboard rotator should be (which occupies almost half of the page).  Early news is that Google’s new Android cell phone operating system won’t support Flash web content either.

So what do I do instead?  Well, I think that the new home page is going to feature headlining content using a similar home rotator, but one programmed using JavaScript!  No Flash?  No problem (even on my iPhone).  No JavaScript?  You may not get the rotating images, but at least you’ll see the first one!

I’ll keep you up to date as we continue to develop the new home page.  Hopefully it will set the bar pretty high in both design AND content so the rest of the site can follow soon after!

Sep 11

Three weeks ago, COSI.org had one of its darkest days. At 1:30 PM on Tuesday, August 19th, the COSI web site died an unexpected death. The timing couldn’t have been worse, as we were celebrating our recent #1 ranking by Parents Magazine with a special $1 admission offer that day. Radio and TV outlets throughout Columbus were directing listeners and viewers to www.cosi.org for more information about the promotion, and the site wasn’t there to be seen!

This situation really illustrates how fragile technology can be. We take for granted the millions upon millions of electrical signals that are sent back and forth inside a computer that let it think and process our applications. We also take for granted the code of the applications that tell the computer how to logically process the information it is given. Like the thousands of little explosions that happen within our automobile engines every second, we usually don’t appreciate such details until they stop working.

For the past few years, the COSI web site had been hosted within the COSI building on a Windows server set up and maintained by our IT department. They have always done a wonderful job at handling the server maintenance, keeping it connected to the internet, keeping the server secure, and managing our domain names. Our site is powered by the Adapt CMS (Content Management System) developed by Integrate Inc. Adapt is programmed in the PHP language, and a standard Windows web server does not natively run PHP. To fill this gap, Integrate had installed a PHP application on the web server to process the PHP code. This PHP application is the piece that unexpectedly failed and brought the whole site crumbling down.

Somewhat ironically, I had submitted a proposal to our VP of Advancement the day before the site crash that suggested we move the site to an outside web host. Doing so would give us greater flexibility within the server, allow for more interaction with our site users while still maintaining security, and also provide us with a native PHP framework to run on. In fact, making the move would save us hundreds of dollars a year in hardware and software costs AND save our IT team’s valuable time. The proposal seemed like the best of both worlds with enhanced service for a lower cost, and was just awaiting final approval from our COSI leadership.

With the site down, my proposal jumped right to the top of COSI’s priority list! The COSI leadership readily approved the plan, and I had 1&1 Internet set up a dedicated server for COSI that day. I had my computer uploading all of the files to the new server throughout Wednesday morning, and Integrate was kind enough to send their developer Brian over to help me move the databases and chase down the bugs. Brian and I ended up being here until 1:30 AM Thursday morning ironing out all the wrinkles, but we finally had the site up and running on the new server! Our IT department was working with Time Warner to make the final switch happen…directing the web traffic for www.cosi.org to the new server.

Around 11:00 AM on Thursday, August 21, the new domain name settings took effect and COSI.org was back up and running! The migration of our site from an internal server to an external one (a project I had planned to do over the course of several days) had been successfully completed in under 48 hours! A couple additional bugs cropped up after we were live regarding our contact and registration forms and the site search. The email forms were working again within a day, and I eventually solved the site search problems by upgrading from the older htdig search we were using to Google’s Custom Search tool that not only restored the function to the site but also improved the quality of the search results!

In all, those few fateful days in the middle of August were an interesting experience to say the least. In the end, we got the site back up, relieved some of the load that had been placed on our IT team (who has plenty of hard work to do without having to manage a web server), increased our site’s flexibility for the future, and even upgraded a few features along the way!

Since the server move, I have been able to use the new dedicated server to create a complete development copy of COSI.org where I can test out new ideas and work on projects without risking damage to the live site. In addition, we can set up entire web applications (like this WordPress blog you are reading) right on our own server. As we prepare to open our new Lost Egypt traveling exhibition next summer, we will even be able to create a standalone web site dedicated to the exhibit using our new dedicated server!

The possibilities don’t end there. What would you like to see us do?