📜 ⬆️ ⬇️

Unusually-economical use of 1C: Enterprise 8 on Asp.Net-hosting

The word “unusual” in the title refers to the placement of the 1C: Enterprise information base.
remotely on the side of an Asp.Net provider, whose tariff plan includes the use of
MSSQL. Savings are achieved due to the fact that the company does not acquire expensive
MSSQL server and extra 1C: Enterprise licenses, but limited to the purchase of 1C server,
which in many cases already exists. The hosting provider can accommodate
website running on 1C: Enterprise data. For posting, archiving and uninterrupted
The database and the website are hosted by the hosting provider.

The technology is called Open Infobase.
The resulting solution on the one hand supports the web interface by means of Asp.Net,
on the other hand, the 1C-interface by native means 1C: Enterprise 8.2 / 8.1. Each
of technology adds its own advantages and enhances the overall effect. Data entered
in 1C: Enterprise, available in the web interface instantly, and not with a delay, as in
other traditional methods, through export-import mechanisms such as COM,
exchange files or explicit / implicit export / import.

The general meaning of technology Elisy Open InfoBase

')

Asp.Net's contribution to the overall solution



1C: Enterprise has always taken a cynical and simple approach in its development:
the product developed only in the direction that promised the most tangible profits.
on the fact of occurrence. As a result, 1C: Enterprise has always lagged behind in its development.
from global trends, and the product is popular only in Russia without a chance to reach developed
countries, as evidenced by a failed project in Germany, which started with a fanfare
in 2007. To prevent the emergence of analogs of popular business applications,
1C closes file formats and confuses data structure.

Starting with version 8.2, 1C: Enterprise added work via the Internet: now informational
Bases can be published on web servers. This was done in a manner peculiar to 1C:
many bugs in the release, you need a license for each connection to the database, no speech
Do not go about managing the generation of HTML, do not wait and do not try to use modern
technologies Flash, RSS, WAP, OpenId, AJAX, jQuery, etc. And if there is hope for correction
errors over the next few years, the 1C web client for mass visits
still does not fit. Instead, the time-tested Asp.Net will do;
version 4.0.

Asp.Net technology adds the word “Open” to the name of the solution “Open InfoBase”, emphasizing
that the technology is “open” to all visitors to the Internet, search engines and special
services. To achieve the goal, apply the whole arsenal of technologies and Asp.Net- and .Net-classes:
Asp.Net MVC, AJAX, web forms, localization, multithreading, LINQ, LINQToSQL and PLINQ
and many others.

When developing applications for Asp.Net, you have full control over HTML rendering.
You can choose any style of interface through the style sheets,
animate the interface with DHTML, play with new HTML 5. You can quickly implement
general application in different languages ​​using localization tools. Total
You will not get this by applying the standard approach proposed in 1C: Enterprise.

A lot of the power of web developers devote search engine optimization or SEO. Apply
Asp.Net MVC to easily generate your URL paths, create robots.txt, sitemap files,
create on the fly the necessary meta tags title, description, keywords. Participate
in the link exchange. You will again appreciate the advantages of Asp.Net compared to 1C.

Your web application will remain compatible with Web 2.0 and generally accepted international standards.
unlike 1C: Enterprise, which is compatible only with itself. Apply
Ajax, log in through OpenId-compatible systems, freely use maps
Google and Yandex and place on the maps the necessary information, publish the news feed.

Important is the support of mobile devices. No problem getting
WML with the necessary minimum of information means, for example, Asp.Net MVC and force
work mobile devices over the Internet with your information base.

The contribution of 1C: Enterprise in the overall solution



Despite the fact that 1C: Enterprise cannot compete in web development with Asp.Net,
1C perfectly manifests itself as a desktop application. In comparison with 1C: Enterprise .Net
The framework remains just a collection of unrelated classes. Undoubtedly, on the .Net framework
You can rewrite 1C: Enterprise, but it will take many years. Another advantage
1C - is the prevalence of the system, relatively low price, availability
army 1C programmers and a huge number of developments in the public domain.

In the Open InfoBase 1C: Enterprise approach, you can develop an application very quickly,
suitable for data entry. A simple application may take 1-2 days. With
This 1C is immediately responsible for creating the data structure on the database server. Users
data in a Desktop application, which is 1C, is more convenient and faster to contribute than to
web application.

On a simple application 1C: Enterprise may take 1-2 days

1C applications can be quickly made distributed, allowing you to connect
several offices. For example, if a real estate agency has branches in several cities,
then each branch works with its data locally, and the final data is merged
and displayed on the website. Another example is load balancing when bases
1C data are located on different servers and 1C synchronization occurs
information.

Starting with version 8.1, a rich reporting tool is built into 1C: Enterprise
"Data Composition System". Reports are created quickly, have flexibility in settings.
tables, columns and rows, and can also be exported to many formats.

Data Composition System

Work with data: enter, edit, delete and search faster and more convenient in
1C: Enterprise. 1C has a built-in full-text search. Application can share
data with other configurations of 1C: Enterprise, such as 1C: Accounting or 1C: Management
trade in the "native language". Import / export between 1C applications is quickly configured
tools 1C: Data Conversion and "Transfer between identical configurations."

1C: Enterprise includes a number of specialized facilities that are well developed.
in popular 1C solutions. Remains and movements in finance, goods faster and more convenient.
organize on a specialized object 1C: Enterprise "Register of accumulation" and
receive movements and balances for any period. Exchange rates are more appropriate to place
in the “Register of information” and get the right rate for a specific date.

Difficulties of simultaneous work 1C: Enterprise and Asp.Net



The expediency of joint use of 1C: Enterprise and Asp.Net is shown in previous
sections of the article. Both technologies work equally well with Microsoft SQL Server DBMS.
It is the reference to the same data that MSSQL uses Open InfoBase technology.
Theoretically, there are no problems, but there are difficulties to be solved in practice.

As stated earlier, 1C: Enterprise intentionally closes its data formats and structure.
data to counteract the emergence of clone products on the market. Main difficulty
in the case of 1C - there is no standard regarding the names of tables and fields in the database
1C. If someone looked inside the database, he could see a lot of tables
with obscure names, which are fields with an incomprehensible purpose.

The internal data structure of 1C: Enterprise

This circumstance complicates access to 1C data from Asp.Net, for example, through obtaining
DataReader and DataTable objects. Once generated, the query may lose its meaning.
and do not work with a meaningful update of the configuration 1C or on the configuration of another
enterprises.

There is a solution to this difficulty. The appearance in the .Net framework technology LinqToSql caused
for many, and for me, including the reasonable question: "Why is it necessary?". After all, many
used SQL expressions or stored procedures to access the MSSQL database,
continue to use them even after the release of LinqToSql. It turned out exactly
LinqToSql is suitable for direct access to the 1C information base.

LinqToSql mechanisms require special .Net classes that are generated
compiler automatically based on dbml file. The dbml file is an XML file with the definition
matches between the names of tables, fields, and the names of .Net classes.

To facilitate the generation of a DBML file based on 1C metadata, a utility has been created.
Elisy.LinqTo1C. Comes with the Elisy .Net Bridge extension, as it is drawn
to the functionality of .Net framework from 1C: Enterprise. After specifying the connection string
to SKLServer, the name of the paged file, the names of paged objects processing Elisy.LinqTo1C
on output gets the corresponding dbml- and cs-files. The CS file contains all the necessary
class descriptions and can be inserted into a .Net project. DBML file can be viewed
from the Visual Studio editor. Access to data is significantly transformed.

The result of obtaining a DBML file for the internal data structure of 1C: Enterprise

Another difficulty that has been encountered in practice is to access images.
and files placed in the 1C information base. The fact is that to store the file
1C uses the Data Vault and Data Compression objects. The database is placed
not the contents of the file, but the serialization of 1C objects containing the file. Difficulty
It is solved by serializing and biting the necessary file from it.

Who is the master data



Direct access to 1C information database data creates a contradiction between legislation.
Russian Federation and 1C: Enterprise license. Some irresponsible persons
without understanding the intricacies of the legislation, they mislead the rest
society, claiming that direct access to 1C data is prohibited.

The position of 1C regarding the direct access is as follows: "You can not access data
information database directly, bypassing the level of objects of work with data "1C: Enterprise"
- for example, with the help of DBMS.

1C company, laying such items in the license, cunning and violates the law itself
Of the Russian Federation, namely the articles: Article 1334 p.1 "The exclusive right of the manufacturer of the database"
Of the Civil Code of the Russian Federation part 4, as well as Article 25 p.1 and p.3 “Free reproduction of programs for
Computer and database. Decompiling Computer Programs "Copyright Act and
related rights. The Civil Code states:

"To the manufacturer of the database whose creation (including the processing or presentation
relevant materials) requires substantial financial, material, organizational
or other costs, has the exclusive right to extract from the database materials
and implement their subsequent use in any form and by any means. ”

Conclusion



In conclusion, I would like to list some of the advantages offered in the article.
technology based on the combination of two technologies Asp.Net and 1C: Enterprise. Maximum
The effect is achieved in unique projects that are written "from scratch".



Source: https://habr.com/ru/post/136415/


All Articles