Adam’s February 2020 Meeting Summary
Agenda
- Generating dynamic content in Delphi with the Sempare Boot Velocity Template Engine – Conrad
- Using FastScript – Martin
- Windows Installable File System (IFS) – Rob
Adam’s Summary
News
Dev Group Meeting Notes Feb 2020
The “25th Year Anniversary” meeting. To celebrate 25 years of Delphi. Plenty of positives in the room about all of our long years of service. I would guess the average member has been using the product for more than 20 years, many have been programming in pascal for longer than 25.
Members were asked to post “old Delphi stuff”. Screen-shots of very old programmes, images of old install-disks etc., please add these below if you feel the urge. Jason went round recording a video of our birthday wishes.
Pete lead the meeting, so we got a proper Microsoft update, with details of Windows 10X, the Surface Duo and Neo, foldable screen devices. Somewhat gobsmakingly the Surface Duo is a Windows device that runs on an Android phone. What is the world coming to?
Neil pointed out that the excellent “Expert Delphi” e-book by the late, great Pawel Glowacki is now free from Packt Publications (https://www.packtpub.com/free-ebooks/expert-delphi).
Martin then gave an introduction to Fast Script.
Fastcript – Martin
Fast Script is the scripting language of the “Fast” components-stable, producers of the excellent Fast-Reports and Fast-Cube. The code library comes free with professional users of the Fast stable, or can be purchased separately.
The fsScript component has simple, useful .LoadFromFile(), .Compile() and .Execute methods, which are pretty self-explanitory. The Compile method accepts a VarArrayOf([]) which is useful for passing in variables and the script has an “AddVariable” method.
Martin commented that having built in the Fast Script capability into his application it has actually not been used much. Other members commented that they used the features extensively for specific use-cases.
Sempare Boot Velocity Template Engine – Conrad
Conrad demonstrated his Sempare Boot Velocity Template Engine
(https://github.com/sempare/sempare.boot.velocity.oss)
Conrad made building a template engine his “Christmas project” and the results are pretty impressive.
The library is designed to allow autogeneration of html, emails and source-code (well any text that can be templated really) from templates which contain plain text coupled with syntax decoration. An example would be:
Dear <%Recipient%>,
Find enclosed ….
Conrad has used good programming practice to construct a set of powerful libraries. Central to this is the VelocityContext object with a .Eval() method which returns a string result, the output of the templating process.
There are a selection of decoration characters, all of which are enclosed in the template with “<% %>”.
These include the ability to manage for-loops, if statements, while-loops etc. Conrad has also built in a MaxRunTime property to pull the engine out of infinite loops in poorly written templates, and code to escape some types of possible error if template content contains malicious elements.
The Github repository is open-source, and available to all members. It seems like a brilliant contribution to me, and I will definitely be playing with it.
Windows Installable File System (IFS) Drivers – Rob
This was a scary presentation. Rob demonstrated how to insert a programme operating in the Windows kernel, below application level which could intercept user calls to the file system and redirect these calls. This basically allows his company to let people believe they are clicking on windows folders or documents when in fact his software redirects them to different files or only shows them the version of a file or part of a file he wants to show them.
His systems add Reparse Points to files. These are Uuid + data which are stored within the stream of the file content on disk. These are widely used in NFTS systems, but not by all operating systems.
Because the Reparse Points are contained within the file, when a file is copied the Reparse Point is also copied, provided that the destination and copying process both support Reparse Points.
Robs session shows the use of Procmon from SysInternals to actually view the calls made by the operating system up and down through the stack to disk.
He also demonstrated using a “Named Pipe” from his windows-kernal based programme to call out into the wider operating system during the file-access process.
I think it was fair to say that a good number of users (myself included) were not aware of the capability to insert code into the operating system in this way. A really useful session.