|
| 1 | +================================ |
| 2 | +Chapter 1: Architecture overview |
| 3 | +================================ |
| 4 | + |
| 5 | +Before we start building our app, let's take a high level glance at the architecture of Odoo. |
| 6 | + |
| 7 | +Multitier application |
| 8 | +===================== |
| 9 | + |
| 10 | +Odoo leverages a `multitier architecture <https://en.wikipedia.org/wiki/Multitier_architecture>`_, |
| 11 | +meaning that the presentation, the business logic, and the data storage are separated. More |
| 12 | +specifically, it uses a three-tier architecture (image from Wikipedia): |
| 13 | + |
| 14 | +.. image:: 01_architecture_overview/three-tier-architecture.svg |
| 15 | + :align: center |
| 16 | + :alt: Overview of a three-tier application |
| 17 | + |
| 18 | +The presentation tier of Odoo is a combination of HTML5, JavaScript, and CSS. The logic tier is |
| 19 | +exclusively written in Python, while the data tier only supports PostgreSQL as an :abbr:`RDBMS |
| 20 | +(Relational Database Management System Software)`. |
| 21 | + |
| 22 | +Depending on the scope of your Odoo development, it can be done in any of these tiers. Therefore, |
| 23 | +before going any further, it may be a good idea to refresh your memory if you don't have an |
| 24 | +intermediate level in these topics. In order to go through this tutorial, you will need a very basic |
| 25 | +knowledge of HTML and an intermediate level of Python. There are plenty of tutorials that are freely |
| 26 | +accessible, so we cannot recommend one over another since it depends on your background. For |
| 27 | +reference, this is the official `Python tutorial <https://docs.python.org/3/tutorial/>`_. |
| 28 | + |
| 29 | +Odoo modules |
| 30 | +============ |
| 31 | + |
| 32 | +Odoo relies on modular components called **modules** to extend its functionality. These modules are |
| 33 | +essentially self-contained packages of code and data that serve a specific purpose within the |
| 34 | +system. You can think of them as building blocks. |
| 35 | + |
| 36 | +Modules offer two main ways to customize Odoo: |
| 37 | + |
| 38 | +- Adding new functionality: You can create entirely new features with modules, such as a real-time |
| 39 | + bus fleet visualization module. |
| 40 | +- Extending existing functionality: Modules can also be used to modify or enhance existing Odoo |
| 41 | + features, like adding your country's accounting rules to the generic accounting support. |
| 42 | + |
| 43 | +Terminology: |
| 44 | + |
| 45 | +- Developers group their business features in Odoo *modules*. |
| 46 | +- The main user-facing modules are flagged and exposed as *Apps*, but a majority of the modules are |
| 47 | + not Apps. |
| 48 | +- *Modules* may also be referred to as *addons*. |
| 49 | + |
| 50 | +In practice, modules are represented by directories. They are placed in a designated location called |
| 51 | +the **addons path**, which the server scans to discover available modules. |
| 52 | + |
| 53 | +In the :doc:`setup guide <../setup_guide>`, we cloned the `odoo/tutorials` repository and included |
| 54 | +it in the `addons-path` argument when starting the server. The directories present in the repository |
| 55 | +are all modules that can be installed on your Odoo server. |
| 56 | + |
| 57 | +.. exercise:: |
| 58 | + In your file explorer, navigate to the `odoo/tutorials` repository and inspect the available |
| 59 | + modules. You should find the `real_estate` module that will serve as the foundation for building |
| 60 | + our real estate application throughout this tutorial. |
| 61 | + |
| 62 | + .. note:: |
| 63 | + You will notice that the module directories are not empty; they all contain at least two |
| 64 | + essential files: :file:`__init__.py` and :file:`__manifest__.py`. These files are what |
| 65 | + makes a simple directory an Odoo module. We'll get back to it in the next chapter. |
| 66 | + |
| 67 | +---- |
| 68 | + |
| 69 | +.. todo update incentive to match the title of the next page |
| 70 | +
|
| 71 | +Ready to start? Let's now :doc:`start building our first Odoo app <02_newapp>`! |
0 commit comments