Biographies Characteristics Analysis

Mastering the basics of environmental literacy. Article 42 of the Constitution of the Russian Federation


The development of a block diagram (architecture) of a program is one of the most important stages in the software development process for the following reasons:

  • the wrong choice of architecture leads to the risk of disrupting the entire project in the future;

  • this stage is the base for the entire development process;

  • a well-thought-out architecture makes it easy to modify the software product if the requirements for it change.
Architecture is understood as a set of program components, as well as links and ways of organizing information exchange between them. The first task that needs to be solved when developing a structural diagram of a system is the task of determining its constituent components.

Based on the analysis of the requirements for the system, a set of all functions that the program must support is determined. Further, the obtained functions are combined into logically interconnected groups. Each of these groups can become one of the components of the software system. You must be prepared for the fact that the first version of the set of components will not be complete. During the analysis of functions and at the first stages of architectural design, additional functions can be identified that need to be included in the developed program. For the most part, these functions will be necessary to perform technological processes to maintain the system in a holistic and operable state. It is quite natural to assume that these functional features cannot be known to the customer of the software system, and to developers at the first stages of development.

First of all, the program architecture should include a general description of the system. Without such a description, it is quite difficult to make a coherent picture from many small details or even a dozen separate classes. The architecture should include evidence that alternatives were considered in its development and justify the choice of the final organization of the system.

The architecture should clearly define the responsibility of each component. A component should have one area of ​​responsibility and know as little as possible about the areas of responsibility of other components. By minimizing the amount of information components know about other components, you can easily localize application design information into individual components.

The architecture should clearly define the rules for communication between program components and describe which other components a given component can use directly, which indirectly, and which it should not use at all.

The user interface is often designed during the requirements phase. If it is not, it should be determined during the design phase of the architecture. The architecture should describe the main elements of the web page format, graphical user interface (GUI), etc. The convenience of the interface can ultimately determine the popularity or failure of the program.

The architecture of the program is modular so that the graphical interface can be changed without affecting the main logic of the program.

The program for processing student survey questionnaires can be conditionally divided into two parts with different functions and access levels for users:


  • a system for conducting a survey of students;

  • system for processing the results of the survey;

  • control system.
All parts are linked into a single program by a common database.



Figure 2.1. - System structure


The survey system contains the following functions:

  • issuing a question from the questionnaire;

  • automatic check of the type and correctness of the input data;

  • saving data to the database.
The system for processing the results of the survey allows you to:

  • display or print survey reports;

  • view information about the survey of a particular student;

  • compare the results of the current and previous surveys with the same questions.
The control system allows:

  • control the conduct of the survey;

  • manage data - add, delete and change;
In turn, each of the systems can be divided into two subsystems based on the environment in which they run:

  • the server part, written in the PHP programming language and running on the server;

  • a client-side part written in the HTML markup language and the JavaScript programming language using the jQuery library and executing in the user's browser.
FROM
The server part of the program in its structure corresponds to the MVC architecture (Model-View-Controller) or model-view-controller. MVC is a software architecture in which the application's data model, user interface, and control logic are divided into three separate components so that modifications to one of the components have minimal impact on the other components.
Figure 2.2. – Model-View-Controller Architecture
This approach allows you to separate data, presentation and processing of user actions into three separate components.

  • Model(Model) - a module responsible for directly calculating something based on the data received from the user. The result received by this module must be passed to the controller, and must not contain anything related to direct output (that is, it must be in the system's internal format). The main goal is to make the model completely independent of the other parts and know almost nothing about their existence, which would allow changing both the controller and the view of the model without touching the model itself and even allow the operation of several instances of views and controllers with one model at the same time . As a result, a model can never, under any circumstances, contain references to view or controller objects.

  • view- information output module. The responsibility of the view is to display the data received from the model. Usually, the view has free access to the model and can take data from it, but this is read-only access, changing nothing in the model, or even simply calling methods that lead to a change in its internal state, the view is prohibited. To interact with a controller, a view typically implements some interface known to the controller, allowing views to be changed independently and to have multiple views per controller.

  • Controller- data input and output control module. The tasks of the controller include reacting to external events and changing the model and / or view in accordance with the logic embedded in it. One controller can work with several views, depending on the situation, interacting with them through some (previously known) interface that these views implement. An important nuance - in the classic version of MVC, the controller does not transfer data from the model to the view.

    The controller receives data from the user and passes it to the model. In addition, it receives messages from the model and passes them to the view. It's important to note that both the view and the controller are dependent on the model. However, the model does not depend on either the controller or the behavior. This is one of the key advantages of such a division. It allows you to build a model independent of the visual representation, as well as create several different views for one model.
The advantages that the MVC architecture presents over the traditional model:

  • transparency of the system;

  • single point of entry into the system;

  • code reuse;;

  • fast development;

  • availability of ready-made solutions;

  • ease of support;

  • easy changes.
Thus, the use of the MVC architecture provides tangible advantages in the design and development of a program for processing student survey questionnaires, which positively affects both the speed of the development itself and the quality of the final result.

2. Development of the program database structure

The organization of the database structure is formed on the basis of the following considerations:

  • adequacy to the described object - at the level of the conceptual and logical model;

  • ease of use for accounting and data analysis - at the level of the so-called physical model.
According to the data presentation model, hierarchical, network and relational models are distinguished as the main ones, respectively, to work with each of the above databases, they use their own DBMS.

In this case, the most appropriate is the relational data model, since all information can be easily presented in the form of tables. The relational data model is a logical data model that describes the structural aspect, the integrity aspect, and the data processing aspect in relational databases.

Structural aspect- The data in the database is a set of relationships.

Aspect of Integrity- relations meet certain conditions of integrity.

Processing aspect- relationship manipulation operators are supported.

An important aspect of database design is normalization - the process of converting the database to a form that corresponds to normal forms. Normalization helps to protect the database from logical and structural problems called data anomalies. For example, when there are several identical records in a table, there is a risk of data integrity violation when the table is updated. A table that has been normalized is less prone to these problems because its structure involves the definition of relationships between data, which eliminates the need for the existence of records with repetitive information.

The free MySQL database management system was chosen as the DBMS. The flexibility of the MySQL DBMS is supported by a large number of table types: users can choose between MyISAM tables that support full-text search, and InnoDB tables that support transactions at the level of individual records. Thanks to its open architecture and GPL licensing (GNU General Public License - a free software license, the purpose of which is to give the user the right to copy, modify and distribute programs, and also to ensure that users of all derivative programs receive the above rights), MySQL DBMS constantly new types of tables appear.

An important advantage of the MySQL DBMS is that it has been ported to a large number of platforms such as AIX, FreeBSD, HP-UX, GNU/Linux, Mac OS X, NetBSD, OpenBSD, Solaris and Windows. Note that MySQL AB provides for free download not only DBMS source codes, but also ready-made executable modules compiled and optimized for specific operating systems.

MySQL has an Application Programming Interface (API) for languages ​​such as Delphi, C, C++, Java, Perl, PHP, Python, and Ruby, libraries for .NET platform languages, and provides support for ODBC through the Open DataBase Connectivity (ODBC) driver. is a programming interface for accessing databases) MyODBC.

The MyISAM type was chosen as the main type of tables. MyISAM tables are ideally optimized for use with web applications where read requests predominate. MyISAM tables show very good performance results with SELECTs. This is largely due to the lack of support for transactions and foreign keys. However, when modifying and adding records, the entire table is briefly locked, which can lead to serious delays during heavy loads. But in the case of the survey questionnaire analysis program, this is not a serious problem, since a high load on the system is not planned.

Another advantage of MyISAM tables is platform independence. Table files can be moved between computers of different architectures and different operating systems without any conversion.

MyISAM tables can have fixed, dynamic, or compressed entries. The choice between fixed and dynamic format is dictated by the column definitions.

The structure of the database is shown in Figure 2.4.

R

Figure 2.3. – Database structure


Relationships between tables organized in the database allow you to perform cascading deletion and updating of data. The use of link tables made it possible to reduce data redundancy to a minimum.

The it_students table contains data about the students who completed the survey.

Table 2.1 - Data table "it_students"


Field

Type of

Length

Description

id

Numerical

11

Index

num

Numerical

11

Student ID number

name

Symbolic

100

Name

second_name

Symbolic

100

middle name

surname

Symbolic

100

Surname

birth

the date

-

Date of Birth

year_postupl

year

-

Year of admission

address

Symbolic

500

Address

phone_h

Symbolic

15

Home phone

phone_m

Symbolic

15

Mobile phone

mail

Symbolic

250

Email address

icq

Numerical

10

ICQ Number

The it_answers_var table contains the answers to the survey questions.

Table 2.2 - Data table "it_answers_var"

The it_questions table contains the survey questions.

Table 2.3 - Data table "it_questions"

The it_tests_cfg table binds survey questions to a specific questionnaire.

Table 2.4 - Data table "it_tests_cfg"

The it_tests table contains data on all questionnaires and the dates of the surveys.

Table 2.5 - Data table "it_tests"

The it_text_answers table contains data about manually entered student responses.

Table 2.6 - Data table "it_text_answers"

The it_students_answers table contains student response data.

Table 2.6 - Data table "it_students_answers"

3. Development of a database information flow model

Since the program for analyzing student survey questionnaires is built on the MVC principle, it is possible to represent information flows as follows. When a request is received from the user who sends the browser to the Web server, the controller, following the programmed algorithms, qualifies the received request, changes it and passes it to the model. The model, which is the link between the controller and the DBMS, interprets the query and makes the appropriate call to the MySQL DBMS, returning the results to the controller.

It is noteworthy that for the controller it remains hidden what type or implementation of the DBMS it works with, all calls to the database occur through the model, the main task of which is to abstract the work with data. Instead of a database, you can even use a text or XML file, it will not matter for the controller. In parallel, the controller sends a request to the view component, which composes the final template and returns it to the controller. It is also possible that data is exchanged directly between the model and the view. The controller combines a selection from the database and a view template and passes it to the user's browser.



Figure 2.4. - Scheme of information flows of the MVC architecture

4. Development of algorithmic support

The algorithmic support of all program components has significant differences, since they carry different functionality.

The first time a student enters the survey system, a new session identifier is created. The session, or session, allows the server to identify the user using a special number that is unique and assigned when the user interacts with the server. In addition, sessions allow you to associate variables with this user and store these variables on the server. In other words, sessions allow you to make variables global to all program components. Thus, the survey system can unambiguously determine from which of the users working with the program certain data came.

D
Further, the student answers a series of survey questions and only at the end of the survey all the data is stored in the database. The algorithm of the questionnaire system is shown in Figure 2.5.

Figure 2.5. – The algorithm of the survey system

One of the most important security points of a web application is checking all incoming data, so you should always check the data entered by the user in search forms, filling out registration fields, and so on for "dangerous" data. This can be malicious JavaScript code, PHP or PERL commands, and (which is the most dangerous) commands to the server.

It should always be remembered that absolutely any user is a danger to an insecure web application, so it is always worth checking requests and variables coming from the user.


  • analysis of POST and GET variables and superglobal arrays;

  • separation of variables;

  • filtering string variables.
Be sure to check the incoming variables at the very beginning of the program, not allowing to work with functions and queries to the database not yet checked, potentially dangerous, data from users. Thus, all the functions necessary for protection will be located in one specific place or even file. In the case of the program for processing student survey questionnaires, data filtering is performed at the level of the CodeIgniter framework in automatic mode, since the line is included in the configuration file $config["global_xss_filtering"] = TRUE.

Absolutely every variable in a program must already have its own type at the design stage, be it a number or a string. This problem is especially acute for programming languages ​​with weak or no typing, which include PHP and JavaScript. Therefore, in the most critical sections of the program, variables are checked for type matching.

Text variables are especially dangerous, for example, a field for entering the answer to a questionnaire question. They just need to be checked for malicious code. To eliminate the danger, some elements are removed from the text or replaced with other characters. The algorithm for processing incoming data in the CodeIgniter framework is shown in Figure 2.6.

R
Figure 2.6. – Algorithm for processing incoming data in the CodeIgniter framework

2.5 Development of the program interface

One of the most important issues in the development of a software system is the development of a user interface. Any system that uses technical means in its functioning belongs to the class of "man-machine" systems. It would be correct to put forward the following requirements for the interface of testing systems:


  • the interface should be clear, simple and easy to use

  • the user should not be distracted by activities not related to the task being performed.
The user interface is made in the HTML markup language using JavaScript and the jQuery library, which made it possible to build an interactive user interface of the program.

To

For example, a text field for entering a date using jQuery has been converted into a compact calendar with automatic validation of date input (see figure 2.7).

Figure 2.7. - Calendar interface for choosing date of birth
The user interface available to students taking surveys is somewhat minimalist. As a result, students are not distracted by beautiful graphics and concentrate on thinking about the answer to the question. interface with one of the

surveys is shown in Figure 2.8.

Figure 2.8. – Question answering interface


If for some reason the student does not select any of the answers to the question, but tries to move on to the next question, the survey system will automatically display an error message and offer to answer the current question again (see Figure 2.9).

Figure 2.9. - Data entry error message



The system for processing the results of the survey can display the results in several modes - text, graphics and printing mode. The interface for displaying the results of the survey in graphical form is shown in Figure 2.10.

Figure 2.10. – Interface for displaying survey results



A browser that is a client to a server and sends it a request to process a Web page may be an implementation of so-called thin clients. The browser is capable of displaying Web pages and is usually included with the operating system, while updating and maintaining it is the responsibility of the operating system vendor. The application logic focuses on the server, and the function of the browser is mainly to display the information downloaded over the network from the server and feed back the user's data. One advantage of this approach is that clients are independent of the user's particular operating system, and Web applications are thus cross-platform services.

A significant advantage of building Web applications to support standard browser functionality is that the functionality must run independently of a given client's operating system. Instead of writing different versions for Microsoft Windows, Mac OS X, GNU/Linux and other operating systems, the application is built once and deployed on any platform.

3. Technology section

3.1 Program development technology

3.1.1 Web server basics

How a web server works: It is known that web servers store information in the form of text files, also called pages. In addition to text, such pages may contain links to other pages (located on the same or another server), links to graphic images, audio and video information, various input objects (fields, buttons, forms, etc.), and also other objects and programs executable on the server. In fact, pages are some kind of link between objects of various types. They are designed using a special hypertext markup language HyperText Markup Language, or HTML for short. To access information located on web servers, users use special client programs - browsers. Currently, there are dozens of different browsers, but only a few of them are the most popular at the moment:


  • Microsoft Internet Explorer;

  • Opera;

  • Mozilla Firefox

  • Google Chrome.
Each web server page has its own so-called Universal Resource Locator (URL). To access a particular page, the user must provide its URL address to the browser. As a rule, any web server has one main page containing links to all other pages of this server. Therefore, browsing the contents of a Web server usually begins with its main (index) page.

3.1.2 Passive and active web servers

Distinguish between passive and active web servers. If the server pages contain only static text and multimedia information, as well as hypertext links to other pages, then the server is called passive. When the pages of the server behave similarly to the windows of ordinary interactive applications, entering into a dialogue with the user, we are dealing with an active server.


3.1.3 Object-oriented approach

Currently, the use of an object-oriented approach in the development of web applications is gaining more and more popularity. And although the advantages of this approach are not as obvious as, for example, in programming languages ​​such as C ++ or Java, an increasing number of freely distributed libraries and programs written in the PHP programming language are moving to an object-oriented interface. By doing so, they force developers who use them to turn to the object-oriented features of PHP. The introduction of full support for the object-oriented model in the fifth version of the PHP interpreter further fuels interest in this methodology.

Often, using an object-oriented approach in place and out of place makes a project successful. Programming for a beginner in the OO style is often like walking through a minefield—if you don't know where the mines are, you can't reach the end of the project. In itself, object-oriented programming is not a panacea - it is a working technology that allows you to:


  • increase the percentage of source code reused;

  • operate with real-world concepts and objects (student, group, course, etc.) rather than low-level computer terms (file, string, etc.) when programming, which allows you to create larger projects with fewer errors and more short time.
The development of programming technologies, as Dijkstra noted, is dictated by the Divide and Conquer thesis. Any successful technology assumes that the shorter the source code of the program, the easier it is to create, debug and maintain, and a simple program is much less error prone than a complex one.

At the dawn of the computer age, a program was a single thread that processed a single array of data. Over time, the complexity of programs and the requirements for them increased, and this way of organizing data turned out to be unacceptable. A structural approach was proposed, in which the data array became available from anywhere in the program, but the main program flow was divided into several procedures. A single small procedure, even if it uses common data, is much easier to develop than a large amount of source code.

Each of the procedures has local variables, the lifetime of which is determined by the duration of the procedure. Some procedures can call others, but the array of data in the program remains common and available to all procedures. This approach is used in procedural programming in PHP and allows you to create large software systems. But the development, debugging and support of programs that operate on large amounts of data (like, for example, a cathedral database) still remains difficult and requires considerable skill and experience.

The answer to this ever-increasing complexity was the emergence of an object-oriented programming approach: the program is divided into several data arrays, each of which has its own procedures, as well as procedures that interact with other data arrays.

As a result, a complex task is broken down into a number of simpler subtasks, and developers get a more flexible way to manage a project - editing one huge monolithic block of code is much more difficult than a collection of small, loosely connected blocks.

Regardless of the binding to the programming language, the object-oriented approach has a number of general principles, namely:


  • the ability to create abstract data types, which allows, along with predefined data types (such as integer, string, etc.), to introduce their own data types (classes) and declare "variables" of such data types (objects). Creating his own data types, the programmer operates not with machine terms (variable, function), but with objects of the real world, thereby rising to a new level of abstraction;

  • encapsulation that limits the user interaction of abstract data types to their interface only and hides the internal implementation of the object, not allowing influence on its internal state. Human memory is limited and cannot contain all the details of a huge project, while the use of encapsulation allows you to develop an object and use it without worrying about internal implementation and resorting to only a small number of interface methods;

  • inheritance, which allows you to develop an existing abstract data type - a class, creating a new class based on it. In this case, the new class automatically receives the capabilities of an already existing abstract data type. Often, abstract data types are too complex, so they resort to their consistent development, building a class hierarchy from the general to the particular;

  • polymorphism that allows the construction of entire chains and branched trees that inherit each other's abstract data types (classes). In this case, the entire set of classes will have a number of methods with the same names: any of the classes of this tree is guaranteed to have a method with the same name. This principle helps to automatically process data arrays of different types.

3.1.4 Features of the CodeIgniter framework

The CodeIgniter framework used is written using an object-oriented approach. All classes of controllers, views and models introduced by the programmer inherit the original classes introduced into the framework itself. This makes it possible to write smaller source code, since all the necessary basic functions are immediately available.

In addition to the classes of controllers, mappings and models available to the programmer, in the CodeIgniter framework there are also plugins and helpers functions available to the programmer. Helpers, as the name implies, are designed to help perform some minor function. For example, there are helpers for building web forms, uploading files, or working with sessions. Unlike all other basic elements of the framework, helpers are sets of elementary functions, written even without using an object-oriented approach. Each function performs a small, strictly limited task. However, the set is quite large, and such a "trifle" becomes very useful in work.

Plugins are pretty much the same as helpers, except for the main difference: they are not a set of functions, they are one function. In addition, you can pay attention to the fact that helpers are more part of the core of the system, while plugins are something external, developed by third-party programmers. In reality, this is how it turns out. Even those plugins that come with the main bundle are written by CodeIgniter users who are part of the community.


3.1.5 Eclipse IDE

When developing a program for processing questionnaires from students of the department, such an important and useful programmer tool as an integrated development environment (IDE - Integrated Development Environment), namely Eclipse, was also used. Eclipse is a free framework for developing modular cross-platform applications. Developed and maintained by the Eclipse Foundation.

The most well-known applications based on the Eclipse Platform are the various "Eclipse IDEs" for developing software in multiple languages ​​(for example, the most popular "Java IDE" supported natively). In this case, extensions were used for programming in the programming languages ​​PHP (PDT module) and JavaScript (JSEclipse module), as well as layout using the HTML markup language.

3.2 Program testing technology

Program testing is the process of identifying bugs in software. At the moment, there are many methods for testing programs, but they do not guarantee to identify and eliminate all defects and errors, to establish the correct functioning of the analyzed program. Therefore, all existing testing methods operate within the framework of a formal verification process for researched or developed software.

Such a formal verification process can prove that there are no errors only in terms of the method used, but does not guarantee their complete absence.

A test is information that consists of specially selected initial data for the program being debugged, and the corresponding reference results used to control the correct operation of the program.

The control of the program is reduced to the selection of tests, the receipt of correct results by which would guarantee the correct operation of the program for the rest of the initial data from the entire admissible range of values.

System testing was carried out in several ways:


  • Stress Testing;

  • manual debugging and program tracing using the XDebug extension;

  • unit testing with phpUnit.
In the case of testing programs written in PHP, the data displayed on the user's screen should be checked for compliance with the expectations. In this case, the following main problems are possible:

  • nothing is displayed on the screen, or a system error is generated with the corresponding code (authorization error, web server failure, etc.);

  • a failure occurred while working with the database, while an error report is generated;

  • server failure associated with a high load on the application or database;

  • A program execution error has occurred, resulting in incorrect data or an error report being displayed.

3.2.1 Load testing of the program

One of the most important tests is load testing, which allows you to find "bottlenecks" in the source code or database calls.

There are many tools available to simplify the task of increasing the number of requests and invoking many operations on the server. The load limit test should be designed to accurately reproduce the expected workload of the application.

For load testing of the program for processing questionnaires from students of the department, the curl-loader program was used. Curl-loader is a freely distributed web application performance testing utility written in the C programming language. It is able to simulate hundreds or even thousands of HTTP and HTTPS server accesses and uses the libcurl library, which allows you to easily test applications that require authorization. And support for the HTTPS protocol allows you to use the curl-loader utility for load testing web applications that work through encrypted transport mechanisms SSL (Secure Sockets Layer - secure sockets layer) and TLS (Transport Layer Security).

3.2.2 Debugging with built-in PHP tools

The standard behavior of an application written in the PHP language, when an error occurs in the code, is highly dependent on configuration settings. As a rule, they are set in the php.ini configuration file:

  • the display_errors parameter, set to on or off, specifies whether to show error messages to the user or leave them hidden;

  • the log_errors parameter, set to on or off, causes the PHP interpreter to write messages to the event log file;

  • the error_reporting directive determines when a warning should be generated and when it can be ignored.
When developing and debugging a program on a test server, you must enable the display_errors parameter and disable log_errors. This allows the programmer to respond as quickly as possible to the occurrence of an error situation, minimizing the number of "switching between windows".

In a working version of the program, on the contrary, disable the display_errors parameter, but enable log_errors. On the one hand, this will complicate the life of attackers who will no longer be able to see the debug information. On the other hand, in a critical situation, it will help you understand what exactly happened and fix the error, even if it does not reproduce in the test environment.

In both cases, it is convenient to set the error_reporting parameter to the most detailed state - E_ALL, which forces PHP to report the smallest oversights in the code.

3.2.3 Debugging a program with XDebug

While the PHP programming language can be used to create command-line scripts for tasks such as system administration and traditional data processing, the power of the language is especially evident in web applications.

Given the short run time of web applications and their layered design (client application, network, web server, application code, and underlying database), it can be difficult to catch bugs in the source code. Even assuming that all layers except the PHP code work flawlessly, tracing to a bug in a program can be difficult, especially if the application uses a large number of classes.

The PHP language expression echo and functions such as var_dump() , debug_zval_dump() , and print_r() are common and very popular debugging tools that help solve various minor problems. However, as testing and debugging tools, these expressions (and even more reliable tools, such as the PEAR Log package) are of little help and not always.

In addition, such debugging is a brute-force approach. In the absence of the necessary information, it is required to redo the source code, repeat the previous steps and start the search for the error again. A much more effective strategy is to test the application while it is running. You can catalog query parameters, view the procedure call stack, find out the value of any variable or object. You can temporarily interrupt the execution of the application and get notified about changes in the value of a variable

This "live" or interactive exploration is provided by a special application called a debugger. The debugger launches or attaches to a process to control it and examine its memory. Or, in the case of interpreted languages, the debugger can directly interpret the code. A typical modern debugger can index and view source code, display complex data structures in a human-readable way, and simultaneously display program state, call stack, program output, and the values ​​of all variables. For example, it is common for a debugger to catalog and display class properties and methods.

Instead of manually adding various debug output functions, you can use XDebug to generate a trace log. The trace log is a list of calls to functions and methods of a class throughout the execution of the program. Its advantage is that absolutely every call will be reflected in the log.

The trace log usually differs from run to run, as it depends on the incoming data, which varies from request to request.

Tracking the log helps you understand how the program is executing, but it is very difficult to visualize all the possible branches unless the program is very simple. It is because of this that testing large programs is quite difficult: there are too many different development paths and everyone needs to be tested.

The XDebug application debugging tool, as its name suggests, provides several functionalities for displaying the state of a program and is a very valuable research tool. Once installed, XDebug interferes with the process to prevent infinite recursions, adds stack and function trace information to error messages, monitors memory allocation, and performs some other functions. Xdebug also contains a set of functions that can be added to source code to provide runtime diagnostic data.

The results of the XDebug module can be viewed using the KCachegrind program, which allows you to visualize the processes occurring in the source code (see Figure 3.1).

In summary, XDebug is a small but very useful tool for the PHP developer, it should be installed on every PHP interpreter used for development. But you shouldn't use XDebug on production servers, as it will greatly degrade performance.
R

Figure 2.1. – KCachegrind program interface

3.2.4 Unit testing using phpUnit

Unit testing is a process in programming that allows you to check the correctness of individual modules of the source code of the program. The idea is to write validation tests for every non-trivial function or method. This allows you to quickly check whether the next change in the code has led to the appearance of errors in the already written and tested parts of the program, and also facilitates the detection and elimination of such errors. The purpose of unit testing is to isolate individual parts of a program and show that individually these parts work.

When debugging and testing the program for processing student questionnaires, the phpUnit system was used, which allows unit testing of web applications written in the PHP programming language.

In order to write a minimal test suite using phpUnit, you need to:


  • connect the PHPUnit.php library;

  • create a subclass of the base class TestCase;

  • add an arbitrary number of testing methods to it, the names of which begin with "test". The input will be given in advance known parameters, and the result is compared with the reference one by means of the Assert family of functions inherited by the test class from the TestCase base class;

  • create the PHPUnit_TestSuite class, passing it the name of the class with the test suite as a parameter;

  • Run the test suite and check the execution result.

6(?). List of graphic material

6.1 Problem statement

6.2 Block diagram of the program


The information that the information system will operate on is organized in the form of a database created using MySQL tools (Figure 16).

Figure 16 Database schema created using MySQL

Formalization of calculations (calculation algorithms and problem solving)

To obtain output documentation, the input data is converted according to a certain algorithm.

When calculating the cost of installing a stretch ceiling, you must fill out the "Cost" form, which contains 3 fields and data entry: ceiling width, ceiling length, material texture. After filling in these fields, the program requests from the MySQL database, data on the cost of the material with this invoice. The cost is calculated by multiplying the area of ​​​​the ceiling covering by the cost of the material per 1 m 2.

In the "Expenses" form, when you click on the "Remains" button, the program module calculates the amount of material remaining in the warehouse. When filling in two fields in the "Remains" form: the date of receipt of the material, the date of consumption of the material, data is taken from the MySQL database with a query about the amount of receipt of material in a given month and the amount of consumption in this month. The rest of the material is calculated by the difference between the receipt and consumption of material for a specific period of time.

Block diagram of the use of the software package (dialog tree)

System menu - is the main form of dialogue in applied data processing systems, containing commands designed to perform specific tasks.

The developed application has an intuitive menu. To work with database tables, the IS "Enterprise Management" module consists of.

Topic 3. SOFTWARE

For adequate use of the computer ( information processing) you need to know the purpose and properties of the programs you need when working with it. A set of programs and accompanying documentation ( used in the operation of these programs), is called software(ON). Software is an integral part of any computing system and is shared ( by appointment) into three categories: system software(necessary to control the computer, to create and support the execution of other user programs, to provide the user with a set of various services), programming systems or tool systems (providing the creation of new programs for computers) and application software (directly ensuring the performance of the work required by the user).


Software structure

System software includes a set of programs that control the operation of the hardware of computers and computer networks ( as a rule, these programs do not solve specific user tasks, but create conditions for their solution). System software sent to:

to ensure the stable operation of a computer and a computer network;

to create conditions for the normal operation of application programs;

to perform auxiliary operations;

for diagnostics of computer hardware and computer network;

The whole set of system programs can be divided into two large groups: basic software and service systems. The base software is the minimum set of software that makes the computer work.

Base subclass Software includes:

· Operating Systems (OS) - a set of programs that control the process of executing application programs, planning and managing PC computing resources ( The OS takes over the execution of such operations as monitoring the health of PC equipment; performing the bootstrap procedure; managing the operation of all PC devices; file system management; user interaction with a PC; loading and execution of application programs; distribution of PC resources - RAM, processor time and peripheral devices between application programs).

operating shells - special programs designed to facilitate user communication with operating system commands, having text and graphical options for the end user interface ( shell programs provide a convenient and visual way to communicate with a computer, allow you to visually display the contents of directories on disks, conveniently copy, rename, send and delete files, etc.).



Network operating systems - a set of programs that provide processing, transmission and storage of data on the network.

Until recently, most PCs had an operating system installed. MS DOS, which was created in 1981 by Microsoft ( note that it was not the original development of Microsoft itself - Bill Gates' company only finalized the "OS" called QDOS, created by another company). Before the advent of Windows, the MS DOS disk operating system was the most popular and widely used. An entire generation of software has been created in its environment. On the basis of MS DOS, in the process of developing computer technology, Windows appeared ( Since 1996, MS DOS has been included in the Windows 95 operating environment). The main components of the OS, developed in the MS DOS environment, are classics, and are organically included in Windows at a new stage in the development of software in general and its core - operating systems.

MS DOS is a 16-bit, single-tasking, "command-line interface" operating system that is compact, has modest hardware requirements, and provides the bare minimum for users and programs. The main disadvantages of DOS:

Its main weak point is working with limited RAM ( in the era of the creation of MS-DOS, the RAM of most computers did not exceed 256 kilobytes. DOS could work with 640 kilobytes of RAM, and Bill Gates argued that no one would ever need more, but as time went on, programs appeared that needed more RAM to work and had to use special programs - memory managers, but they did not solved the problem);

The second drawback of DOS was the impossibility of working in a full-fledged graphical mode ( although the computers of the time could already provide support for it);

· The third disadvantage of MS-DOS was single-tasking.

Operating systems of the DOS family, despite their simplicity and cost-effectiveness, are obsolete, and they have been replaced by new generation operating systems. These operating systems include operating systems of the family Windows, operating systems of the family Unix and etc.

Service systems- intended for computer maintenance ( expand the capabilities of the underlying software). On a functional basis, among the service software, we can distinguish:

Disk maintenance programs ( providing verification of the quality of the disk surface, file safety control, disk compression, creation of insurance copies, data backup on external media, etc.);

anti-virus software ( providing computer protection, detection and recovery of infected files);

data archiving programs ( provide the process of compressing information in files in order to reduce the amount of memory for storing it);

network maintenance programs.

programs for diagnosing the health of a computer;

Programs used to perform auxiliary data processing operations or computer maintenance ( diagnostics, testing, optimization of disk space usage, recovery of information destroyed on a magnetic disk, etc.) are called utilities.

Programming systems or tool systems are software products that support programming technology. Within this direction, there are tools for creating applications, including:

local tools that ensure the performance of individual work on the creation of programs;

· Integrated environments for program developers, which ensure the implementation of a set of interrelated work on creating programs.

Local software development tools include programming languages ​​and systems, as well as the user's tool environment. There are machine programming languages ​​( machine codes accepted by computer hardware), machine-oriented languages ​​( programming languages ​​that reflect the structure of a particular type of computer - assemblers), algorithmic ( universal) languages ​​independent of computer architecture, such as Fortran ( Fortran), Cobol ( Cobol), Algol ( Algol), Pascal ( Pascal), BASIC ( Basic), Si ( C), C++ ( C++) and etc.; procedural languages ​​( where it is possible to describe the program as a set of procedures - subroutines), domain-specific languages ​​( designed to solve problems of a certain class), integrated programming systems. Note that the classification of programming languages ​​is not fixed by GOSTs ( for educational purposes, they are usually classified according to various criteria). A program prepared in a programming language goes through the stage of translation, debugging and testing.

The main purpose of the toolkit of integrated software environments is to increase the productivity of programmers, automate the creation of programs that provide a graphical user interface, etc.

In addition, there are tools for creating complex information systems ( CASE - technology). The design of information systems is a labor-intensive and time-consuming work that requires highly qualified specialists involved in it. In the recent past, design was often done on an intuitive level with informal methods that included elements of art, practical experience, expert judgment, and costly experimental performance tests. In the early 70s. in the USA there was a programming crisis ( software crisis). This was reflected in the fact that large projects began to be carried out behind schedule or in excess of cost estimates, the developed product did not have the required functionality, its performance was low, and the quality of the resulting software did not suit consumers. The need to control the software development process, to predict and guarantee the development cost, timing and quality of results has led to the need to move from artisanal to industrial methods of creating software and the emergence of a set of engineering methods and tools for creating software, united by the common name "software engineering" ( software engineering). Software engineering is based on the idea that software design is a formal process that can be learned and improved upon. By the end of the 80s. there has been a lot of research in the field of programming ( development and implementation of high-level languages, methods of structured and modular programming, design languages ​​and their support tools, formal and informal languages ​​for describing system requirements and specifications, etc.). CASE term ( Computer Aided Software Engineering) has a very broad meaning. Initially, the meaning of the term CASE was limited to issues of automating the development of only software, but now it has acquired a new meaning and covers the process of developing complex information systems as a whole. CASE technology is a set of methods for designing information systems, as well as a set of tools that allow you to visually model a subject area, analyze this model at all stages of development and maintenance, and develop applications in accordance with the information needs of users. Most existing CASE tools are based on structural or object-oriented analysis and design methods, using specifications in the form of diagrams or texts to describe external requirements, relationships between system models, system behavior dynamics, and software architecture.

Application programs- designed to solve applied user tasks ( ensures the execution of tasks necessary for the user on the computer). Conditionally ( according to their purpose) can be divided into the following subclasses:

programs for word processing;

· graphic editor;

programs for processing photo and video images;

programs for preparing presentations;

spreadsheets;

database management systems;

· Programs of economic and statistical analysis;

Computer-aided design systems (CAD);

information retrieval systems;

network software ( e-mail programs, access to video conferencing, Internet browsers, etc.);

game programs.

The application software consists of application packages(PPP) and user application programs.

Currently, a significant place in the application software is occupied by application software packages, which, according to the scope of application, are divided into domain specific packages (aimed at solving a narrow range of problems), general purpose packages (designed to solve typical data processing tasks) and integrated packages (the scope of their application is mainly the economic sphere; they usually contain: a spreadsheet, a text editor, a database management system, a graphics editor, communication tools). Application programs are created as part of a specific computing environment ( they are usually developed on a case-by-case basis under the agreement of the PPP or OS under which they apply).

Sections: Primary School , Ecology

“Nature is not a temple, but a workshop, and man is a worker in it,” said Turgenev's hero. For a long time, man built his relationship with nature according to this principle. However, what has been brought up for centuries - the consumer approach to nature - is very difficult to change. This is where environmental education is of particular importance.

A special role in primary school is given to the subject "The world", which is an integrated course and aimed at the formation of the social experience of students, their awareness of the elementary interaction in the system "man, nature, society". Education of a moral and environmentally sound attitude to the environment and the rules of behavior in nature.

I have been working on the teaching staff "School of Russia" for the second year.

The main topics of the sections:

  1. Where we live
  2. Nature
  3. City and country life
  4. Health and Safety
  5. Communication
  6. Travel

Topics for projects are given at the end of each section, but project presentations are held at the end of the first and second half of the year. In the first grade, the children prepared short reports on these sections, with the help of their parents they made presentations on whatman paper. In the second grade, children do this work in a group. They share the information that they have preserved from the first year, combine it, supplement it with new found material. The defense is carried out by selected students of each group.

There are topics that are of great interest to children, but they are not in the projects. The children take up these topics with enthusiasm and then share their findings. So it happened with the work on the topic "Starry sky", in the section nature. We studied the constellations, at the extracurricular activity “My Astrakhan” we got acquainted with the Astrakhan Planetarium and its employees, who informed us about the creative competition and the guys, united in a group, decided to participate.

During seasonal excursions, children observe changes in nature, collect natural material, create crafts, help wintering birds, build feeders and wait for guests. Talk about their pets and care for them. In winter, they arrange a vegetable garden on their windows and grow legumes.

Elements of environmental education can be included in any lessons: Russian language (vocabulary, dictations, expositions), mathematics (when solving and compiling problems), literary reading (when discussing poems, prose).

At the lessons of the Russian language, at the stage of speech development, children can be offered tasks of ecological content, explain the meaning of proverbs and sayings about nature.

Children compose stories from pictures on a given topic, for example, "What the starling told me in the spring."

I select texts for dictations, presentations, and check cheating in such a way that they help the child understand and feel the interconnection and interdependence of all life in this world, awakening a sense of beauty.

The foundations of environmental education and upbringing are also formed in mathematics lessons. Children like tasks in which they can get acquainted with the life of nature. In the 2nd grade, children begin to compose problems themselves, using the knowledge gained in other lessons. At the same time, students learn to solve problems, receive new information about nature and develop speech, memory, and thinking.

Great opportunities for environmental education lie in the lessons of literary reading. I pay attention to the development of motivation to protect nature through figurative knowledge of the world. An important place in the formation of aesthetic motives for nature protection is occupied by a literary analysis of lyrical poems by Russian poets. Children learn to feel the "mood of nature", to express their vision of the world around them, to find the unusual in ordinary objects.

Environmental work is also carried out with parents: at parent-teacher meetings, in individual conversations and consultations.

Diverse hard work gives good results. Based on the diagnosis, we can conclude: children ask more questions, questions become deeper in meaning. The children have a desire to look for answers to questions on their own. Children do not just contemplate nature, but also experience, worry, rejoice, empathize, master the skills of caring for animals and plants.

Work on environmental education is also carried out outside the school. Excursions are of great educational value. They provide direct communication of children with nature in different seasons.

I try to teach children to see not only the beauty of nature, but also the thoughtless extermination of it by people.

Ecological education of the younger generation is one of the main tasks at the moment. This is a very difficult but interesting job.

One of the principles of environmental education is continuity. We need to remember this and reflect this principle in our work with children.

A fairly new direction in improving environmental education in elementary school is the problem of managing the independent activity of younger students in studying the environment with the help of tasks that put the child in the position of a researcher, discoverer of natural secrets and mysteries.

In the course of work, you can use the following activities:

  • role-playing games;
  • Practical activities;
  • children's creativity;
  • communication with nature;
  • experimentation;
  • speech activity: exchange of information, impressions;
  • observation;
  • reading books, visiting exhibitions, museums, cinema halls.

A variety of activities naturally connects environmental education with the entire process of personality development of a younger student.

The tasks of environmental education in elementary school require purposeful systematic work. Environmental education is impossible without the integration of all academic subjects and extracurricular activities. Children need to be introduced to the peculiarities of the nature of their native land. The study is carried out according to the principle: from close to far - from the native city, region - to the whole country, and then to other countries and continents.

The goal of environmental upbringing and education of younger schoolchildren is to achieve positive educational and educational results at this particular stage of school education. The children form the beginnings of ecological culture, which will allow in the future, in accordance with the concept of general secondary environmental education, to successfully assimilate the practical and spiritual experience of human interaction with nature, which will ensure its survival and development.

Formation of environmental literacy of younger schoolchildren in the lessons of the world around through tasks of a creative nature

The famous teacher V.A. Sukhomlinsky said: “I am deeply convinced that if in childhood a person experiences a feeling of amazement at the beauty of his native nature, if, with bated breath, he listens to the words of the teacher about what his eyes see, during these hours his pulse awakens alive thoughts. Thanks to these hours of communication with his native nature, his mental abilities develop, the word of his native speech enters his spiritual life and becomes his own wealth: in the word he expresses his thoughts, feelings, experiences. The harmony of image and word, knowledge of the mind and knowledge of the heart - this is the birth of what we call a feeling of love for nature, for the native world. Analyzing these words, I realized that a big role in nurturing this feeling belongs to the primary school teacher. At the lesson of the world around me, I conducted a survey of students and came to the conclusion that the negative list is many times greater than the list of good deeds. The vast majority of children have internalized the negative examples and, at best, have adopted a passive "don't do it" attitude. Such a position corresponds to a low level of development of ecological culture. Children with a low level of development of ecological culture have little idea of ​​the benefits that they themselves can now bring to nature, the city, and the people around them. Thus, at present, pedagogical practice is experiencing the following difficulties in the development of environmental literacy of younger students: students do not fully understand that everything in nature is interconnected; students do not have ecological knowledge, there is no feeling that a person is a part of nature; children do not know how to evaluate their actions and the actions of other people in relation to the environment on the basis of anticipation of possible negative consequences.

Recently, the issues of nature protection, environmental problems have become the main ones not only for scientists, but also for the general population, including younger schoolchildren. In the Federal State Educational Standard of Primary General Education, among the main areas of school work, it is said that “education of an emotionally valuable, positive attitude towards oneself and the world around” is of great importance. Thus, the state sets the task for the school to improve the environmental education of the younger generation.

The urgency of the problem dictated the following tasks: 1. Analyze the school curriculum and identify its possibilities in the environmental education of students. 2. Create an idea of ​​the complex relationship between man and nature. 3. Give modern ideas about the biosphere, the role of water and air basins, soil cover, flora and fauna. 4. Raising responsibility for the state of nature, its conservation and improvement in the interests of future generations.

The solution to this problem depends on the level of the general culture of every person on earth. The foundations of any culture are laid in childhood. I believe that it is necessary that every day students make a discovery for themselves, so that every step ennobles the soul of a child. This is facilitated by the integrated course of N.Ya. Dmitrieva and A.N. Kazakov "We and the world around us" in the system of L.V. Zankov, which is based on "Natural Science" and "Social Science". The wide content area, which is presented in the textbooks "The World Around", makes it possible for each child to find the sphere of his interests, creating conditions for the formation of universal educational activities. So, immersion in a wide natural and social sphere activates the emotional and sensual sphere of children, arouses in them an interest in their Earth and their native land, in the people of the Earth, in the family, a sense of belonging to what is happening in our common home.

The most important indicator of the formation of environmental literacy, environmental culture of the individual is ● the child's interest in natural objects, the living conditions of people, plants, animals, attempts to analyze them; ● compliance with environmental rules of behavior in the environment becomes the norm of life, becomes a habit. Thus, we are talking about the formation of ecological culture as part of the general culture of the individual, which is a set of ecologically developed intellectual, emotional-sensory and activity spheres.

To achieve the tasks set, I use the following means in my work: ● environmental tales ● environmental tasks, tasks-stories ● conferences, press conferences ● study of plants and animals of the local area listed in the Red Book ● tasks of an entertaining nature: intellectual creative games, quizzes, competitions of drawing-poster "Let's protect life", "Take care of the Earth!"

A fairy tale is a good material for the knowledge of ecology. The fairy tale not only entertains, it unobtrusively educates, introduces the world around, good and evil. If a fairy tale contains some biological knowledge and concepts about the relationship of living organisms with each other and with their environment, then the fairy tale will be a source for the formation of elementary ecological concepts. But in ecological fairy tales, ecological rules should not be violated, the properties and actions of the fairy-tale hero should not be distorted.

The purpose of the ecological fairy tale is to give accurate, scientifically reliable information. Sound biological knowledge should be the basis of ecological training. In fairy tales, ideas are given about patterns in nature: that a violation of patterns in nature can lead to trouble; about individual features of the behavior and life of various representatives of the animal and plant world. In fairy tales, the features of many animals and plants, natural phenomena, and landscapes are very accurately noted.

Fairy tales composed by the children themselves are one of the indicators of the level of understanding of environmental problems and empathy. If a child himself came up with a fairy tale, “connected in his imagination several objects of the world around him, then we can say that he learned to think” (V.A. Sukhomlinsky) Moving in fairy tales the focus of children's attention from a person to wildlife, which creates and supports human environment, allows you to form respect for nature, responsibility for it. This should underlie the ecological education of children.

Environmental tasks in elementary school can be used both on the topic and regardless of the topic of the lesson. In any case, they will activate the attention and mental activity of students, set them up for work that promotes creativity and initiative, which increases the emotional background of the lesson. Text tasks of ecological content should be used in the classroom to assess both the positive and negative impact of man on nature. Ecological tasks not only stimulate children's curiosity, but also contribute to the manifestation of care and concern about the state of nature. Ecological tasks for younger schoolchildren can be of different levels of complexity depending on the class and readiness of children.

In the lessons of the world around, students master the skills to see the problem, put forward and prove hypotheses, express their thoughts orally and in writing. They learn to present the results of research in the form of schemes, plans, models, crafts. The accumulated knowledge and skills should be consolidated and applied, i.e. I need a natural way out, an opportunity to realize my experience. In order to let the children feel the significance of their knowledge, it was decided to hold a series of conferences.

Preparatory work was carried out, as a result of which the following issues were considered:

1. What is a "conference"?

2.Why do we need conferences?

3. Who needs conferences?

4. Do schoolchildren need conferences?

5. How do people prepare for the conference?

6. And how should we prepare for the conference?

7. How can we arrange a conference? Who will be our guests?

Exciting and useful for students to work on environmental projects:

“My tree”, “Rivers of our land”, “Mountains are valuable not because they are high, but because they are rich”, “Help the birds in winter”, “Plants and animals listed in the Red Book”, “Earth is our common home ". Working on projects, students learn to work with instructions, develop research skills, observation, the ability to obtain information from different sources, analyze it, learn to work with reference literature, develop Internet skills. When creating a presentation, they show creativity, to speak to an audience, they work out the ability to briefly formulate their thoughts, argue their opinions.

Since modern environmental changes pose a real threat to people's lives, the educational activities of the school should be aimed at the formation of environmental literacy, environmental culture of students, so that a generation will grow up that will protect the environment.

The given system of means of experience contributes to the formation of environmental literacy and the formation of a personal position of younger students. Questions of the culture of consumption of natural resources were at the center of my educational work with the class.