Agile design, development and launch of a highly loaded online store based on 1C-Bitrix platform - in 4 months

    Good afternoon, colleagues!
    Today I will tell you how to design and launch a highly loaded online store with non-standard functionality in a very short time ... on the 1C-Bitrix platform.

    Issue


    If you approach the task of developing a large online store formally, describing every millimeter of a future project, then you will get TK for several hundred, if not thousands of sheets and dozens of diagrams and screen forms. And you will write it, most likely, at least six months ... five of us, spending the night at work. But the most “terrible” is ahead - when you finally solemnly add it and announce it with bulging eyes, it is very likely that the project requirements will change: the market conditions have changed in six months, people, your bosses and subordinates come and go, new ideas and they and you, etc. And you have to urgently hire 10 scribes, and so on ad infinitum :-)
    image
    On the other hand, if the TK is written in small, 10 pages, over the weekend, and everyone agrees ... without reading, then you will have to settle in the development team to specify the requirements and answers to amazing brain-braking questions: “Please write a discount calculation formula when paying for the product in dollars, taking into account the error of machine zero. " Most likely, you will not last more than a week and the project will not appear.
    So what to do if you take a month to design, three to program, you don’t want to settle in the development team, and someone has already publicly announced the launch date of the project? :-)

    We write a technical task in macro language


    image
    First of all, realize that not only programmers, but also talented system and business analysts worked on the 1C-Bitrix platform for many years and take advantage of their experience! Fortunately for you, the most complex and difficult to understand issues of electronic commerce have been chewed for a long time, adapted to Russian realities and turned into simple concepts, broken down for ease of perception into modules of the 1C-Bitrix platform: “Online Store” , “Trade Catalog” and "Currencies . "
    It remains for you:
    1) It is good to understand the internal logic and terminology of these modules. This is a key point. You can spend the weekend on it, it's worth it.
    2) See what small blocks are left to add to get a publicly announced online store.
    3) Write a short, but capacious TK in the terminology of the 1C-Bitrix platform, containing links to standard documentation for the platform and detailed blocks with a description of extended / non-standard functionality. Volume - well, a maximum of pages 20-30 and 5-10 diagrams.
    4) To prepare the development team for understanding TK and its quick implementation - for this, colleagues need to quickly “pump” free courses for developers or, if time permits, more complex commercial trainings .
    5) To prepare a project service team - managers, content editors, administrators - also "pumping" them for effective work.
    Yes Yes. The important question remains - what if I start development on the 1C-Bitrix platform, and suddenly a complex functionality appears that will be impossible to implement and have to re-write everything on another platform? Believe me, you are not the first to have such a fear - and similar tasks have been solved, for a long time and quite successfully, by the following technologies:
    1) The constant struggle for simplification and modularity of the platform architecture. The architecture of 1C-Bitrix is ​​so simple and intuitively logical that nothing will disturb your creative flight of imagination and top-down business requirements - does the air prevent you from moving? Personally, I have never met such business requirements for online stores that would require rewriting the platform core. Believe it or not.
    2) The standard mechanism for expanding the platform’s business logic is redefined event handlers and custom modules. Believe it is easier than doing three-story inheritance from many objects.
    You can also outsource the development and support of the project, for example, use the services of our certified partner network , which will significantly reduce the risks of the independent organization of the development / support process of the Internet project. You will only need to collect the requirements and come to the developers with them.

    Instruments

    You can write TK in Microsoft Word, etc., but I recommend writing it using an effective teamwork tool - wiki . Everyone can edit the text and it is clear who and when did it. If you use our corporate portal , you can write TK in the wiki of the working group created for the project .
    Also, a convenient wiki is available in redmine , trac , confluence products , etc.

    Table of contents

    We will collect and describe the key features of our online store in TK, starting from expandable standard functionality.

    Product catalog structure and product properties

    You need to definitely decide which directory you have. Sometimes the product catalog provides itself with a “tree with apples”, sometimes it’s a flat list with the ability to filter by different parameters (producer, new product, sale), and sometimes the same apple products can be hung on different trees - providing different presentation of information. I recommend that you insert prototypes of interfaces of all the pages of your catalog into this section of the ToR - rough draft of screen forms helps a lot to understand the logic of the catalog.
    Typically, on the 1C-Bitrix platform, the catalog is either placed in one whole information block, or a tree structure of goods with general descriptions is stored in one information block, and specific price offers (which are often identified by SCU) are stored in another (their) information blocks.
    If you or your colleagues are versed in UML, it is often useful to reflect the essence of the directory on a suitable diagram , putting down the logical relationships between them.
    image
    To minimize the risks associated with the high workload during the operation of the project, I recommend experimenting with the directory structure on a prototype that can be quickly created by developers on the 1C-Bitrix platform in a draft layout (labor: a day or two). And make the final decision on the catalog architecture only after you fill in the catalog with the expected amount of test data (and it is better to exceed it 2 times) and measure the speed and nature of typical queries to them.
    Often for the functioning of the directory requires additional reference books - Manufacturers, Colors, Types of vehicles, etc. - all that will be associated with the goods in the catalog. We list them here.
    Bottom line:
    In this section of the TOR, you have thought through and described the catalog structure and properties of the goods of your project, having previously made sketches of screen forms, made a technological prototype and tested the catalog architecture on the test data volume, which is close to real. There would be time - and you could build and test a catalog in the Yandex.Market style on a prototype - however, 3 months remain before launch.

    Pricing of goods in a catalog, currency

    The simplest thing is that the product has one price = number. It is more difficult when the price changes depending on the type of the Buyer - for ordinary people the price is one, for partners it is another, etc. Even more interesting, when the price can be set in the catalog in different currencies, and should be converted into the currency of the store, depending on where the Buyer came from. And it also happens that the price of a product depends on and on the quantity purchased. And when everything comes together ...
    In the trading catalog of the 1C-Bitrix platform, the above functionality, fortunately, is provided (and many other useful features). However, if you need a more complex pricing logic in the catalog, for example, when the price depends on the number of days until the Buyer's birthday * the amount of your orders, you can always solve it ...overriding event handlers .
    Formulas often appear in this section of TK. It is useful to write this and the next section of the TOR with an accountant.
    Bottom line:
    Most likely, most of the pricing logic and currencies you need, adapted to Russian realities, are already implemented in the 1C-Bitrix platform. However, you can always add what you need, or change its behavior - through standard platform extension mechanisms that are well known to developers.

    Order Process for Customer

    We describe how a customer can buy a product by rendering on-screen forms. If in doubt, install the standard 1C-Bitrix platform online store or play in the virtual laboratory and study the logic of its operation. Often the product is pre-added to the basket and carried out according to the order wizard, but you can also sometimes arrange a “quick” purchase in one step - by paying for the order, for example, from the personal account of the Buyer and substituting the data from the Buyer's profile by default into it.
    Remember that buyers are roughly divided into individuals and legal entities, but sometimes more types are required. Each type of buyer, when placing an order, usually enters different data - for example, legal entities can enter a TIN, etc. This section of the TOR is good to work with a lawyer.
    When the order is placed, it is necessary not only to notify the Client about it , but also to save the entered data in the profile for future use with repeated orders. Also, the client should be able to view the generated orders in the personal section, repeat and cancel them.
    It is often convenient when Buyers can pay for an order from a personal account replenished, for example, with a scratch card.
    image
    Bottom line:
    You have drawn and described the order process. Useful UML activity diagrams for this .. Much of what is needed to implement this process is already available in the 1C-Bitrix platform. If you need to expand the business logic of the order process, you can always do this using standard platform expansion mechanisms.

    Order Process for the Manager

    The platform has a standard administrative interface for working with the catalog, Customer orders, their personal accounts, discounts, taxes, etc. - Suitable for the vast majority of Internet projects. We can not only process orders, but also “run” them according to business processes adapted for your company, where each employee performs certain operations with respect to the order - one dials up to the Client and confirms the order, the other sets the payment status of the order and enters payment details documents, the third interacts with courier services, etc.
    Often, back-office business processes associated with the processing of store orders are reflected in the state diagram. This allows you to more clearly and formally reflect the complex processes of the company and capaciously transfer knowledge to developers.
    image
    Bottom line:
    you set up business processes for the back office of the online store using the capabilities of the “document management” technology for orders - determining their possible statuses, employee rights, and the possibility of switching between statuses. Also, through standard admins, you manage many other directory and store entities.

    Payment systems and delivery services

    As a rule, online stores are launched with a limited set of payment systems and delivery services, then adding them as needed. 1C-Bitrix has many built-in objects of this category, and you can always quickly add non-standard payment systems and delivery services .

    Specialized Administrative Sections

    Sometimes it happens that the administrative sections built into the platform, such as the order admin panel, are not entirely suitable for solving very specific tasks. In this case, though due to the additional programming costs, you can create your own administrative sections with any functionality you need. In secret - if you need to start in 3 months, try not to create custom admin panels - better take care of the usability of the site accessible to visitors :-)
    Bottom line:
    Admins specific to your project can be added in any quantity. But often - “with the head” lacks standard admin area.

    Roles and Rights

    image
    In this section, TK describes who has what rights in the store and what operations it can perform. For example, a content editor adds news and edits pages, and an accountant puts down payment status for orders, etc. It is possible that information from other systems will be automatically poured into your catalog - create a special account / group for them with rights to this operation only. It is useful to format this information in the form of a UseCases chart .

    System Resistance to Load

    image
    In this section, TK describes the methodology for conducting stress tests of an online store, if there is time for this, and targets. For example:
    1) Test data in a volume close to expected is poured into the system. For example, 1,000,000 orders, 200,000 catalog items, 2,000,000 users.
    2) The load on the Internet project is emulated, for example using jmeter , etc.
    3) The load tool records information for each hit.
    It is required that the system withstands 1,000,000 hits per day, with an average page acquisition time of 0.5 seconds and a percentage of errors (50 *), for example, less than 1% (the system administrator should strive to reduce the number of errors to 0).

    As a result, you have a short and effective ToR, in which, on the one hand, there will be many links to detailed online documentation for the 1C-Bitrix platform, and on the other, detailed tasks specific to your Internet project. Additionally, you immediately determine the solution targets that should be achieved during implementation by selecting and configuring equipment, optimizing the code, and caching. TK contains only the specifics of your project, relying on the huge technical documentation for the platform.

    Evaluation and Development


    image
    The implementation of the project on 1C-Bitrix usually follows this scenario:
    1) Installation of the platform - minutes
    2) Integration of templates, setting up multisite - usually, if there is a layout, day
    3) Integration of standard elements - news, site map, menu, site search and etc. - usually done in a day or two.
    The TK prepared above is divided, preferably with the involvement of a development team or experts (try PlanningPoker ), into components . A typical project is dozens of components. Often it’s faster not to write your component for the project, but to modify the standard one (there are hundreds of ready-made components in the platform distribution).
    image
    For the components to work, information blocks must be configured - this is an abstraction of the 1C-Bitrix platform over the database. This usually takes about a day.
    4) The components are evaluated. It is better to bring together programmers and spend a day or two evaluating and discussing it. At this stage, it is checked how much you understand what you want to receive - either you will confidently answer all the questions of the developers and get adequate estimates that can be voiced, or the developers, especially not understanding the tasks (if you do not understand them yourself), will give estimates ( perhaps under pressure :-)) "from the flashlight" and most likely you will not start on time.
    5) Component development. This is usually the longest phase in the life cycle of the first release of a project. A component of medium complexity is done by one developer roughly the day. Components can usually be made in parallel by several developers.
    image
    6) Setting rights. Users and roles are created, their rights in the system and project are checked.
    7) Functional and acceptance testing. Testers and users test the functionality by “calling” the project. Bugs are fixed. If you want unit tests - write, but most likely there will be no time left for them.
    8) Preparation and conduct of stress testing. If the project is heavily loaded, it is recommended to configure a web cluster. From experience, it is better to develop and test on the weakest hardware possible - on powerful hardware you may not immediately appreciate the poor development quality.

    Content Filling


    Because at the previous stage, roles and rights were configured, content editors can begin to fill the system with information. Directories and catalogs are also imported. It’s better to send the employees involved in content filling to the above courses beforehand - otherwise they will bombard you with questions at best, and at worst they will say that the platform is buggy, because they do not succeed.

    Choosing a hosting, project deployment


    It is recommended to choose a certified hosting taking into account the requirements obtained during the load testing in clause 8. For highly loaded projects created on a web cluster , you should pay attention to the growing popularity of cloud providers. If you have strong admins - take a dedicated server, if not - order external administration.

    Project Service


    After putting the project into operation, make sure that the core of the system is updated regularly (sometimes during development, our requirements for quality integration are violated and the kernel is modified - which leads to disruption of the project after the update, so the advice is to force the project to be updated every day), and the project itself is proactive it was monitored and system administrators found out about possible problems before visitors to the site :-)

    Conclusion


    To implement a highly loaded online store for several months, it is not at all necessary to write a huge TK of 1000 pages with hundreds of diagrams. Often, it is enough for the project manager to study the capabilities of the Internet Shop and Trade Catalog modules of the 1C-Bitrix platform and reflect only specific and non-standard tasks in the TOR, filling out the remaining sections in the spirit of “see standard 1C-Bitrix documentation”. As a rule, in most cases, to change the standard functionality of the platform’s online store, it’s enough to use the technology of redefining event handlers and very rarely to create your own modules, although this is done simply. To reduce the risks of degradation of project performance under load, it is recommended to conduct load testing in advance on the amount of data close to “combat”.

    You are not the first one who is tormented by the question: “What if I start development on the 1C-Bitrix platform, and suddenly a complex functionality appears that turns out to be impossible to implement and will have to re-write everything on another platform?”. As I tried to show in the article, the tasks of this class have been successfully and successfully solved for a long time - there is no need to be afraid .

    Good luck

    Head of Integration and Implementation Quality Control 1C-Bitrix - Alexander Serbul

    Also popular now: