Why 1C is good
This publication was created in response to a very superficial and one-sided publication "Why 1C is bad and why 1C programmers do not like it that way . " Judging by the comments, many are far from understanding what, in fact, is programming in 1C.
In the understanding of most programmers, 1C is accounting. This was the case until 6.0 inclusive. Starting with version 7.5, the application consists of 2 parts - a platform written in C ++, and a configuration that includes a description of the structure of tables, visual objects and code in 1C, very similar to Visual Basic.
From all this it follows that the platform can solve a very wide range of problems, including those not related to bookkeeping in any way. All that without 1C is solved by a bunch of client application + database. Not so long ago, the company began to release libraries that are the basis for standard configurations, but can also be used in third-party projects - a library of standard subsystems and a library of connected equipment. They contain infrastructure functionality, for example, maintaining a list of users, a built-in email client, exchange by exchange rules, etc. The advantage is that they are well described and can be partially implemented.
As described in paragraph 1, the platform and configuration are different software products, they are made by different groups of developers who, according to my information, have little contact with each other. The platform is made by very experienced developers, many have been involved in its development since the time of 7.5, i.e. since 1996. With configurations, everything is much worse. There are many configurations, one might even say - insanely many. There are a great many authors, and the experience of some raises big questions. Judging by the personnel policy, the authors of the configurations are not particularly ceremonious and do not hold. For example, the new flagship solution “ERP. Enterprise Management 2.0 ”writes a completely new young team. The team that developed the previous flagship solution - “Production Enterprise Management” (SCP) - was left out of work.
It follows that the quality of the platform will always be better than the quality of standard configurations from 1C.
Example 1C demonstrates that domestic IT companies are very successful and can create world-class software products. The 1C platform has unique solutions for the global market for accounting systems. For example:
3.1. The use of a spreadsheet document for the layout, and different rows can have different column formats (i.e. different number of columns in different rows). When exporting from this format to XLS, the required number of columns is created to reflect all formats;
3.2. Data composition scheme (ACS), which can build reports of any complexity based on data from tables in the current database, tables of external SQL or OLAP data sources, arbitrary tables from memory. In the query text, compiled in a language that is a subset of the SQL language, you can specify the location of the insertion of the selection, selection, sorting fields. After setting up the report, ACS converts the request template into the final form sent to the database server. In this case, the ACS calculates the fields and temporary tables of the query that are not needed for the result, and they are excluded from the queries;
3.3. Possibility of development in Windows and Linux, in Russian and English. You can run applications on Windows, Linux, through a web browser, on iOS, Android. At the same time, to perform the 1C functional in the browser, an automatic translation from the 1C language to JavaScript is performed;
3.4. Using your own query language allows the application to work with any of the following Microsoft SQL Server, Oracle Database, IBM DB2, Postgre SQL, file database 1C. To work correctly with versioned databases, Oracle and Postgre use their own locking mechanism;
3.5. Using UUIDs as row identifiers in a database allows simplifying the tasks of integrating various systems on 1C with each other;
3.6. The mechanism of external components that allows you to create components in C ++ for all different operating systems and browsers supported by the platform;
3.7. Restricting access rights at the record level using query templates, which gives unlimited possibilities for fine-tuning rights;
3.8. Complete separation of the database structure from the application structure. The names of the tables and fields of the database are generated automatically, which, firstly, makes you use the platform integration mechanisms, and secondly, allows you to make normal names of the application structure elements (metadata) in Russian;
3.9. The mechanism of distributed infobases, which allows you to create an unlimited number of nodes of the current information source, where changes in the data will be downloaded and from which configuration changes will be downloaded.
And best of all, its developers are not afraid to move forward and solve very ambitious tasks. In my opinion, the 1C platform arose at a very successful moment in time - the performance and memory capacity of computers became sufficient to implement very bold design decisions, even if not always optimal.
Initially, the platform was designed to enable people who are far from programming (even those without technical education) to complete the system. For platform 7. * this was fair, it was very compact, understandable, albeit a bit confusing. With the release of 8.0, the bar for the developer was lifted very high, and considering everything that is in the 8.3 platform, we can say with confidence that it’s almost impossible for a specialist without technical education, although the very concept of a good developer in 1C is very vague.
The volume of a typical SCP configuration is ~ 3 million lines of code, not including the database structure, report layouts, roles, etc. The lack of strict typing and the Russian language simply attract many people who are far from programming to change something, as a result of which something stops working.
Hence the emergence of the term "1C programmer" as a lower caste among developers. The platform developers in some way contribute to this state of things, otherwise they would have long ago excluded the query designer from the configurator. More or less complex queries written using it are direct candidates for govnokod.ru .
1C is different. You can work in a non-IT company, you can work in an IT company, you can even work in 1C itself. And 1C is different in all these places. If you work in a large franchisee company, then the work of a programmer is not much different from work in other IT companies.
One of the misconceptions is that a good 1C programmer should know accounting. Categorically not, bookkeeping should be known to an accounting analyst, production and cost accounting - an analyst for management accounting, payroll - an analyst for payroll. Knowledge of the above areas for the developer on 1C is necessary exactly in that volume in order to understand what the analyst wants from him. Just as a system programmer must know the basics of the OS, and a web-programmer the basics of layout. But what a good 1C developer should know is:
4.1. The principles of the DBMS, query planner, locks;
4.2. Minimization of data exchange between the client, the application server and the database;
4.3. Working with COM, ADO, XML, SOAP, the REST API has recently appeared.
Of course, to write high-quality code, you need to read literature relating simply to software development technology, and it is even better to have experience in developing in other programming languages. Unfortunately, the vast majority of 1C programmers do not even realize this.
Despite all the advantages, the platform does have problems. Moreover, many of them have not been solved for decades
5.1. The lack of plugins in the configurator. For platform 7.7 there is an openConf project. For 8. * there is a project "Snowman". But all this is actually hacks, which very sadly affects the possibility of their application and the quality of support;
5.2. Poor performance of the virtual machine executing p-code, as binary translation is not used. Now this circumstance has begun to influence the approaches of developers of typical configurations from 1C - queries have become widely used;
5.3. The lack of the ability to fine-tune the structure of the database and queries for a specific database. For example, additional indexes have to be added using database tools, which is a violation of the license agreement;
5.4. The lack of inheritance between treatments, which somehow compensated for the lack of OOP. In the openconf project for 7.7 this feature was and was very pleasing;
5.5. Using your own configuration repository. In this case, the entire configuration can be uploaded / loaded in xml format, but each upload / download does not analyze the changes in the files, so all files in the directory are stupidly overwritten, which, firstly, makes the process long (for configurations of the soft starter, about 15 minutes ), and secondly, it makes it impossible to use a version control system. In openconf for 7.7, this problem was resolved;
5.6. There is no way to get the sample row number in the query, although this function is in the main databases (ROW_NUMBER for SQL Server), although for the rest of the databases, the platform could make the necessary left connection with a note on performance in the documentation, as is done for other query language constructs;
5.7. The lack of a project concept in the configurator, which could help with the transfer of changes from the test environment to the working one;
5.8. The standard mechanism for updating configurations uses a simple comparison of texts and objects, not merge, although the old version of the typical functionality is present inside the configuration.
1C knows about many of these problems and for a long time has been preparing a new configurator written on the Eclipse Platform, but when it is finally released, no one knows.
In the next publication, I will try to explain the shortcomings of standard solutions from 1C using the example of the old flagship configuration “Production Enterprise Management”, especially taking into account the release of the new flagship “ERP Enterprise Management 2.0”.
1. Platform and configuration
In the understanding of most programmers, 1C is accounting. This was the case until 6.0 inclusive. Starting with version 7.5, the application consists of 2 parts - a platform written in C ++, and a configuration that includes a description of the structure of tables, visual objects and code in 1C, very similar to Visual Basic.
From all this it follows that the platform can solve a very wide range of problems, including those not related to bookkeeping in any way. All that without 1C is solved by a bunch of client application + database. Not so long ago, the company began to release libraries that are the basis for standard configurations, but can also be used in third-party projects - a library of standard subsystems and a library of connected equipment. They contain infrastructure functionality, for example, maintaining a list of users, a built-in email client, exchange by exchange rules, etc. The advantage is that they are well described and can be partially implemented.
2. Authors
As described in paragraph 1, the platform and configuration are different software products, they are made by different groups of developers who, according to my information, have little contact with each other. The platform is made by very experienced developers, many have been involved in its development since the time of 7.5, i.e. since 1996. With configurations, everything is much worse. There are many configurations, one might even say - insanely many. There are a great many authors, and the experience of some raises big questions. Judging by the personnel policy, the authors of the configurations are not particularly ceremonious and do not hold. For example, the new flagship solution “ERP. Enterprise Management 2.0 ”writes a completely new young team. The team that developed the previous flagship solution - “Production Enterprise Management” (SCP) - was left out of work.
It follows that the quality of the platform will always be better than the quality of standard configurations from 1C.
3. Manufacturability
Example 1C demonstrates that domestic IT companies are very successful and can create world-class software products. The 1C platform has unique solutions for the global market for accounting systems. For example:
3.1. The use of a spreadsheet document for the layout, and different rows can have different column formats (i.e. different number of columns in different rows). When exporting from this format to XLS, the required number of columns is created to reflect all formats;
3.2. Data composition scheme (ACS), which can build reports of any complexity based on data from tables in the current database, tables of external SQL or OLAP data sources, arbitrary tables from memory. In the query text, compiled in a language that is a subset of the SQL language, you can specify the location of the insertion of the selection, selection, sorting fields. After setting up the report, ACS converts the request template into the final form sent to the database server. In this case, the ACS calculates the fields and temporary tables of the query that are not needed for the result, and they are excluded from the queries;
3.3. Possibility of development in Windows and Linux, in Russian and English. You can run applications on Windows, Linux, through a web browser, on iOS, Android. At the same time, to perform the 1C functional in the browser, an automatic translation from the 1C language to JavaScript is performed;
3.4. Using your own query language allows the application to work with any of the following Microsoft SQL Server, Oracle Database, IBM DB2, Postgre SQL, file database 1C. To work correctly with versioned databases, Oracle and Postgre use their own locking mechanism;
3.5. Using UUIDs as row identifiers in a database allows simplifying the tasks of integrating various systems on 1C with each other;
3.6. The mechanism of external components that allows you to create components in C ++ for all different operating systems and browsers supported by the platform;
3.7. Restricting access rights at the record level using query templates, which gives unlimited possibilities for fine-tuning rights;
3.8. Complete separation of the database structure from the application structure. The names of the tables and fields of the database are generated automatically, which, firstly, makes you use the platform integration mechanisms, and secondly, allows you to make normal names of the application structure elements (metadata) in Russian;
3.9. The mechanism of distributed infobases, which allows you to create an unlimited number of nodes of the current information source, where changes in the data will be downloaded and from which configuration changes will be downloaded.
And best of all, its developers are not afraid to move forward and solve very ambitious tasks. In my opinion, the 1C platform arose at a very successful moment in time - the performance and memory capacity of computers became sufficient to implement very bold design decisions, even if not always optimal.
4. Developers
Initially, the platform was designed to enable people who are far from programming (even those without technical education) to complete the system. For platform 7. * this was fair, it was very compact, understandable, albeit a bit confusing. With the release of 8.0, the bar for the developer was lifted very high, and considering everything that is in the 8.3 platform, we can say with confidence that it’s almost impossible for a specialist without technical education, although the very concept of a good developer in 1C is very vague.
The volume of a typical SCP configuration is ~ 3 million lines of code, not including the database structure, report layouts, roles, etc. The lack of strict typing and the Russian language simply attract many people who are far from programming to change something, as a result of which something stops working.
Hence the emergence of the term "1C programmer" as a lower caste among developers. The platform developers in some way contribute to this state of things, otherwise they would have long ago excluded the query designer from the configurator. More or less complex queries written using it are direct candidates for govnokod.ru .
1C is different. You can work in a non-IT company, you can work in an IT company, you can even work in 1C itself. And 1C is different in all these places. If you work in a large franchisee company, then the work of a programmer is not much different from work in other IT companies.
One of the misconceptions is that a good 1C programmer should know accounting. Categorically not, bookkeeping should be known to an accounting analyst, production and cost accounting - an analyst for management accounting, payroll - an analyst for payroll. Knowledge of the above areas for the developer on 1C is necessary exactly in that volume in order to understand what the analyst wants from him. Just as a system programmer must know the basics of the OS, and a web-programmer the basics of layout. But what a good 1C developer should know is:
4.1. The principles of the DBMS, query planner, locks;
4.2. Minimization of data exchange between the client, the application server and the database;
4.3. Working with COM, ADO, XML, SOAP, the REST API has recently appeared.
Of course, to write high-quality code, you need to read literature relating simply to software development technology, and it is even better to have experience in developing in other programming languages. Unfortunately, the vast majority of 1C programmers do not even realize this.
5. Platform issues
Despite all the advantages, the platform does have problems. Moreover, many of them have not been solved for decades
5.1. The lack of plugins in the configurator. For platform 7.7 there is an openConf project. For 8. * there is a project "Snowman". But all this is actually hacks, which very sadly affects the possibility of their application and the quality of support;
5.2. Poor performance of the virtual machine executing p-code, as binary translation is not used. Now this circumstance has begun to influence the approaches of developers of typical configurations from 1C - queries have become widely used;
5.3. The lack of the ability to fine-tune the structure of the database and queries for a specific database. For example, additional indexes have to be added using database tools, which is a violation of the license agreement;
5.4. The lack of inheritance between treatments, which somehow compensated for the lack of OOP. In the openconf project for 7.7 this feature was and was very pleasing;
5.5. Using your own configuration repository. In this case, the entire configuration can be uploaded / loaded in xml format, but each upload / download does not analyze the changes in the files, so all files in the directory are stupidly overwritten, which, firstly, makes the process long (for configurations of the soft starter, about 15 minutes ), and secondly, it makes it impossible to use a version control system. In openconf for 7.7, this problem was resolved;
5.6. There is no way to get the sample row number in the query, although this function is in the main databases (ROW_NUMBER for SQL Server), although for the rest of the databases, the platform could make the necessary left connection with a note on performance in the documentation, as is done for other query language constructs;
5.7. The lack of a project concept in the configurator, which could help with the transfer of changes from the test environment to the working one;
5.8. The standard mechanism for updating configurations uses a simple comparison of texts and objects, not merge, although the old version of the typical functionality is present inside the configuration.
1C knows about many of these problems and for a long time has been preparing a new configurator written on the Eclipse Platform, but when it is finally released, no one knows.
In the next publication, I will try to explain the shortcomings of standard solutions from 1C using the example of the old flagship configuration “Production Enterprise Management”, especially taking into account the release of the new flagship “ERP Enterprise Management 2.0”.