Creating asynchronous servlets with Tomcat 7 (Servlet 3.0 API)

Overall, the API is pretty straightforward to use, assuming that you are familiar with asynchronous processing in the first place. However, if you are not familiar with asynchronous processing, then this business of callbacks can be quite confusing and daunting. Additionally Tomcat 7 and Servlet API 3.0 make it easier to configure servlets using annotations. There are other cool features in 3.0 that I haven’t covered in this tutorial, like loading servlets programmatically.

Android activity, service, widget lifecycle state management – Tutorial

When creating android applications, that are not trivial, it is important to keep in mind that android activities, widgets, and services have somewhat autonomous lifecycles that are controlled by the operating system itself. This is profound impacts on how you have to think about applications, since there will no longer something unified, but rather are a lot of different parts that are being orchestrated somewhat randomly. For example, applications process can be terminated anytime, or its activities can be terminated, or its services can be restarted. If you do not plan for such diversity in lifecycle states when building each widget service or activity, you will have a really tough time syncing them all up in the final application.

Android Event Dispatch Thread or Main Thread – Tutorial

Android applications run in a native Linux process, in the underlying Linux OS. This process houses activities (screens), widgets, and services (non visual long running application parts). When working with Android apps, it is important to remember to keep long running code running in threads that are not tied to the main thread or event dispatch thread, in order to get an “application not responding” error. A common mistake that is made is long running tasks are performed in this EDT/main thread, and this leads to lots of application failures.

Android custom themed Dialog – Tutorial

I was trying to create dialogs and alert dialogs that look the same on all Android smartphones, after he realized the different types of smart phones do something different with the default themes and make buttons, dialogs, etc. look very different from one phone to the other. Everything looks very different in the simulator than it does on a Droid X or Droid 2 for example. Things look more similar on a Samsung Galaxy S, or HTC Incredible, but even there you can see some differences.