Skins vs FXML #275
Replies: 5 comments 7 replies
-
|
FXML is very very slow. It uses reflection to create the actual views. In some cases, heavy uses of FXML could cause some serious performance issues. Now think about a GUI framework, controls, widgets and so on are to be used in large quantities (not all the time, but a big UI is not unusual), they need to be created and disposed fast, FXML is not the best idea. |
Beta Was this translation helpful? Give feedback.
-
|
What you say make sense, in particular for the basic controls (I mean single elements like MFXButtons and even MFXTables) because they may actually be used to build a UI where performance is critical. |
Beta Was this translation helpful? Give feedback.
-
|
It's true for components like table views, but for buttons FXML could actually be fine since there's just one element Dialogs are definitely a no go for FXML, especially common ones that need to be used frequently. In MaterialFX you can do it though. MFXStageDialog allows you to use an FXML view as the content |
Beta Was this translation helpful? Give feedback.
-
I am not questioning the separation of MFXStageDialog and content, that is fine, and it is a different story. I am talking about the content of the dialogs provided by MaterialFX. Take MFXTableView/MFXFilterDialog as an example. In order to make even simple changes to the UI I have to deal with the code. If they used FXML instead, I could just tweak those with no, I am sure, noticeable performance impact.
I think it is for the dialogs provided by the framework. |
Beta Was this translation helpful? Give feedback.
-
|
Please see #255 , it should be enough to get the use case. If we had the FMXL for TableView and MFXFilterDialog we could already work around some limitations applying the styles directly in he FXML instead of creating a new table view just to create a new skin which would be a copy of the MaterialFX one. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'd be interested to know what are the design decisions for the Skinning mechanism in MaterialFX? in particular, why there is no use instead of FXML?
The current implementation put a lot of UI and controlling stuff in the Skin classes which is something I find not very clean nor handy. To tell the true, even new languages like dart/flutter seem to take this route, so you are not alone.
However from a user perspective (a developer that wants to develop an app on top of the framework) I found quite difficult to understand the behaviour of the complex controls. And above all, even to just reshape a dialog you need to write code, while instead it would be super easy with FXML.
many thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions