Telefonieren ohne Limit

August 6th, 2009

Ist eigentlich schon jemandem aufgefallen, das in der aktuellen Version des uns allen bekannten Werbespots weder der Herr Lobo noch die junge Dame mit dem Fake-Kind mehr zu sehen sind?

Open Source E/R Modeling von Oracle

July 7th, 2009

Ich weiss nich ob’s an dem positiven Einfluss der neuen Tochter Sun liegt, oder sich generell bei Oracle der Comunity Gedanke (und der sicherlich damit verbundene Marketing-Faktor durch einen naheliegenden Image Gewinn) ein wenig mehr breit gemacht hat, aber auf jeden Fall kommt da imemr mehr aus der Ecke.
Neuester OSS-Spross ist der SQL Developer Data Modeler mit dem sich ER-Diagramme erstellen und nach SQL/DDL Code exportieren lassen. Das ganze funktioniert laut eigener Angabe (man höre und staune) selbst mit den Konkurenzprodukten von MS und IBM.
Auch wenn ich noch keinen Blick riskiert habe kann ich an der Stelle nur schonmal sagen: Weiter so!

UPDATE: Das ganze ist natürlich nich wirklich Open Source, sondern unter der OTN erschienen… aber immerhin ;)

UPDATE: Tja, zu früh gelobt. Der “Download” ist zwar kostenlos aber die Benutzung anscheinend nicht.

Du bist Terrorist!

May 26th, 2009

Dieser Video-Clip kursiert schon seit einiger Zeit durch das Netz. Mal abgesehen von der Riesen-Welle, die er in der Blogosphäre ausgelöst hat, finde ich die Umsetzung der Thematik äusserst gelungen.
Meine Hoffnung ist, dass solche Beiträge breite Teile der Bevölkerung erreichen um die sicherlich notwendige Diskussion über die Freiheit der Bürger sowohl im echten Leben als auch im Netz mehr in der Vordergrund zu rücken. Nur auf diese Weise kann Argumenten wie denen, die im Zusammenhang mit der ePetition zum Thema Internetsperre aufgetaucht sind, der Wind aus dem Segel genommen werden. So hatte ein Sprecher der Deutschen Kinderhilfe die enorme Resonanz der ePetition, damit abgetan, dass es sich hierbei um ein propagandistisches Machwerk handeln würde und die mittlerweile fast 100.000 Unterschriften keineswegs die Meinung der deutschen Bevölkerung repräsentieren würde.
Sicherlich kann man davon ausgehen, dass durch gute Mund zu Mund Propaganda unter dem Thema nahen Menschen (den netzafinen Menschen) diese enorme Resonanz entstanden ist. Dem sollte man aber durchaus entgegen halten (bzw. unterstellen), dass der jeweilige Unterzeichner dies aus freien Stücken getan hat und und dies nicht tut, weil er ein widerlicher Kinderschänder ist, sondern sich zumindest ansatzweise mit dieser Thematik auseinandergesetzt hat.
Meiner Meinung nach rührt die laut Umfragen ja durchaus bestehende grosse Zustimmung gegenüber der Internetsperre einfach von der mangelhaften Sensibilisierung der Bevölkerung zu diesem Thema. In diesem Sinn, Vorhang auf:

Du bist Terrorist from alexanderlehmann on Vimeo.

Rapid Application Development von Oracle

May 13th, 2009

Einer der Gründe warum ich Symfony so gerne mag und in meiner täglichen Arbeit des öfteren als Projektbasis einsetze ist die unglaubliche Geschwindigkeit, mit der sich neue, datenzentrierte Anwendungen erstellen lassen. DBDesigner öffnen, modellieren, XML exportieren, konvertieren, per Konsole Model-Klassen und CRUD-Module erstellen – fertig.
Oracle hat nun unter dem Titel APEX ein auf die hauseigenen Datenbanksysteme zugeschnittenes Tool veröffentlicht, dass diesen von mir gewohnten Ablauf sogar noch beschleunigen könnte. Die in der Selbstbeschreibung als “rapid web application development tool for the Oracle database” bezeichnete Anwendung kommt als browserbasiertes Tool daher, mit dem sich, laut Eigenaussage, auch ohne enorme Programmierkenntnisse datenzentrierte Anwendungen erstellen lassen. Das schöne daran: Durch die direkte Anbindung an die Datenbank fällt der komplette Teil des Modelings weg.
Ob und wie das in der Praxis funktioniert werd ich mir selber mal anschauen müssen. Der Artikel auf heise Developer zu dem Thema klingt allerdings bereits recht vielversprechend.

UPDATE: Für diejenigen (mich), die keine Lust haben für eine Evaluation extra Oracle + APEX auf einem Testsystem aufzusetzen bietet Oracle unter http://apex.oracle.com/i/index.html einen kostenlosen SaaS-Dienst an. Habe mich grad mal angemeldet, mal schauen wie scharf beim Approval kontrolliert wird…

Alles neu…

May 5th, 2009

…macht der Mai. Aus diesem Grund hab ich mich nach der “geringfügigen” Pause auf dieser Seite mal wieder dazu entschlossen, etwas aktiver zu werden. Um die “Hemmschwelle” Übersetzung nicht als Ausrede heranziehen zu können ab jetzt wohl vornehmlich in meiner Muttersprache…

Symfony ezComponents Integration

August 27th, 2007

As the documentation on how to integrate and use ezComponents in Symfony is quite meager here’s a small example on that. Exemplarily I picked the Graph component for the demonstration. Further documentaion on that can be found here.
Asuming there is an already configured symfony project with one or more application and modules the first thing to do after downloading ezComponents is to prepare symfony for the usage and copy the ezComponent classes into the project folder (they can also be referenced as explained in symfony book chapter 17 but copying the files has some advantages. E.g. you don’t have to change the application’s settings.yml when swapping from Win to Linux).
Configuration is quite easy. Just copy the base folder of the ezComponent you want to use into your symfony lib folder. In our case the folders “Base”, “autoload” and “Graph” are needed. Afterwards you just have to activate the built-in bridge class in symfony. So search for the line autoloading_functions: in your settings.yml, uncomment it and add the following line:
- [sfEzComponentsBridge, autoload]
The whole block should look like that afterwards:

.settings:
.
.
.
  autoloading_functions:
    - [sfEzComponentsBridge, autoload]

After doing this we can instance the ez classes like every other custom class from the lib folder. Let’s assume you have a shop and want to illustrate how many items of each product are sold per day. The following code snippets demonstrate how to generate a simple line chart showing the amount of sold products broken down by product category for each day of the year. Please ignore the absurdity or the performance issues of this approach as it shall only demonstrate how the data passed to the graph class has to be formatted ;)
This is the actions.class.php of the module:

public function executeIndex()
{
.
.
.
(the days array could be generated with PEAR::Date)
  foreach ($days as $day) {
    $product_1[$day]++;
    $product_2[$day]++;
    $c = new Criteria();
    $c->add(SalesPeer::DAY,$day);
    $sales = SalesPeer::doSelect($c);
    foreach ($sales as $sale) {
      if($sales->getProductId() == '1') {
      $product_1[$day]++;
    } elseif($sales->getProductId() == '2') {
      $product_2[$day]++;
    }
  }

This results in an array with the days of the year as indexes and the sale count as value. Now we just have to pass those arrays to the Graph component:

$data = array('Product 1' => $product_1,'Product 2' => $product_2);
//init graph
$graph = new ezcGraphLineChart();
//set title of the chart
$graph->title = 'Sales';
//tell class to generate a jpg instead of svg
$graph->driver = new ezcGraphGdDriver();
$graph->options->font = 'fonts/tutorial_font.ttf';
$graph->driver->options->supersampling = 1;
$graph->driver->options->jpegQuality = 100;
$graph->driver->options->imageFormat = IMG_JPEG;
//assign previously generated arrays to class
foreach ( $data as $item => $count ) {
$graph->data[$item] = new ezcGraphArrayDataSet( $count );
}
//render image
$graph->render( 500, 300, 'images/charts/sales_chart.jpg' );
}

The ezComponents automatically know about the application paths so if you don’t pass any dir names (like “images/charts/”) the output would be saved to the “web” folder (same for the ttf file for the jpg generation). So all you have to do to display the generated chart on a page is the call of the “image_tag” helper:

< ?php echo image_tag('charts/sales_chart.jpg'); ?>

As you can see, quite simple and very comfortable. Have fun with it!

Javascript based table sort

June 19th, 2007

Yesterday I searched for a simple way to sort data sets fetched from a DB by column without querying the DB anytime the sort order changes. A Google search came up with a very nice Javascript at http://www.frequency-decoder.com/. Very sweet, very fast even for large result sets and most important very easy to integrate into a running application.
Check out the demo here or read the whole article.

Seven Deadly Sins

January 13th, 2007

Lust, Gluttony, Greed, Sloth, Wrath, Envy, Pride…

Sound familiar to you? Stop being naughty in real-life, live it out online!
Class A flash adventure :)

Zend Framework All-In-One Getting Started Package

December 2nd, 2006

I started a new PHP project today and as everytime I was pissed that setting up a proper project structure always takes so much time. So I thought it might be useful for some of you if I present my result right here. The following zip file contains a, for my purposes quite suitable all-in-one out-of-the-box eclipse project for a Windows development environment. I basically went through some Zend Developerzone tutorials and put it alltogether.
Let’s start with the general configuration. The code base can be used on any Windows system with WAMP installed but to get things started even faster I recommend to install the following two software packages first:

  1. PHP IDE from Zend (which is basically Eclipse with some neat little plugins for PHP development)
  2. XAMPP as WAMP package.

The whole paths in my scripts are customized for this configuration so as I said, for quick quickstart get those two first. XAMPP isn’t shipped with mod_rewrite enabled, so the first thing to do is to adjust the httpd.conf in “XAMPP_HOME\apache\conf”.
Next thing to do is to remove all files and subfolders in “XAMPP_HOME\htdocs” and to extract the zip from this page into that folder.
Afterwards change DocumentRoot and attribute from “XAMPP_HOME/htdocs” to “XAMPP_HOME/htdocs/www” and (re)start the server.
The provided zip file comes with the following features:

  • Zend Framework 0.2.0
  • Smarty Template Engine 2.6.16
  • Propel 1.2.0
  • Creole 1.1.0 (needed for Propel)
  • Phing 2.2.0 (needed for Propel)

The directory structure explained in detail:

  • app – this is where all MVC classes should go. The “views” folder conatins a example.tpl.html which is just a standard Smarty template. I prefer to name my tpl files with .html ending as they can be opened more easy and are recognised as HTML by Eclipse.
  • bin – this folder just contains the batch file for model generation
  • build – this is where all propel related files should go to. The files from the archive are simply copy & pasted from this tutorial. Generation of the sample model from that tutorial should work out-of-the-box (as long as you changed the path variables the right way).
  • cfg – Here goes the config.ini file used by Zend_Config and the autogenerated propel-config.php
  • lib – self-explanatory I guess. Be sure to add the path to /www/.htaccess if you add new libs here.
  • www – this is the document root for the apache server. Only content (images, CSS, JS, etc.) needed by clients should go here as it’s public.

As a special feature there is a generate-model.bat which can be used to automatically start the phing build process for propel ORM generation.
To get started with this base project structure there are some config lines which have to be overviewed:

  1. “set XAMPP_HOME=c:\Programme\xampp” in “bin/generate-model.bat”
  2. “smarty.template_dir= C:\Programme\xampp\htdocs\app\views” in “cfg/config.ini”
  3. Paths and DB config in “build/build.properties”

Sorry for not giving more details on how to use the code base, but it’s late, I’m tired and everything one needs to know is written on Zend Developerzone… ;)
I’m planing to integrate the LiveUser package aswell the next days, maybe I’ll give you an update. Feel free to comment, ask questions or indicate errors…
Oh, almost forgot HERE is the zip.

Will it blend?

November 8th, 2006

This is another example of how a nice marketing campaign can look like. But remember, don’t try this at home…