Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at the New York ColdFusion User Group (Jan. 2008) with: Clark Valberg and Adam Lehman

KinkyTwits - My ColdFusion And jQuery Powered Twitter Client

By Ben Nadel on

Last week, I had mentioned on Twitter that I was gonna try to build my own Twitter Client for yucks (trying to attain true Geek status). I came up with "KinkyTwits". I put a good 12 or 13 hours into this over the weekend and I think I came up with some cool stuff. It's definitely rough and the code really needs to be organized much better, but it's working as a really basic Twitter client.


 
 
 

 
KinkyTwits - ColdFusion And jQuery Powered Twitter Client By Kinky Solutions.  
 
 
 

Watch the Demo Video Here

The backend is powered by ColdFusion, naturally, and MySQL. The front end is powered by jQuery. The whole thing is basically a single page application (what you see above). I tried to build this using a lot of Twitter feedback that I saw over the last few weeks. In particular, I got the feeling that people wanted:

  • Filtering based on patterns
  • Smart Groups
  • Snoozing

I tried to include all of that in this initial beta.

There's a lot of things that it doesn't have yet like TweetPics and URL shortening. But, I don't think those things would be too complicated to add. I am gonna continue working on this, see how it performs. If anyone wants the code, let me know.




Reader Comments

Looks cool, Ben. I'm curious, are you running the back-end on a web server? I'm guessing so, because you say it's ColdFusion powered.

I've thought of doing something similar, but always come back to the idea that this approach could be a potential scaling issue if the app were to get popular.

Do you know if other AIR clients like TweetDeck and Twhirl use a back-end server, or if they interface directly with the Twitter API?

Reply to this Comment

I meant to include this in my previous comment: I've liked the grouping of TweetDeck, but it's always felt a little clunky to me. I'd love to try yours out for a while. Can you send me a copy?

Reply to this Comment

@Adam,

Yeah, it is running off a server. I thought about this for a while and I came to the conclusion that that was the way to go. For starters, its just a personal client, so I wouldn't except this to be run as a service for a large group of people (but I guess that could change).

But, mostly, what I like is that CF and MySQL act as the go-between. Meaning, the HTML/jQuery interface only feeds from the MySQL database. It *never* touches Twitter directly (except to post a status). The action of pulling Status feeds from Twitter and caching them locally is totally asynchronous to the main application. This allows me to apply all the filtering and grouping and organization. Sure, I suppose I could do that on the fly in there interface or during the call, but I would rather not.

Reply to this Comment

Hey! Nice work so far! Meets my needs directly.

Was wondering if I could take you up on your offer and get the code?

I'm trying to get my Wife's "Moms Club" up on twitter, and the real issue they have is they want the ability to have sub-groups (so they can include/not include certain other moms from certain tweets -- go figure). Your "groups" functionality looks to cover this issue nicely!

Thought I might take what you've done so far, and run with it!

Perhaps you could zip up the code and send it to the listed email address (or maybe you have a "package" link you could point me to or SVN repository?)

I could pay you if need be! Do you have an Amazon wish list?

BTW - have you noticed lately how all the online "social" issues resolve around they ability to _filter_ your relationships? I guess Clay Shirky nail it.

Reply to this Comment

@Robert,

I'll shoot you a copy. It's really rough right now. There is no session management or anything. It's really just a proof of concept right now. My Twitter login is actually hard-coded right in my Application.cfc file. I really wanted to see if this concept was even worth pursing. Now that I think it is, I will go back and refactor, make session management, etc.

That's said, I'll send a copy :)

Reply to this Comment

You wrote:

"But, mostly, what I like is that CF and MySQL act as the go-between. Meaning, the HTML/jQuery interface only feeds from the MySQL database."

If I understand you correctly, indirectly you cover the issue of Twitter taking back the "trac" abilities. Recording the stream (in your mySql) allows to gain back some of that capturing of the "firehose" stream for searching and aggregation.

That's a benefit!

Reply to this Comment

Hi Ben

This is fantastic, and as usual it holds your distinctive style on the page.
Please could I have a look at the source code?

Many thanks,

Matt

Reply to this Comment

@Robert,

I'm not exactly sure what you;re saying, but yes, the firehose of Twitter statuses is copied to my local MySQL server, which is what feeds the interface. This actually helps me to simplify the filtering process greatly as I am really, behind the scenes, duplicating the Tweets for each group.

Reply to this Comment

Heck, if you are giving out the code I would love to take a look :-) I have been meaning to sign up for twitter so I cnow have a good excuse!

Reply to this Comment

@Abul,

Thanks man. I'm gonna make some updates at lunch (add some debugging). I'll send you an update later today.

Reply to this Comment

Just realized that General and Direct messages are handled in COMPLETELY different ways, including totally different response format. It's lunch time, gonna see if I can karate shop these updates!

Reply to this Comment

@Abul et al,

I was able to update the app on my lunch break (and re-emailed to you). I fixed the Direct messages and added local logging for errors.

Reply to this Comment

Just a general note of caution:

Do not run my Twitter client along side your old one. This will eat up your API allowance very quickly! Regardless of mine, you should only ever use one Twitter client.

I learned that the hardway when I was developing and I exceeded my limit in about half an hour (rather than an hour). I was burning the candle at both ends.

Reply to this Comment

I saw your Tweets over the weekend and wondered if you would be sharing the code. Nice job Ben. Pretty cool! Gotta love jQuery + ColdFusion.

Reply to this Comment

@Steve,

I make no claims on the code, but if you want to see it, just let me know. It's been a lot of fun, thanks.

Reply to this Comment

Interesting! Now, if only there was a way to "mute" certain twitters, at least until after a certain event . . .

Reply to this Comment

@Lola,

You can "snooze" a user. Every time you click their "snooze" link, it increases their snooze length by another hour (with no limit to how many times it can be clicked). When a user is snoozed, their tweets get auto-filtered into the Snoozed group and do not show in the General Tweets.

I am working on updating my Groups to allow you to add Users to them, rather than just regex filters.

Reply to this Comment

Nice work! Now, if I could just get something that slick on my Windows Mobile....

Oh and love the app name. :)

Reply to this Comment

Hi Ben,

Very sweet looking app. I am writing a Twitter app as an exercise in getting back into CF dev, initially just using the built in CF AJAX tags. I am having a lot of problems with layouts, flickering refreshes, and even incompatibility with the built in stuff (cfdiv vs. cfcalendar), so would really like to see your code to get a better idea of using jQuery.

TIA,
-Rob

Reply to this Comment

Very Nice Work!

I'm thinking developing japanese version of twitter like app for my family and friend in japan. This will be perfect for starting it.

Could you kindly share your genius code source please~

Thanks

Reply to this Comment

Ben:

I've been running into a real issue with doing a simple Twitter update of late from a CFML powered site. Is your source viewable? What I'm trying to do should be easy but it simply isn't working for me and other CF/Twitter information sources on the web are few and far between.

If it is viewable, may I have a look at it? I'm really trying to get a good idea of what I'm doing wrong as opposed to looking for a prebuilt solution (although if your solution does the job, I'd like to discuss using it in my app with you).

Thanks in advance.

Reply to this Comment

@Adam, thanks. I had run across that early on and it failed like all the others.

As it turns out, as I was posting this, I did discover the solution to my issue was a CFML language problem rather than anything I was doing incorrectly or anything like that. I have a workaround that looks like this:

<cfhttp url="http://twitter.com/statuses/update.xml" method="POST" username="#variables.Tusername#" password="#variables.Tpassword#" charset="UTF-8">
<cfhttpparam type="HEADER" name="Authorization" value="Basic #ToBase64(variables.Tusername & ':' & variables.Tpassword)#">
<cfhttpparam type="FORMFIELD" name="status" value="#variables.Tstatus#">
</cfhttp>

Reply to this Comment

@Craig, I wonder if Twitter recently changed their API. They've been known to do that. If you have specific problems, I would recommend logging them on the issues page for the RIAForge project. Not enough people do that. :)

Reply to this Comment

Nice idea!

I am in need of a simple app like this so is there a way of getting a copy of it, please?

tia

Reply to this Comment

Hello Ben, congratulation for this great app. Could you share you code with me? I´m needing create this kind of interface in our intranet to tweet at our corporative twitter. Thank you.

Reply to this Comment

@Ben,

I'm very curious as to your approach to displaying tweets utilizing ColdFusion. I've learned recently that twitter has basically shut down their RSS feeds, so what method do you use to display tweets? As you've offered, could you please share your code?

Many Thanks!

Reply to this Comment

Post A Comment

You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.