[fpc-pascal] Adding method dynamically to a class

Jorge Aldo G. de F. Junior jagfj80 at gmail.com
Fri Jun 22 15:25:21 CEST 2012


Use event properties (Properties to a procedural type)

Adding completely free methods to a class makes no sense.

By free i mean a method that has no clear signature (parameters and
result type) because calling them will be a nightmare (You will have
to do the compiler work and build your own parameter passing and
return type system).

This is usually done in interpreters but what you describe doesnt
sound like a interpreter.

2012/6/21 ik <idokan at gmail.com>:
> On Wed, Jun 20, 2012 at 2:15 PM, Inoussa OUEDRAOGO <inoussa12 at gmail.com>
> wrote:
>>
>> > Think of a plug-able system.  I have an engine, and code to execute.
>> > Instead of compile everything to an ELF/PE, I place code on dynamic
>> > shard
>> > library, and load it on run time when needed.
>> >
>> > The idea is that the engine will not be rewritten for every new request
>> > (that comes often), because it's logic (almost) never changes, but to
>> > load
>> > code on demand that often changes, provide additional functions, changes
>> > of
>> > logic, bug fixes etc...
>>
>> WST library server implementation could be a elegant solution : it is
>> web-services that are
>> locally located in dynamic library(DLL)/shared object(so) instead of
>> being remote. The main
>>  executable acts as client while the server's implementation as
>> provided as shared objects.
>> No TCP is used, only memory through the WST's library protocol. No
>> SOAP serialization
>> as you can use the WST's custom binary messaging format that is very fast.
>>
>> To resume :
>>  * The main executable defines a WSDL schema that contains the types
>> (think of this as IDL)
>>  * The servers implement the service exposed in the schema.
>>  * The main executable loads the servers using the library protocol
>>
>> Main benefits are :
>>  * much larger type system available (wsdl, WST contains a type library
>> editor)
>>  * you could later even add remote servers without changing your main
>> application,
>>    just create the service with the desired location parameters.
>>
>
> Thank you, I'll check it out. My "problem" is something like with WDSL idea.
>
>
>>
>>
>>
>> --
>> Inoussa O.
>
>
> Ido
>
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list