Some of you witnessed me last August standing in front of the great Perl congregation at YAPC::EU and talking a lot of steamy hot air out of my mouth. More precisely how nice it would be to have a DSL for GUI creation like Rebol has it. I just turned hulky green (but without the muscles) of envy when I saw how much less syntax they need to define GUI. Especially if you use the super verbose Wx. (But it looks just better :) ). As I currently do a lot for the rewrite of Kephra, make him most modern, super mighty, tight and duper I found myself currently writing some helper modules that might serve as a basis of that DSL I call GCL - GUI Creation Language.
I will speak again about it, but since there will be no other track beside it, I can give now away some of the wow points. What I created just the last days (last commit) is a sizer class that has several advantages.
1. greater whipuptitude - less syntax the create something meaningful
2. more introspection
3. new function that let you insert before after a certain widget
accompanying by a panel class that will be mostly what you really want.
it improves on points 1-3 too plus
4. easy handling of recursive structures
5. no hassle with reparenting of widgets
since the input that these both classes take are Perl data structures, (values, arrays , hashes and ref of all of them) we can serialize it. It slowly dawns on me how even to marshal from existing GUI no matter which way you created it. Because it is a Perly data structure it can be stored in YAML (or JSON if you prefer) not XML like XRC or FBP which both can't do marshalling. Maybe this is a dawn of an universal language other can write ports like GCL::GTK or GCL::Prima that can translate the DSL or data structure into another toolkit and even HTML could be doable and we would have true portability for the first time. Its pretty much wet dreams now. All I have now are the Util, Panel, Sizer, menu and Toolbar builder and yes a Splitter Class. The Splitter is also superior to what you have in Wx since,
1. remembers its children , orientation and position. you just say simply resplit or toggle and all is well.
2 it also handles the reparenting
If anyone helps me to put t on CPAN I would be glad.
Don't worry in the upcoming book, which I started to write this week I also will mention and describe other helper modules from CPAN. But I hope you can understand that I see it as one projects with many arms(Kephra, GCL, Book, Docular and the little Apps that will serve as examples), since much of my experience comes from Kephra. Or maybe I just will collapse under the weight of this task. But hey, nearly half of the current Perl mag and the Perl tutorial part 8 and other things that appear just now also could not slow down it.