Adrian De Armas wrote 19 lines
Hello everyone,
I am a professor of "introduction to programming". Currently we are working
with matlab and c.
Today I had a meeting about doing the module more interesting to the
students. Currently we teach algorithms making console applications and
usually I receive questions like "Why don't we do something more modern?".
I recommended that we should use Pascal in General and Lazarus in
particular to teach how to create rich GUI Applications and to my surprise
the idea was well recieved. Now I have to make suggestions about how to
prepare the module starting from zero. Students do not know how to program
and I need to include subjects as: variable declaration, operations, if,
while, for, functions and procedure, arrays and multidimensional arrays.
I would love to know what you think about making the transition from
console to GUI.
This is an exciting opportunity I'd love to make it right.
...
I haven't used Lazarus yet, I need to learn it,
but during the development of my own
JavaScript GUI library I have came to a conclusion that GUI-s are inherently something that require
"dynamic programming" or the code gets really bloated.
Another thing that I noticed, when developing my
own GUI library, is that the simple "deck of cards" style of GUI models that web developers use, which essentially mimic ordinary, old-school, HTML-pages, where each screen state is a separate HTML-page,
are useless in practice, because the number of cards in the deck of cards gets really huge really fast.
At least that's the story with GUI-s that implement various forms. I suspect that Your best bet for a
simple GUI is actually a 3D-game based on the
http://castle-engine.sourceforge.net/
That should be fun, "modern", and actually
MUCH-MUCH-MUCH-MUCH EASIER TO USE than anything
that uses forms. My own summary for the case that
uses forms, is:
http://longterm.softf1.com/specifications/rastclsp_t1/
So, I really suggest that You avoid the typical
blanks-and-buttons types of GUI-s like a plaque, when teaching beginners. Those are really hard even for me as a professional. Stick with the 3D-game-engine and game levels. If I were to teach beginners to
program, then I would use Ruby, not Pascal, but
the Castle 3D game engine is my first choice for
anything 3D. Although, in the JavaScript and web browser world there is the "yet-another-VRML-ready-to-die-off"
https://www.x3dom.org/
and the x3dom competitor, web browser version of OpenGL, WebGL, based game engines like
http://babylonjs.com/
Any kind of client projects have to use the
web browser, because almost everything else has various installation problems. I do not mean just the
time that it takes to download and install, but
literally PROBLEMS, crashing or lack of support
at a given operating system and hardware configuration, etc.
So, all in all, Lazarus seems nice, but the task
that it seems to be designed to solve, the creation of 2D GUIs, seems too complex for beginners. You'll be probably much better of, if You stick to 3D in stead of 2D.
The Castle 3D game engine has some very nice
sample code, which might be used as a template.
3D graphics, on the other hand, is more tedious to do than 2D graphics, because there is more information that needs to be entered/decided, but once the statues are molded, a simple 3D game or a 2D-game with a running turtle on it, is much easier than anything with
buttons and blanks. Besides, every blank needs input verification, id est the height of a pet can not be negative, the name of a dog can not be an empty string, etc.
With a hope to be helpful,
P.S. When talking about "more modern", then my current architecture is
http://mmmvkos.softf1.com/k2sitsi_hallatav/wiki_supplements/diagramo/editor/viewDiagram.php?diagramId=46
and overall development process is described at
http://intervaarium.softf1.com/lounge/work_process/en/
That is to say, the "most modern" might not be necessarily something very new. The question might rather be:
why has industry used crap, when they knew better?