Featured Developer – Vaughn Dabney

Circuit board and shield icon on blue background with digital code

In today’s “Featured Developer” post we’ll be talking with Vaughn Dabney, a Titanium developer for the last year and half who has recently developed a mobile app for the NAACP Annual Image Awards. Let’s hear more about him and his latest project.

Interview with Vaughn Dabney

Tell us a little about yourself

I have been a developer for about seven years. I was an electronics engineering student at DeVry University (Arlington, VA Campus), and it was last year that I started to delve into the world of websites and programming. After taking my first pro bono client in 2006, I never looked back.

Since then, I have been a multi-language developer working for various companies, as well as independently. I started out teaching myself Flash and Actionscript 2/3 when I started working for MySpace (FIM Labs/Spring Widgets) in 2007. While I was there I learned best practices and troubleshooting techniques from some of the best developers I know to this day.

After being laid off in 2009 with many others in the economy, I did my own thing for about a year. During that time I taught myself in depth: Javascript, PHP, and MySQL. Long story short, I love what I do.

For fun, when I’m not working (which is rare), I am a hardcore roller skater. I skate at least three times a week here in Atlanta. That’s one place where I go to forget everything for a couple hours and lose myself on the rink floor. Pretty heavy into my photography too – mostly wedding and lifestyle. Besides that, I’m an artist at heart which is probably why I love to create apps that people can use.

So tell us a little bit about your mobile app
The NAACP 44th Annual Image Awards App – The app was developed to engage users and attendees on the day of the Image Awards ceremony. Features include: nominee voting, celebrity outfit voting, and a live Instagram feed using specific hashtags. The content was updated throughout the show via calls to various APIs, as well as custom content from our server. Compatibility: iPhone and Android phones.

Can you speak to the voting integration of your app?

As for the integration with voting this was a simple but thought out process of course. Let’s look at the MySQL database and tables first. I set up two tables for both voting views (Nominee view and Outfits). So for the Nominee view, I created the ‘nominee_voters’ and ‘nominee_voting’ tables. In the voters table, I am storing the device MAC ID and the nominee ID (this comes from a table with all nominees). This table is responsible for storing a user’s vote count because we only wanted to allow one vote per nominee/outfit. In the voting table, I am storing the nominee ID as well as the vote value (value of 0 = no / value of 1 = yes). The process for nominee voting goes as follows:

  1. User clicks the ‘Yes’ or ‘No’ buttons when asked if they think the Nominee should win.
  2. The MAC ID, vote value (0/1), and nominee ID are then passed to a PHP page to handle the communication to the MySQL database and tables.
  3. The php page checks to first see if the user can vote. If the user has not voted for that nominee yet, a new row is inserted into the nominee_voting and nominee_voters tables with the aforementioned values for each table.
  4. After successful insertion or if the user has already voted, the php page outputs a JSON response for the app to display. If a new record was inserted (i.e. the user voted successfully) the response would be something like ‘{“rsp”:”OK”,”msg”:”Your vote has been counted!”,”percents”:[56,44]}’. If the user already voted for that nominee the response would be: ‘{“rsp”:”ERROR”,”msg”:”You have already voted for this nominee.”}’
  5. The app would then display the response messages (msg value) in an alert as well as update the percentages for yes and no responses for all votes in the database.

The same setup and process happens for the outfit voting except I store the image url as a reference instead of an “outfit_id” since that is the image url.

All calls to the php action handler from the app were made via the HTTPClient object using both POST and GET methods depending on what data was needed.

And of course along with error handling if anything should go awry with the php communicating to mysql, I also have the app calculate percentages of ‘yes’ and ‘no’ votes both on load as well as immediately after a vote.

And how about the Instagram integration?
When it came time for integrating Instagram into the mix, it was very simple. Instagram’s API is easy to use so I just made a REST API call to get all images that were tagged with a specific tag. In this case, the tag was #ImageAwards. The function below was exactly what I used:

Of course one would need an access token after registering their Instagram app (what they call ‘Clients’), but it is pretty straightforward. The API returns a JSON object back and then parsed through that to build a scrollView with the images and usernames.

Why did you choose Titanium for your mobile development?
I’ve been developing with Titanium for about a year and a half, and I simply could not say more about the quality of the platform. Once I started with Titanium, I knew this was something good…something that was going to open up more opportunities for my business and clients. Seeing this happen has been amazing, so it was evident that I use Titanium as the platform of choice. Finding the time and capacity to learn Objective C and/or Java was not exactly ideal since I didn’t have any employees to field existing projects. The only option was to find an alternative platform that allowed for solid results without sacrificing the experience.

What were some of the highlights of Titanium development for you?

The primary benefit that I love about Titanium is the rapid prototyping and development for multiple platforms. The use of one code base is perfect when the client has a wide base of users with both iOS and Android devices. With this project, not only was multi-platform compatibility a factor, but also time. In this case, the timeline was effectively three weeks — starting development the week of January 7th. Knowing that Apple typically takes six to seven days for approval, the pressure was on. Not to mention, I work as a developer for a company during the day.

How long did it take to design, implement, and test?

I proposed a design the last week of December and they loved it. The design, again because of timeline, was done in a week. Development took about 18 days to finish with about three to four hours of work each night, including weekends. I usually test throughout development, but we did final testing the last week.

What resources did you use to learn and develop with Titanium?
Since I was already involved with development before I discovered Titanium, it wasn’t too difficult to understand the syntax of the Titanium platform. Developed around Javascript with an emphasis on object notation (JSON), it didn’t take long to see the power of the platform. I think the challenge was to learn what to use and when to use it and with that, I looked towards the community when I was just getting started. Typically, forums and community boards associated with a specific software products aren’t that helpful. Usually it requires time-consuming searches and/or digging around the web for abstract hints to solutions.

I must applaud the way the Q&A forum is setup on Appcelerator.com. You can really find a solution to a problem or help with issues you are having as a developer — and people are active! That’s the great thing about it. You don’t feel like you’re sending your questions off in a bottle out at sea, hoping for someone to read it.

Do you have plans for updates to The NAACP 44th Annual Image Awards App or future Titanium apps? Care to share some details?
There are plans to either update the existing app or develop a more general one, but we’re still in talks right now. Considering how busy they were with getting ready for the awards, they were awesome clients to work with and I’m looking forward to future projects. As for other apps, I have projects coming up that are pretty exciting and I’ll be sure to keep you posted about those!

What advice do you have for companies that want to delight their users with mobile?
If easy maintenance, reliability, and rapid development are priorities with mobile campaigns, Titanium is the platform to do that. I’ve developed 11 apps with six more on deck and it’s just me…think of what a company can build out with a team!

What inspires you about the future of mobile?
The aspect of mobile development that inspires me the most is the integration of mobile into our daily lives and objects around us. There are so many ways to do this and the opportunities are endless!

Big thanks to Vaughn Dabney for taking the time to give us some insight into his experience and success with Titanium app development. We know the rest of the community, as well as the Appcelerator team ourselves, get excited when we see beyond what is possible with Titanium to what is now reality.

Do you think that you and your Titanium app should be highlighted on the Appcelerator Developer Blog? Send us an email at community@appcelerator.com and we’ll see if you have what it takes to join the ranks of our other featured developers. We hope to hear from you soon!

Vaughn’s Links