HomePHP Page 3 - An Introduction to Intranet Application Frameworks
Presentation Layer - PHP
You can use software in a number of ways to improve the efficiency of employees in a company. If there is an intranet set up, you may want to create applications that take advantage of it to help your workers keep track of various projects. To make this work, you'll want to start with an application framework.
The presentation layer will consist of an HTML template. This template will collect all the input from the user when required; it will also present output when required to do so by the user. HTML is generally used for this purpose.
The most common HTML data collection tool is the form. We are going to be seeing a lot of it during the course of this article. I've generated all the templates using Dreamweaver. Dreamweaver makes it easy to make cosmetic changes to aspects of a template that you want to change.
The application framework will consists of three core components:
Database support - This component will offer database abstraction to the applications. See the section on database support on the next page.
Error handling - All applications will need debugging and error handling during and after development. This error handling class will offer such support. Therefore, all applications that use the framework will have to use this support to generate error messages in a uniform way.
Authorization and Authentication - None of the applications using the framework will have to deal with logging users in and out of the system. This will be done by the central authorization facility. Each application will have to use its own business logic to decide which users to grant and deny access. This component will use the database support from the framework to find out whether a user exists and if so, it will redirect the user to the index page of the intranet site; otherwise the user will be informed that her login details did not match.