Leadership Lessons from Dancing Guy

Read transcrip at http://sivers.org/ff .

Great Lesson!

Play Framework + Oracle = EASY!

To configure your oracle database using the play framework you need to follow the following steps:

  1. Choose the JAR with the drivers according to your oracle’s database version and put in the lib/ directory of your web application
  2. Configure your application.conf file,  located inside the conf/ directory
    • In the JPA Configuration Section you have to choose the JPA (Hibernate) dialect. In my case I was working with oracle10g so i had to insert in the configuration file:
      • jpa.dialect=org.hibernate.dialect.Oracle10gDialect
    • Now you just need to add the following lines, according to your database (including username and password).
      • db.url=jdbc:oracle:thin:@yourdatabaseserver:1521:yourschema
        db.driver=oracle.jdbc.driver.OracleDriver
        db.user=yourusername
        db.pass=yourpassword
  3. Now you just need to restart the server. He adds the database drivers automatically to the classpath of the project.
  4. If you want, you can generate Netbeans or Eclipse projects, so you can open this projects with everything configured.

Really easy with no XMLs!

Debug using Firebug

Firebug is really good to debug web applications.

Firebug offers a built-in JavaScript object that provides a separate channel for data outputting. For example, if you want to write something to console window instead of browser window, you can call functions of the console in the following way:

console.debug($('form'));

using jQuery (the use of $(‘form’)) you can see every element of the form on the Firebug console.

More information about Firebug.

[Play] Iterate over objects using jQuery

What if I want to navigate into each checkbox, radio of my html? You can do it pretty easily using jQuery.each function.

In every checkbox element I want to send a post message to my Play Framework.

jQuery.each($(':checkbox'), function() {
    $.post('@{myPlayMethod()}', { itemValue: $(this).val() })
});

This code sends the html element value property to method “myPlayMethod(String itemValue)“.

Java + Rails = Play Framework

After studying a lot of Java frameworks, I found a pretty interesting tool to develop web applications. Now you’re thinking: that framework just for run and test the application you need to configure 452 xmls and you need to configure the database, and a lot of other things… like for instance Hibernate, if you want to get an DB object-mapper. Yes, you can have MVC, using Spring… but, you need to configure again, xmls. But why the hell do you need to configure xmls? I just want to focus on my programming, on the way I’m doing software.

After seeing rails, I became very interested in developing web applications in that way. Play Framework uses the same principle. I am doing some experiments with this new framework.

You already know Play Framework features (that are on their own website). These are the features I like more:

  • Changing the Models at runtime (yes! You can change your database at runtime);
  • Automatic admin generation;
  • Ability to have template custom tags;
  • Integration with Hibernate (you just need to configure a text file that has your credentials to your database – don’t forget the jdbc jar at playproject/lib);
  • Allows you to create a netbeans or an eclipse configuration to run the project inside the IDE;
  • Support (they are always trying to help at google groups or at irc);

Happy new year!

Screen shot 2009-12-30 at 9.16.34 PMAfter a great 2009, which I have finished my masters degree and began my working journey, the objectives I have for next year are growing, each day.

I hope 2010 to be a year of challenges and the year where I’m going to frequently update my blog (I hope, it is one of my intentions! :-) ). Write your objectives to next year, fight for them, and be successful, that is what I wish to you.

Happy 2010, let this fantastic year begin!

The future of mobile communication

The world is changing rapidly everyday. This is an example, and a prediction how mobile communication will advance in the near future.

Are you really unemployed?

Hug a developer today!

I found this video at Rui Venancio’s blog. This explains why a developer is always in pain, everyday he goes to work.

Amazing Video 2

Another great movie made by the University of Quebec. Congratulations!