“What is a model” and “Is Zend_Db_Table a model” seem to be asked once in a while on #zftalk. Frameworks say they have a full model available, thus they are MVC frameworks ORM libraries say they generate models. It seems the ActiveRecord pattern has become somewhat synonymous with model. Pádraic Brady wrote an excellent post on how models are misunderstood, …
Common widget design patterns
I’ve worked on quite many widget projects, and very often they have certain patterns that keep appearing. I’m calling these “widget design patterns” – let’s take a look at a few.
NetBeans 6.5 review
During the weekend, I tried out NetBeans 6.5 and its new PHP related functionality. I had earlier seen some quick shots of how the support was, and it seemed like a good contender for big names like Zend Studio. What features does NetBeans 6.5 have for PHP developers? How does it compare against Zend Studio for Eclipse?
Generating Sudoku puzzles using JavaScript
While I’m not the biggest fan of Sudoku puzzles, I wanted to make a sudoku widget for the Opera x-widgets challenge. This required me to study the algorithms used for generating sudokus, which was actually a quite interesting challenge. While there are some examples of generating sudokus online, such as this interesting approach, it seems there’s only one “true” way: …
CSRF protection revisited
Yesterday, I was talking on IRC with Tom Graham. He was looking for a way to protect GET requests against CSRF. I showed him my CSRF protection plugin, as it would be suitable for protecting GETs too with minor modifications. This got me thinking what would be the best way to allow you to easily protect certain URLs with it, …
Creating a Dojo dijit.Tree with checkboxes
Dojo provides a useful component called dijit.Tree, which is basically a quite typical tree component. However, it doesn’t do much out of the box, and I needed it to make some tree nodes selectable with checkboxes for my Zend Framework based packageizer script. While Zend Framework has a Zend_Dojo component, it doesn’t quite do trees the way I want yet.
Base classes in OOP programming languages
David Otton posted a short but thought-provoking post about stdClass, which many think is the “base class” all PHP classes automatically inherit from. I have to admit that I had this misconception as well. On the other hand, “true” OOP languages such as C# and Java both have a base class which all other classes inherit, even if you don’t …
Developing for smaller screens
As of late, I’ve been working on developing a widget that runs on both PCs and mobile phones, for Opera’s X-Widgets Challenge. The widgets for the challenge must work on a QVGA (320×240) screen, and that presents certain challenges. For example, as the size of the widget is so constrained, you need to think what is absolutely necessary – does …
Improved Zend Framework package maker
Last month, I introduced the packageizer, which allowed you to choose a class from the Zend Framework and get it as a zip with its dependencies. Now, based on some feedback from users, I’ve improved the user interface of the tool: You can now select multiple items for inclusion in the package, and I’ve made it possible to get the …
Dojo Toolkit – difficult to learn, is it worth it?
I’ve usually dismissed the Dojo Toolkit as a difficult, poorly documented JavaScript library. However, Zend Framework recently decided to choose it as the default JS library to bundle with the framework. It can’t be all bad if that happens, right? This sparked my curiosity towards Dojo again – Maybe it was time to actually try it for real, armed with …