Scenario codes regarding multiple usage approaches #59
Replies: 1 comment
-
@slovnicki Thanks for raising this question. The short answer is "Yes," it's beneficial to see variants of scenario implementation as long as the reason for each variation is provided. From a usability standpoint, the issue of having multiple ways of implementing the same scenario is about how easy the API user can make those choices and how reversible those choices are. The goal of this project does put an emphasis on high-level APIs that give the majority of Flutter users what they need for navigation and routing at a potential expense of flexibility and power, which was the design goal of Navigator 2.0 and Router. Showing the variants of scenario implementations can help us assess a few aspects of API usability we're going to look at in the heuristic evaluation:
|
Beta Was this translation helpful? Give feedback.
-
I'm wondering how can we best depict and showcase various usage approaches for a package which has many. Of course, it would not be wise to randomly use different usage in each scenario as this may confuse research participants.
For example, beamer has many ways in which it can be used, depending on developer needs. I will point out 2 major differences;
locationBuilder
Difference in
locationBuilder
Each
BeamerRouterDelegate
must receive alocationBuilder
, but it can be provided in different ways;Simple
Using the
SimpleLocationBuilder
does not require to define customBeamLocation
s and below setup is sufficient for a functioning application.Almost Fully Custom
Defining custom
BeamLocation
s, but letting beamer decide which to choose.Fully Custom
Defining custom
BeamLocation
s and deciding which to choose by examining the "root state"Difference in Navigating
Navigating through pages can be done in a declarative or imperative manner, where imperative API will call declarative
update
under the hood.Declarative
Updating current location state
Updating delegate's state (
locationBuilder
gets executed)Imperative
Most commonly used
Many more...
Why Such Diversity?
The reason for this diversity is that users have different needs and expectations of an API. Obviously, there's no way to manually control a page stack in
SimpleLocationBuilder
as one would do in customBeamLocation
'spagesBuilder
, but many users simply don't have a need to do it and are satisfied with default page stacking.nav2-usability/scenario_code
I submitted most of the scenarios using the
SimpleLocationBuilder
andbeamToNamed
as it was sufficient for requirements. On one hand, I'm happy with that because it's a very simple way to get users going, but on the other hand I'm sad that participant's won't see "what Pages API is really about" if they don't seepagesBuilder
. I did use "full beamer" in one scenario - skipping stacks. Although still not necessary, but skipping stacks is in my opinion the core example for Pages API so I went that way.My Question
My question to everyone is:
Should/Can we put more than 1 scenario code for a package?
(if there's a situation where many usages are possible)
I don't want this to be extra work for anyone and these additional examples don't need to be studied thoroughly, but just be there if someone asks "Can I do this or that?". It may seem impossible looking just at a single usage, but very possible in others.
Beta Was this translation helpful? Give feedback.
All reactions