RC5-COM-Framework (accessed per SimpleVariant.bi)

Windows specific questions.
OSchmidt
Posts: 47
Joined: Jan 01, 2016 12:27
Contact:

RC5-COM-Framework (accessed per SimpleVariant.bi)

Postby OSchmidt » Jun 22, 2016 2:47

Since GUI-libs and -bindings to FB are a recurring topic in the Forums, here's a modern one,
which is based on COM-Wrapper-Classes around SQLite and cairo, fully unicode-aware -
though currently only for the Win-platform, therefore my posting here in this SubForum...

Some questions you might have:

1) Is it OpenSource - and does it work on Linux?
  • Not yet, but it is planned to open it up under LGPL, when the Linux-version is ready -
    the ADO-like Desktop-DB-support is already based on SQLite - and the graphics-framework
    relies on the cairo-lib, so there's no ADO/JET, no GDI+, no CommonControls-dependencies
    to consider - or port. Currently the Windows-version is "free as in free-beer"...
2) How big is it, and what are its dependencies?
  • It consists of 3 Dlls, is self-contained and (compared to QT or GTK+) relatively small (Zipped about 2.5MB).
    And as said, the "heavy-weight" dependencies (graphics and desktop-db) are already covered by OpenSource-libs -
    these are contained in a stdcall companion-dll:
    - vb_cairo_sqlite.dll ... (and the other two are):
    - vbRichClient5.dll (the COM-Dll which contains the Wrapper-Classes)
    - DirectCOM.dll (a small companion, which is used for regfree instantiation and threading)
3) Which Win-Versions are supported - and since it's COM-based, will it need "a Setup"?
  • It will work from XP onwards to Win10 - and no, a setup is not needed for development and deployment with FB.
    Further below I'll post a Link to a zipped-Tutorial, which shows how the Framework can be tested and used
    in a regfree manner (by simply placing - and "shipping" the 3 Dlls in a \Bin\ Subfolder of your FB-App)
4) Since FB has no direct COM-support, what's "the bridge" to access its COM-Classes?
  • "The bridge" (the main-workhorse) is SimpleVariant.bi: viewtopic.php?f=6&t=24777&p=221188#p221188
    which is used as the "level-0-layer" below small FB-Wrapper-ClassTypes (at "level-1"), which are defined in RC5_FBObjects.bi.
    These FB-ClassType-wrappers are currently made of quite straight "one-liners" for each method-call, using
    the LateBound-Call-support from SimpleVariant.bi ... in case there's enough interest, one could "elevate" these
    LateBound FB-Class-Wrappers to a direct VTable-Binding - but currently I try to keep things simple and transparent
    (so there's no TypeLibs to consider, understand or import...)
5) Why should I consider working my way into it, when there's already so many other (GUI)frameworks?
  • Ok, where's the beef? ;-)
    - It's small(er) than most other GUI-frameworks
    - The API-interfaces are quite well-thought-out and easy to use, I think...
    - It allows an easy way, to define and implement your own Widgets
    - It supports full (nested) Alpha-Layering throughout a given Widget-Hierarchy
    - It supports full Parent/Child relationships (any Widget can contain any other Widget, with Clipping)
    - Graphics-stuff is not the only thing it contains - there's also:
    -- DataBinding-stuff
    -- XML/JSON-support
    -- FileSystem- and -Stream support (+ a DirList-Class, FileSystem-Watcher and the System-FileDialogues)
    -- powerful Container-Classes (Sorting-Dictionary, Sorting-Collection, ArrayList, StringBuilder)
    -- an easy to fire-up InProcess-Webserver
    -- Crypto- and CoDec-Classes etc...

I will stop this here, before it starts to sound like "bad advertising" <g>... hopefully a few small
examples (when you care to look at them) will shed some more light on it, in a more practical manner...

Here's the link to a Demo-Zip, which is "self-contained" (it comes with the 3 RC5-Baselibs already -
in the above mentioned \Bin\ Subfolder):
http://vbRichClient.com/Downloads/RC5_FBObjects.zip (about 2.7MB)
http://vbRichClient.com/Downloads/RC5_FBObjects.7z (same content, 1.9MB)

If you have the Path-Variable defined to an FB-1.05 Win32-Compiler, you should be able to
compile (and later run) the 3 examples directly from the (unpacked) App-Folder:
- 1_Regfree_COM_and_LateBound_Events.bas
- 2_SQLite_and_CairoDrawing.bas
- 3_Forms_and_userdefined_Widgets.bas
by using the _compile_all.bat...

Here's a ScreenShot of the 3rd Demo, which shows a few simple (userdefined) Widgets and their nested Alpha-Rendering
(the smaller, second Form is started from the same Class-Def, but shown as a Modal-Form to the larger Parent-Window):
Image

Here's a Link to *.chm-Files (for those who are interested, what Classses the RC5 contains,
since RC5_FBObjects.bi only covers a subset of the Classes and their Methods, basically only,
what was needed for the Demos to work): http://vbRichClient.com/Downloads/RC5_ChmHelp.zip

Please let me know, when something is not clear, or doesn't work... and also if that's something
"to expand on" with regards to FB...

Olaf
OSchmidt
Posts: 47
Joined: Jan 01, 2016 12:27
Contact:

Re: RC5-COM-Framework (accessed per SimpleVariant.bi)

Postby OSchmidt » Jun 22, 2016 3:24

Ok, for those who made their way through the 3 little "tutorial-like Demos" above,
here's an example, which is making an attempt at demonstrating a "real Application"
(again based on SimpleVariant.bi, RC5_FBObjects.bi and the RC5-Dlls).

It is a little App, which is able to render "3D-Area-Surfaces" - and thanks to cairo,
quite nicely I think - it's also introducing the usage of pre-compiled RC5-Widgets
(from vbWidgets.dll, which is available as VB6-Source on GitHub: https://github.com/vbRichClient/vbWidgets)

It is written, using the MVC-Pattern - making use of a JSON-based Model, a View which
is defined in a Script-Language (5 little *.vbs-Files, using VBScript) - and a DataBinding-
Controller which will post back to FB-defined CallBack-Routines (the 3D-calculations and
the rendering is hosted in the FB-App itself).

Thanks to cairo, the semitransparent and antialiased renderings look quite nice - though
the achievable FPS are not that high as with GPU-support (the OpenGL-support of cairo is not
yet "mature enough" on Windows) - but "high Framerates" are not really the purpose of this Demo.

Here's a ScreenShot (showing the surface-area of a Gaussian-bell, viewed slightly "up the kilt" -
to demonstrate the support for "backface-detection" in the 3D-projection-class):
Image

Here the Download-Link(s) for the Demo:
http://vbRichClient.com/Downloads/RC5_3DSurfaceDemo.zip (about 2.8MB)
http://vbRichClient.com/Downloads/RC5_3DSurfaceDemo.7z (same content, but about 2MB)

Olaf
jcfuller
Posts: 324
Joined: Sep 03, 2007 18:40

Re: RC5-COM-Framework (accessed per SimpleVariant.bi)

Postby jcfuller » Jun 22, 2016 10:12

Sounds interesting but it appears to be 32bit only?
I have not done any 32bit coding in quite some time!

James
OSchmidt
Posts: 47
Joined: Jan 01, 2016 12:27
Contact:

Re: RC5-COM-Framework (accessed per SimpleVariant.bi)

Postby OSchmidt » Jun 22, 2016 21:20

jcfuller wrote:Sounds interesting but it appears to be 32bit only?

Yes, the Framework-Dlls are currently all 32Bit-binaries, and so also the FB-
compiler needs to produce matching 32Bit-executables ...

But also "FB-wise" the 32Bit-compiler is a necessity currently, because
SimpleVariant.bi relies (in its CallByName-function) on va_first(), va_next() ... etc.
which are currently not available in the 64Bit-FB-versions...

jcfuller wrote:I have not done any 32bit coding in quite some time!


Well, when we talk about the Windows-target (and especially about COM-stuff),
then 32Bit-binaries are quite welcome (and currently still the preferred format).
E.g. there's recommendations out there, to do larger MS-Office-package-installs
in a company-LAN preferrably in their 32Bit-versions, so that they have a better
"connectivity" to existing COM-Addins/Dlls... (the 32Bit-COM-universe is much
larger than the 64Bit one).

Though the ability to adjust a given compiler, to target different platforms (or "the bitness" of the
produced binaries), is of course "nice to have" - a feature that is lacking in good old VB6 for example...

Olaf
oyster
Posts: 178
Joined: Oct 11, 2005 10:46

Re: RC5-COM-Framework (accessed per SimpleVariant.bi)

Postby oyster » Jan 11, 2019 8:51

interesting.
what is the progress after years? Since it uses cario, maybe it supports linux too? But how about the vbs script?

btw, what role does the sqlite play in a GUI lib?

Regards

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 0 guests