Thursday, October 27, 2011

Fundamentals of Extensible Business Reporting Language Dimensions

What is XBRL dimensions: XBRL dimensions specification is a modular extension for the XBRL specification. It uses the segment and scenario elements of the context to use the elements defined in it to divide the data according to dimensions, as I will explain shortly. The dimension specification is too big to be fully covered in a single article, so in this, I will only discuss the fundamentals and in another, I will explain the other syntactic details. Since the article assumes the reader's prior knowledge of XBRL, the reader is advised to first read the articles on XBRL here.

Saturday, October 22, 2011

Java Compile Time Method Binding

Introduction: It appears to be a simple process to determine which method a particular method invocation refers to, but it still needs pages of documentation in the java language specification to address this, especially to take care of auto-boxing/auto-unboxing and variable arguments. In this article, I will highlight how an actual method is bound at compile time to a particular method invocation.

Thursday, October 13, 2011

Manipulating Java Class Files with ASM 4 - Part Two: Tree API

What is ASM tree API: ASM Tree API is the part of ASM that lets you create/modify the class in memory. The class is viewed as a tree of information. Like the whole class is an instance of ClassNode, which contain a list of FieldNode objects, a list of MethodNode objects etc. This article assumes that the reader has already read the first part here.

Thursday, October 6, 2011

Manipulating Java Class Files with ASM 4 - Part One : Hello World!

What is ASM: ASM is an open source java library for manipulating java byte code. So it has the same purpose as Apache BCEL. As this article assumes that the reader has some knowledge of java class file format, it is advisable to read about it in here. So how is it different from BCEL? Well firstly it allows for an event driven way to manipulate byte code eliminating the need to load the whole class in the memory just to make a small addition. Secondly, it does not have a separate class for every single instruction. Instead, it handles opcodes directly and only has constants representing each. This reduces the size of the library to a great extent. So, ASM is simply lighter and smarter. However, ASM also has a mechanism to deal with class files by loading the whole class into the memory just in case the operation is too complex to be handled through event based processing.

The current stable version of ASM is 3.3. However version 4.0 RC2 is out. So, I am going to discuss that version here.

Thursday, September 29, 2011

A Detailed View of Extensible Business Reporting Language Instance

Introduction: XBRL instance is the XML document that contains the real data in an XML format. This document expects a fundamental knowledge about XBRL, which you can read from my posts here. At this point, I will discuss about an instance document in detail.

Thursday, September 22, 2011

A Detailed View of Extensible Business Reporting Language Taxonomy

This is the second article in the extensible business reporting language series. If you have not read the first one, you can read it here. This article assumes that the reader has already read this previous article. In this article, I will attempt to cover the most important aspects in detail.

Thursday, September 15, 2011

Implementing Aspect Oriented Programming Framework - Java Instrumentation

What is Aspect Oriented Programing: Aspect Orented Programing or AOP is a design pattern or programming practice, in which the code for cross cutting concern is separated out from the main program logic, thus effectively reducing the program complexity. Now what is a cross cutting concern? They are application non-functional requirements that apply to multiple functionalities. A simple example would be logging. Logging is done whenever some predefined things happen (for example a method is invoked). Normally, every method that is invoked would have to contain the code for logging. In AOP, we write the logging code in a separate method may be in a separate class and then configure our AOP framework to do logging whenever a method is invoked. There are so many good tutorials available on AOP, one of which is here. However, in Java SE environment, it certainly requires a change in the method's byte code made by the AOP framework. I will demonstrate how an AOP framework performs load time weaving (changes byte code during runtime).