Comments (10)
okay it's cool. I figured it out.
from fn-fx.
I started working on supporting nested properties (https://github.com/fn-fx/fn-fx/tree/nested_properties), I have a solution which kind of resembles hiccup, but I'm not very happy with it. I'm looking now for another solution. Have you done something in the direction of supporting hiccup syntax?
from fn-fx.
from fn-fx.
What's the reason for this change? Where would be the differences to what we have right now?
from fn-fx.
from fn-fx.
from fn-fx.
What I needed was the ability to create encapsulated components with local state and external hooks, something similar to react.
from fn-fx.
from fn-fx.
To be honest I don't like it. :) I feel like it's adding a different abstraction layer on top of JavaFX.
With regard to local state, I worked with React and stateful components are tricky. The good thing is they encapsulate something and allows you to build more sophisticated building blocks. The problem is you sometimes find out later that you need that piece of information which was initially hidden as local state. In clojurescript, Om's solution is to keep the entire state in a single global atom and declare for each component what data it needs in form of a query, and Reagent works with binding atoms to places where the data is needed.
I don't think the hiccup syntax is what's missing from fn-fx, and it's certainly not related to state management. (I don't quite like that in the current syntax instantiating a component uses dash-notation, while the component itself is CamelCase, but that's rather a cosmetic thing). It may be nice, maybe more familiar, but I think it's more of a surface thing.
I would rather change the event system. It may scale, as @halgari says, but I don't like the way it's coupled with the state: you always get the entire state as a function argument, and must return the updated state. I feel that here is where a limitation starts to kick in. I would rather let listeners be simple functions and manage state differently, maybe by adopting one of the models from the Clojurescript world.
from fn-fx.
I just stumbled upon a limitation of the event handling in fn-fx: key events in javafx are handled by properties whose values are event handlers. This means the :listen/on-key-pressed
will not work, as it registers a listener to the onKeyPressed
property, whereas we need to set the value of the property to the listener function.
from fn-fx.
Related Issues (20)
- CompilerException org.reflections.ReflectionsException: Couldn't find subtypes of Object. HOT 4
- Standardise how examples are run
- Auto generate and deploy API docs from master HOT 3
- Use HTML as frontend HOT 2
- Direct support for loading FXML files HOT 3
- Support for WebView HOT 2
- Special handling of :shown property prevents on-showing/on-shown events being triggered.
- Doesn't seem to work with Ubuntu out of the box HOT 14
- Remove sudo:false from TravisCI config file HOT 1
- fn-fx doesn't work on OpenJDK 1.8 HOT 4
- UI not updating even though the model differs
- How do you get the selected value from a choice-box HOT 1
- Endless changeloop for sliders HOT 6
- bind functionality HOT 2
- table-cell with button
- (ui/text :fill (ui/color ...)) does not set fill property to said color
- lein uberjar gives an error ClassNotFoundException HOT 1
- Event stop propagation
- Unable to open DISPLAY HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fn-fx.