1. Conditional instructions If-else if else is the simplest conditional statement. It can be used in several forms. The statement evaluates the expression and executes the instructions between the braces only if the result is nonzero. Together with else, for the result n is executed with the instruction set situated after else. switch Switch is an instruction designed to simplify conditional...
Design patterns – Singleton, Factory, Observer
Design patterns are general and reusable solutions to a common problem in software design. A pattern design is a description of the solution or a template that can be applied to solve the problem, not a piece of code that can be applied directly. In general, object-oriented patterns show relationships and interactions between classes or objects without specifying the final shape of the classes or...
Structured programming
Structured programming is a paradigm of computer programming due to the growing complexity of computer programs. It has emerged as a new programming model in order to create new programming techniques that can produce programs that are safe to operate for longer. In the late 1960s, due to the rapid development of data processing with the computer, it was possible to address and solve increasingly...
Different PHP data types and how to use them
PHP is simple to use, besides being a structured programming language, like C, Perl or from version 5 upwards even Java, the syntax of language being a combination of the three. Due to its modularity, it can also be used to develop standalone applications, for example in combination with PHP-GTK, or can be used as Perl or Python on the command line. Perhaps one of the most important features of...
Object-Oriented Programming
Object-Oriented Programming (OOP) is a programming paradigm, focused on the idea of encapsulation, that is, the grouping of data and code that operates on them in a single structure. Another important concept associated with object-oriented programming is polymorphism, which allows abstractions to allow for a more straightforward conceptual description of the solution. Object-oriented...
What is PHP
PHP is a programming language. The PHP name comes from English and is a recursive acronym: PHP: Hypertext Preprocessor. Used initially to produce dynamic web pages, it is widely used in the development of web pages and web applications. It is mainly embedded in HTML, but starting with version 4.3.0, it can also be used in the “command line” (CLI) mode, allowing for the creation of...
Types of primitive data
In Java, data types are divided into two categories: primitive types and reference types. Java starts from the premise as ” anything is an object ”, therefore data types should actually be defined by classes and all variables should store instances of these classes. Basically, this is true, but for ease of programming, there are also the so-called primitive types of data, which are...
Variables and operators in Java
In a script (or program), constant data and variable data are used that change values during program execution. These data are called variables. Variable = the name of a location in the computer’s memory used to store data. The easiest way to use and refer to such a variable date is to name it. The variable name allows access to its value as well as changing the value if necessary. You...
The Form object
Forms are HTML elements that give life to static pages because they provide an interface through which visitors can interact with controls (form elements). The Form object is how you can interact with this HTML element in your JavaScript scripts. 1. Methods and properties of the object The properties of the “Form” object are as follows: action – contains the “action”...
The image object
Using JavaScript, you can create a lot of effects on the images on the site. In JavaScript, all images are represented in a matrix called images. This is a property (and sub-object) of the “document” object. For indexing in the array (or array), each image on a web page has a certain number (index). The first image has the number 0; the second image has the number 1 and so on. Thus...