quinta-feira, 16 de agosto de 2012

log4j performance

Aiming better performance, in log4j 1.2 [1], you can use:
if(logger.isDebugEnabled() {
    logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
}
instead
logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
In log4j 2 [2], you can use the new feature
logger.debug("Entry number: {} is {}", i, entry[i]);

References

[1] http://logging.apache.org/log4j/1.2/manual.html
[2] http://logging.apache.org/log4j/2.x/performance.html

sábado, 7 de julho de 2012

a4j:repeat rowKeyVar

rowKeyVar

terça-feira, 26 de junho de 2012

segunda-feira, 25 de junho de 2012

segunda-feira, 11 de junho de 2012

Icon vs Text

When use Icons? When use Text?

[1] As rule of thumb, icons alone should only be permitted when at least two out of the following three conditions apply:
  1. Space is very limited (i.e., too small for text alone).
  2. The icons are standardized (e.g., the floppy disk image for save)
  3. The icon represents an object with a strong physical analog or a visual attribute (e.g., a printer icon to access printer attributes, or a red rectangle to set a page background red).
[1] http://ux.stackexchange.com/questions/1795/when-to-use-icons-vs-icons-with-text-vs-just-text-links
[2] http://designaday.tumblr.com/post/91812707/back-to-basics-icons-vs-text
[3] http://www.ixda.org/node/19518 
[4] http://uxmyths.com/post/715009009/myth-icons-enhance-usability
[5] http://www.smallfarmdesign.com/blog/2009/12/28/the-problem-with-icons/
[6] http://blogs.msdn.com/b/jensenh/archive/2005/11/01/487661.aspx

terça-feira, 6 de dezembro de 2011

Managing SQLite Database - SQLite Expert Personal

This is a free and a great SQLite database manager. It also manages the Android SQLite database easily.

SQLite Expert Personal
http://www.sqliteexpert.com/









segunda-feira, 5 de dezembro de 2011

JBoss Envers and Temporal Databases

It can be used in need of Temporal Databases[1]... It is a great option for historic data!

Envers: Easy Entity Auditing
"The Envers project aims to enable easy auditing/versioning of persistent classes. All that you have to do is annotate your persistent class or some of its properties, that you want to audit, with @Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort." [2]

[1] http://en.wikipedia.org/wiki/Temporal_database
[2] http://www.jboss.org/envers

Hibernate - the best choice

Ok, Hibernate [1] is the best choice for design applications!

"Hibernate is best used to leverage end-to-end OR mapping. It provides a complete ORM solution, but leaves you no control over queries. Hibernate is an ideal solution for situations where you have complete control over both the application and the database design. In such cases you may modify the application to suit the database, or vice versa. In these cases you could use Hibernate to build a fully object-relational application. Hibernate is the best option for object-oriented programmers who are less familiar with SQL." [2]

[1] Hibernate Documentation
http://www.hibernate.org/docs

[2] Comparison of iBatis, Hibernate and JPA
http://www.narendranaidu.com/2008/07/comparison-of-ibatis-hibernate-and-jpa.html