Sample usage of uploader.js

In my previous post you saw how I wrote an uploader.js library for managing uploads to imgur.

Now the question is how to use it.

Here is a sample source code from a phonegap+jquery page.

The uploading happens in 2 steps. First, we choose the photo from the photolibrary. uploader.js sets up a callback_func to be invoked whenever the photo gets selected, it returns a 64 bit encoded string of the image. The function on the html side then sets up another function that take cares of the uploading process, setting up a second callback which takes care of any errors that might be raised. Thus it sort of sets up a nested callback.

Sample source code:


Phonegap + Imgur Uploader

One of the stuffs I recently did was to use the Phonegap API and Imgur API to do image uploading.

Source Code


Java Web App development using Spring Roo

Enough has been said about Java and how the Java EE 6 specification has caused the process of making web applications in Java slow and painful. True with Java the problem is of comprehensibility and integration of the different components. On top of that you have a number of things such as patterns, JPA and the web front end files. All of this come with different kind of frameworks to ease up development, for example the JPA object relational mapping can be solved by using Hibernate. However there was no meta framework, something unheard of in the Java web application development world. A framework to manage the frameworks ? Hmm, very strange indeed.

Spring Roo solves all of that by providing a nifty overlaying architecture that just does one thing - integrating the different patterns and best practices and different providers/frameworks to do that. It keeps you focused on the logic and thats what is more important.