<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d13405220\x26blogName\x3dPavan+Podila\x27s+Blog\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://pavanpodila.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://pavanpodila.blogspot.com/\x26vt\x3d-3240902251102105728', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe", messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER, messageHandlers: { 'blogger-ping': function() {} } }); } }); </script>

Thursday, June 09, 2005

Why do we think so often of abstraction?

I read somewhere that Computer Science is the science of abstraction. As a developer we continuously try to hide the details so as to deal with the problem at hand more easily. Such details are essential to get the work done but beyond that it is the ease of programmability that takes over control. Abstraction is definitely a key element in developing software.

Abstraction exists at different levels and at each level we try to provide ease of programmability. As we go to the architecture level, we need abstraction not just to hide details but to hide the variability of the system. Take the case of interacting with different kinds of databases to store data. At the backend layer, we don't want to deal with database specific code because it is possible to change the database at the later date, say for performance reasons. Thus we try to hide this fact by providing a layer of abstraction. Here we are trying to abstract the variability of the database.

Ease of programmability and hiding variability seem the only two compelling reasons for abstraction.