terça-feira, 30 de janeiro de 2018

DROP Wiki (English) #1 - Introduction

Você pode ler este post em português clicando aqui.

With the main goal of providing large documentation about the DROP, I'll start the series DROP Wiki, and as lots of conversations about the framework start with the question "What is the DROP?", nothing better than to start the series by trying to answer this question.

Using the shortest possible answer, the DROP is a set of classes built in Delphi, to make the daily tasks of the developer easier. A bunch of these classes have been developed to support their own ORM framework (object relational mapping), and it is mainly for fulfilling this goal that the DROP is best known.

Another great thing about the DROP is that it is a totally free and open source (MIT license), and if you are already interested in downloading or using it, you can do it through GitHub, or by downloading the source in a compacted file using this link. Now, lets break the DROP down a little further.

I remember that, while developing/rewriting the DROP, for many times I have talked with my teammates at Aquasoft, or among other developers (as my friend Muka), and the subject of these conversations was the reason of the DROP having been divided into some layers, each of them with one responsibility. Understanding these layers can make the understanding of the whole DROP easier:
  • Core: contains useful classes for several tasks, with generic development purposes. On this layer there's nothing implemented to access DBMSs. To tell you the truth, some classes are not even used directly or indirectly in ORM tasks;
  • DB: the classes contained here abstract the communication with DBMSs, and therefore, many of these classes are abstract as well, providing uniform structures, that further allows to DROP write code once, however compatible with the supported DBMSs. Even though on this level there aren't concrete classes to access data, there are lots of specific classes to some DBMSs, like the classes that solve the SQL objects, translating them into the specific language of each of the supported DBMSs;
  • ORM: contains the ORM classes, proper. They transform classes structures and their attributes to SQL objects, as enable those entities objects to be persisted and retrieved from the DBMSs;
  • ORM Base (I still think that this name needs a facelift from a marketing department ;-): the ORM layer doesn't requier that the classes to be mapped inherit from the DROP classes, however, the DROP provides, by this layer, some classes that can be extended, reducing the developer work while doing the ORM.
The Core layer presents all its units in a namesake package, being that all other layers are implemented in a package called DB. It is important to emphasize that all classes contained in these packages are free from specific any data access engines.

To perform the physical data access, the DROP can work with both DBX Framework or FireDAC. It is up to the developer to use one technology or the other. Therefore, each of the implementation of the DROP to the above technologies has received its own package.

Talking about physical data access, the DROP currently supports seven relational DBMSs:
  • Interbase;
  • Oracle;
  • Microsoft SQL Server;
  • PostgreSQL (only by FireDAC);
  • MySQL;
  • Firebird;
  • SQLite (ok, not really a DBMS, but...).
Concluding, if it were possible to summarize the above content in an image, it would be something like this:



Finishing this post, the sequence of these serie are still being written (some of the Portuguese posts are already published, and I'll work in the translation ASAP). The next posts will cover the above topics alternating topics between all the DROP layers.

Thank you for reading! See ya!

Nenhum comentário:

Postar um comentário

DROP Wiki (English) #2 - Connecting to DBMSs

Você pode ler este post em português clicando  aqui . Continuing the DROP Wiki Series, the current topic is the connection establishment w...