3 ms·
The beauty is in the eye of the beholder (and I put IMOs liberally in my post). The OP mentioned GUI prototyping and I was viewing Tk in this context. For rapid
by ptero 10y ago
The beauty is in the eye of the beholder (and I put IMOs liberally in my post). The OP mentioned GUI prototyping and I was viewing Tk in this context. For rapid prototyping, Tk is a better solution for me, by far.
It is a very simple, script language that allows creating dynamic GUIs on the fly. I can make a simple GUI and hang calls on buttons and menus with a few lines of text. No compiling. No library mismatches to deal with. Whiteboard sketch to a working prototype often takes less than an hour, almost never more than a day.
It is cross platform and text based, so we can email prototypes around for people to try it on their Windows, Linux and Mac machines, click on buttons and report what they want to change. It is text, and does not require installing software. This is a noticeable advantage in locked-down environments, where installing Tk once and running 10 scripts is much easier than installing 10 revs of software.
Due to the language simplicity we had people who said they have no idea about it (and no plans to learn it -- they just wanted a prototype) making and sending back mods within a few days of getting the prototype. This is great -- then we know that this is what they want.
Tk is long in the tooth and has many limitations, but for rapid GUI prototyping it is one of the most useful tools for me.
- coldtea 10y ago>It is a very simple, script language that allows creating dynamic GUIs on the fly. Very limited ones. And ones clients will have a shock when seeing. And still coding it all together. With Delphi you can drag and drop great looking (and more full featured) prototypes in zero time. It will be limited to Windows, though, I'll give you that.
- ptero 10y agoClients having a shock after seeing a prototype says a lot about the author and very little about the language the code was written in. Can you clarify "coding it all together" part. I have no idea what you meant.
- barrkel 10y agoDelphi GUI building is drag-and-drop - no coding. Of course for more than trivial built-in behaviours you'll be writing code, but for a UI prototype, especially if it's just CRUD forms etc., you can get it built in a few minutes with no code. Drop a database connection component and set the connection properties, and you'll get live data and properly typed and bound controls on the form too. Compilation takes fractions of a second, so that's not an impediment to design iteration - but you don't need to compile or run to see what it looks like since it's effectively a WYSIWYG form designer.
- dfox 10y agoProblem with Delphi-style RAD tools is that there is huge step in complexity between things that can be done in the designer and these that can not. And this invites particular style of "programming" that consists of searching the internet for existing components and connecting these components together with horrible hacks. It is perfectly possible to write well-structured application in Delphi, but most are not. [Edit: hit reply too soon] Tk model of UI programming does not promote this that much, because causing stuff to happen by writing code is the default way. Also Tk-style approach of writing GUI definitions in code and letting the toolkit to deal with details like positioning (in fact, using HTML for UI is mostly similar) is more productive.
- barrkel 10y agoI don't really want to get into a long-winded discussion, but (a) the GUI definition in Delphi is also code (specifically: there's a declarative syntax for constructing a tree of components with property values); and (b) positioning is handled by the VCL. Typically you specify things like alignments and borders in the designer, and the VCL takes care of keeping things positioned. I really wish HTML was as easy to design with as the VCL designer. Trying to e.g. create vertically centered children is far, far easier in the VCL than in HTML + CSS.
- vintagedave 10y ago> It will be limited to Windows, though, I'll give you that. Rather, it'll be limited to Windows, macOS, iOS and Android. :)