Fibonacci for web developers

We start by creating a database table. This is very important for web applications, because web applications can’t store state in memory, like desktop applications. CREATE TABLE `fib` ( `n` INT NOT NULL, `fib` INT NOT NULL, PRIMARY KEY (`n`) ); Now we write the PHP code. You can write the HTML form yourself, it’s not that hard. Do you write code like this? I know I do.

July 12, 2012

The three parts of the next web

The three problems that need to be fixed are subscription, feed reading and feed creation. Subscription Subscribing to feeds is really hard. It should be really simple. Unsubscribing should be just as simple. See something that you want to subscribe to? Click the subscribe button. Done! Unsubscribing should be just as easy. You see a post in your feed reader that you don’t want to see. Click Hide....

April 7, 2012

Names are important for being specific

I read an article from the BBC website that talks about how Net giants challenge French data law. The article isn’t very specific about what the law actually contains. There also isn’t a link to the text of the law or the name (or number if you will) of this law. So while this creates a lot of commotion on Twitter, there is no way to search for the text of this law....

April 7, 2011

Camlistore use cases

The use cases of Camlistore or all very interesting. I’m interested to see how this all pans out.

March 25, 2011

Camlistore

Camlistore seems like a really cool project when it gets farther along. Or actually it seems really cool already, but it’s not useable at the moment. Something to take a look at sometime in the future.

March 25, 2011

Testing If-Modified-Since with lwp-mirror

This week I created a way for me to post small messages, as there is not yet a good decentralized way to make this happen. One part of this research is how can I create, host and share RSS feeds without using to much bandwidth and server time. One way we can do this, is by using the features of the HTTP protocol. One of those features is the Last-Modified header....

March 12, 2011

Executing code from templates

Until today I couldn’t use variables in my template that are pieces of code. I added one piece of code that executes the piece of code in a the stash and returns its value. In the template it looks like this. [% FOR p IN products %] <p>[% p.name %] [% END %] There are two places in this piece of code that could contain code references. The first is products....

August 31, 2010

Controllers and actions

In the last two essays we established that there is a dispatcher, multiple controllers and multiple actions. The dispatchers creates a controllers and calls the action. Why do we split the application into these parts? First the Dispatcher. The Dispatcher applies rules to a URL and chooses the corresponding Controller and Action. The Controller is a container for action and applies some default values to the action. The Action contains the code that’s necessary to perform some transformation on the application data....

August 26, 2010

The structure of dispatching controllers

Yesterday we looked at the structure inside of two simple controller actions. Now let us look at the outside. The structure of the two actions can be shown as a tree. Guestbook list Orders list I hid the rest of methods that would normally be in these controllers. In front of these controllers there is another class, called the Dispatcher. This Dispatcher uses a request and calls the appropriate controller and action....

August 25, 2010

Discovering structure in web controllers

Alex Stepanov writes in Notes on Programming: We often get the idea that a mathematical theory is built in a logical way starting from definitions and axioms. This is not the case. The definitions and axioms appear at the very end of the development of a good theory. It invariably starts with simple facts that later on are generalized into theorems, and only at the very end the formal definitions and axioms are developed....

August 24, 2010