Responsive web Framework



Throughout the development, it has been tried to follow standards that adapt to the different conventions


(minimum width: 480px)

Structure and indentation

The processes (perl, php, js) follow a certain sequence:

  1. Debug Mode Statement / Activation
  2. Carga de librerías externas
  3. Capture and validation of data received
  4. Additional Validations
  5. Obtaining database information (if applicable)
  6. Prepare information
  7. Take action or display information
  8. Set end criterion
This indicates that first you get everything you need to perform the process, it is validated and if it meets the conditions the activity is performed. This differs from some other systems where information is validated and deployed as it is obtained, being able to generate errors or rollback.

An indentation of three spaces has been used; Aiming that each block of instructions, are in a new line; Including the end tag. In the case of single-line blocks, these can be indicated on the same line with or without block indicators; if the block occupies several lines, the start tag must be at the same height as the command that groups them except for function declarations.
Each instruction must be accompanied by a semicolon (;).

Un ejemplo de códigos válidoss:

  • function cubeSqrt ($int_value)
      $int_value = $int_value * sqr($int_value);
      return sqrt($int_value);
  • for ($i=0; $i<count($arr_this); $i++)
      { print $i; }
  • for ($i=0; $i<count($arr_this); $i++) {   $int_result = cubeSqrt($arr_this[$i]) + $i;   print "The $i value is: $int_result";   }
  • for ($i=0;$i<count($arr_this);$i++) print cubeSqrt($i);
It is important that this indentation is not followed in CSS because it does not provide anything additional (except spaces).

Constants and variables

Cnstants and variables are differentiated between them as the first are written in capital letters, while the second in lower case. It is sought that its name expresses the information that will contain, accompanied by a prefix (in lower case) that indicates the type of data stored, as they are real_PI or int_counter. The goal is for this prefix to simplify programming by clarifying the type of information contained.

Prefixes used:

Boolean In SiteUP! Integer values 1 and 0 are handled as boolean for compatibility issues, as mentioned below.
Array numerically indexed (matrix en javascript)
Hash or word indexed array (object en javascript)
aa_, aofa_
Array of arrays
ah_, aofh_
Array of hashes
ha_, hofa_
Hash of arrays
hh_, hofh_
Hash of hashes
Date and hour
Changing data
Cgi object
Image object
Pdf object

In the case of temporary auxiliary variables such as index counters, the prefix can be omitted; as well as predefined elements. These are discussed in the next section.

Objects and functions

The (real) objects are written in capitalized form, while the functions are written in lowercase the first word and capitalized the following.
Object examples are NavObject while navGet() on functions.

Tables and fields

Tables and fields are written in lowercase. The tables bear the singular name of the type of service they will contain; qhile those of subservicio also in lowercase and singular, will be formed first of the type of alteration of the service and later of the name of this one. An example would be the document and catdocument tables; documents and category of documents respectively.

Los campos se encuentran ordenados de acuerdo a la siguiente secuencia:

  1. Primary key (PK) of the table
  2. Secondary table keys
  3. External keys (foreign id)
  4. Hidden id data (author, setup, created ...)
  5. Public id data (name, description, ...)
  6. Personal or service data
  7. Data containing auxiliary information.

Classes, names and identifiers

In the case of html variables or fields of action (mainly <input /> fields), the name and id generally match in order to be able to access them in a standard way, with respect to the detection of fields with error or to be modified.

In the case of classes, these follow the standardtype - dimension alteration special, that is explained more in detail in the section of CSS.


The directories should be indicated with a diagonal at the end, especially when assigning the value in a variable.

The parameters that affect the system must be clear as to their name for identification.
If a parameter can contain multiple values, the most recent or relevant must go first (ejemplo: service in actions over service service).