[Lazarus] Console App Development

Marco van de Voort marcov at stack.nl
Fri Aug 12 12:42:39 CEST 2011


On Thu, Aug 11, 2011 at 03:43:36PM -0300, Alexsander Rosa wrote:
> Should we use CRT or VIDEO unit? What's the state of Free Vision? We plan to
> port our WMS (Warehouse Management System) module from C to Pascal (to use
> our persistence framework). It has a few colors, a numbered menu and a few
> scrollable lists. The module usually is run thru Putty from mobile computers
> like MC-3090 (Windows CE + WiFi).

While Video is usable standalone, the KVM units ( keyboard - Video -  mouse)
are mainly meant as the Free Vision backend. 

Crt is pure legacy, and has many quirks and idiosyncracies.

Free Vision is the most complete solution, but its programming model is very
old, it uses TP object and shortstrings, but pchars here and there to work
around shortstrings and it in general doesn't take
advantage of any newer FPC/Delphi features (mostly the more automated
streaming system (RTTI, properties)  ansistrings, and in general cleaning
out design cobwebs from when apps still had to work on 20MHz 386s. 


For minor stuff you can take any of them, as long you test them for your
terminal types. I would use Video over Crt. (see the lister demo).

FV is also an option, but for the more complex (more than a few screens)
apps.

A few attempts have been made (by Florian and me) to update FV stepwise
(with at least ansistrings), but such projects quickly expanded in scope,
and still would deliver a patched old and limping framework.

For real serious work, one would have to redo TV on a more Delphi/VCL basis,
since then maintainability is king, and the limitations of TV get annoying
over time.

Personally I like (TUI) console apps for server maintenance and
configuration apps.  They work quick, and work over a SSH connection,
without much additional configuration. While this is a _better_ solution one
has to ask if it is worth maintaining experience with two frameworks
(GUI+TUI) for, specially if they are so different as LCL and TV.

Alexander seems to have a clear specialized reason though, where TUI
connects to the pecularities of a certain devices interface. No discussion
there.




More information about the Lazarus mailing list