Thursday, September 06, 2007

Framework ?


Software people should often hear this term ‘Framework’. What is it all about? The picture you see looks like an exploded building. But, you see the steel skeleton standing alone right? That’s Framework. That is some thing that supports the building architecture and gives a structural support.

I am thinking of writing a framework for my pet project. Especially for database persistence and queries. It might simplify coding complexity and speedup writing of code. Because, frameworks can provide basic structural support for projects. Also, it can help to eliminate boilerplate code found here and there in projects. When I imagined, how the coding style could change if I develop a framework, it turned me excited.

Few lines about Framework:

1. Usually, at the beginning of projects, Architects do some basic works -- one of them is building a Framework.
2. A Framework will offer basic structural support and services. For example, accessing a database is a common scenario in any project. We end up writing database access calls every where in project; every where we need to handle transaction, synchronization and etc. This plate of code can be moved into Framework and can be accessed from any part of the projects. Like wise, a Framework can have basic and structural functionalities for a project. Change/upgradation in code/functionalities can be done in one place, that’s in the Framework level, and dont need to change every part of the project.

A cool example,
Suppose, if you want to insert some values into database, you write painful code like this,

-------------------------------------------
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con = DriverManager.getConnection(connectionURLThin, userID, userPassword);
PreparedStatement preparedStatement = con.prepareStatement("insert into emp(?,?,?,?)");
preparedStatement.setInt(1, 100);
preparedStatement.setString(2, "mani");
preparedStatement.setDate(3, new Date());
preparedStatement.setDouble(4, new Double(46000.50));
preparedStatement.executeUpdate();
con.commit();
preparedStatement.close();
con.close();
-------------------------------------------

Ssshh! Take a break and come back :-) Just think what will happen if one need to repeat this code everywhere? That’s something called 'boilerplate'.

Rather, this can be abstracted/wrapped into a Framework, like

-------------------------------------------
MyDatabaseFramework.persistValues(100, "mani", new Date(),
new Double(46000.5)); // this single line code will insert, commit & save your head.
-------------------------------------------

That’s what Framework is, and that’s something, I am planning to write. Now Framework can be abbreviated into single word, "COOL" -- isn't?

Tuesday, September 04, 2007

Books in wish list.

Books in wish list:

I wish to read the following books whenever get time,

1. Refactoring: Improving the Design of Existing Code
2. Design Patterns: Elements Of Reusable Object Oriented Software
3. Patterns of Enterprise Application Architecture


(I've just mentioned that thats my wish list -- no written/oral guarantee that I'll read those books!! God needs to consider extending a day's time beyond 24 hours.)




Monday, September 03, 2007

Art of designing it.

I am planning to add a new module to my pet project. This is the proposed class diagram design for the new module. Nowadays I am becoming very crazy about better design and better architecture. I spent a lot of time on these diagrams, to get it better and better. First, I drew this diagram in one shot with few classes. Within few minutes, I thought that the design was bad, so I crushed the paper and thrown out. Like wise, three papers went to the dust bin and finally, I got something better on the paper. This is a reusable, modular, pattern oriented design. I thought of drawing other diagrams also. But, this is my personal project and why I should take much pain! :-)

I might start coding slowly. I am expecting a developer gang to join for the code development. Let's see again how it goes. I dont have plan or schedule for release, because this is absolutely my personal project, based on personal interest, and a base for personal learning :-)


(Click on the image to enlarge it)

சலித்துப் போனேன் மனிதனாய் இருந்து...

When I am bored or feel alone, I just fall back to my childhood memories. My childhood age, school days, and that kind of ages wave at mind. I almost feel alone most of the time. Sometimes, I even worry very much that I can not live a life again with those friends in the same places we lived. It's gone. People are busy on their way. They are more towards personal concerns, tied up with own family, problems. Somebody settled down in life, somebody still searching their life, rest just got vanished -- dont know where and how they are making their lives.


I am very eager to see every one else I met at my little age. I couldn’t even find a trace for some people. This is the reason why I panic to leave my places. When I left my home, all the relations had gone. When I leave a city and move to another, a gang of friends and contacts vanish off. And because of this, I just dont want to move between places. I never even think of leaving this country at least. I can make my fortune here itself. If I can't, then I am really not going to feel bad. I am at least thinking of living my rest life or last years in my home town; in the places where I was born, I was roaming.





Nowadays I seriously like to live at my home. I like the rivers, temples, dams, and every dust around my home. I had lost all my stamina and peace in this hasty life. When I go home, I feel my heart easy. One simple solution for this, would be to change my profession. However, I dont know any job, other than 'Programming in Java'!

Saturday, September 01, 2007

I can not do any magic

One of my bad habits is, if don't continue doing anything in at least 30 days interval, I will just forget it in rest of my life time. Now, this blog is a victim. I had forgot my blog in recent days. I don't want to say that I was busy(though I was). I aggressively hate the word 'busy'. I have had number of works queued up. As usually I ended up messing them and collapsed all my plans. In these days, my life is more volatile than the stock market! I don't want to crush my self and stick to plans.. because that leads me to feel frustrated... makes me sick... increases my heart beats... I just want to be very frank of what I can do at the maximum, in the given situation. I cant do any magic to achieve my targets. I can just do my work.I cordially accept any slippages from regular works. At least, I can sleep peacefully, no matter it happens or nothing happens.

This is my inner feeling since last fews weeks. "I can not do any magic to achieve my targets! I can just work, may be hard."