Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibsBuilder design #442

Closed
AllanWang opened this issue Sep 15, 2019 · 3 comments
Closed

LibsBuilder design #442

AllanWang opened this issue Sep 15, 2019 · 3 comments
Assignees

Comments

@AllanWang
Copy link
Contributor

After migrating to post 7.0.0, I have a lot of questions on the design.

Functions like extracting libs from fields seem to be internal now, and wrapped in LibsBuilder.

While there is a major rewrite, lots of functions within LibsBuilder look like legacy code. Is there a reason to add the with functions when most of the configs are already public and mutable?

Getting the items also seems to be done with adapter(Context), which returns a fast adapter. Why not return the list of models instead? People may already have fast adapter, or may want to attach other items around the adapter. This function adds unnecessary coupling to the root adapter.

@mikepenz
Copy link
Owner

yeah those with functions are mainly legacy code and face as backwards compatbility tools for java users.

You can also use directly the Libs class to get the data so that cas eis covered

@mikepenz mikepenz self-assigned this Oct 18, 2019
@AllanWang
Copy link
Contributor Author

I'll take a look again, but I think something was missing that prevented me from updating. I needed a function that takes in the r class and returned the lib models.

@AllanWang
Copy link
Contributor Author

I guess the question was why it was kept here, whereas in FastAdapter things were fully refactored. As for the data models, Libs does fulfill my needs. For the sake of compatibility I guess there's no need to change it, but I believe returning fast adapter item lists would be better in the future than returning a new fast adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants