When talking about RAD (Rapid Application Development) Tool under Linux/Unix, I used to use Tk, which is a fairly easy library for building graphical applications, to build simple GUI based applications, because to me, GTK, Qt, or Java are way too complicated to be use to build simple GUI based applications. Maybe they are designed to build complicated ones.
The core concept of Tk is that GUIs are built out of widgets -- objects like buttons, windows, scrollbars, and menus, which have associated attributes (size, colour, captions, and so on). Widgets are grouped together hierarchically within a toplevel window...
The general structure of a Tcl/Tk program is to define the user interface as a hierarchy of widgets with subroutines executed by callbacks. Widgets show up on the screen when you ask a geometry manager to manage them, or when you invoke the pack command (to resize the widget's parent to hold them).
The reason I quote above is to show how easy is to code such GUI based applications by hand in Tk.
The key idea is that you "declare" the GUI, instead of drawing it by hand (like in Visual Basic). There are so many drawing-based GUI tools (like glade, etc), but very very few declarative ones. I'm wondering what they are.
While looking for answers myself, I found the following is the kind of declarative GUI building tools I'm looking for (although I don't know what Oz stands for). you can see how simple declaration can be used for creating windows, adding children to them, and making them react to user input, etc.
functor
import
Application(exit)
System(show)
GTK
define
%% Define Toplevel window class
class MyToplevel from GTK.window
meth new()
GTK.window, new(GTK.'WINDOW_TOPLEVEL')
GTK.window, setBorderWidth(10)
GTK.window, setTitle("Hello, World!")
{self signalConnect('delete-event'
deleteEvent _)}
end
meth deleteEvent(Args)
%% Do cleanup stuff here
{System.show 'deleteEvent occured'}
{Application.exit 0}
end
end
%% Define HelloButton class
class HelloButton from GTK.button
meth new()
GTK.button, newWithLabel("Hello, World!")
GTK.button, signalConnect('clicked'
clickedEvent _)
end
meth clickedEvent(Args)
{System.show 'ClickedEvent occured'}
end
end
%% Create Class Instances
Toplevel = {New MyToplevel new()}
Button = {New HelloButton new()}
%% Make Butten child of Toplevel Container
{Toplevel add(Button)}
%% Make it all visible
{Toplevel showAll()}
end
So, again, what are the popular declarative GUI building tools out there? (I'm actually more interested with those that work with Go, but that's not the restrain to this question)
Thanks