jrubyfx icon indicating copy to clipboard operation
jrubyfx copied to clipboard

Classic OOP style?

Open rubyFeedback opened this issue 3 years ago • 1 comments

If I understand jrubyfx correctly then it is a DSL, where we use verbs to describe what we want to have e. g.:

vbox {
}

And so forth.

Via ruby-gtk I am more used to:

x = Name.new

And then use .add() or << to chain widgets together.

Would it be possible for jrubyfx to also support that style? Where e. g. classes from JavaFX are mapped 1:1? Like: JavaFX::TextArea.new or whatever the name is?

I understand that in ruby everyone loves DSLs but I found them a lot more complicated than classical OOP.

rubyFeedback avatar Aug 01 '22 16:08 rubyFeedback

Yes, that style should be supported as it's the style I prefer. See some of the non-dsl samples in fxml or contrib.

On Mon, Aug 1, 2022, 12:43 PM rubyFeedback @.***> wrote:

If I understand jrubyfx correctly then it is a DSL, where we use verbs to describe what we want to have e. g.:

vbox { }

And so forth.

Via ruby-gtk I am more used to:

x = Name.new

And then use .add() or << to chain widgets together.

Would it be possible for jrubyfx to also support that style? Where e. g. classes from JavaFX are mapped 1:1? Like: JavaFX::TextArea.new or whatever the name is?

I understand that in ruby everyone loves DSLs but I found them a lot more complicated than classical OOP.

— Reply to this email directly, view it on GitHub https://github.com/jruby/jrubyfx/issues/131, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEM6QAFR24GNUXUDLYTRQDVW75DRANCNFSM55IGDLJA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

byteit101 avatar Aug 01 '22 16:08 byteit101