Wednesday, July 7, 2010

Free Source Code Management Hosting With SVN

A common task to accomplish in order to manage a software project and its source code, release cycle, features, bugs and team work in a proper way is to have a source code management system (SCM) such as those based on GIT, CVS or Subversion (SVN). Sometimes the project must start very quickly and there is not enough time to install and configure a SCM by yourself, so you have several alternatives in the web, some of them are for free and for some others you have to pay accordingly to the size of the project, team members or features available. We have found an alternative that can match the features that you are looking for small projects that have to start right away, it's called Unfuddle, we are using it for a small startup company and it have worked like a charm. You can try it out at

Saturday, July 3, 2010

How to use PHP CLI in windows?

PHP Cli allows you to execute PHP scripts in a system shell and enables you to interact with it sending parameter values.  An example of its usage is Bake (from CakePHP), with it you can create web applications with Model View Controller pattern in a snap only with a database you defined before. The only thing you would need to do in a XAMPP installation is to add the absolute path to the PHP installation to the PATH environment variable through My Computer->Properties->Advanced Settings->Environment variables. My PATH environment variable looks like:

C:\Sun\SDK\bin;C:\Program Files\Nmap\;C:\spring-roo-1.0.0.RELEASE\bin;%MAVEN_HOME%\bin;%MYSQL_HOME%\bin;%CATALINA_HOME%\bin;%ANT_HOME%\bin;C:\xampp\php

Thursday, July 1, 2010

How to create a generic Dao with Hibernate and Spring Framework

When you are designing web applications a common problem to solve is the DAO (Data Access Object) layer. The simpler way to implement a DAO layer with Hibernate in seconds is to use some of the classes that are provided with Hibernate such as HibernateTemplate. HibernateTemplate class simplifies the data access operations when using Hibernate and provides an easy way to handle Hibernate Session objects .The following diagram shows in UML what is the rationale behind this implementation.

Image 1.  UML diagram for a generic DAO.

The solution proposed in this article is based on Spring Framework 2.5 and Hibernate 3.2.x. Let's begin with a business model class called Person, its objects (instances) are going to be used and obtained from a database like Oracle, MSSQL, or whatever JDBC compliant database