Text Only Compiler

[quote=200730:@Norman Palardy]Done both
I prefer writing metrics and letting some code chew on it and write the actual code to create the layout
Its basically what xojo does for you[/quote]
yes, but that requires some type of drag-n-drop Gui builder… which I am trying to avoid for now
If I start with a GUI builder, then I’m dependant on it… if I build the project to work without it, then I have two ways to create a project

[quote=200731:@Dave S]yes, but that requires some type of drag-n-drop Gui builder… which I am trying to avoid for now
If I start with a GUI builder, then I’m dependant on it… if I build the project to work without it, then I have two ways to create a project[/quote]
No it doesn’t
It requires a defined format that is JUST metrics you run through some app that spits out the code that will be compiled
OR the “application” can consume the metrics file & on the fly and generate the layout from just the metrics

Then the coder just writes the metrics

Think about it this way
A Xojo VCP project could be entirely written in Notepad (ugly but doable)
Then you compile it using Xojo
The fact it has no command line compiler is more or less irrelevant as you JUST want the compiler
You dont HAVE to use the Xojo IDE in any way to do this except to run the project through the compiler

IF Xojo had a command line compiler the only aspect of the work flow that would change is you no longer start the IDE to compile
You just say “xojocompile projectfile” or whatever and it does its thing
The compiler etc still just takes in the metrics file & crafts the right UI from it

but the author still writes a file full of metrics not
code to create a new window
code to create a new button at location
more code to create yet another button

You can write GUI apps in Java, just pure text files. There’s actually several frameworks for building the UI, most popular is (was?) called Swing.

You can do the same in Objective-C or Swift. It’s not the language it’s the framework included. You could do it in Xojo too by wrapping all controls in a ContainerControl so they can then be added in code.

Grid Bag layout
ugh :stuck_out_tongue:

GLBasic is pretty easy and has what you are looking for, I think. Lots missing, but cross platform, works well, etc. GNICobol can do screen sections but typically that is simply TUI. MicroFocus COBOL (in several variants, including the free Visual Cobol) and several others do GUI screens from plain jane text files. Elastic COBOL, etc.

There are bunches out there, but they are rather below the radar these days.

C of course, as well as FreePascal and a bunch of compilers along those lines. Ada has a binding to QT/TCL that works very well. you an do that in C# or F#, etc.

Another language far below the radar: COMAL - used it on my Commodore C64 in the 80ies but it should work on Win PC too…

Take a peek at Tcl/Tk. It allows you to create GUI’s pretty easily with just a plain text file and no dealing with X, Y, Width, Height coordinates. It uses packers or grids and automatically handles all the positioning for you.

C++ and wxWidgets :wink:

Purebasic has a GUI editor but if my memory serves correctly that just creates text files which you can create yourself instead. Cross platform, too.


Edit - it has its own IDE but I think there is a command line compiler as well.

Purebasic command line compiler : http://www.purebasic.com/documentation/reference/cli_compiler.html

The form editor produces code like this (a text box in a window for a simple example). So I assume you could just create this file manually :

; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.

Global Window_0

Global String_0

Procedure OpenWindow_0(x = 0, y = 0, width = 600, height = 400)
Window_0 = OpenWindow(#PB_Any, x, y, width, height, “”, #PB_Window_SystemMenu)
String_0 = StringGadget(#PB_Any, 160, 120, 100, 25, “”)

Procedure Window_0_Events(event)
Select event
Case #PB_Event_CloseWindow
ProcedureReturn #False

Case #PB_Event_Menu
  Select EventMenu()

Case #PB_Event_Gadget
  Select EventGadget()

ProcedureReturn #True

[quote=200604:@Dave S]Does anyone know of any product (language etc) the creates a GUI application (like XOJO does), BUT your project file is 100% text, by this I mean the developement environment does NOT have a GUI for laying out forms/windows/views, that is MUST be defined by the developer in text only…

Basically, the developer uses Notepad or some other “generic” text editor to create the entire project, and submits it to a “compiler”

I’m looking for ideas how how others would have defined the requirements for such a text file[/quote]


Great for server side non-UI code - done that.
Does make cross platform apps - done that.
I can spot one a mile away and have one I use daily because it was written in Java so I can run it on my Mac Windows & Linux VMS & everything & its “the same” on all 3 - butt ugly.
It’s just portable.

It’s not UI compliant on any of the platforms.