This last week was spring break, aka, time that I can actually devote to programming and being productive, as opposed to listening to professors talking during my sleep.
And in a week, I’ve made a pretty cool android app as an intramural project for a company called Softrek. The specifications were to interact with their custom API to access user data, pictures in their database, and upload pictures to it. I used Phonegap APIs, to access the camera and phone storage, and jquery/mobile to upload files, query the server for pictures, search, and add nifty panels and buttons.
Here she is:
Theres still a lot of work to do; add more functionality, test, and update the appearance. (pray that it works on IOS). Overall, pretty fun. …Back to school work…
Source code here: https://github.com/thetommyludwig/softrek-app1
You can use any javascript lirbary you want, but the animations themselves must be written in CSS, not javascript. It is absolutely vital for mobile developers to learn CSS animation instead of javascript. The reason is that Javascript is actually very inefficient for animation, and it’s only recently, with the proliferation of mobile browsers, that we are starting to notice this. You see, with a JS animation (e.g. created using jQuery’s animate function), the javascript lirbary sets an interval timer (lets say, 33ms, which is about 30 frames per second), and on that interval, it figures out where the animated element should be, using complex math calculated by the CPU, and then puts it there. Unfortunately, if the CPU is too slow to do that calculation every interval, it gets backed up and the animation stutters. jQuery and other JS animation tools do some work to combat this, sensing a drop in frame rate and trying to make the interval wider, to give it more time to complete the calculations, but it’s often too-little-too-late.On the other hand, when you do a CSS animation (e.g. using the transform or webkit-transform css properties), you leave it to the GPU to simply calculate where the element should be as often as it can. As soon as it calculates the element’s new position and places it there, the GPU starts the calculation again. This means the animation is always as smooth as the GPU can possibly make it, no matter what. If you animate too many elements for the GPU to handle it may still have trouble, but instead of ugly stuttering, it will be a more graceful drop in framerate.Hope that helps.