Design Patterns Series – Part Two: Template Method
A typical template method pattern consists of the abstract base class which defines one or more template methods (usually set as final) and some abstract methods which the subclass has to implement. Template method defines common algorithm where some of the steps are implemented by subclasses. A Template method pattern provides a skeleton for performing […]
Read More →Android Series: Utilizing Camera ‘Share via..” option
If you have ever build an android app which required you to use a camera, you should consider a different flow in your application, starting not from your app itself but from the built in android Camera application. Let’s say you want to post a photo on twitter or facebook. In you standard flow you […]
Read More →Android Series: Taking photos with Android built in camera
Today I will describe how to take a photo in android application using the built in camera. The way to do it is to simply start ‘activity for result’ instead of simple ‘activity’ and specify android camera application as our activity. Then, once a picture is taken with a nice built in camera application, we […]
Read More →Design Patterns Series – Part One: Strategy Pattern
The Strategy Pattern is a first pattern described in a series of post I’m planning to make regarding this topic. The Strategy pattern allows us to select a specific algorithm at runtime and its one of the simples design patterns to grasp. The scenario described on the diagram below shows a simple usage of the […]
Read More →Google App Engine – Searching with JDO
How to perform a search in the Data Strore when there is nothing like ‘LIKE’ keyword available? This is a short code snipped allowing you to search the data in your Google App Engine data store. List<User> locs = new ArrayList<User>(); Query query = pm.newQuery(User.class); query.setFilter("name >= […]
Read More →Simple Guide to basic Javadoc
Javadoc tool is in my opinion one of the most underestimated tools available for a Java developer. Recently I have started digging into some opensource projects when looking for a nice examples of design patterns and I was surprised at high quality of their code in terms of commenting. This is something I, and many […]
Read More →Google App Engine – Querying related table using Key object
This is just a short note on how to query related entities in JDO. As I have found out, we cannot use the entity key as its shown in the Data Store Viewer on the GAE admin console eg. zzR0ZXN0cgkLEgNGb28XGQw and compare that using someRelatedEntityKey == zR0ZXN0cgkLEgNGb28XGQw, instead we just provide the whole Key object […]
Read More →