This is the first step towards a simple to use API that allows for the user to declare its composable functions and not need to do anything else.
With this, any composable function can be registered via:
val myComponentLibrary = ComponentLibrary("namespace")
.add("myComponent") @Composable { MyComponent(it) }
There's no need for manual deserialization. As long as the Composable Function has been annotated with @ServerDrivenComponent, the code required for deserialization will be automatically generated.
The auto deserialization is still not complete. We still need to:
Deserialize entities that are not in the root of the properties map.
Be capable of deserializing more than one level at any entity.
Deserialize Arrays.
Deserialize Maps.
Fix every "fixme" and "todo" in the code.
Separate the publications of "nimbus-compose" and "nimbus-processor"
Document this feature. Both the API and .md files.
The code quality of this feature is not best right now. I still need to go over it and make it better.
Fix to Slow view updates
One reason for slow performance on view updates was the use of Jackson for deserializing the property map. But it was not the only one.
For some reason, view updates were super-complex in Nimbus Compose and it was causing big performance issues. I just replaced it with a simple observer. I'm not sure if my approach was the best, but it works for now. We need to revisit this in the future.
Instead of deleting the code, I just commented it out. It will be easier to revisit this problem if the original code is still there.
Other
Added a TextInput component to the sample to help test the efficiency of view updates.
Upgraded versions of dependencies and made all the necessary changes.
Fixed the bug where Nimbus Compose looked into the config passed to it instead of getting the properties from Nimbus Core. Example: nimbus.logger could be null, even though the logger is set by Nimbus Core if none is provided in the config.
Auto component deserialization
This is the first step towards a simple to use API that allows for the user to declare its composable functions and not need to do anything else.
With this, any composable function can be registered via:
There's no need for manual deserialization. As long as the Composable Function has been annotated with
@ServerDrivenComponent
, the code required for deserialization will be automatically generated.The auto deserialization is still not complete. We still need to:
Fix to Slow view updates
One reason for slow performance on view updates was the use of Jackson for deserializing the property map. But it was not the only one.
For some reason, view updates were super-complex in Nimbus Compose and it was causing big performance issues. I just replaced it with a simple observer. I'm not sure if my approach was the best, but it works for now. We need to revisit this in the future.
Instead of deleting the code, I just commented it out. It will be easier to revisit this problem if the original code is still there.
Other
nimbus.logger
could be null, even though the logger is set by Nimbus Core if none is provided in the config.