These last two weeks have been crazy. Mathias Hansen has been to three conferences in that time, I attended two of them, and together we have a combined travel distance of over 10,000 miles! It’s been a while since my last blog post, so I’d like to share with everyone the details of our successful and very fun time at our last conference, eCommerce HackDay, organized by Dwolla .
eCommerce HackDay is no ordinary conference or convention — if you would even call it that. It’s about competing developers, who love all-things-code, binging for a 24-hour hackathon to create the most elaborate, creative, and complex project they possibly can. Personally, I’ve never been to a sponsored hackathon — only the small ones Engage or my buddies host — so I actually had no idea what to expect.
The second we arrived at the Hackathon, you could see people were hardcore developers. I mean, to even be invited you needed to crack a code and puzzle by programming your way though a series of HTTP requests. It was surreal. All around us were developers from big-league companies such as TokBox, Stripe, Etsy, Twilio, SendGrid, and Amazon to name a few. It was exciting and frightening to think we would be hacking in competition against such skilled people. There was even a “HackStar” attending who “wins hackathons for a living”!
The hackathon started with some introductions, ground-rules, and an overall good time. Mathias and I purposely partnered-up by ourselves to see how far we could push ourselves as a working team against the many experienced developers. In just 24-hours we came up with an idea, programmed it, and won two-awards for our finished project.
The project we built is called tips.io. tips.io is a self-post platform where anyone with a Dwolla account can offer small “tips” or bounties for awesome, insightful, and helpful answers to their questions or requests about any subject. It’s a pretty simple concept that creates incentives for people to really put a strong interest in responding to questions with a serious and well-thought out answer.
tips.io is built on Codeigniter, the Dwolla API, and TokBox’s OpenTok. We used my custom Codeigniter templating engine and a custom Bootstrap competitor that uses the Metro design philosophy. I plan to open-source and release both of those projects as soon as I possibly can. As we were developing, Mathias found three bugs in Dwolla’s PHP SDK and created a custom Codeigniter Library for it. Mind you, this was all done in a 24-hour period! It kind of gives you insight into why these awesome companies host things like this. We also got to speak with a developer at TokBox, who we think we may have coincidentally spoken to for support while using their API previously on XG.
In the end we presented our project in front of nearly 200 people — not counting the one’s watching it from home with Google Hangouts. We were both super nervous but overall had a very successful presentation. In competition against 27 different teams our tips.io ended up winning the awards for “Best Use of API” from Dwolla and “Best Use of OpenTok”. We were ecstatic because we were aiming to win both those awards. The prizes were two Ouyas and a Google Nexus 7!
To wrap this up, it was an amazing experience. We received some serious insight to the eCommerce industry, and it gave us a lot of potential ideas on where we can incorporate it into Engage’s business model. I’d like to do a shout-out and congratulate the top 3 winners overall, and I would like to thank the sponsors of the event. After having such a good time, this definitely won’t be my last Hackathon.
At Engage we continuously try to improve our workflow, and as such, we have recently spent time on trying to figure out how we can improve the management and deployment process when working on web projects.
Our main goal was to determine a simple flow that makes it possible for multiple developers to collaborate on the same project using a version control system without requiring developers to have a local LAMP stack and with simple deployment to a dev, stage and production environment.
We decided to use git as the version control system of choice, primarily because of its cheap branching model and its distributed architecture.
How it works
The system works by heavily using server-side post-receive hooks to pull changes to the web server as soon as they are pushed to the remote git repository.
Each git branch corresponds to a separate URL which could be hosted in totally different hosting environments. Here are some examples for your reference:
A change to the develop branch is then as easy as committing a change and pushing it to the remote repository.
git commit -am ‘My new change’
git push origin develop
This could also easily be extended to support feature branches too. Let’s say that I need to work on a new landing page without disturbing the other developers who are currently working with minor changes in the development branch.
# Make sure we are on the develop branch
git checkout develop
# Create a new branch from the develop branch
git checkout -b feature/newlandingpage develop
When pushing the branch for the first time to the remote repository, the post-receive hook will automatically handle creating a subdomain so the new landing page can be viewed at http://newlandingpage.feature.mywebproject.com
Speeding up the creation of new test projects
Another thing I, personally have been working on recently is a feature for GITLAB that enables me to quickly create a new web project from a template. This is done by allowing you to initialize a git repository from a template, right after the git project has been created in GITLAB.
Let’s say we pick CodeIgniter, Twitter Bootstrap and MySQL. A default CodeIgniter install will be copied to the repository. Twitter Bootstrap will be copied inside the CodeIgniter install with a default page, also a MySQL database/user will be created, and in addition to that, the CodeIgniter database config is updated to reflect the newly created database and user.
With this system it is easy to get started on a prototype of a new project without any compromises.
I’ve dabbled with the Facebook PHP SDK plenty of times before, and Facebook does a really awesome job of making it simple to use their SDK and their Graph API. The development and creative team at Engage know how much I love the Open-Source PHP Framework CodeIgniter by EllisLab . It’s a high-performing and extremely light-weight MVC (Model-View-Controller) Framework that has a very small foot-print when compared to the other frameworks out there. Best of all, it requires nearly zero-configuration to get setup on a web server.
I’ve been doing some research on how other developers integrate Facebook’s SDK into Codeigniter, and I haven’t seen any real solid working examples of a best practice. So I decided to throw my two-cents at it, and am releasing my findings publicly for everyone to use!
To get it setup, all you have to do is follow the very short README file instructions, and you’ll have a working example in no time. Here’s an overview of the important files to look at:
Controllers and Models
Below you’ll find links to a working demo, the source on my GitHub Repository, and a support forum. If anyone has any questions, please feel free to email me at firstname.lastname@example.org. Thanks, and I hope this at least helps one person out there!