Implicit Evaluation with PHP

Implicit Evaluation with PHP Archives: October 2006

·

31 October 2006

Modifying Recursive Data Structures in PHP

I’ve been working on code to allow pure HTML pages to be used as the source code of templates. Compiling this HTML mandates the use of a recursive data structure to form a tree of HTML tags and to preserve the textual content of the page. It’s reasonably easy to do in PHP5 because of […]

continue reading... » 2 Comments

30 October 2006

Fortitude Forms II: The Form Comes Around

I got an interesting bit of code started in Fortitude this weekend. To understand it, let’s start first with the usual dev-cycle of a Fortitude app:

Create a Model class
Create a Form class
Create a form handling action
Create a View/FormView file

What’s annoying while doing this is that so many fields are seemingly replicated on each step. I […]

continue reading... » 0 Comments

28 October 2006

Eval in a Sandbox

You might call me an outspoken critic of eval.
However, it can sometimes be a necessary evil. Even when eval is the only way to solve a problem, it’s still a security concern. Therefore, I’d like to present a well-to-do way to call eval. It can still let perpetrators call system(”rm -rf /”) but at does […]

continue reading... » 0 Comments

24 October 2006

Session Management in PHP

Session management is one of the features that sets PHP apart from other languages which happen to be used on the web. It is easy enough to understand how to use $_SESSION, but many programmers seem to learn how to use it and nothing more.
$_SESSION serves a single, useful purpose. It makes variables available across […]

continue reading... » 0 Comments

20 October 2006

An Online WYSIWYG Form Editor

Today, I was reading a highly dugg article in Smashing Magazine called List of CSS Tools. It was an interesting collection of links for design and building web applications. But one link in particular stood out: JotForm. This is the kind of designer Fortitude needs. In one of Fortitude’s predeccesors, I had built a designer […]

continue reading... » 0 Comments

19 October 2006

Fortitude Forms Need A Handler Action

One thing which bothers me about how Fortitude Forms operates is that it needs an action. The reason for this is simple:

Fortitude has a controller, and a controller must delegate logic somewhere
The HTML form needs somewhere to submit

But what’s unfortunate is that all the updating logic is buried in Fortitude’s controls. Any validation can only […]

continue reading... » 0 Comments

2 October 2006

PHP and Perl Comparison

Today’s post is more practical than usual. A few weeks ago, I discovered a functional comparison between PHP and Perl authored by Professor Alva Couch of Tufts University. It struck me as a very useful resource, so I updated the PHP column to PHP5 (it was PHP3) and added all the function documentation I could […]

continue reading... » One Comment

·