Naneau

Go dik-dik, go!

Category: PHP

Writing view scripts

A substantial part of my time I spend looking at other people’s code, for various reasons. Sometimes it’s just to figure out how others have solved a problem I am facing, and other times I’m trying to figure out why something doesn’t work. There has a growing focus on coding standards for a while now, [...]

Using Naneau_View_Smarty with RC1

The new viewRenderer, introduced with the Zend Framework 1.0.0RC1 is a source of confusion for a lot of us. When I first upgraded I couldn’t figure out what on earth it was trying to do. Luckily, Matthew Weier O’Phinney has written an article over on devzone that explains the basics of it. I now understand [...]

MSN Messenger class

MSN Messenger is one of those things I wish I could abandon. But I can’t. In the Netherlands, it’s the number one instant messenger. And because I rather like the concept of having friends, I need to keep in touch with people. MSN Messenger is the way to go, unfortunately.
I like linux, I love gnome, [...]

Serving JavaScript and CSS

Now that JavaScript based sites are on the rise again, I have noticed that a lot of people serve their JavaScript and CSS uncompressed. With the discussion about all those nifty JavaScript libraries out there reaching an all time high, the fact that you can easily reduce file size by over two thirds should not [...]

More art!

Well… Okay, its not more, it’s just better. I updated it. Which is what I do. I wrote the original script when I couldn’t sleep a few nights ago. Coding in a sleep-deprived state always gives me interesting results, although they may not always be that useful .
Today I took some time and had [...]

Artistic endeavors

I have created what I think is the most useless thing ever. I call it ‘Ajax Art’. Check it out!
When I was young I would always fail art class. I was good at building things, but I’ve never been able to draw. I just can’t do it. My handwriting is near illegible as well. I [...]

On input validation 2

I posted about it yesterday. I’ve thought about it some more. Wrote some code. And I’m happy! I can validate input without fuss again. Yay. I really did get tired from writing trivial form validation rules into my controllers time and time again. Allow me to demonstrate my new approach.
First, I think about what fields [...]

On input validation

For years I have used PEAR’s HTML_QuickForm and loved it. I based my work flow around it. Basically, QuickForm lets you define a form, with all it’s elements, and attach validation rules to those elements. It could generate HTML for the form, so it was easy to integrate into templates. It had a simple interface [...]

Smarty and the Zend Framework

Like I’ve mentioned in previous posts, I’m a great fan of using “decent” template engines, and try to avoid writing views in php. I don’t want to discuss the reasons behind this in detail right now. I just believe that limiting yourself to a small set of template tags makes you think more about structuring [...]

Modified fields for Zend_Db_Table

Earlier today, I wrote a little extension to Zend_Db_Table that allows for “custom” fields to be added to it’s rows. When it was done some other ideas came floating up. Why wouldn’t I make my life even easier, by creating fields that don’t output their values directly, but in some meaningfully modified way.
Why would I [...]

Extra fields for Zend_Db_Table

Zend_Db_Table is a very, VERY handy class for working with databases. It has come up in numerous posts on this blog. But I’ve always felt that for a complete model implementation there was something missing. For me, the greatest advantage of defining my models away from the rest of the code is that you can [...]

A Zend Framework tutorial, part four

In the first three parts of this tutorial I talked about designing your models and controllers. In this fourth part I’m going to take a look at views. Views are the final part of a MVC application. They contain code that will create the output of the application.
For most of you this will mean that [...]

Ext JS Zend Model Viewer

The title for this post is quite descriptive. While working on my post on ExtJS grids it dawned on me that all I was doing was rewriting a model definition in JavaScript , for use with the grid. Writing a JSON reader for my Data Store was just mapping it to model fields. And as [...]

Easy living

The life of a programmer has become easier and easier over the years. High level programming languages, decent development environments and good manuals all help. With the rise of the internet, sharing knowledge has become a lot easier. And because of that, people now share solutions to common problems.
Before I started this blog, a few [...]

Zend Framework and Stock Quotes

While browsing I found this blog post by Greg Neutstaetter. I downloaded his code and tried to get it to work with the current version of the Zend Framework. There were only a few minor modifications that needed to be made for it to work, which tells you something about the stability of the framework. [...]

Updating Ajax Charts

HTML is a markup language for producing static pages. When trying to present data to your end users that changes over time, that can be a problem. There are different ways to get around that. The whole Ajax hype floats on it.
Charts are a way of presenting information. Because they are images you need some [...]

Handy little Lorem Ipsum class

I often need some random filler text when designing an application. Traditionally, designers use lorem ipsum as ‘random’ text. I have written a handy little class for use with the Zend Framework for this, though it should also function on it’s own.
I just wanted to share it with the you, it might come in handy. [...]

Creating an Ext JS grid using the Zend Framework

Web development has become a lot easier with the rise of frameworks and libraries that help you with common tasks. On the server side there’s PEAR, CakePHP, Symfony and the Zend Framework, amongst others. For the client you can choose from YUI, Prototype, Scriptaculous, Ext JS and many, many more. All these libraries and frameworks [...]

A Zend Framework tutorial, part two

In part one of my tutorial for a zend framework application I talked about creating a general design for your application. If you’re following my approach, you should by now have in your possession some kind of document with requirements for your application. You should also have a diagram with the basic layout of your [...]

JsTable and Ext JS

There are plenty of interesting things you can do with JsTable. Because I had some spare time I wrote up a simple application that uses JsTable to build an Ext JS grid. The result will look something like this:

You can do this for every model you have. It will display all the fields for a [...]