This week I have had less time for SuperSLiM than I imagined, but with the time I've had, I have continued work on the public API and the internal state for the library. Much of the work has been pen and paper documentation and modelling, but much of an example of how to write a data driven app with SuperSLiM has been written as a by-product.
For the public API I've settled on using a graph as a proxy to control the output of the library. In the previous post I discussed the section graph and its interaction with the traditional RecyclerView adapter. In the end I decided to go ahead with embedding the adapter into the section graph, which I believe makes working with RecyclerView and SuperSLiM quite simple. Now you simply add, remove, and update sections and items in the graph. There is no need to turn the graph structure into the sequence of views that RecyclerView requires, SuperSLiM does it all in the background.
The step after working on the changes to the public API was to revisit the design for the internal state of the library. In previous implementations a simple graph of the section structure was maintained by recording state from views encountered during layout passes. SuperSLiM now pulls the complete graph structure from the adapter, and doesn't have to interrogate views just to build the current graph section for every layout pass.
During the next week I am continuing work on the internal section graph. There are changes for the internal SLM API that need to be implemented, and I need to update the LinearSLM to reflect this.
If you want to help support SuperSLiM development, please consider visiting the patreon campaign page and become a patron by pledging a small donation. Thanks.
For the public API I've settled on using a graph as a proxy to control the output of the library. In the previous post I discussed the section graph and its interaction with the traditional RecyclerView adapter. In the end I decided to go ahead with embedding the adapter into the section graph, which I believe makes working with RecyclerView and SuperSLiM quite simple. Now you simply add, remove, and update sections and items in the graph. There is no need to turn the graph structure into the sequence of views that RecyclerView requires, SuperSLiM does it all in the background.
The step after working on the changes to the public API was to revisit the design for the internal state of the library. In previous implementations a simple graph of the section structure was maintained by recording state from views encountered during layout passes. SuperSLiM now pulls the complete graph structure from the adapter, and doesn't have to interrogate views just to build the current graph section for every layout pass.
During the next week I am continuing work on the internal section graph. There are changes for the internal SLM API that need to be implemented, and I need to update the LinearSLM to reflect this.
If you want to help support SuperSLiM development, please consider visiting the patreon campaign page and become a patron by pledging a small donation. Thanks.
Comments
Post a Comment