Side Projects

During my downtime from working on my Magic: The Gathering Web App I’ve picked up some new side projects to keep things interesting as well as give myself a break from constantly thinking about the same project; give me a change to step away and come back at it looking at the bigger picture or from an outsider’s point of view.

 

The first side project I decided to embark upon is a JSONP API. Inspired by MTGAPI.com, I started to wonder how difficult it was to make an API, particularly for JSON responses, since I already knew how to set the header of an HTTP request in PHP and I knew that JSON responses only printed out the JSON data structure of whatever was being requested. So I made a simple echo service, tested it out, and sure enough it worked! Reading more on JSONP and it’s limitations, I tested it (as best as my limited knowledge could) against common XSS attacks with the help of OWASP.

 

Now if only I had some actual data to make use of the API. 1st World Problems.

 

Another side project I’ve started is a web app that helps people remember to take their medications (at the suggestion of a family member; demo). I put it together in a day and it’s still VERY rough around the edges and I’m working on figuring out what features would be required / desired. Right now, it looks like the hard part will be handling recurrences and a calendar. Right now I’m using FullCalendar, which is great, but leaves the recurrence handling server-side and there isn’t any iCal support (which would make handling recurrences easy), but as of right now, it could work, just wouldn’t be pretty.

 

In the mean time, I’m looking at other options which includes jQuery iCalendar which can handle parsing iCal events (particularly recurring events). I am also trying out jQueryUI’s Datepicker widget as the calendar base and looking for ways to tie in event managment. Styling it appropriately has been difficult so I’ll also be posting a short tutorial on how I managed to make it a fluid, full-sized calendar with square cells.

 

Lastly, a project I haven’t started yet (but is on the horizon) is working with PhoneGap. A limitation with the medication reminder web app mentioned above is the lack of support for notifications. Once a working version of the web app is made, it is my understanding that I could package it in a PhoneGap app and port it to iPhone / Android and be able to take advantage of the native notification services which would help facilitate reminders throughout the day.

Website / Recent Update

WordPress released 3.8 which appeared to have a slew of new features including a redesigned, responsive administrative dashboard. Along with upgrading to 3.8 (primarily for security reasons) I decided to upgrade my theme to one that’s responsive and more mobile-friendly. I settled on the Parabola theme because it demoed nicely in a mobile format, allowed for personalization exports/imports and offered a decent reach of built-in customization without having to make child themes; I only had to add 1 line of custom CSS to get the navigation dropdown to render properly on my phone.

 

I haven’t had as much time as I’ve wanted to work on my Magic: The Gathering Web App due to the holiday season. I’ve been reading more about “appropriate” MVC design using backbone.js and underscore.js and what I’ve mainly been seeing can be summed up as: if you can use backbone.js to accurately represent the model and associated actions with an appropriate view then do so, but don’t assume you have to do EVERYTHING with backbone.js; if it’s easier and more maintainable, use regular JavaScript.

 

As with any software development project, getting the design right is crucial and probably the hardest aspect (a good, well-thought-out design is easy to implement). I’m pulling mainly from my Java background here with getters/setters on JavaBeans, but since JavaScript is a lot looser in terms of declarations, I’m currently looking at having the models / collections be their own controllers (collections to add/remove models, models to modify their own information). No idea if this is the right course of action, but hey, that’s what this project was for (to learn: CSS3, HTML5, JavaScript, jQuery[Mobile], backbone.js and underscore.js).

 

I’ve stickied the Change Log for the Magic: The Gathering Web App to the home page for quick access. I may do the same for the planned features. During the development downtime of the holiday season I’ve tested the web app and found a few more features I’d like to add, notably an import/export feature since the webapp uses the device’s localstorage for persistence (also helpful for when developing on multiple computers/devices).

 

If you have any suggestions for web apps to create, let me know and I’ll look into them. I could always use more examples for my resume!

 

-Brad