As I told you in yesterday’s post, I’m currently developping a new website for my own web design company and a framework in PHP in parallel.

But what has been done so far?

Well, firstly I created some sort of prototype: a single homepage with DIV’s for logo, header, navigation, content, etc…, the logo’s and a stylesheet. It takes some time in the first place, but I think it makes developping a website much easier if you have a clear view of what you want before you start implementing the functionality.

Then I started with the navigation. I decided to go for a (small) matrix structure, with products and services on the one hand and a target-audience approach on the other hand. It went quite well and I’m pretty happy with the result 🙂

The navigation is not yet fully implemented in the framework, and I’m not sure if it ever will be completely in the framework (need to do some heavy thinking about that).

Well, so far so good for the pretty fun stuff, now it’s time for the real thing…

The next thing I started with was the user registration and login functionality. But what about user registration without a database? So I needed the use of some sort of DataAccess base-class (As I’ve done a lot in COM and .NET development). The Data baseclass allows met to execute queries on the database without having to open and close the database and entering username and password time after time again. Execute the query and continue with the result, dynamic queries and arguments, etc… Nice work 😉

OK, so we have data access, back to the user registration and login.

But how can I handle user login, without some sort of state or session management? That’s when I started with the State, State->Cookie and State->Session classes. This allows me to choose wether I want the user state to be implemented using cookies or using session variables (which uses a cookie also, but can be deployed without using a cookie). Of course the regular session and cookie functionality is (or will be) implemented.

Another step taken… Back again to user registration and login.

So an unregistered visitor comes on the site and gets a ‘Register’ link. This shows a popup where he can enter a user name and an email address for registration, along with optional personal data. While I was creating the register-form, I tought: “Why type the same stuf over and over again and change some id’s and labels each time, just to create a simple form?” And the answer was: “to realize that this stuff needs to be in the framework as well!”

So the Form and Form->FormField classes were born. Now I can simply create a form by specifying some variables, some formfield variables and nothing more. This will save me a lot of time, espacially if I add form-validation to it. But that’s something for the (near) future.

That’s what has been done in the past weeks (I’ve got a daytime job you know, and I don’t have time every day and sometimes I realy don’t feel like working in the evening, that way it ook weeks for this).

The next post will be about what I was working on in the past days and what (problems) I came up to.

Stay tuned!