Development in 1C:Enterprise
- ReleaseDate
- 11/28/2019
Development in 1C Platform.
Once you have installed 1C:Enterprise server, thick and/or thin client applications (and DBMS if you plan to work in client-server mode) you can start development of your 1C:Enterprise app. Here are two possible options: develop an app from scratch or load an existing app (with or without data) and modify it. Let's imagine, that we want to create the app from scratch. Then we create a new database. After we have created a new database we have an app that is ready to run!
Our empty app already has a main window and some default menus. At this stage the configuration of our application is empty. It means that there's no objects, data and business logic. Configuration contains code and data structures of an app. Database only contents data. Configuration is a file with ".cf" extension. Let's say that when we develop 1C:Enterprise app we modify it's .cf file (technically there is always 2 .cf files: the IDE's one and the app's one).
If we will take a look at our empty configuration. There is an object tree which we will add objects to.
Now we are about to add a new object to the object tree. And it's time to say a few words about 1C scripting language. It is weak typed language with elements of OOP (Object oriented programming). On the one hand it's based on objects which encapsulate data and algorithms, on the other hand there are some features like the following: no explicit inheritance in 1C language (all the objects you create are implicitly inhereted from base objects which you can see in the configuration tree), module-like structure of global code ("global" is not belonging to any object). You can override any method or event of these basic classes, but they have sealed properties. There are a lot of built-in types to handle data, e.g. tables with rich functionality, dictionaries, lists, arrays and so on. All these types are classes, but you can't create new classes based on them. But anyway, the language is a kind of thing you get used to. The very significant feature that I must say about is ORM model. This is magnificent thing about 1C:Enterprise. All the objects in 1C:Enterprise app are classes that map to the database tables (one class can map to one or several tables and actually it's the business of 1C:Enterprise server and we don't ever worry about actual DB structure). A developer almost never needs to write straight SQL query to a database. This all is done via 1C:Enterprise object's methods. The designing of database model (1C:Enterprise objects) is done visually in IDE: creating tables, adding/modifying columns, dropping tables etc. are done via Designer. In fact, there is a brilliant query builder in IDE, that I will show further.
Let's go ahead and add a new object. I decided to develop an application for kids store. So I'll create an object to contain goods. It will be a catalog (a catalog is an object that stores entities which an app manipulates with).
We have created a new object "Goods" and added several attributes to it ("attribute" is the same as property in OOP notion).
The brilliant thing is that 1C generates forms for the list of objects and a single object. Let's see what it looks like. Here is the form of element's list:
And here is the form of single element:
In empty configuration you can load an existing configuration.
Every 1C application (also called applied solution) is a multitier architecture that includes:
- Client application
- 1C:Enterprise server cluster
- Database server
On one hand, this provides a wide range of scaling options, from personal use to automation of large, geographically dispersed enterprises.
On the other hand, multi-tier architecture provides a choice between several DBMS for storing applied data.
Major system components can run on both Windows and Linux operating systems. Besides that, 1C:Enterprise web client can run on Mac OS X and Apple iOS computers.