Dec 12, 2014

ListView is probably the most common android component, but it has to be implemented correctly to provide a  better user experience. In this post, I will give a few suggestions on how you can achieve the near optimum list performance.  They are mentioned below: Access Data Incrementally:- Load only the data you need. I know this is a general principle to reduce memory footprint of your application, but even so, this can and must be done.  The ListView class can listen for scroll updates, you can implement the OnScrollListener...

Posted on Friday, December 12, 2014 by Unknown

Oct 30, 2014

If you want to integrate Lucene with your android application, this post will get you started.  Lucene provides you with a wide range of searching options  like  Fuzzy Search, wildcard search, etc.  So, you can use this in your android application, if you want to provide search option over your custom data model. In the code shown...

Posted on Thursday, October 30, 2014 by Unknown

Oct 5, 2014

  In the last post, I had explained how you can use Retrofit API to consume Feedly’s feed search API. In this post, I will cover the integration of a SearchView with the feed search API.  To integrate SearchView with the custom data source, you need to implement the following  interfaces  in the fragment or activity. SearchView.OnQueryTextListener:...

Posted on Sunday, October 05, 2014 by Unknown

Recently, I noticed a poor implementation of dynamic query in our application environment.  As the query was complex and its where clauses were generated dynamically, the developer chose not to implement the bind variables.  Now, some of you will be aware of the disadvantages of not using bind variables, but i have mentioned them below just to recap:- It is a security risk as it allows SQL injection attack It causes a major bottleneck on database as every time a search is submitted, the query will need to be parsed and for this...

Posted on Sunday, October 05, 2014 by Unknown

Oct 4, 2014

Retrofit is a type-safe rest client for java/android that one can use for easily consuming rest services. It supports both synchronous and asynchronous retrieval. In this post, I will explain an example which shows how you can integrate it with your android application for consuming rest services asynchronously.  The example will show its integration for doing feed search with Feedly. Feedly’s basic feed search is free, you can find the document here Feedly Search Service.  Setting up Retrofit : - I am now using android studio instead...

Posted on Saturday, October 04, 2014 by Unknown

Oct 3, 2014

Android has  a different paradigm for application development. So , In this post, I will  explain a few of those concepts (as I understand) that lie at its core. Cursor:  To draw parallels,  a cursor object is just like a ResultSet in JDBC. It is used for iterating over the underlying data and just like a JDBC ResultSet object, it must also be closed.  The following snippet shows how to iterate over the  result set. try { cursor = getDatabase().query(tableName, columns,...

Posted on Friday, October 03, 2014 by Unknown

Just an update : these days, I am developing a RSS reader app on android. I am using android framework for development and not  Oracle MAF because it tends to be free of license restrictions, plus it performs better. I am not particularly fond of android’s ContentProvider API’s , as I find them to be inflexible, so I am going to take the conventional approach of programming.  In the coming posts, I am going to share tips and tricks on android application development  and of course  when the application is developed(which will...

Posted on Friday, October 03, 2014 by Unknown

Jun 12, 2014

In this post i will share the security utility for performing operations on IAM Fortress applications using it’s java API’s. Use this utility only if you plan on having custom code to manage Fortress as fortress already provides a J2ee application to manage its policies. The code can be used coupled with earlier examples to integrate fortress as a security provider for your ADF essentials application. Also, you can make task flows for performing user, role, permission management using this utility.  The code is mentioned below ...

Posted on Thursday, June 12, 2014 by Unknown

May 23, 2014

Recently a user contacted me with the requirement that he needed to assign enterprise groups to application roles dynamically. Normally, people can manage this through enterprise manager, but there might have been a specific requirement for that user.  I have already written various posts on ADF security which cover utility methods that use OPSS API’s to perform operations on the enterprise OID, OpenLdap etc.  In this post i will cover this specific requirement; although the given code is very crude, it is there only to serve as an example...

Posted on Friday, May 23, 2014 by Unknown

The in built primefaces charting components can be extended like any other faces component. In this post i will explain how to extend the in built pie chart component to use custom renderer which in turn will use NVD3 pie chart component. On a similar line you can similarly create your own custom faces component also. The code is mentioned below....

Posted on Friday, May 23, 2014 by Unknown

D3.js is a framework for data driven documents. You can use it to create data visualizations. If you require some charting component for your java application you can easily create components based on this library or a derivative of it. In this post i will highlight some of its features via a html example and in the next post will give you an example...

Posted on Friday, May 23, 2014 by Unknown

Jan 21, 2014

I was recently given a requirement to drive the entity attribute validations at runtime rather than at design time, with the following criteria. Ability to change fields to required at runtime. To be able to define validation message for field at runtime Define validations such as field must be numeric, or contain only alphabets (Used Regular expression...

Posted on Tuesday, January 21, 2014 by Unknown