Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for

Una pausa

So bis zum 05.01. passiert hier nichts mehr – internetfreier Urlaub ;-)

Guten Rutsch und was man so wünscht.

CakePHP 1.2

CakePHP 1.2.0.4206_dev kommt mit einigen Verbesserungen daher:

  • New Validation class
  • FormHelper is improved and extended. Bake yourself some new views using the latest code.
  • EmailComponent: send some emails in plain text, html, or both.
  • SecurityComponent: now supports HTTP_AUTH through var $requireLogin.
  • Pagination: check out the paginate method in the Controller class and the PaginatorHelper. Its pretty simple. try using $this->paginate(); instead of $this->Model->findAll();.
  • Url extensions: specifying the content type of the request is easy with Router::parseExtensions() added to /app/config/routes.php and the RequestHandler. Things like XML and RSS can be added without changing your controller code. Views are mapped to /app/views///.ctp
  • Datasources: The database is not the only place you might store data. So, having multiple datasources will allow you to access them through model methods.
  • I18N support

Im neuen Jahr werde ich mich in jedem Fall wieder mehr mit CakePHP beschäftigen. CodeIgniter ist sehr cool und hat eine schön flache Lehrnkurve, aber zumindest für grosse Projekte lohnt sich die Mühe CakePHP zu erlernen.

JSON ist nicht nur für JavaScript

Simon Willison stellt fest: JSON isn’t just for JavaScript

The sweet spot for JSON is serializing simple data structures for transfer between programming languages. If you need more complex data structures (maybe with some kind of schema for validation), use XML. If you want to do full blown RPC use SOAP or XML-RPC. If you just want a light-weight format for moving data around, JSON fits the bill admirably.

What do we lose from not using XML? The ability to use XML tools. If you’re someone who breathes XSLT that might be a problem; if like me your approach when faced with XML is to parse it in to a more agreeable data structure as soon as possible you’ll find JSON far more productive.

Smarty mit dem Zend Framwork verwenden

Rob Allen zeigt einen Ansatz Smarty und das Zend Framework zusammen zu verwenden.

We use Smarty at work and when we migrate our content management framework to Zend Framework, we intend to continue using Smarty. Hence, I’ve created AkCom_View_Smarty to play with how we are going to use Smarty within the Zend Framework. I think that part of the release also has an implemention of Zend_View_Interface that uses Smarty, so it’s worth looking at that solution too!

CSS und JavaScript – gemeinsam sind sie stark

Christian Heilmann zeigt wie man die Stärken von JavaScript und CSS kombinieren kann, statt um jeden Preis CSS-only Lösungen zu suchen.

In JavaScript ist es (…) mit einem kleinen Trick ganz einfach möglich zu überprüfen, ob ein Style Sheet geladen wurde. Der Trick ist, die Höhe oder Breite eines Elementes (…) zu definieren:

#ichkannCSS { height:20px; }

Dann überprüft man in JavaScript, ob die offsetHeight beziehungsweise offsetWidth des Elementes den gleichen Wert hat:

var CSStestDingen = document.getElementById(‘ichkannCSS’);

if ( CSStestDingen !== undefined ) {

if ( CSStestDingen.offsetHeight === 20 ) {

// hier wird CSS gekonnt!

} else {

// der kann fei kei CSS ned.

}

}

Unterschiedliche Styles für JavaScript- und nicht-JavaScript-Versionen lassen sich leicht mit einer css Klasse auf dem body Element realisieren.

window.onload = function(){

var klasse = document.body.className ? ‘ dynamisch’ : ’dynamisch’;

document.body.className = klasse;

}



Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.