Blog 7

Assignment milestone 1 notes:

We need to make sure that the goals are the reasons for why we are building a website rather than a list of tasks to build the website. We need to have a list of goals

e.g:

Get student to visit the site

Get student to complete the cooking tutorials

Use the website as a information sharing environment.

 

Class notes:

Todd showed us the fixed version of the PHP code.

A session is a defined usage of the system in a contiguous period of time. With session management systems the session is determined since your web browser has last closed. Session management systems use cookies and they are closely related, and so it depends how it has been set up. In a session management system there is usually an identifier associated with the system. The identifier will store information related to a session.

What PHP does is it uses a database with information on all the sessions, so you can replace the session management with my own code. But in Todd’s code he is using a static storage array.

You can have a controller attached to every function in your code. In the controller we have:

The PageView is instantiating (creating a copy of itself).

 

If I had a e-commerce website the shopping cart items would be stored in the database, and the session would have to store that it is the same computer accessing the website. The session variable (issued from DB, if it isn’t set you do a request for a new shopping cart id) has the shopping cart id stored in it, the shopping cart id shows that it is the same computer.

The model is rebuilding itself all the time, and it is using the session to get information from the session.

So the persistent data is stored in session variable and database system. Note: Before using a session variable you need to make sure it is set first.

 

The other option is to dump the model as a object into the session and retrieve it every time. So it can be retrieved between sessions but this is unreliable as you have to serialize the model. But this is not ideal.

We made changes to Todd’s code.

Project work:

I have fixed up my site goals so they are goals for the website as opposed to tasks required to build the website.

The milestone 1 is due next Thursday. We need to use PHP using MVC model to build the website. But we are not required to have the appearance of the website finished.

Leave a comment