Playing with AS3 Low Level Graphics
I've been toying around with the low level graphics API after seeing Ralph Hauwerts awesome presentation at the FITC. (I'm still waiting for my tshirt though). He demoed an application using particles doing all those fancy things and I wanted to try that myself. I'm still working on it and it's not as cool as Ralph's demo, but my first experiments turned out to look kinda cool too. Enjoy.
Aktualisiert: Vortragsfolien
Die Vortragsfolien zu meinem Vortrag über RIAs, Flex und Mate: Rich Internet Applications, Flex and Mate
Hier gibt es die Code Samples!
Building a CMS using XML, XSLT, Ant and ImageMagick
Not so long ago a freelance client approached me with some updates for their website. The site has been growing organically since 2000 and therefore was a big mess. Several attempts to port the site to a CMS driven system failed largely because those CMS systems are usually to complex for our needs (Typo3) or not flexible enough (Joomla, Wordpress). So as I was faced with updates to all the updates including image updates which in turn needed thumbnails to be generated. The same day I stumbled randomly over the xsl:result-document function in XSLT 2.0 which allows you to transform a single XML file into several output files. That sparked an idea with me: why not use that to build a CMS system using XML technologies? I've toyed around with Cocoon a couple of years ago but that was not what I was looking for. So I looked for other technologies...
This post is a write-down of my experiences building a XML/XSLT driven simple CMS system. In it I will show you the required technologies, my approaches and my solutions to problems I've encountered. You'll need a solid understanding of XML at least, understanding of Ant and XSLT helps a lot, too.
This post contains tons of XML and I tried my best to format it in a readable way — in fact I've spent hours to get everything nicely on the screen.
Liquibase Incremental DB Diff
After discussing this on the Groovy and Grails Exchange, I finally put together a new version of the db diff script that I've mentioned in an earlier post. I couldn't find the original version that I've written a couple of months ago, so I hacked together a new one. It's far from perfect, efficient or beautiful, but it does what it is supposed to.
So, what's the idea behind this script? Everybody that uses Liquibase (if you are not, check out my blog post about what Liquibase is and how to use it) knows how painful it is to update your changelog.xml. Liquibase already gives you a great tool to start with, the db-diff command. However, it is hardcoded to diff the current environment's database against the test database. This is annoying as you'll have to modify your datasources and keep the database schema updated manually. But fear not, here is my (surprisingly) easy solution.
I've created a simple script (or rather, I took the db-diff script and hacked it), which I've called incremental DB diff (all the other cool names are already taken...) and what it does is the following:
- update the schema in the db-diff (or whatever you call it) database using the changelog.xml
- diff the database of the current environment against this database and output the diff as Liquibase XML
So, how is this a good thing? Easy: this little script will automatically create a target database to diff against using the changelog.xml which is good, as the changelog.xml represents your last migration status. And as it uses a separate database it doesn't influence the test database.
After running the script just put the output in the changelog.xml and you're done.
All you have to do to use this is to drop the file into your /scripts/ directory, create a new database and an according datasource entry for the environment "dbdiff" like this:
dbdiff {
dataSource {
driverClassName = "com.mysql.jdbc.Driver"
dbCreate = "create-drop"
url = "jdbc:mysql://localhost/foo_dbdiff"
username = "foo"
password = "bar"
}
}
Download DbDiffIncremental.groovy. Drop me a mail or a comment if you have questions.
Grails GraniteDS Plugin and Flex Modules – Could not resolve ? to a component implementation
I'm currently working a lot with the Grails GraniteDS plugin. Just recently I've started to separate my application into modules and ran into a really nasty error.
It took me some time to figure it out, hopefully I can save you from going through all this.
The Flex web tier compiler usually gives me this error:
Error: Could not resolve <namespace:Component> to a component implementation. <namespace:Component/> error during compilation Could not resolve <namespace:Component> to a component implementation.
Initial research confirmed what I thought, this error is caused by a mismatch between a XML namespace declaration and the actual location of a component. However the location and the namespace declaration looked right and the issue occurred only after I had moved the questionable component into a separate module.
After two painful hours I realized that the Flex webtier compiler, as configured with GraniteDS, resolves namespaces relative to modules, not relative to the source folder. D'oh!
The solution I came up with was simple, might be naïve though. I figured that if resolution is relative to the Module and not to the source folder, there might be no such source folder as I would expect it. A quick look into the flex-config.xml found in <GRAILS_PROJ>/web-app/WEB-INF/flex/flex-config.xml confirmed this:
<!-- List of path elements that form the roots of ActionScript class hierarchies. --> <!-- not set --> <!-- <source-path> <path-element>string</path-element> </source-path> -->
So there is no explicit source path set. So I changed it so it would point to <GRAILS_PROJ>/grails-app/views/flex:
<!-- List of path elements that form the roots of ActionScript class hierarchies. --> <!-- not set --> <source-path> <path-element>../../../grails-app/views/flex</path-element> </source-path>
Voilá - it works. However, as mentioned earlier, this might be a very limited solution, but for now it works.
Panorama – Château Villandry II
And here is my second panorama from Château de Villandry. This particular one has been made from the stairs leading to the vegetable gardens.
Panorama – Château Villandry
I finally managed to create my panorama from Château Villandry in France. I missed one image so there's an ugly gray border on the bottom left. Other than that it's a really beautiful panorama, you can see almost all the gardens. Enjoy. (Click for high-res version!)
Zurück nach Deutschland
Die letzten Wochen waren unheimlich ereignisreich. Meine Zeit bei Mindblossom ist vorüber aber die letzten 2 Wochen dort war ich nicht untätig. Ein letztes Projekt mit unheimlich enger Deadline musste (und wurde) gestemmt: Rona 70th Anniversary. Danach ging es mit viel Freelance Arbeit weiter. Heute habe ich endlich ein wenig Luft und ich plane meine Rückkehr nach Deutschland. Der Flug ist gebucht und ich werde am kommenden Donnerstag um 16:50 in München aufschlagen.
Heute habe ich auch endlich mal die Bilder von meinem Handy heruntergeladen und da ein paar schöne Schmankerl aus den letzten Monaten dabei sind, habe ich sie hier hochgeladen. Enjoy.
- CN Tower im Nebel
- Feuriger Sonnenuntergang, gesehen von meiner alten Wohnung @ Fort York Blvd
- Sandsturm in Toronto, gesehen @ Spadina Ave
- Da stand ein halber Panzer in ner Seitenstraße…
- Ich denke es ist ein umgebauter Hummer – eine gepanzerte Version einer Zivilversion eines Militärvehikels. Macht irgendwie keinen Sinn…
- Fischvehikel
- CN Tower im… Dunst?
- Protest für die Tamil Tigers – Unglücklicherweise direkt vor meinem Schlafzimmer und bis spät in die Nacht
- Lake Ontario
- Somewhere in Toronto
- Mein neuer Bildschirm – 30″ Apple HD Cinema
- Mein Schreibtisch nach einer langen Woche
- Goodbye Mindblossom Feier – Lily und ich
- Goodbye Mindblossom Feier – ein paar von meinen großartigen Kollegen
- Tesla!
- Tesla – man beachte das Fahrzeug steht auf Tassen!
- Ja wirklich, auf Tassen – es ist jedoch fraglich ob das mit dem normalen IKEA Geschirr geht!
- Ach ja, der fährt mit Strom!
- Pilze
- Buchladen… so in der Art
Paris, Tag 2
Tag zwei in Paris. Nachdem wir den halben Tag wegen meines Jetlags verpasst haben, sind wir erstmal zum Essen raus. Danach ging es zu weiteren Sehenswürdigkeiten und einer Bootstour. Brüllend heiß und Paris ist ziemlich... nun ja, es riecht überall.
Bin wohl von der guten Luft in Toronto verwöhnt. Morgen fahren wir nach Versailles. Juhuu.
- Mittagszeit. In Torontozeit: 6 Uhr Morgens – der Blick verrät es!
- Mjam
- Man kann über die Franzosen sagen was man will, kochen können sie!
- Metro
- Das obligatorische Photo vom Eifelturm
- Lily, Eis und Eifelturm.
- Das stand da wirklich! Wie passend!
- Lily und ich auf dem Boot.
- Lily und ich auf dem Boot.
- Notre Dame
- Rue Jacob.
- Irgendwo in Paris…
Geburtstag und Erster Tag in Paris
So, sicher in Paris gelandet nach einem mehr oder minder ereignisfreien Flug, mal abgesehen davon das mein Sitznachbar wohl Blähungen hatte. Vom Flughafen ging es direkt nach Paris wo ich Manne und Lily getroffen habe. Danach ging es direkt nach Paris, ein paar Sehenswürdigkeiten ansehen und in einem idyllischen Straßencafé Geschichten austauschen und auf den Neusten Stand bringen.
Meine Mailbox, Facebook und Lokalisten quillt über vor lieben Geburtstagsgrüßen. Vielen vielen lieben Dank an alle!
- Lily, Manne und ich vor Basilique du Sacré-Coeur de Montmartre
- Basilique du Sacré-Coeur de Montmartre
- Lily vor dem Louvre
- Chillaxing in Jardin des Tuileres
- Mittagessen in einem Straßencafé
- Mein Lieblingsschwede








































