lundi 30 janvier 2012

Learning a new dev language...

While some of my friends are learning some cool new languages like Closure or Scala, I am rediscovering a good old language... PHP !

... well, my need was to be able to develop a web based module for Win-firme (my C++/desktop based application) in order to offer a more convenient way for players to enter their choices. As I am currently hosted on a OVH shared platform, java was not really an option, and moreover I was needed something that would require a 0 operation support (not really the case yet for java...). So, I finally decided (but no real other choice) to get a try to php. I have always used PHP as a scripting language with simple database interactions, so I was worry about how to build something well designed. So I was positively surprise to discover that PHP5 offers me most of the technological stack I was expecting to build something correctly.
First, I always heard about sql injection troubles with PHP. In fact, since PHP5 you can use prepare statements using PDO and have a powerful way to communicate with your database.

So I didn't want to have to right sql request directly for each of my objects to store. After looking at some persistance frameworks (and find some issue with installing them on my shared ovh hosting), decided to build my on simple "EntityManager", after all this is not a so big deal ;).
So for this I was needing some Reflection abilities (well also an Object Oriented Language, that is the case with php)... does that exist in PHP ? Yes, everything is there ! Annotation ? Well, not directly in the core language, but available through some project (as reflection allows to read the code comments, they developed some lib to parse this part...) like addendum.

So, after almost 9 (not very intensive) months of development, a lot of technical experimentations, my first "official" release is there waiting for real life feed-backs !

Aucun commentaire: