The Passionate Craftsman

Ruby, PHP, MySql, Software engineering and more.

Wednesday 27 May 2009

M888 - Databases in enterprise systems

I find interesting a course of The Open University, at postgraduate level, that talks about databases in the enterprise. The course covers ODBC and JDBC, the some popular persistence frameworks (e.g. Java EE, .NET, Hibernate, Toplink) and SQL/J (a multi-part specification for using SQL with Java). The course covers even web application frameworks (e.g. ASP.NET, PHP). This course probably is useful to have a general understanding a the possible solutions availables on the market; thus I think is more for software architect than programmers.

Labels:

Tuesday 19 May 2009

Test Driven Development Tutorial

The presentation is an introduction to TDD. It is quite useful to developers new to TDD.

Monday 18 May 2009

Map a directory in Apache outside the documentroot


Assuming that you are using Zend Server CE under Windoes and that is installed in "C:\Program Files\Zend", here is how to map a directory, which is outside the documentroot.

* Create a new directory: C:\Program Files\Zend\Apache2\lol
* Add a new alias in C:\Program Files\Zend\Apache2\conf\http.conf, inside "": Alias /lol "C:\Program Files\Zend\Apache2\lol"
* Add the permissions to the direcotry:


Order allow,deny
Allow from all


Than you can reach the directory "lol": http://localhost/lol/

Thursday 14 May 2009

Enumerator class in PHP

If you want an elegant way to an have enumerated type try this:


class QFlashMessageType {
const Info = 0;
const Error = 1;
}


You can use it in this way:
QFlashMessageType::Info;

An enum class example on stackoverflow: http://stackoverflow.com/questions/254514/php-and-enums

Labels:

Tuesday 12 May 2009

Accelerated C++: Practical Programming by Example


I have bought this book two days ago: Accelerated C++: Practical Programming by Example. Tomorrow I will have the pleasure to have a look if it is as good as the rating a Amazon UK. I have found interesting a review by ddddd and this is an extract of the review:

"I've seen other books that try to teach you C++ from the ground up, not giving useful advice until they've bored you with pointers and memory management and so on. Let me say, the way these folks do it (high-level library functions first, primitive data structures later, then OO at the end) is surely the way to go. What's more, this book gets you in the habit of elegant, modular programming, although its main focus is on problem-solving, not style."

It seems that someone, in the end, has found a way to teach C++ in a non-painful way. I think that by learning C++ using example and high level classes is better than explaining any detail about the data type and pointer - although this is important too -.