Skip to content

Refactor Code and Docs "Server" Verbiage #720

Closed

Description

@Archmonger

Current Situation

There are a lot of locations in the source & docs where we currently call things "server", when they really should be called "web frameworks"

Proposed Actions

Rename functions, comments, and docs while keeping these guidelines in mind

  • Web Framework = FastAPI, Flask, Sanic, Tornado, Django
  • Web Server = Gunicorn, Uvicorn, Hypercorn, Daphne, Built-in development servers, etc
  • Reactive Component Framework = IDOM
    • It's an easier way to distinguish us rather than the more literal "we are a web framework built on-top of web frameworks"
  • Views = Built-ins that assist in plopping something visual onto the page
  • Components = We are already pretty good about the usage of "component", no need for change

Activity

  1. added
    type-docsAbout changes and updates to documentation
    priority-3-lowMay be resolved one any timeline.
    type-refactorAbout improving code structure.
    on Mar 28, 2022
  2. added this to the milestone on Mar 28, 2022
  3. rmorshea commented on Mar 28, 2022

    @rmorshea
    Collaborator

    I basically agree and was thinking about this in my last PR. Only difference is that maybe we could use "Web Application" instead of "Web Framework". Framework is a bit generic - in principle one can have frameworks for building both apps and servers. With that I'd probably rename idom.server to idom.app

  4. Archmonger commented on Mar 28, 2022

    @Archmonger
    ContributorAuthor

    "web application" is rough. Although it makes sense, that namespace is currently getting used up by Progressive Web Applications, so it ends up feeling incorrectly labeled.

  5. Archmonger commented on Mar 28, 2022

    @Archmonger
    ContributorAuthor

    I haven't given much thought on what we could rename idom.server to.

    Maybe idom.compat?

    I'm currently on vacation, I'll give more thought to this next week.

  6. Archmonger commented on Apr 4, 2022

    @Archmonger
    ContributorAuthor

    I'll likely update this list if I think of more. But this is what I have for now:

    1. idom.compat
    2. idom.compatbility
    3. idom.framework
    4. idom.support
    5. idom.backend
    6. idom.conf
    7. idom.app
  7. rmorshea commented on Apr 4, 2022

    @rmorshea
    Collaborator

    I'm thinking idom.app might be fine. Whenever you construct something like flask.Flask or sanic.Sanic all the examples assign to an app variable.

  8. rmorshea commented on Apr 4, 2022

    @rmorshea
    Collaborator

    We should be able to use the same language as these app frameworks do in their documentation.

  9. Archmonger commented on Apr 4, 2022

    @Archmonger
    ContributorAuthor

    In that context, app is referring to the WSGI/ASGI application. But in our case, the end user isn't really directly interfacing with the WSGI/ASGI app through IDOM.

    At the same time, I'm personally not a big fan of any of the options I posted.

    I'd think of it from a few steps back. What is it that the module currently trying to do, and what might it do in the future? From my perspective:

    • Provide helper functions specific limited to our supported web frameworks
    • Provide ability to launch on a supported web framework
    • Provide scoped access to WS/HTTP contexts/requests
    • Future: Provide in-depth pre-developed framework features/hooks (ex. django-idom#33)
    • Future: Provide embedding/runtime utilities

    This module really sounds like a compatibility layer to me.

  10. rmorshea commented on Apr 4, 2022

    @rmorshea
    Collaborator

    Besides idom.app I'd say idom.compat would be my next pick.

  11. rmorshea commented on Apr 4, 2022

    @rmorshea
    Collaborator

    Actually, didn't see idom.backend - that one's pretty good.

  12. Archmonger commented on Apr 4, 2022

    @Archmonger
    ContributorAuthor

    Agreed. Semantically, idom.backend does make a lot of sense. I'll sit on this one for a bit and see if I think of any other options.

  13. modified the milestones: , 1.0 on Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-3-lowMay be resolved one any timeline.type-docsAbout changes and updates to documentationtype-refactorAbout improving code structure.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions