Projecting Failure – Clvr.io

In the first post in this series, I covered a personal project: LG Console. In this post I’m going to discuss a project I worked on earlier in 2012 for Jenkat Media, Inc., a company I helped co-found back in 2007.

clvr.io
With JenkatGames.com we have had a long-standing problem: we don’t really have a good idea on how much a new user is worth to us. Much of our user base does not register with the site, and since the content is all free, there’s no transactions to track. We decided to start tracking various actions, starting with page views, that generated small amounts of revenue. To that end, we decided on deploying a small REST service on an external host and having our server hit it when a trackable action occurred.

Clvr.io was built using:

  • Java SDK 1.7
  • JAX-RS
  • JSON
  • MongoDB
  • Jetty

Continue reading

Posted in Projecting Failure, Projects | Tagged , , , , , | Leave a comment

AppFog – A Developer’s Best Friend? – Part 3

In the first two parts of this series, I highlighted how easy AppFog is to setup and some of the slick functionality that AppFog offers. This third part will cover a couple of neat AppFog tricks I’ve seen.

Cloning Your App
Once you have your app up and running on AppFog, you are able to clone it. There would be a variety of reasons to do this, but two that stick in my head are: offer higher availability (which I’ll touch on shortly) or providing different levels of service for different types of customers. Perhaps I would want my paying customers on a more powerful instance at uber.ericbrandel.com, while the free customers are on a less powerful and less costly instance at free.ericbrandel.com.

Continue reading

Posted in Cloud, PaaS, PHP, Web Development | Tagged , , , , , , | 1 Comment

AppFog – A Developer’s Best Friend? – Part 2

In the first part, I outlined what made AppFog such an appealing tool for developers. Setup is painless and fast, and there’s a free tier that has a lot of functionality and power. In Part 2, I’ll take a look at some of the other really slick functionality that AppFog offers.

App Resources

Adjusting the amount of resources available to an app is amazingly easy. Just slide the Instances and Memory Quota sliders and set your desired levels. After adjusting, your app will restart, and your code will be copied to each instance, each one running with their own set amount of memory.

Continue reading

Posted in Cloud, PaaS, PHP, Web Development | Tagged , , , , , | Leave a comment

AppFog – A Developer’s Best Friend? – Part 1

In the past, I have advocated utilizing AWS to quickly spin up some development environments. It’s not that tedious to do, but it can take a little bit of time, and it can also have some costs associated with it. Ideally, it would be nice to have something out there that made setting up environments even easier, and it would also be nice if it were free.

One of the podcasts I listen to on a regular basis is The Cloudcast. Last month they had an interview about VMWare’s Cloud Foundry push. Cloud Foundry is the “Open Platform as a Service Project”. As with other PaaS offerings, like the Salesforce.com acquired Heroku, the idea is to provide the platform stack you need, without having to worry about the underlying hardware, software, storage, OS, etc. To use the popular LAMP stack as an example, it really doesn’t matter what version of Linux is being utilized for most LAMP development, and the same is true for Apache HTTP Server. What you want are updated, patched, and configured versions of the OS and web server. A proper PaaS abstracts away the server infrastructure. With Cloud Foundry the attempt is also made to make moving between various PaaS providers as easy as possible, with standard APIs, service, and language support. The goal is to introduce true cloud application portability.

Continue reading

Posted in AWS, Cloud, PaaS, PHP, Web Development | Tagged , , , , , | Leave a comment

Worthwhile Tech Podcasts

There are a lot of Tech podcasts out there. Unfortunately, if you’re browsing through iTunes or googling trying to find some, chances are many of the ones you discover will be old, with the last new podcast from two years ago. I don’t understand why they don’t have some better filtering in iTunes for this type of thing, but then again, iTunes doesn’t seem to be designed for the power user at all, especially with iTunes 11’s insanely bad search, but I digress.

Below is a list of some Cloud Computing, Marketing, Business, and PC Hardware/Tech blogs that I enjoy, and are updated on a fairly frequent basis (typically weekly). I’ll provide commentary on some, but not all.

Business:
These aren’t strict business podcasts, like, say, the Harvard Business Review’s IdeaCast, but more focused on the entrpreneur side of things, with an emphasis on solopreneurs or microprenuers.

Continue reading

Posted in Misc | Tagged | Leave a comment

Easily Handle Development and Production Database Configs With WAMP and PHP

One thing that can be a hassle is handling differing development and production database configurations. On your local box you have set of database credentials, on the live system you have another. Frequently, you may end up commenting out one set or another, and that can easily lead to accidentally putting code on the live server that will not work. There are a number of ways to handle this, but one simple way is outlined below.

Continue reading

Posted in PHP | Tagged , , , , , | Leave a comment

Reordering a Day’s Events in FullCalendar

To help us schedule things in our new CMS, we’ve been using Adam Shaw’s FullCalendar jQuery plugin fairly extensively.

It does a good job of providing a pretty robust and easy to use Calendar, including some nice drag and drop functionality. One thing it doesn’t support is the ability to easily reorder events inside of a specific date, by simply dragging them around. Now, you can assign each event a time, and then they will order by that time, but that requires you to edit each one individually, which is kind of a pain. It doesn’t actually matter to us the time of the event that we’re scheduling, just the date, and we need a way to order them in some way.

I was originally hoping to be able to just do a sortable call on the container that holds the events themselves, but that appears to be impossible due to the way FullCalendar works. If you look at the code it generates, the calendar is actually just a big table, with the events placed into their proper locations using absolute positioning. All the events for a day are not held in a unique container. They are not actually contained by the calendar itself. An example of an event:

Continue reading

Posted in jQuery / Javascript | Tagged , , , | 2 Comments

Colorbox Was Smarter Than I Thought

I was doing some work on a custom CMS recently. It’s been utilizing the really nice jQuery ColorBox plugin, and I was using it to preview a page with the following code:

jQuery('#previewPage').click(function() {
   var data = jQuery('#editpage').serializeArray();
   jQuery.colorbox({href:"/pages/preview/", data: data, speed: 200, 
   opacity: 0.25, title: "", width: 1024, height: 550});
 })

It’s pretty straightforward, with #editpage being the form containing the new page’s contents. The problem was that the preview would work once, but any subsequent preview call would cause the following error:

TypeError: Object function (a,b){return new p.fn.init(a,b,c)} has no method 'colorbox'

Continue reading

Posted in jQuery / Javascript | Tagged , , | Leave a comment

A Handy SaaS App: CloudMailin

A couple of years ago I was working on a little prototype web app. Part of that app required the ingest of email messages, which would then be further processed. Now, it wasn’t a huge issue to pipe the emails through some code I had written, but that required messing around at a lower level than I would have liked, and was somewhat server specific. It would have been nice to avoid the issue altogether. That’s where CloudMailin fits in. It offers simple incoming email processing for your web apps.

An example of how this can be useful: your support app sends emails to customers. You want to be able to ingest any replies to those emails back into your system. With CloudMailin , you can do so quickly and easily. Setup is pretty simple:

Continue reading

Posted in Cloud, PHP, SaaS | Tagged , , , | Leave a comment

Quickly Build RESTful APIs in PHP with Slim

Writing and interacting with APIs, RESTful APIs in particular, is something most web developers have to deal with. There are a number of ways to implement them, and many of them are quite straightforward, like on the Java side of the things with JAX-RS. With PHP, one of the best options is the Slim Framework.

Slim is actually a PHP micro framework that can be used for far more than just writing RESTful APIs. Digging into the documentation reveals that there is some very powerful routing functionality in there, especially with the slick middleware functionality.

Continue reading

Posted in PHP, Web Development | Tagged , , , , , | Leave a comment