Backpacks for Kids is an annual fundraising drive put on by Bell Aliant, to raise money for school supplies for children who can't afford the basics. This year, Bell Aliant wanted to open up this campaign to the general public, and needed a fun way to solicit contributions. We built a website where visitors could fill a digital backpack with virtual school supplies, make a contribution with their credit card, and promote their contribution to their social networks, from any device.
This project leaned heavily on Lasso's core strengths. Lasso 8.5 has a very polished set of tags out-of-the-box, that enable us to do lots of heavy lifting with very little code. For example, while most modern 3rd party APIs provide a REST interface, they also ship client libraries for popular scripting languages. This is because most popular scripting languages make you do a lot of unnecessary work to communicate with another web server. Without their client library, lots can go wrong.
Lasso makes things so easy that we don't even need a client library. We can obtain a native map of 3rd party JSON data in a single line of code:
$result = decode_json(include_url($api_endpoint));
Sending data back to a 3rd party service for processing is as easy as calling include_URL with -POSTparams=$params.
We use Stripe as our payment gateway, and CouchDB as our data store. Since they both provide REST APIs, we use this 1-line pattern to retrieve payment data, validate credit cards, create new customers on Stripe, charge customers, log transactions and store contributions.
The best part? This entire workflow is less than 100 lines of code, no client libraries required!
Lasso's simplicity extends even further, to session tracking for language localization, built-in URL rewriting for custom share pages, and easily configured SMTP settings for sending thank-you notes. It provides an awesome foundation to build upon.
Backpacks for Kids has facilitated thousands of dollars in contributions from the general public, and generated a tremendous amount of awareness through social media sharing (25% of all traffic came from social referrals). Donations come in at all hours, from smartphones, tablets and desktop browsers. Lasso never misses a beat.
I enjoy describing the benefits of Apache + Lasso + CouchDB / noSQL to my peers in the PHP / mySQL, Rails and NodeJS communities, because our architectural patterns are so refreshingly different. We avoid the messy syntax of PHP, the rigidity of Rails' MVC framework, the callback hell of NodeJS, and the inflexible schemas of relational databases, while reaping the benefits of a reliable web server, a powerful yet concise procedural syntax, an adaptable scripting framework and a highly flexible document store. It's difficult not to sound smug.
This is what our client had to say:
"The Torusoft team really pulled through and delivered a site for us that provided an effortless experience for the user, from the point of making a donation through to sharing the experience with friends on their social networks. The drag and drop option gave users the chance to have a little fun while donating money, too! We were extremely please with Torusoft all through the process, from the conception of the idea to making the first donation, they were both professional and generous - always ready with a solution at hand to tackle any challenge we presented."