Quite often I see a question in a newsgroup or forum along the lines of: What is this thing called 'OOP'? What is so special about it? Why should I use it? How do I use it?. The person asking this type of question usually has experience of non-OO programming and wants to know the benefits of making the switch.
A lot of developers are taught to use database stored procedures, triggers and database constraints at every possible opportunity, and they cannot understand why an old dinosaur like me should choose to take an opposite view. The reason can be summed up quite simply...
Where an application requires certain values at runtime, and where these values may be changed at irregular intervals, it is common practice to hold these on a database record rather than having them hard-coded into any program.
Before switching to web development and the stateless HTTP protocol I spent several decades developing client-server systems which were statefull. These came in several flavours...
It is a feature of my software that I produce HTML output from XML documents with server-side XSL transformations. This means that as well as producing the XML document I transform it into HTML on the server before I send the result to the client.
The software that I write is not intended for just one customer who is locked into a single RDBMS. Instead it can be used by virtually any customer using the RDBMS of their choice. How is this possible?
In software engineering, a design pattern is a general solution to a common problem in software design. A design pattern isn't a finished design that can be transformed directly into code, it is a description or template for how to solve a problem that can be used in many different situations.
The process of internationalisation can be as simple as replacing a string of text in one language with a string of text in another language, or it can be much more complicated involving the use of different character sets, as explained in Notes on Internationalization. In the interests of simplicity I shall limit myself to the straightforward replacement of text as this is "good enough" in most circumstances I shall encounter.
As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously.
The session handling functions in PHP are designed to save state between different requests from the same client. This works well if the client device is accessing the application via a single browser window, but what happens if the user decides to open up several browser windows and attempts to access the same application through multiple windows at the same time?