Just another quick code snippet to show how to handle a Future as a Promise in PlayFramework 2.0.3.
If you create some code in a reusable library and you want to call it from your PlayApplication you have to convert the Future to a Play Promise. Here is how to do just that.
Akka Future Code.
PlayFramework code to wrap Akka Future
I could not find much information on making sure a field on a mongdb document was unique when validating a playform so here is some quick code that does the job.
Im using Play-Salat to do the lookup but you could just as easily do the lookup directly.
I was recently asked to review Appcelerator's Titanium platform to see how it compares to native iOS application development. I figured the best way to do that would be to create an iOS module for the Titanium Market Place I had a quick look and decided that I would make the UIActivityViewController available as a Titanium Module called BDActivityViewController. In a follow up post I will show how I went about creating the module along with some of the issues I encountered and some neat tricks to help with your own module development. But back to the topic at hand. How does Titanium development compare to native iOS development? I have broken it down into the areas that affect me as a developer.
Having given up Eclipse in favour of Intellij for my Scala development I was not looking forward to going back,
However I took the plunge and installed Titanium Studio.
Once installed you are presented with some options to install pre-configured application as samples or as templates for your own applications I found it very easy to get these applications up and running. In addition the documentation for getting started on the website is very good but a little outdated. So this process was not as painful as I thought it was going to be. However creating a module application was a little more involved. I followed the iOS Module Development Guide to create a simple template application and I was up and running in no time. I especially liked the ease with which you can quickly test your modules by simply calling >titanium run from the terminal.
Titanium seem to have most of the iOS libraries covered but there are still some gaps in functionality and you normally have to wait up to 30 days for an official new release.
On the plus side using the Titanium Market Place means that you can access modules for platforms that you have no coding knowledge about! and if you do have the knowledge then you can create modules that fill the gaps and allow others to benefit.
The recommended way to do development is to use Titanium Studio, having used Eclipse for several years I was quickly able to get up and running, debugging and all that entails day to day development. If you have ever used Eclipse then you will feel right at home here. In addition to Eclipse you can do your coding in any editor you like and I even ended up doing most of my module test application in Sublime Text only switching over to Titanium Studio when i needed to do some debugging.
I actually enjoyed developing for the Titanium platform it was a lot simpler than I initially thought it was going to be. I have experience developing a NativeAlert cross-platform module before in ActionScript to iOS and that was truly a challenge. In a follow up post I will again create a NativeAlert class but this time for Titanium covering some of the issues I had whilst creating the BDActivityViewController allowing with some helpful productivity tips to make the workflow a little easier.
If you know of any good BlogPost, Git Repositories or Tutorials for Titanium Development please leave a comment!
You can also follow me on Twitter @omnipitence
Liquid-Photo for ios will be at the reduced price for this week only! Get it while you can. And please retweet or share with anyone you think would like the application.
To celebrate my Liquid-photo website getting hacked i have decided to give away Liquid-Photo for iOS for free this weekend. Please download and let me know what you think about the application. Also please retweet, facebook or otherwise let everyone know about the offer. You can download it here for free
I recently received a malware notification from google for my domain liquid-photo.com. It seems that somehow a malicious script managed to make it's way onto the site. I am in the process of cleaning the entire site and as such I am redirecting here to my personal Blog until I can be assured that I have totally eradicated the issue from liquid-photo.com.
I am terribly sorry if this has caused anyone issues and I hope to have the site back up and running as soon as possible. I may even take this as an opportunity to redesign both sites.
On a plus side i did find some old images I created when I was at University for some Applications, 3D Models and info graphics.
New Post over at Liquid-photo
LiquidPhoto Finally Available on the IOS App Store!