Feb 222011
 

JavaAppsEnDatabaseI’ve received this interesting article by Paolo,  that i gladly publish:

Easy Driver is a project to access the databases, it is Free and Open Source. It is formed of a Java library and a code generator.

The experience made writing directly the queries with JDBC taught us that it’s common to have a lot of redundant code. This is a well known source of troubles during the maintenance and it raises the costs, when writing and maintaining the code.

The object oriented paradigm does not fit well with the relational model of the most often used databases.
Another problem which afflict the database world is its fragmentation. SQL has been developed in several dialects, despite its standardization attempts.

The mapping between the relational world and the object one, joined to the need of lowering the development and porting times, so the maintenance costs, has caused the development of some ORM (Object Relational Mapper), we can quote Hibernate, iBatis and TopLink, for instance.
Lastly the JPA specification with the born and EJB QL tried to unify the diversities of the various ORM under a single interface.

But working with these tools you realize they have some strong limitations, which just derive from the solutions they tried to give to those problems.

First of all, we should point out that who usually provides us the independence from a particular tool, he does it in order to bind us to his one and not for charity spirit, for sure. Coming to our case, let us suppose that we use Hibernate, which is a great tool and very often it is the best solution. It was brought to .NET and Java, so it is a very good choice, until you need to work with some limited resource devices, where a virtual machine or a common language runtime are a huge overhead.
For a new application is a legitimate to choose PHP, Phyton or perhaps the ever green C++ ! For those environments there are not the most famous ORM, instead there are some other solutions, which are usually incompatible among themselves.

Even if we remain in the enterprise environment, more you search for the independence from the tools, more you get more headaches in the every day jobs, because you get very few functionality, compared to when you use directly your database dialect.

Saying that, I do not want to criticize the job those tools do, as they are really great tools, anyway the real programmer’s life often forces him to choose different ways, instead of the proposals that the great IT corporate do.

Let us look to the reality: sometimes the stress for a delivery is so high that is impossible to project and plan well. Purists write the books, but rarely they live making real projects.

Even if I have the maximum respect and admiration for those tools, which I use by myself with great satisfaction, I am convinced that there is still some room for something different, which has humbler targets, but whose development is driven by the real people who use it.

I have started from my own experience, writing down what could be useful, thinking that somebody else could share the same ideas.
So I wrote down some notes about how my tool could be. The first attempts, the first draft ideas did not bring me to anything better that what already existed, so I continued trying.

My consultant experience shown me that somebody else in some other companies tried some ways that could be similar to mine, but someone jealously protected his solutions, keeping them as proprietary frameworks. But that could lead to some internal problems. In fact the new recruited people often do not happily study a new tool, whoso knowledge is not easily sellable outside. In this society that institutionalized the temporary employment, you need to get a “know how” that you can sell, when you loose your job. The safe salary is not enough anymore.
Moreover the natural scarce attitude that technical people have about the communication, as they are so used to deduce The truth, is often a cause of friction between who has to learn how to use a tool and who wrote it.
We all feel proud about what we have done and the critics hurt us. This is a big problem in the relationships among the hackers.
With no doubts there are some very good ideas in the various proprietary frameworks, which are never going to get the value they deceive, but the choice to develop an internal solution is not always the smartest for the company which pays the salary to the employee who work at that solution, instead of producing something that could be directly sellable. I do not discuss about the fact that cost is sharable among some projects, but we all know the software cost is very hard to estimate and you realize only when you reach the end how much you spent in your in-house developed program…

So I had the idea that my project should have been free and open source. A generator which creates the classes which represent the table structure and which creates a very banal object model, knowing that modern IDEs make the refactoring easy.
Let us exploit the potentiality of our chosen database, privileging in our choice the open source solutions. I think PostgreSQL is a smart choice. A library that needs to write as few strings as possible, better none, so that the compiler could help us to compose the queries.

You can find the first usable beta version at http://code.google.com/p/easydriver/ and the news will be at my still bare web site: http://www.byteliberi.org/

I am looking for some contributors, sponsors, but above all, I am looking for very pragmatic people who have a huge passion for our job.

Paolo Proni is a freelance IT consultant, he uses a computer since when he was a child, so from a long time… He mainly work with Java and secondly he plays a bit with C++. He mainly writes some web applications by JSF and EJB, that run with JBoss. He thinks that Linux is the best invention after the wheel, but he like Mac OS X too…

Popular Posts:

Flattr this!

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*