Monday, January 28, 2013
So here's a small but completely functional application written using Angular and Twitter bootstrap. In less that 70 lines of code I managed to access LastFM's APIs and show the list of top artists by country returned from the service. From there we can navigate to see the top albums for each artist and the top tracks. Can you do that as easily with other frameworks? Maybe, but doing it with Angular was easy and fun. I really recommend AngularJS to anyone looking to develop a web based interface.
So what does the code look like?
In angular you start off defining your modules, some factories or/and services and configuring which URLs will trigger which controllers. You also define which templates will be used when a controller is triggered.
Angular provides nice AJAX abstraction in the form of a $resource service that provides means to interact with RESTful server-side data sources. And now for the controllers:
As usual here's the app in action on Heroku and the whole source code.
Sunday, January 6, 2013
Neoflix is an example app using the Neovigator visualization. It uses the Movie Lens dataset and the work of Marko Rodriguez as shown on his blog entry "A Graph-Based Movie Recommender Engine" with some tweaks as shown in this post.
I ported the work of Max de Marzi using Neo4j and Neography shown in the above post series from Ruby to Groovy and JAX-RS. You can see the code here and the live application on the Heroku site.
My version is querying Neo4j using Cypher which is currently slower than Gremlin which is the query DSL used in De Marzi's example. In the next major release of Neo4j query times will likely be much faster.