Posts

Showing posts from 2011

Some useful links

If you are a web developer and need to validate your markup, here is a tool by W3C which is really helpful. http://validator.w3.org/ And if you are struggling with your regex and need help testing it, use the following.Its a cool javascript tool. http://regexpal.com/ Sometimes, we are in need to convert our VB.NET code to C# or vice versa, I find below tool quite reasonably helpful. http://converter.telerik.com/ Enjoy your coding!!

O Re Piya !!

Image
I have to admit I am in love with this song.The verse, the rhythm , the voice, somehow everything seems perfect.Its like those delicious death by chocolate desserts you wish to eat again and again. Every time I hear this I discover some interesting aspect of the song.It has depth in its verse, resonance in its sound that wrenches your soul and rhythm that agitates your mind and then soothens it.Ahh and that philosophical touch too! Hope you enjoy it :-)

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

Validation Framework - Part One

Our previous project was a web application with high security requirements.So we decided to use validations to validate the input and prevent user from entering harmful data or data that could make an application behave unexpectedly.We choose to use both client and server side validations on our pages because there was a possibilty of user disabling javascript on the browser and hence bypassing client side validations.Hence Regular ASP.NET validation controls were used and we had Required Field Validators, Regex Validators, Range Validators and Custom Validators across our pages.We set the EnableClientSide property of the validators to true to make sure client side validations fire.Once client side validations passed, on every postback event we were again checking for Page.IsValid property before proceeding to our event handling code.Now to evaluate Page.IsValid property, ASP.NET fires all validations again on the server side as well. Well, the project is over and working fine.I mov