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

Proof of concept for breaking module packages per responsibility #7368

Closed
4 tasks
robert-zaremba opened this issue Sep 23, 2020 · 3 comments
Closed
4 tasks
Labels
C:Types T: Dev UX UX for SDK developers (i.e. how to call our code)

Comments

@robert-zaremba
Copy link
Collaborator

Summary

Ref: discussion in discord #core

Problem Definition

The design of having a types package, which contains all types for given module, is a bit odd:

  1. it doesn't encapsulates the ownership and concerns properly
  2. looks hacky

Proposal

Define packages per responsibility (domain): keeper, msg, client, dal (data access layer).

This approach (not having a generic types package) would require from us that we focus more on interfaces: usually we have an interface and interface implementation, and breaking packages by responsibility makes it easier to also have a clear interface separation (as we have with crypto and crypto/sha256 and crypto/md5 ...).


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@robert-zaremba robert-zaremba added T: Dev UX UX for SDK developers (i.e. how to call our code) C:Types labels Sep 23, 2020
@alexanderbez
Copy link
Contributor

ACK. types, common, util, etc...are all anti-patterns and we should avoid them. I wouldn't propose we enforce any exact hierarchy on specific modules, only that they don't use a vanilla generic pkg. This should also be done in by 0.41 as we're gearing up towards a 1.0 stable release hopefully soon.

@aaronc
Copy link
Member

aaronc commented Sep 24, 2020

#7093 and #7122 might be relevant to reorganizing modules. These would allow the keeper interfaces and handler code to be defined upfront in proto files. This could simplify what is actually needed to write a module.

@tac0turtle
Copy link
Member

this is encapsulated in appearing epic. Closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Types T: Dev UX UX for SDK developers (i.e. how to call our code)
Projects
None yet
Development

No branches or pull requests

4 participants