
When planning the development of EnviroNet, it was decided to use PHP and MySQL as the main server-side technologies.
In order to speed-up and facilitate the coding process, the repeated use of various functionalities of PHP, such as the inclusion of frequently used sections of code from external PHP files, proved to be very effective. The use of this feature also allowed me to simplify the structure of the code and to keep file sizes to a minimum.
Furthermore, it as ensured that the existing code contains a satisfactory number of comments and explanations regarding the code’s purposes. These comments will allow me and other programmers to understand the code more easily.
As the main EnviroNet system is supposed to be accessed from mobile devices, it was essential to work within certain parameters for the development of this website. One of these restrictions is the inability of most mobile devices to interpret JavaScript. Therefore, the server-side coding had to be adapted to include the error-handling control structures of the application. This was done by implementing a large number of user-feedback messages into the structure of the website. In other words, whenever a user performs certain tasks or makes mistakes (e.g. searching for non-existent content, searching or posting without specifying parameters, logging out, changing of password, etc.), the system has to provide the user with an appropriate message, in order to allow the user to get a deeper understanding of the system.
To ensure that EnviroNet is only accessed by and contributed to by authorised users, who have completed the sign-up process, it was essential to implement access-privileges that are being controlled by a login procedure. These confirm a user’s identity by comparing login details with existing information in the database. Once a user has successfully signed in to EnviroNet, the system keeps track of the user by creating session variables, which allow access to the system’s functionalities.
Another method of increasing the security of the EnviroNet system is the use of encoding data. Sensible data, such as the passwords of users are being stored inside the database in an advanced encryption format. Whenever the system needs to verify sensible data, it uses a passphrase to encrypt the data, before comparing it with the stored copy inside the database.
As EnviroNet is a public, content-driven tool with the aim of enriching users’ lives, where every user has the potential to publish content without any restrictions, we were concerned about the possibility of offensive, commercial and otherwise inappropriate content being published. In order to prevent EnviroNet from becoming an advertising tool, we chose to provide every user with the ability to rate existing posts as inappropriate. By doing so, a user nominates the deactivation of the concerned post. Whenever a message is being rated for the third time, it becomes inactive and will be excluded from the search results. Furthermore, the user who posted this message will be rated every time one of his / her messages is being deactivated. When a user is rated for the third time, his / her account is being deactivated.
As EnviroNet consists of two co-existing websites, namely the one that is accessed via a mobile device and the one that can be accessed via a regular computer-based browser, we required a script that allowed me to determine what kind of device a user is using to access EnviroNet. The PHP function HTTP_USER_AGENT allowed me to retrieve a user’s browser information. We then wrote a script that searched this information for common data of operating systems. Thereby, I was able to redirect those requests coming from mobile devices to a different URL than those that indicated that the user was currently using a computer.
When creating the database structure for EnviroNet, one of our intentions was to make it as efficient as possible. Therefore, it was ensured that no duplicate data exists in the database, as this could slow down the retrieval process. Furthermore, the amount of information users can provide for certain aspects of the database is restricted. While users can still create posts that contain very long messages, other information (e.g. personal details) undergoes certain quantitative rules, which will ensure the seamless communication between the system and the users.
Another feature that is aimed at increasing the efficient use of EnviroNet is its capability to communicate with the users through email. If an existing user forgets his username or password, he/she can make use of the provided functionalities on the computer-based website and request his login details. EnviroNet will then send an automated email to the user with the requested information. Furthermore, users are being sent emails upon successful creation of their user account. To enable this feature of EnviroNet, I had to make use of PHP’s mail function.
Diagrams
Click here to view the table structure of EnviroNet's database
Click here to view the site structure of the mobile device website.
Click here to view the site structure of the computer website
Projector
When scoping EnviroNet, we initially planned to develop a system capable of using GPS coordinates, in order to determine a user’s exact location. However, our research showed that we wouldn’t be able to fulfil the technical requirements for such a system with the resources available to us. Therefore, we decided to simulate the locative aspect of EnviroNet by asking its users to provide their location in form of two single digits, which stand for latitude and longitude. In order to facilitate the user’s understanding of how EnviroNet would ideally be used in everyday situations, we decided to provide the user with appropriate visuals, representing the locations where he / she currently searches or posts messages.
We abandoned our initial idea of using a series of posters in combination with coordinates, because it could have made it too difficult for the user to make the connection between his actions in different locations. Instead, we intended to produce an interactive and responsive multi-user tool, which would assist the user by personalising his experience of and path through EnviroNet.
The resulting tool is an interactive Macromedia Flash Player, which continually accesses EnviroNet’s database to request a list of currently active users. This list is then being compiled using PHP and parsed back to the Flash Player in form of an XML Object.
Users can interact with the tool by searching or posting messages in the EnviroNet system. Every time a user performs such an action, his username and location will appear on-screen, as well as a visual of the chosen location.
Diagrams
Click here to view the Projector Structure.