Monorepo for Tangled tangled.org
777
fork

Configure Feed

Select the types of activity you want to include in your feed.

wip: appview/{service,web}: service layer #230

open opened by boltless.me targeting master from sl/uvpzuszrulvq

Obviously file naming of appview/web/handler/*.go files are directly against to go convention. Though I think flattening all handler files can significantly reduce the effort involved in file naming and structuring. We are already grouping core services by domains, and doing same for web handers is just over-complicating.

- appview/web/routes.go : define all web page routes
- appview/web/middleware.go : define middlewares related to web routes
- appview/web/handler/*.go : http handlers, named as path pattern
- appview/service/* : domain-level services

Each handlers are pure by receiving all required dependencies as parameters. Ideally we should not pass base dependencies like db, but that's how it works for now.

Now we can test:

  • http handlers with mocked services/renderer
  • internal service logic without http handlers

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m5jyyj76xa22
Diff #0

No differences found between the selected revisions.

History

1 round 0 comments
sign up or login to add to the discussion
boltless.me submitted #0
patch application failed: error: No valid patches in input (allow with "--allow-empty")
expand 0 comments