Thursday, April 15, 2010

Java Based Configuration .... Move On


Its not that we have to use applicationContext.xml in Spring Configuration. Good news for Java core fans !!!!!!!! We can achieve the same functionality by configuring using a POJO.

Costin Leau justifies why to use Java Based Configuration and also better way of creating ApplicationContext.

Go thru the below link:

Wednesday, April 14, 2010

Cognos Roundup


Cognos is the world leader in business intelligence and enterprise planning software. Cognos solutions provide organizations drive performance with planning, budgeting and consolidation, monitor it with alerts and scorecarding, and understand it with business intelligence reporting and analysis.

IBM Cognos is one among the leading Business Intelligence tools which has got very good reporting and analytics capabilities. It provides multi-dimensional data as a simple report/analyse to the Business Users who can take decisions with in no time.

Let us meet the components of Cognos
Report Studio
Query Studio
Analysis Studio
Powerplay Studio
Event Studio
Metric Studio

Windows components
Framework Manager
Transformer
Cognos configuration

IBM Cognos supports almost all the familiar databases found in the market. To name some of them - Oracle, SQL Server, IBM DB2 and many more

In my coming, posts I would discuss each component in details..so stay tuned.

Spring - The Revolution

Spring is an open source application framework for java development. It makes the development of enterprise java applications pretty easy. Spring Framework has evolved as the king of frameworks with in a very short time.

Rod Johnson is the author of the first version of Spring.

We have couple of modules in Spring framework. Based on the user's requirement one can utilize or opt for the respective modules.

To name some of the modules in Spring:

Spring Core
Spring MVC
Spring AOP - Aspect Oriented Programming
Spring ORM Integration
Spring Transactions
Spring Web Flow

These are some of the common modules which are useful in most of the today's enterprise applications.

Going further, I will discuss about all these modules in detail.

Stay tuned.

Sunday, April 4, 2010

Gavin King - King of ORM


To justify the title of the blog, I think I do not want much time. Gavin King, founder of Hibernate brought a remarkable change in enterprise application developer's life. Hibernate is known for its easy integration into any kind of UI frameworks like Spring and because of its huge support base. If you see around whenever you face any problem in Hibernate, there are lot of people around in many forums and communities ready to help you out.


I have captured the interview content of Gavin King and the link is provided below

SOLID programming principles

In today's fast paced development who cares of following the programming principles which would enhance the performance and makes the developer's life easy in maintaining the code base.

Most of us care about the deadlines, in time deliveries but are we making sure that we follow all the stringent principles of programming?

Here comes the SOLID programming principles which should be followed during the Object Oriented Programming and Design to enhance the code base for easy maintenance and high performance. And also there would be no code smells if SOLID programming styles followed by the developers or designers.

Lets see what SOLID has for us:

S - Single responsibility principle
O - Open/Closed principle
L - Liskov substitution principle
I - Interface segregation principle
D - Dependency Injection

Though the buzz words are not catchy, if we carefully look into the internals, we already heard about these principles.

Single responsibility means that an object should be handling a single responsibility. As simple as that. For example, We have an entity Student, this entity should be handling operations pertaining to Student alone.

Open-Closed principle - This is pretty much common in Object Oriented Programming. Any framework supports this. Any class is open for extension and closed for modification.

ISP - says that generalize the interface instead of having multiple interfaces.

Liskov - This principle is known for its behavioral sub-typing. Specifies the semantic relation rather than syntactic relation.


Dependency Injection - This is a separate topic which can take hours of discussion if we start. Lets put the definition here and discuss in detail about this at a later stage or in a different post. Dependency Injection or earlier called " Inversion of Control" is the base for Spring Core and Hibernate and many more frameworks.
Dependent objects will be injected automatically by the framework ( say Spring Core, Hibernate etc) whenever the owner needs it.

So to conclude this post, I hope we realize the intention of these SOLID programming principles and religiously follow the principles.

Brand New JPA 2.0


Java Persistence API (JPA) 2.0, introduced with Java EE 6, adds in and specifies fully many things which were missing in JPA 1.0. Some of the features added in JPA 2.0 are advanced locking, enhanced query language, a shared cache API, expression/criteria API, property standardization, more flexible object modeling and more advanced O/R mapping support.

Java & persistence architect at Oracle, Mike Keith's presentation at Jfokus

source: infoq

Listen to Rod on the Spring evolution


As most of us know, Rod Johnson is the founder/father of the evolutionary Spring framework.

The Spring Framework began in February 2003, based on the Interface21 framework published with Rod's best-selling Expert One-on-One J2EE Design and Development. Rod is one of the world's leading authorities on Java and J2EE development. He is a best-selling author, experienced consultant, and open source developer, as well as a popular conference speaker.

Here in i am sharing a presentation by Rod Johnson. He discusses about the Spring Framework.
Topics covered include the philosophy behind Spring, configuring the Spring container, XML configuration, new XML configuration namespaces, Annotation-based configuration, automatic component annotation scanning, Spring JavaConfig, mixing configuration types, and Spring 2.5 new features.

Object Relational mapping tools


As I discussed earlier in one of my blogs about the importance of ORM tools in today's development, this is one of most heard buzz words these days. As ORM does the trick for the techies who are not comfortable with databases.

And also only because of these kind of frameworks, we need not re-invent the wheel again and again. In time releases of a product are very much possible with the usage of these frameworks.

I just wanna list out some of ORM tools used in different platforms here

Some of the major ORM tools used in Java platform are mentioned here
  • Cayenne - Apache, open source for java
  • Kodo - commercial implementation of both the JDO and JPA API.
  • Torque - an object-relational mapper for Java
  • EclipseLink - Eclipse Persistence Platform
  • Enterprise Objects Framework, Mac OS X/Java, part of Apple WebObjects
  • Hibernate, widely used open source ORM Framework
  • iBATIS, maintained by ASF, and with .NET port
  • Java Data Objects (JDO)
  • Java Persistence API (JPA)
  • JPOX, open source JDO 2 reference implementation
  • KeyAccess, open source, lightweight ORM tool. Generates domain model from database.
  • Object Relational Bridge (Apache OJB), an object-relational mapper for Java
  • OpenJPA, Apache, open source, supports JPA API
  • TopLink by Oracle

Though, most of us know .NET goes with proprietary versions like ADO.NET Entity Framework, I am listing down other options down here.

  • Genome, free or commercial
  • ADO.NET Entity Framework, Microsoft's ORM (released with .NET 3.5 SP1)
  • NHibernate, open source
  • Persistor.NET, free or commercial
  • iBATIS, Free open source
The same way, we have different ORM tools present on the shelf for other major platforms like C++, Ruby, PHP, Python and so on.


This list never ends, so stay tuned while the list grows !!!!!!

Saturday, April 3, 2010

Java Annotations


Java Annotations - Though java annotations were introduced in jdk5 version, it started gaining momentum when the leading frameworks started reaping the benefits of annotations.

Though people are familiar with annotations from long back, but never bothered much due to lack of idea on the hidden fruit "annotations"

We (core java developers) see @SuppressWarnings, @deprecated annotations in most of the IDEs but never bothered about these. But the actual usage is unfolded by the popular frameworks like SPRING, HIBERNATE and many more.

It is very simple to specify a POJO as an entity in Hibernate. Instead of specifying in an xml, you can go ahead and specify @Entity on top of the class declaration. In the same way, @Table is used to specify the table name to which this entity or POJO is referred in the database.

Though a big turn around, it is very simple to use if you are adapted to this change.

You can sense the revolution of annotations in the java world by the following case:

In today's world, most of the applications started using annotations as an alternative of xml files. For example we need not create hbm files for each and every entity we create, instead we can go ahead with annotations.

Its evident that developers are more comfortable with annotations.

Frameworks hit back


Hibernate the catchy ORM tool heard everywhere now a days in the business market. Why so? Whats that dragging people towards hibernate or any other ORM tool?

The very simple reason behind this is SIMPLICITY. Any one who comes out into the market and tells the developers "BOSS!!! I have a easy solution for your problem" is always entertained and encouraged. For example, Spring, Struts, Hibernate and many more to come.

Strictly speaking, they did not do any magic they just followed what they studied in OOPs in their graduation or whatever. Yes, your guess is right. Abstraction is what I am talking about. The gurus of any frameworks you take, they just abstracted or hided the underlying details which the developer is not bothered about.

For instance, a developer wants to connect to a database and retrieve the data to populate his UI form has to change the same code if the database changes or schema changes. But is this right??

If some one says " Hey Developer, I will take care of your DB related transactions, you just take care of your business logic", how happy the developer will be?

Thats exactly what hibernate or any ORM tool does. ORM is explained in the JPA specification.

ORM tools actually does a lot in the background for the developers. Some of the features at a glance are Persistence, Mapping, Inheritance, transactions and many more...