It has been a while between whacky inventions but 2014 just went a little bit insane with so much work and work travel before I knew it christmas had come and past, along with the free time that I only get a fleeting glimpse of once a year.... While we focused on family day trips and experiences I couldn't help but build something during this downtime so heres the goss...
Due to my enthusiasm and fascination of cocktails I recently purchased a classic cocktail recipe book I had been intrested in for a while. After 2 months of glorious ownership of this book I had not mixed 1 drink out of its hundreds of recipes, there were simply too many recipes with obscure ingredients overwhelming me, so, instead of actually reading it cover to cover I decided to build an application to save my ingredient list and retrieve a list of cocktails I could make with those ingredients. The idea is not completely original, cocktailbuilder.com does a similar thing but I wanted to focus on quality cocktails from the early 1900's right down to today. I have at least 800 recipes to add and hope to reach 1000 when I will officially launch The Savoy Bartender.
Whenever I do build something I try to learn something new, so for savoybartender.com I used Facebook connect to authenticate users instead of building a whole user database with authentication etc. Facebook authentication is a great way to build a simple web application without complex authentication and sessions (savoybartender simply uses the facebook UID to 'CRUD' the users bar stock/ingredients). Facebook authentication was quite easy to setup and use and while many dispise it, in my case it saves me having to worry about storing user data and passwords which is always a security risk.
You can see the beta version of the site live at savoybartender.com with currently 50 recipes.
Well, it happened again... I got carried away with an idea and now I have to write something about it to justify the time I spent on it.
While searching trove.nla.gov.au recently I noticed how un-responsive it is, I mean, some elements respond to different browser window sizes but using it on a phone is not very fun. so I thought I would have a play with Troves API and see what I could come up with.
Using the API is easy enough, just create a Trove account and request access, it is also simple enough to get a hang of quickly with the documentation provided. I will note there are some obvious limitations to the API which are probably there on purpose to protect the content and Trove itself. Once I had API access and had done a few tests I started with a Boostrap framework; who can pass up the ability to have a neat responsive site up and running so fast, even if it does mean sacrificing a completely unique design...
For the most part building rove was straight forward, I used jQuery AJAX requests with all data returned as JSON objects, it was then just a case of cycling through objects to list results. My biggest challenge was getting thumbnail images as they do not always come through the API. To get around this I wrote a small PHP script utilising the simple html dom script to lookup each search results URL and scrape the image source from it, a bit of a hack but it works!
Right now you can search all content types and it links to the trove items page, my next 2 main features are pagination of results with a "show more results" button at the end of each search and then I want to add article content to the result when it is clicked, this way results can be viewed in the same window as the search results and a user can then click through to the items full details on Trove.
Rove is online here: http://rove.michaelhalls.net
I created the load more feature so it allows continuous loading of results as a single page application. I also added the 'Send Item Details' button which allows a mobile user to send the items metadata including Trove URL and a PDF of the result to any email address - the idea here was to create something you might find a school student using in a classroom or library while researching in a group environment.
Rove is on the shelf now, it was a good exercise and I am happy I finished what I set out to build.
Setting up Phaser is not very hard and there are a lot of examples out there, there is also a very active support forum that I had to make use of, my question was answered overnight and my little testing platform is complete! I had some design ideas floating around so with idraw and sublime text I went at it. Click the screenshot below to try the platform, to play the game use your keyboard arrow keys to move and the up arrow to jump...
The question is, does anyone remember where the games music track is from??? It's 90's gaming memories for me!
I have a feeling it is going to be a good year, well, I mean so far it has been very productive, onwards and upwards?! At least right now anyway everything looks so beautiful on my new macbook pros retina display, so maybe I am just a bit lovestruck... speaking of lovestruck I just finished upgrading Roseann's (my wife's) website. We started with a base Wordpress theme and modified it to suit, she can take over now and update content and blog away, over the next few weeks I need to implement a client viewing gallery area so that might be the next subject for a Wordpress plugin.
As usual with the site, I have stared at it for too long so cannot be subjective in critiqing it, I do know though it was a big upgrade from the last version of the site!
Now I have to try and figure out how to get enough sleep to be able to get up in 5 1/2 hours! There is never a dull moment with kids!
I have been quite busy with work lately but have somehow been able to find some time to create my first Wordpress plugin, I am sure there are many things wrong with how I made it so I will be looking for feedback, but, delving in to the Wordpress Codex was rewarding and I took away quite a bit of knowledge about the core of Wordpress and am excited about creating my next plugin soon!
Check it out! I created a page with some documentation and download links: WC Bulk Buyer Discounts Plugin