• Programming Guideline

    Elanat Programming Guideline
    Programming guideline in Elanat is coding conventions are a set of guidelines and Naming for a Elanat Framework that recommend programming style, practices, and methods for each aspect of a program written.

    Description:

    All descriptions are located at the top of the programming code. Only when adding a description in else, the description is placed in front of it.

    In descriptions the first character of each meaningful English letter is capitalized.

    The start and end of a style class set is specified in a style file as follows:

    The description of the function of the methods is appropriate to the description in backend code.

    Example:


    Naming:

    Classes of style files start with the letters el and before all English words underline (_) is added and written in lower case.

    Example:

    JavaScript file methods start with the letters el_ and the first character of each meaningful English letter is capitalized.

    All naming must be PascalCase. camelCase naming is prohibited.

    Please note that the coding should be as close as possible to the C++ programming language.

    Names of classes and methods must be PascalCase; also, method variable names must be PascalCase, even if they are single words.

    The classes, methods, and variables of the server-side programming language are named as follows:

    The first character of any meaningful English word is written in capital letters.

    Example:

    In loops, using, catch, etc., if the variable is one word, it must be written in lowercase letters, and if it is more than one word, PascalCase must be used.

    Example:

    If the created sample is a single word and the item used with one or two spaces is used only once, the first letter or the first and second letters can be written in lowercase letters for its abbreviation.

    Example:

    If the new instance class is multi-word, it should either be written as an abbreviation of the words and in lowercase letters, or the closest word that defines the meaning of the class should be written in lowercase letters. If the class is one word, the same name must be repeated in lowercase letters.

    Example:

    All input arguments must be written in PascalCase.

    Example:

    If the sample made from the class is more than 1 item, the number 1 should be added to the first sample, and the number 2 should be added to the second sample, and the number n should be added to sample n.

    Example:

    The use of underlines and non-English characters before names is not allowed. You can use the words Pvt and Tmp.

    Example:

    f the methods located in the controller classes end in the name of an event, the name of the requester's input must be connected to the event word with an underlined letter.

    Example:

    Directory names must be in lowercase letters and the underscore character (_) must replace the space character ( ). It is forbidden to use the dash (-) character in naming directories.

    Example:

    Also, the names of css and js files must be in lowercase letters and the underscore character (_) must be replaced by space ( ). It is forbidden to use the dash (-) character in the naming of css and js files.

    Example:

    It is forbidden to use coding patterns <% Code %&rt; in aspx files; such as things like loop and if codes.

    Aspx file names must be in PascalCase.

    Example:

    The id names and names attribute of html inputs begin with the tag name summary in the box, and after the underline (_), the first character of each meaningful English letter in the input name is capitalized. Id names and names attribute should be equal.

    Example:

    The procedures stored in the database and the names of the columns of the tables are written in lower case and the space between all meaningful English words is separated by an underline (_).

    Example:

    The names of the tables in the database start with the letters el and before all English words underline (_) is added and written in lower case.

    Example:

    The names of the files and folders in the new add-ons or the names of the files and folders added in the core of the framework, as well as the original names of the add-on files, should not conflict with the url.

    Example:

    Only the following values are acceptable:

    Underline character (_)

    Dash character (-)

    English alphabet

    number

    Non-English alphabet letters

    Note: The space character ( ), the dot character (.), And the dollersine character ($) are not acceptable.

    The xml tags are written in lower case and the space between all meaningful English words is separated by an underline (_) and the number is not acceptable.

    Example:


    Phrases and sentences:

    The way phrases or sentences are written in the frame follows the Allman style coding rule.

    A set of expressions that are within a method and are independent of each other are separated by two empty line.

    Example:


    Error and exception:

    All errors are stored under the logs directory in the App_Data directory, with the name and date of the error occurring with the .log extension.

    The contents of the error file are as follows:

    First line: error title

    Second line: error path

    Third line: date of error creation

    Fourth line: time of error creation

    Fifth line: The username of the person whose request encountered an error

    Sixth line: The IP of the person whose request encountered an error

    Seventh line: error text

    Description of all errors in the Security.SetLogError(ex) method; are saved.

    Example:

    Note: In some cases, these rules may not be fully observed in the source code of Elanat; we try to make Elanat source codes more regular over time.