h-source code - h-node.org
Hardware
Issues
Help
Wiki
FAQ
Wiki
» h-source code
talk messages: 0
h-source code
h-source is the PHP software used to create h-node.org. The h-source source code is hosted at
Savannah
At the moment, there is no stable releases but you can clone the git repository:
git clone https://git.savannah.gnu.org/h-source.git
h-node.org pulls from the h-node branch weekly. There is also a
staging instance
that tracks the development branch daily.
How h-source works
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 or more View files.
For example, the URL of this page is the following:
We can split the above URL in four parts
-> the domain name
wiki
-> the controller, that is a PHP class
page
-> the public method of the controller used to serve this page
en/h-source
-> the query string, a list (separated by /) of arguments passed to the
page
public method of the
wiki
controller
Inside the source code of h-source you can download, you will find the following file:
Application/Controllers/WikiController.php
It is the PHP class associated with the wiki controller mentioned above. 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 manages database queries, inserting new data to the database, updating old data and retrieving some data. Each model is a PHP class. All 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
The view files are simple PHP files that contain the HTML code that forms the web page, mixed with some simple PHP instructions. 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/, where is the controller name. The view files placed inside Application/Views can be used by all controllers while the view files saved inside Application/Views/ can be used only by the controller named .
So, in the case of the wiki (WikiController.php) controller, all view files are placed inside a folder:
Application/Views/Wiki
The view file that serves the content of this page is
Application/Views/Wiki/page.php
The contents of this page are in the Public Domain. (see the
CC0 page
for detailed information). Anyone is free to copy, modify, publish, use, sell, or distribute the text for any purpose, commercial or non-commercial, and by any means.
Italiano
Ελληνικά
Português
Login form:
create new account
request new password
special pages
list of pages
last modifications
website statistics:
hardware in the database:
3G cards
34
Acquisition cards
35
Bluetooth
59
Ethernet cards
174
Fingerprint readers
14
Host Controllers
171
Modems
18
Notebooks
810
Printers
127
RAID adapters
20
Scanners
24
SD card readers
58
Sound cards
148
Video cards
349
Webcams
136
Wifi cards
239
TOTAL
2416
users logged:
12
supported by
subscribe to our
client for h-node
Please help in the development of the client for h-node (h-client project). See
here
and
here
related projects
Please help in the development of the
IsMyHWOK
software, a different h-node client
download the source code
useful links:
GNU Operating System
Free Software Foundation
FSF Latin America
FSF Europe
Dragora
Dynebolic
Parabola GNU/Linux
Trisquel GNU/Linux
Ututo
The
h-node
Project
credits
contact
h-node.org is a hardware database project. It runs the
h-source
PHP software, commit
cdeda15
, available under the GNU General Public (GPLv3) License.
JavaScript license information