[Pas2js] Pas2JS component design, any feedback

Michael Van Canneyt michael at freepascal.org
Tue Jun 5 10:14:19 CEST 2018



On Mon, 4 Jun 2018, warleyalex via Pas2js wrote:

> Hi there, in my experimental Pas2JS project, today I've created a visual
> lazarus component and its pas2js
> corresponding version. When designing forms, you often use container type
> controls to hold others controls. In complex form designs, where containers
> are used within others containers. For instance, I dropped onto the form 5
> components.
>
> Take a look at https://pastebin.com/raw/LEn2Ryni
>
> a) Before go ahead, I'm keen to get some feedback on the idea of providing a
> simple component (lazarus visual component x pas2js component).
>
>
> // OFF-TOPIC
> ----------------------------------------------------------------------------------------
> b) Another thing, that's not necessarily a bad thing using a Framework with
> Pas2JS. We have to consider that Pas2JS has its strengths and limits. Some
> areas, Pas2JS is so rudimentary that, in practice, that RTL alone does not
> provide a sufficient framework to development. 
>
> I've been thinking, it would be a nice idea to build a core framework build
> on top of VueJS or F7 framework and or GreenSock libraries, just for
> instance, when it comes to writing smart components, interesting components,
> such as reactive components, it seems everybody ends up writing a framework,
> it seems, likely waste a lot of time solving problems others have already
> solved, VueJS here is a good alternative. The UI part could be implemented
> on of TCustomComponent, both visual or non-visual components could be used.

I am all for it.

To be clear: I think both approaches 
* A widgetset as in LCL
* A custom-control set based on some existing framework
each have their advantages and disadvantages.

It's unfortunately too early to tell which approach will prove to be the
best. The former will be easier for people wishing to do a quick & dirty
rewrite of an existing desktop GUI. The latter is probably better for some
large new application. Only time will tell.

Michael.


More information about the Pas2js mailing list