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

Update tutorial for new service architecture #1984

Closed
chris48s opened this issue Aug 27, 2018 · 11 comments
Closed

Update tutorial for new service architecture #1984

chris48s opened this issue Aug 27, 2018 · 11 comments
Assignees
Labels
developer-experience Dev tooling, test framework, and CI documentation Developer and end-user documentation

Comments

@chris48s
Copy link
Member

Tutorial should cover how to write a service that extends BaseService/BaseJsonService

@chris48s chris48s added the developer-experience Dev tooling, test framework, and CI label Aug 27, 2018
@chris48s chris48s self-assigned this Aug 27, 2018
@paulmelnikow
Copy link
Member

@niccokunzmann who wrote the original tutorial has offered to help with this!

Any thoughts on how the work could be divided?

@chris48s
Copy link
Member Author

chris48s commented Aug 27, 2018

OK. Having a quick scan over the docs, the testing docs also need some work. Maybe as a starting point, one of us can take the tutorial and the other one can do the service test docs? Code review provides an opportunity to check we're covering everything. @niccokunzmann - are you most keen to work on the tutorial? The perspective of someone who is a bit further removed might be really valuable here. If so I will take the test docs.

The most important first step is to get the tutorial to a stage where the docs reflect reality. Maybe we don't have to cover all of these for an opening gambit, but I do have a few topics in mind that we should cover in the docs:

  • fetch()/render() pattern
  • Contract by design, writing a validator
  • When to use static/instance methods
  • Available helper functions in /lib (maybe this is its own docs section to cover properly, but we should touch on this in the tutorial)
  • Inheritance/service 'families'
  • Static examples

do you have anything else in mind that should go on that list @paulmelnikow ?

I'll probably also take the opportunity to read over the rest of the docs and see if there's anything else that needs a 'refresh' :)

@niccokunzmann
Copy link
Contributor

niccokunzmann commented Aug 27, 2018

From my perspective there is not "one" tutorial. We have these service families:

  • JSON
  • raw data
  • in the future possibly also XML (I think, it works like the JSON one with XML to JSON conversion)

So, the tutorial would best cover what is most needed and common to all of them first. Then, there are differences, each getting a sub-chapter. I like complete code examples that would work if you copy them in. Is there a service which would be good to take as an example from your point of view?

@chris48s
Copy link
Member Author

In principle I agree with that. In reality, I think all of the services we currently have an example of extend BaseJsonService, so I'd be happy to start off with that and we can evolve the docs as we port more badges that do something different.

Just to be really clear on this: are you going to work on TUTORIAL.md ?

@niccokunzmann
Copy link
Contributor

niccokunzmann commented Aug 27, 2018 via email

@chris48s
Copy link
Member Author

OK cheers. I will aim to work on updating the tutorial myself in the next few days. Feel free to contribute your thoughts either in review or at a later date. Documentation can always be extended and improved over time.

@paulmelnikow
Copy link
Member

Two things come to mind:

  • An overview of the design: in a few sentences, how does the service work? How does a service get registered, executed, tested? How is the frontend generated? Try to take the magic out of it.
  • Advice on porting existing services, and on refactoring

And a third, though it's not about the service rewrite:

  • A description of our code review process

@chris48s chris48s added the documentation Developer and end-user documentation label Aug 29, 2018
@chris48s
Copy link
Member Author

chris48s commented Sep 5, 2018

tutorial updated in #2042

Next jobs:

  • Update/refresh the service testing docs
  • Add docs on how to port legacy services

I think I'm going to defer adding the docs on service families just now given the discussion we're having in #2031 given we may want to change the advised way of doing this.

@techtonik
Copy link
Contributor

Add docs on how to port legacy services

I am very much interested to read these docs for #2420. =) Maybe start with TUTORIAL.md will be enough.

@paulmelnikow
Copy link
Member

I drafted some quick ones: #2429.

@paulmelnikow
Copy link
Member

Think this can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Dev tooling, test framework, and CI documentation Developer and end-user documentation
Projects
None yet
Development

No branches or pull requests

4 participants