Posts

Showing posts from February, 2011

Infinity

Image
Infinity - how did this concept come into existence.This is my take on it.Man as he began to evolve felt the need of numbers, basically some way to count things.Hence various number systems were devised by various human civilizations across the world.So as man started counting, he would have somewhere realized he could go on and on and on forever.With this the concept of infinite would have come into existence.A very very huge number that is unending.He would have started using this concept of endlessness or eternity to other things as well, like our universe, time, etc. Now that we had conceived this idea of infinity we needed a symbol to represent it.So the symbol of infinity slowly came into existence.If you closely observe its basically a twisted closed curve and if you travel across the curve you will realize you end up traveling forever.

Generic Object Mapper

We were connecting to a DB2 database through our ASP.NET application.So we decided to use IBM.Data.DB2 dll and added DB2DataAccess and DB2DataReaderHelper classes.Everything was set and we started constructing our Data Access Layer, keeping our approach simple - connect to the database, get a datareader / dataset,use a mapper method to populate our custom classes / business entities with the data and close the connection.Slowly the number of mapper methods grew.Considering the fact that we had around 111 Business Entity Classes and even if we had to populate 50 % of these classes from the DB and some cases we could map more than one classes together in single method, we would still land up in around 40-50 mapper methods.So we did a bit of an introspection to understand if writing those many mapper methods was worthwhile our effort and time, not ignoring the fact it could make our lives hell during maintenance. Hence the idea of writing a generic object mapper dawned.So we wrote one