Operation Y and the new ABI library

Glad to welcome you, dear reader!

This article will discuss the new ABI Model Pattern library. It would probably be logical to provide some kind of example to show all the possibilities of this library, but here are the naughty ones ... Now I will describe only a minimum to introduce you to it, to provide your imagination with the right picture and use it to realize all the ideas, that come to your mind.

image

If you think about how you can create the necessary models and maintain data compliance with it? The following thought arises:

  • firstly, we need to somehow physically describe the model, that is, to understand that this is some entity with which we can interact;
  • secondly, in the end, get something with which it would be convenient to continue working without going beyond the functionality of this model.

image

Basic concepts


I will add a little terminology from this library to this article, since in the future I will call everything with words that are more suitable for describing how everything works.

  • The library has its own graphical interface for the convenience of creating models, which is accompanied by pop-ups, warnings and various prompts;
  • A model is a description that is represented by a set of parameters / fields, and parameters, in turn, have certain properties;
  • Entity is the implementation of the model. We assume that this is an object that stores data that meets the requirements of the model.

To more clearly emphasize the words above, I will present the page for creating a model from the interface:

image

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

I would also like to note a special checkbox near the field for entering the parameter name. This checkbox makes it possible to make a connection between a parameter and a column in the database, which should be considered as a connection <Model> - <Table> , or rather <Parameter> - <Column> .

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

image

To summarize


Here is what we have today:

  • a library with which you can create models (which will later be stored in ... and validated and parsed into ... - I want this functionality to remain hidden in the classes of the library itself as something that works and does not attract additional attention);
  • entity with which you can work, update and receive values ​​without thinking that it will contain data that does not meet the stated requirements.

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 no longer meets the stated requirements, then you will receive the corresponding error from the library.

If it’s even simpler, let's look at what 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 model parameter;
  3. The ability to automatically create tables and columns in the database;
  4. Entity data integrity
  5. Ease of use Entity based on the created model;
  6. Ease of transferring the library with saving all models to other projects;
  7. A self-sufficient addition to any project that does not depend on anything third-party for work.

image

I tried to tell you as simply as possible about the capabilities of this library, so as not to confuse you with the thought that appeared after reading this article, and I invite everyone who is interested to personally try, cry and see what the library is like. Thank you for your time spent reading all these letters.

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

Thanks


And right here, this is the very best place to thank Denis Goncharov (@denaikG) for a lot of things: support, assistance in development, as well as the implementation of the interface for the library, through which it became possible to manage models.

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

Also popular now: