maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12548
Systems Integration and Raising of the Abstraction Level
We have highly evolved systems such as SQL, HTTP, HTML, file formats or
high level programming languages such as Java or PHP that allow us to
program many things with little code. Even so a lot of effort is
invested in the integration of these systems. To try to reduce this
problem libraries and frameworks that help in some ways are created but
the integration is not complete.
It is well known that most of the time when you try to create something
to integrate several incompatible systems what you get in the end is to
have another incompatible system :). Still I think the integration
between the systems mentioned above is something very important that
can mean a great step in the evolution of computing and worth a try.
To explore how this integration can be I have created a framework that
I have called NextTypes and that its main objective is the integration
of data types. For me it is something very illogical that something as
basic as a 16 bits integer receives a different name in each of the
systems ("smallint", "short", "number") and can also be signed or
unsigned. In any moment, due to a mistake from the programmer, the
number of the programming language does not fit in the database column.
Besides these names are little indicative of its characteristics, it
would be clearer for example to use "int16". Whatever names are chosen
the most important thing is to use in all systems the same names for
types of the same characteristics.
Also there is no standard system for defining composite data types of
primitive types and other composite types. From an HTML form to a SQL
table or from one application to another are required multiple
transformations of the data. Lack of integration also lowers the level
of abstraction, making it necessary to do lots of low level stuff for
systems to fit.
NextTypes at this moment is nothing more than another incompatible
system with the others. It simply integrates them quite a bit and
raises the level of abstraction. But what I would like is that the
things that compose NextTypes were included in the systems it
integrates.
Finally I would like to list some examples of improvements in database
managers, SQL, HTTP, HTML, browsers and programming languages that
would help the integration and elevation of the level of abstraction.
Some of these enhancements are already included in NextTypes and other
frameworks.
SQL
---
- Custom metadata in tables and columns.
- Date of creation and modification of the rows.
- Date of creation and modification of the definition of the tables.
- Use of table and column names in prepared statements.
Example: select # from # where # = ?;
- Use of arrays in prepared statements.
Example: select # from article where id in (?);
# = author,title
? = 10,24,45
- Standardization of ranges of valid values and resolution for date,
time and datetime types in database managers an HTML time element.
PostgreSQL
----------
- Facilitate access to the definition of full text search indexes with
a function to parse "pg_index.indexprs" column.
Other database managers
-----------------------
- Allow transactional DDL, deferrable constraints and composite types.
JDBC
----
- High level methods that allow queries with the execution of a
single method.
Example: Tuple [] tuples = query("select author,title from article
where id in (?), ids);
- Integration with java.time data types.
HTTP - Servers
--------------
- Processing of arrays of elements composed of several parameters.
fields:0:type = string
fields:0:name = title
fields:0:parameters = 250
fields:0:not_null = true
fields:1:type = string
fields:1:name = author
fields:1:parameters = 250
fields:1:not_null = true
Another possibility is to generate in the browser arrays of JSON
objects from the forms.
"fields": [
{
"type": "string",
"name": "title",
"parameters": 250,
"not_null": true
}, {
"type": "string",
"name": "author",
"parameters": 250,
"not_null": true
}
]
XML/HTML - BROWSER
------------------
- Input elements for different types of numbers with min and max
values: 16 bits integer, 32 bits integer, 32 bits float and 64 bits
float.
- Input elements for images, audios and videos with preview.
- Timezone input element.
- Boolean input element with "true" and "false" values.
- Null value in file inputs.
- Clear button in file inputs like in date and time inputs.
- Show size in file inputs.
- Extension of the DOM API with high level and chainable methods.
Example: paragraph.appendElement("a").setAttribute("href",
"/article");
- Change of the "action" parameter of the forms to "target" to indicate
the URL where to execute the action. The "action" parameter is moved to
the different buttons on the form and allows executing a different
action with each of the the buttons.
Example:
<form target="/article">
<button action="delete">Delete</button>
<button action="export">Export</button>
</form>
- "select" elements that change a parameter of the current URL.
Example:
<select url-parameter="lang"/>
<option>en</option>
<option>es</option>
URL = https://demo.nexttypes.com/?lang=en
- "content-type" attribute in links and context menu in the browser to
open links with external applications using WEBDAV, similar to a file
manager.
Example: <a href="" content-
type="application/vnd.oasis.opendocument.text">
------------------------------
| Open link with ... |
| Open link with LibreOffice |
- Background submission of forms without using XMLHttpRequest,
display of result in dialog window or file download, and execution of a
Javascript function for subsequent actions.
Example: <form background show-progress callback=function()>
- Dialog with progress indicator of form submission. Must show total
size, transmitted data and average speed. Possibility to pause or
cancel the submission.
- Dynamic datalist with searchable JSON source. Over data source URL is
added a "search" parameter with input value.
Example:
<input list="article-list" name="article" type="text" />
<datalist id="article-list"
src="/article?lang=en&view=json&names" />
Example query URL: "/article?lang=en&view=json&names&search=Ne"
- Same appearance and operation of inputs with dynamic datalist in all
browsers.
- Option tags with icons.
Example: <option icon="/icons/save.svg">Save</option>
- Tabs, Tree, etc widgets
- Mechanism to close HTTPS sessions initiated with client certificate
authentication.
JAVA
----
- Subclasses of String or some system of variants of String that allows
assigning a regular expression or class that limits its valid values
to avoid code injection or values that will crash the system.
Example: String:Type = "[a-z0-9 _] +"; Or String:Type = TypeChecks;
String:Type type = "article_language"; -> correct
String:Type type = "Article-Language"; -> error
We can talk about the characteristics of each system in its mailing
list or group. For the general topic of system integration I have
created a discussion in the github project.
https://github.com/alejsanc/nexttypes/discussions/6
This email has been sent to the following mailing lists and groups:
pgsql-hackers@xxxxxxxxxxxxxxxxxxxx
pgsql-jdbc@xxxxxxxxxxxxxxxxxxxx
mozilla.dev.platform@xxxxxxxxxxxxxxxx
public-html@xxxxxx
jdbc-spec-discuss@xxxxxxxxxxxxxxxx
jdk-dev@xxxxxxxxxxxxxxxx
maria-developers@xxxxxxxxxxxxxxxxxxx
chromium-dev@xxxxxxxxxxxx
https://mysqlcommunity.slack.com/archives/C8R1336M7
Best regards.
Alejandro Sánchez.