Hi, guys... Just some random thoughts here. Please point out anything I''m overlooking. I was thinking about the popularity of Rails, and I got to thinking: It''s mostly about doing things automatically, and it''s about user interface. So I got to thinking: Could something similar be done in the non-web world, i.e., generate a GUI app rather than a web app? There are some subtleties, of course... HTML is very flexible and lays the burden on the renderer and the layout engine. But the result is fairly ugly. But my basic question is: Is it possible/practical to create a Rails-like tool that will generate fxruby code? And as a side thought, would it be practical to build a CSS-like layer on top of fxruby? All these ideas would involve no changes in fxruby, of course... If you feel like speculating, share your thoughts... Hal
Hal Fulton wrote:> Hi, guys... > > Just some random thoughts here. > > Please point out anything I''m overlooking. > > I was thinking about the popularity of Rails, and I got to > thinking: It''s mostly about doing things automatically, and > it''s about user interface. > > So I got to thinking: Could something similar be done in the > non-web world, i.e., generate a GUI app rather than a web app?It is possible.... In order to make it work seemlessly, you will have to have some automatic binding library do the work for you. The SmallTalk world used ValueHolders that would send events when the property changed allowing both the model and the view to update themselves accordingly. JGoodies followed the same pattern for its binding API. I did some work on a layout engine for Java Swing a while back to provide a simple form oriented layout language. I had a good start, but never finished. However to have automatic layout work (even with a language) it helps to have a working layout manager. That layout manager is responsible for orienting the labels and fields, sizing the form to accomodate different lengths for internationalized text, etc.> > There are some subtleties, of course... HTML is very flexible > and lays the burden on the renderer and the layout engine. > But the result is fairly ugly.For HTML the result is fairly easily tunable within reason. It''ll never look like a native Application though.> > But my basic question is: Is it possible/practical to create > a Rails-like tool that will generate fxruby code?I''m sure it is possible. As to practical, I can''t answer. It would be very practical to have the tool.> > And as a side thought, would it be practical to build a > CSS-like layer on top of fxruby??? Probably not. GUIs are not HTML sheets, having a good layout manager is beneficial though.
On Tue, 22 Mar 2005 09:06:53 -0500, Berin Loritsch <bloritsch@d-haven.org> wrote :> It is possible.... > > In order to make it work seemlessly, you will have to have some > automatic binding library do the work for you. The SmallTalk world > used ValueHolders that would send events when the property changed > allowing both the model and the view to update themselves accordingly. > JGoodies followed the same pattern for its binding API.I''m not yet familiar with ValueHolders or JGoodies, but what you''re describing reminds me a little of how data targets work in FXRuby. Also Joel VanderWerf''s FoxTails extensions.> > I did some work on a layout engine for Java Swing a while back to > provide a simple form oriented layout language. I had a good start, > but never finished. > > However to have automatic layout work (even with a language) it helps > to have a working layout manager. That layout manager is responsible > for orienting the labels and fields, sizing the form to accomodate > different lengths for internationalized text, etc.I''m not sure how to read this last part. Are you implying that FOX doesn''t already have a "working" layout manager? If not, what is it that you feel is missing from FOX''s layout manager choices?> > > > And as a side thought, would it be practical to build a > > CSS-like layer on top of fxruby? > > ?? Probably not. GUIs are not HTML sheets, having a good layout > manager is beneficial though.I''m not sure if this is what Hal was getting at, but I''ve often thought it would be useful to have some kind of external file in which you could specify certain visual aspects of a FOX application more easily. One could argue that the FOX registry already provides a mechanism for setting user preferences (such as which font to use, which color scheme, etc.) but it''s a bit awkward to edit those registry settings and to swap out one entire set of, um, settings for another set of settings (as opposed to the ease of swapping out CSS stylesheets on the fly for a Web site).
lyle@knology.net wrote:> On Tue, 22 Mar 2005 09:06:53 -0500, Berin Loritsch <bloritsch@d-haven.org> > wrote : > > >>It is possible.... >> >>In order to make it work seemlessly, you will have to have some >>automatic binding library do the work for you. The SmallTalk world >>used ValueHolders that would send events when the property changed >>allowing both the model and the view to update themselves accordingly. >>JGoodies followed the same pattern for its binding API. > > > I''m not yet familiar with ValueHolders or JGoodies, but what you''re > describing reminds me a little of how data targets work in FXRuby. Also Joel > VanderWerf''s FoxTails extensions.FoxTails (and observable) are, to me anyway, more ruby-like ways to do what FXDataTarget does. YMMV wildly. I think using the dynamic nature of ruby to generate UI from specification is a good idea. I''m not very familiar with rails, but maybe you mean, for example, widgets that automatically configure themselves to talk to a database? Sounds cool... Btw, FoxTails has an experimental feature to do this with hierarchical (not relational) data. If you have a data structure that is tree-like (or more general actually), you can wire it up to a tree browser.