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

RekordType not necessary #1

Closed
grignaak opened this issue Sep 28, 2013 · 3 comments
Closed

RekordType not necessary #1

grignaak opened this issue Sep 28, 2013 · 3 comments

Comments

@grignaak
Copy link

It's limiting to require that Rekord only accepts types that extend/implement RekordType, and I don't see much benefit from it.

I suggest removing the constraints from all classes and methods.

@SamirTalwar
Copy link
Owner

Could you give me an example of how you would like to use it that is currently prohibited by RekordType?

@grignaak
Copy link
Author

I can think of a few use cases.

Rekords would be perfect for metadata about objects--especially those which are from third-party objects. Take for example an HttpRequest, and you want to attach some timing metrics to the request, or some trace messages.

I could use Rekords to make builders for objects ala Make-it-easy. Again, very useful if the type being built was a third-party objects.

Mixing the above, Rekords could be used to map data-base columns to how to build an object. Or they could be used to transform database rows to a HttpResponse where the database columns and the output fields are named differently (shouldn't that be the case anyway?).

@SamirTalwar
Copy link
Owner

Those are all great use cases I hadn't thought about. Feel free to send a pull request. Alternatively, you're welcome to wait for me to do it. I don't think it will take me very long, but I might not get it done this weekend.

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