Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Architecture questions #8

Open
ghedwards opened this issue Mar 6, 2021 · 2 comments
Open

Architecture questions #8

ghedwards opened this issue Mar 6, 2021 · 2 comments

Comments

@ghedwards
Copy link

Hi, I think this project is great and I'm learning a lot from it, I wasn't sure how to reach out to you with questions other than github issues, so here goes.

I'm still learning about flutter and provider / riverpod and I was looking at appconfig.dart and noticed you directly accessing AuthenticationService, is this ideal or would it be better to do this via the authenticationServiceProvider ?

Cheers
Gareth.

@ghedwards
Copy link
Author

Also, have you thought about buildServerUrl taking care of the EndpointPath itself, ie. pass _endpoint to buildServerUrl. This way if there is a change in how the URL is constructed it can be done in one place. I was working on a similar API using an existing project of mine because I had some trouble with the devlog python app.

image

@zgoda
Copy link
Owner

zgoda commented Mar 7, 2021

This is my 1st project with Riverpod so I don't know what's "right" and what's "wrong". Heck, it's my 1st project in Flutter at all. I tried to compile some sort of "architecture" that's not totally broken and is appropriate for the application of this size. I'm coming from Python where "practicality beats purity" so the direct use of service object may not be the cleanest option but is practical - the service is used only to validate connection options and credentials and once validation succeeds, the final service is accessed only by means of provider and this instance is discarded.

To be fair, I'm not a mobile app developer, I'm working with Python and sometimes Javascript and I was just curious about Flutter because I liked Dart. So if you're serious about learning good practices I may not be a best source of inspiration. ;)

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

No branches or pull requests

2 participants