📜 ⬆️ ⬇️

Operation "Y" and the new library ABI

Glad to greet you, dear reader!

This article will discuss the new ABI Model Pattern library. Probably, it would be logical to provide some example to show all the possibilities of this library, but there is no netush ... Now I will describe just enough minimum to acquaint you with it, to allow your imagination to create the correct picture and use it to implement all the ideas that come to your mind.

image
')
If you think about how you can create the necessary models and keep the data consistent with it? The following thought arises:


image

Basic concepts


I’ll add some terminology from this library to this article, since in the future I’ll call all words more suitable for describing how everything works.


To emphasize the words above more clearly, I’ll introduce the model creation page from the interface:

image

Thus, in order to create a Model, we need to give it a name, assign it with parameters and indicate what requirements each of them should meet.

Separately, I want to note a special checkbox near the field for entering the name of the parameter. This checkbox allows you to make a connection between a parameter and a column in the database, which should be considered as a relationship <Model> - <Table> , or rather <Parameter> - <Column> .

I will not delve into the thinnest and deeper places of this library (yes, I really think you will have time for something more important than reading what I am trying to explain here and blah blah blah) , because I want to explain only the meaning and purpose. One of the ideas of using the library is presented in the picture below.

image

Summing up


This is what we have today:


This library should be considered as a set of functions that control a large number of created models of the required type and if this type ceases to meet the stated requirements, then you will receive the corresponding error from the library.

If it is even simpler, let's consider what opportunities you get by connecting this library:

  1. Easy to create, edit and delete models in the application using the interface;
  2. Automatic validation of the entered properties for each parameter of the model;
  3. The ability to automatically create tables and columns in the database;
  4. Entity data integrity
  5. Ease of use of Entity based on the created model;
  6. Easy transfer of the library with the preservation of all models in other projects;
  7. Self-sufficient addition to any project that does not depend on anything third-party to work.

image

I tried as simply as possible to talk about the possibilities of this library, so as not to knock you over the thought that came after you read this article, and I suggest that everyone who is interested in personally try, pokalat and see what the library is like. Thank you for taking the time to read all these books.

Link to "ABI Model Pattern v.0.1.0 demo" in github

Thanks


And right here, this is the best place to thank Denis Goncharov (@denaikG) for a lot: support, development assistance, and the implementation of the interface for the library, through which the opportunity to manage models appeared.

Your opinion is very important for understanding in which direction to move and what interest is caused to you, dear ones, to this library. Criticism, wishes and compliments leave in the comments.

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


All Articles