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

Common methods should be defined via interface #416

Closed
nbartels opened this issue Apr 7, 2016 · 0 comments
Closed

Common methods should be defined via interface #416

nbartels opened this issue Apr 7, 2016 · 0 comments

Comments

@nbartels
Copy link
Contributor

nbartels commented Apr 7, 2016

You can check the GWT Framework as inspiration. The Button object for example implements a lot of interfaces to allow the developer to work on a more abstract base.

http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/Button.html

So the interface work as marker for special functions and provide a unified method name to access this function.

For example:
The HasVisibility interface let the developer now, that the visibility of this component can be changed and the methods to do this are isVisible and setVisible(boolean).

Transforming this to RestFB we should provide interfaces like HasCreatedTime or HasComments. Objects with a createdTime field or a comments field can implement this interfaces. We have to provide these methods already but developers have to check the method list of an object. With the interface this is much faster accomplished because a fast check in the javadoc provides everything needed. Check the Button example.

@nbartels nbartels added this to the 2.X milestone Jan 13, 2017
@nbartels nbartels modified the milestones: 2.X, 3.X Nov 24, 2019
@nbartels nbartels modified the milestones: 3.X, 3.8.0 Jun 12, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant