h-source is the PHP software used to create h-node.com. The h-source source code is hosted at Savannah.
At the moment there is no stable releases but you can download the SVN version (updated daily). In order to download the SVN version you have to install subversion. Then type the following command in a terminal:
svn co svn://svn.savannah.nongnu.org/h-source/trunk/h-source
You can also access the subversion repository using HTTP (slower)
svn co http://svn.savannah.nongnu.org/svn/h-source/trunk/h-source
h-source has been developed using the EasyGiant PHP framework. The EasyGiant PHP framework forces the developer to adopt the MVC (model-view-controller) paradigm. According to this paradigm each web page served is managed by a Controller, a Model and one ore more View files.
For example, the URL of this page is the following:
http://www.h-node.com/wiki/page/en/h-source
We can split the above URL in four parts
Inside the h-source source code just download you will find the following file:
Application/Controllers/WikiController.php
that is the PHP class associated to the wiki controller above mentioned. That file has a public method named page, which require two arguments (passed in the query string: en/h-source) In this way it is easy to find the PHP file that is serving the page you have requested. This page is served by the WikiController.php PHP class by means of the page public method
For each Controller (in this case wiki -> WikiController.php) there is also a Model and one or more view files.
The model has to manage the database queries, that is it has to insert new data inside the database, update the old data, or retrieve some data. Each model is a PHP class. All the model classes are saved inside the Application/Models folder.
Each model manages a single database table. In this case the WikiModel.php file, the model PHP class, is used to manage the wiki MySQL table. It is placed inside the Application/Models folder
The view files are simple PHP files that contain the HTML code that form the web page, mixed with some simple PHP instruction. All the logic is written inside the controller (WikiController.php) and the model (WikiModel.php).
All the view files used by a controller are saved inside the folder Application/Views or Application/Views/<controller>, where <controller> is the controller name. The view files placed inside Application/Views can be used by all the controllers while the view files saved inside Application/Views/<controller> can be used only by the controller named <controller>
So, in the case of the wiki (WikiController.php) controller all the view files are placed inside the folder:
Application/Views/Wiki
The view file that serve the content of this page is Application/Views/Wiki/page.php
Tarjetas 3G | 34 |
Acquisition cards | 34 |
Bluetooth | 56 |
Tarjetas de ethernet | 171 |
Lectores de huellas digitales | 11 |
Controlador de Host | 170 |
Modems | 18 |
Computador portátil | 791 |
Printers | 125 |
Adaptador RAID | 20 |
Escáners | 24 |
Lectores de tarjetas SD | 57 |
Tarjetas de audio | 142 |
Tarjetas de video | 342 |
Cámaras web | 132 |
Tarjetas de red inalámbrica | 234 |
TOTAL | 2361 |