My approach. The core is the engine. - page 2

 

couldn't get past... what monitor resolution do you need to see such horizontal "bunches" of code?

it's not comfortable to look in the editor and scroll back and forth to edit or view code ))))

 

And so.

The first advantage of my approach is Brevity. Less words, more numbers. An object is a vector. An Item is a complex of vectors within a matrix. A complex of Elements is a Window. The complex of windows is the Core.

The point is that an Object does not have to be a graphic. An element can be made a Notion, and endowed with no less than a number of Objects and properties. And the engine will be a logical machine working with these concepts (Elements).

 
Vasiliy Sokolov:

OOP is a very flexible methodology, so it does not have any a priori ideas like the concept of "kernel". However, the kernel model in question here can very well be built using OOP. Therefore the statement is not entirely correct.

Yes, I looked it up myself, and was surprised - Peter is describing the OOP thing as it is.

But, as I understood it, Peter as a dignity brings out the user's ability to have full access to all properties and methods of the Kernel. And OOP-style is precisely encapsulation, when access rights are restricted in every way.

I remember when I was young, I too was frightfully indignant that in protected mode I didn't have access to all of the computer's memory. How it could be that some, you know, programs would start and I could not get access to their memory... Specially built "workarounds" by programming direct memory access controller, even got the contents of memory of another process, inaccessible to me from the program (though, for this I must use commands to access the ports of RAP controller, and this in itself is not easy in multitasking Windows environment, I used special driver).

And only then I understood, that protected mode, access sharing (and encapsulation in general) is a very important thing, which I needed. So that I wouldn't accidentally get into things I shouldn't. And so now I firmly stand on position "only those resources, properties and methods which are necessary to the process right now must be available to it at any place of the program".

But Peter, as I understand it, is not an advocate of encapsulation.

 
Igor Makanu:

couldn't get past... what monitor resolution do you need to see such horizontal "bunches" of code?

it's uncomfortable to look in the editor and scroll back and forth to edit or view code ))))

As I said before, convenience isn't the main thing in my approach. The main thing is efficiency and the potential for development and application.

 
Реter Konow:

As I said, convenience is not the main thing in my approach. The main thing is efficiency and potential for development and application.

OK, I'll wait for more code examples, but so far I see very unreadable code, maybe something will become clear later

 
Vasiliy Sokolov:

OOP is a very flexible methodology, so it does not have any a priori ideas like the concept of "kernel". However, the kernel model in question here can very well be built using OOP. Therefore, the statement is not entirely correct.

A conditional kernel can be built. I think serious programs do that. But, I have everything built on a "physical" kernel.

 
Igor Makanu:

OK, I'll wait for more code examples, but so far I see very unreadable code, maybe something will become clear later

Look. The shown is just a general example. Here's a clearer version.

  1. You want to draw a Button.
  2. You create an array and store the property values of the button you want to create.
  3. Button consists of three objects: Base, Text, Picture.
  4. Each object exists inside a Button Element, hence the array must be two-dimensional.
  5. Each row of the array will represent one object of the Button Element.
  6. Three objects will represent the entire button.

And so, you have built a matrix of three vectors, each carrying the properties of one button object.

Then, you can use this matrix as a prototype . A template by which any other button will be created. All you need to change in the final variant, some values of objects, and new button will be created.

Basically, you can do the same thing in OOP. But,a class is used as a template. I use an array as a template.

That is the difference.

 
Реter Konow:

As I said, convenience is not the main thing in my approach. The main thing is efficiency and the potential for development and application.

The potential for development also depends on convenience.
 
Where is the code to be able to check these "porta-potties" ()?
 
Vladimir Karputov:
Where is the code so you can check these "tatters" ()?
Come on the code, at least the ex4-file. I understand it's about MT4 so far.