Here’s another reason to like NetBeans: the jVi plugin. It changes the NetBeans code editor to Vim, which is in my opinion much more powerful text editor than the standard one in NB. What makes jVi even better is that you actually get all the code-assist and other features present in NetBeans’ normal editor! I’ve used some Vim plugin for …
Another idea for using models with forms
Matthew Weier O’Phinney wrote about using Zend_Form with models. His approach puts a form inside a model, which then uses the form to validate itself. While this idea is not bad, I find it being upside down – I think the form should use the model to validate itself, not the other way around. But how would you utilize a …
Decoupling models from the database: Data Access Object pattern in PHP
Data Access Object pattern: It’s a pattern which abstracts the details of the storage mechanism – be it a relational database, OO database, an XML file or whatever. The advantage of this is that you can easily implement different methods to persist objects without having to rewrite parts of your code.
Seven Things
Oh no, another of these silly blog tagging games. I was tagged by Pádraic Brady, and the point is to share 7 random or weird facts about me.
Sandboxing Rhino in Java
I’ve been working on a Java app which needed Rhino for scripting. The app would need to run untrusted JavaScript code from 3rd parties, so I had to find a way to block access to all Java methods, except the ones I wanted. This would not be a problem if there was an easy way to disable LiveConnect – the …
Best of 2008
Since the year is about to end, I think now is a good time to highlight some best things of 2008
Reusable “generic” actions in Zend Framework
Sometimes you will need nearly the same functionality in many actions. This can lead to unnecessary code duplication if you aren’t careful, and there’s been a couple of occasions on #zftalk, where people have been asking for a good practice to avoid this. There are several ways to deal with this, such as moving the code into a separate function, …
Happy holidays
Merry christmas to everyone, or if you don’t do xmas, happy <insert your holiday’s name here>! Also, here’s a small challenge for you: draw santa in mspaint (or something else) – but do it with your eyes closed!
What will you do during the holidays?
I’ve been asked this a couple of times.. What will I be doing during xmas? Since the people asking that aren’t exactly computer people, the usual non-nerdy answer I give out is that I’ll probably take it easy and relax – you know, the usual stuff. But since this is the internet, and this is a programming blog… I’ll be …
JavaScript margin/block commenting system
On Djangobook, they used to have this interesting commenting mechanism on their book’s pages: Each paragraph in the book could have comments, by use of a JavaScript commenting system which would display the amount of comments on each paragraph when you hovered over them with the mouse. You could also click on the little bubble which displayed the count, and …