## 3 The Solution Proposed: WikiGIS
### Prototype Architecture and Operation  
For now, the prototype is based on client/server type architecture. The browser loads the application when connecting to the WikiGIS site, then it queries the server, which processes most of the information, and finally returns the results to the browser (Figure 2). On the **client side**, the user interface is accessible through a standard web-browser such as Firefox, Internet Explorer or Safari. The cartographic interface is based on the Google Maps API, which enables the use of all the functionalities provided by the Google Maps Web Service (tools, base maps, address geolocation, _etc._). Interaction (creation, modification, consultation) with this API, and therefore the display of geometric entities, is achieved via the client workstation. It allows the desired entities to be displayed and retrieval of the geometry of the entities created using the tools available. However, it does not provide data storage, which is completed on the server side. On the **server side**, there are two components:  
* The WikiGIS HTTP server (Apache/PHP) manages the website pages, and hosts the code files on which the prototype is based. The latter communicates with the database via SQL queries to send and receive geometry- or user-related information, in order to transfer it to the client workstation. It acts as a communication intermediary between the client and the database. Figure 2: WikiGIS Architecture. * The MySQL database of the WikiGIS allows geometric and attributive components of each entity (points, polylines, polygons) to be stored and tracked. Its purpose is to store all the information necessary to the operation of the WikiGIS; that is to say, users' data (family name and given name...), geometric data and descriptive data (in text format) associated with the geometry. The development of the WikiGIS required the use of several programming languages (HTML, CSS, JavaScript, PHP and XML). Figure 2 and Figure 3 present the interactions between the different components, and the corresponding languages. The Web page displaying the main interface of the WikiGIS is written in HTML, PHP and JavaScript. JavaScript enables the primary functions necessary to operate the Google Maps API to be used, because the Web client alone communicates with the Google Maps Service, depending on the information the WikiGIS server sends back to it. To enable the client to communicate with the database, we used PHP (server language) to establish a bridge between the two. Only SQL queries contained in PHP files sometimes need to receive JavaScript variables. The communication between these two languages is then achieved through URL links, which contain both the name of the specified PHP file, and the variables needed to perform the SQL query. PHP language is also used for user management. The principle is simple, when a user logs in via PHP, his or her login name and logon date are saved. Storing these data is necessary, because some actions are available only if the user is logged in (creation, modification of geometric entities...). The other PHP files store SQL queries. They get JavaScript variables through the GET method. When the purpose of a SQL query is to read information from the database table (SELECT type), it is essential to send the result of the query back to the JavaScript code contained in the HTML file. Therefore, we write a XML file based on a structure consisting of three main nodes corresponding to object types (points, polylines, polygons). These nodes contain both subnodes holding the characteristics and attributes (ID, position, _etc._) of a specific object, and as many \"comment\" subnodes as there are comments associated with this object. \"Comment\" nodes contain their own attached attributes and a final \"text\" subnode, which consists of the text of the comment. This file is then read  
Figure 3: The role of languages in operating the WikiGIS. by the JavaScript.