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

Simple courier backend #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eeasley-coursera
Copy link
Contributor

I've talked to quite a few people about what we value in courier. The recurring themes are schema introspection and some distance from scala (i.e. rather than using straight case classes and tying ourselves even tighter to scala). I'll not recap all the problems/complaints with courier here (unless you'd like me to. Please let me know if that would be valuable.)

As an object of discussion, I'd like to propose the approach typified by the prototype below. Key characteristics of this approach worth reemphasizing are:

  • We opt in in a type-by-type basis with @backend="simple"
  • There is a direct and obvious translation from the courier declaration to idiomatic scala code
  • The resulting class is indeed much simpler (compare WithPrimitives.scala to WithPrimitivesSimple.scala)
  • We still retain the current courier syntax
  • If we were to ever move away from scala, we ought to be able to write a similarly simple codegen for our new language and keep all our existing courier declarations
  • We automagically generate the schema value in a way that doesn't entail writing out lots of boilerplate

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

Successfully merging this pull request may close these issues.

1 participant