Please enable JavaScript to view this site.

KOL/MCK - User Guide

First conclusions. The need to minify code: Who needs it?

 

The topic of writing minimal (in size) applications in Delphi is widely covered. Any beginner can easily find information on how to make their application small. Almost any source claims to ditch the VCL and write in a pure API (Application Programming Interface). The ability to use other libraries instead of VCL - ACL and KOL - is quite often mentioned. I am a convinced supporter of the fact that you do not need to write in a pure API, except for those cases when it is simply impossible to do the work differently.

 

Let me explain why. API functions are generally quite general, and the number and types of parameters that are used in API functions are prone to bugs. (For example, instead of an integer, in some cases, a pointer to a string of the PChar type may be passed in the same place). The code using a direct call to these functions looks cumbersome, inconvenient to read and modify. And, for example, drawing on the so-called DC (Device Context) by directly referring to the GDI (Graphic Device Interface) methods is a more than non-trivial art. It is still better in many cases to use encapsulations in objects or classes, even if they are simpler than VCL.

 

However, I am not forcing anyone to use the Key Objects Library. But experience shows that creating and maintaining applications on KOL is not at all more difficult than on VCL (you just need some practice, as well as to get started on VCL). At the same time, the size of KOL programs is quite comparable to what is possible to get by hand through the API.

 

Now to the question of why you should minify your application code at all. Why - everyone decides for himself. Or he wants to save his traffic and user traffic when uploading his application to the Internet. Or he writes ActiveX - an application that is loaded from the server to the client side (and it is desirable to reduce the load time as well). Or he is writing a CGI application and wants to offload the server, which will have to execute hundreds and thousands of such CGI applications per second. Of course, a large program with a size of 400 KB can also be considered a CGI application, but it will probably take several times more resources and time for the system to launch. Yes, virus and Trojan writers are another category of "programmers" (so to speak) who need to write small programs.

 

Recently, the "fashion" for creating applications as large as possible (as proof of their coolness) is fading away. Despite the fact that the majority of Internet users are no longer limited by the speed of Internet access (and these speeds only grow over time), many of them are beginning to understand that the size of an application has practically nothing to do with its capabilities, quality of performance, or ease of use. And it only speaks about the qualifications of a programmer (and here the relationship is just the opposite: a seasoned programmer, as a rule, will have much less code than a beginner).

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC