These are chat archives for jdubray/sam

6th
Apr 2018
Jean-Jacques Dubray
@jdubray
Apr 06 2018 03:25
I like this tweet because it introduces yet another dimension on top of State Representation. We all agree with a somewhat global state and due to small form factor, it could be another layer that creates projections of the state representation. These projections do not modify the application state.
I believe that can be applied to larger form factors too. It's just a question of proportion. This may unlock new types of UX, less navigational and more projectional.
VaseJS
@VaseJS
Apr 06 2018 12:23
what is a “projectional” UX?
Victor Noël
@victornoel
Apr 06 2018 12:24
re-read the discussion :) it's not something formal
VaseJS
@VaseJS
Apr 06 2018 12:32
ok, re-read and still don’t understand what JJ means by “projectional” UX. You guys are talking in code (pun intended). Can someone break it down for those of us not as high level as everyone else. It sounds like there is an issue with navigation on some level and how it releates/dictates state. but with every other word being “state” it can confusing at times for me. or the conversation can simple be too advanced for me
Victor Noël
@victornoel
Apr 06 2018 12:33
It refers to "Web devs will benefit a lot writing a 3D game to understand that navigation is just camera movements and objects activations."
it's not something formal again, the word "projectional" is a metaphor for this kind of things
that's how I understand it :)
I think the difference between navigational and projectional ("less navigational and more projectional") is that navigational assumes some kind of action that modify the state
while projectional is just about changing the point of view on the state
VaseJS
@VaseJS
Apr 06 2018 12:35
formal or not, i still don’t understand what “projectional” means. I only understand that i would be different than what we have as a standard navigation. It sounds like navigation based on context (like a context menu)
That makes sense in a 3D environment, but how can that be applied to a 2d web environment
Victor Noël
@victornoel
Apr 06 2018 12:39
hmm, maybe we are not talking about the same thing :)
I don't know how to answer your questions
devin ivy
@devinivy
Apr 06 2018 12:42
the way i understand "projection" in software development is based upon how it's used in mathematics. in software terms, it's roughly an "encoding." you can say that the view encodes, or represents, the application state.
or, "the view is a projection of the application state"
what it implies (to me) is that there's some factoring that makes the projection explicit, essentially talking about functional views :view = f(model). putting it all together, i take the tweet to mean that view = f(model)is a good way to think about navigation too, where navigation is part of model!
VaseJS
@VaseJS
Apr 06 2018 12:53
@victornoel i’m trying to figure out what is being talked about :smile:
lol
I guess without an example to reference while the conversation is going in, I’m having a hard time following. I still don’t complete have SAM understood in my brain. Just a few parts that need clarification for me
Victor Noël
@victornoel
Apr 06 2018 12:55
it's not really related to SAM, but it helps if you tried to implement it, because it's while doing it that you understand some aspects of state management.
VaseJS
@VaseJS
Apr 06 2018 12:56
that is likely where my confusion comes in then. I’m asking myself, “how does SAM fit into this?"
Victor Noël
@victornoel
Apr 06 2018 12:56
hehe
VaseJS
@VaseJS
Apr 06 2018 12:59
so if the view is a projection of the mode like the camera angle on a object in a video game (lets say Mario), how is project different than navigation? I guess there is an direct and implied intent? Navigation being direct but projectional being implied? Not sure if implied is the best wording here. Trying to see how/what the view is projecting vs how its currently done with standard navigation?
Victor Noël
@victornoel
Apr 06 2018 12:59
I think it is mainly related to the whole idea of having a view derived from the state representation itself derived from the model. In SAM (and most state management approaches), the state representation is different depending on where (in terms of navigation) you are in the application (which page). So there is some kind of coupling between navigation-related-to-view and navigation-related-to-state.
The idea of talking of projectional, for me, is that you just see the navigation and the view as a function of the state representation, but the navigation is not present in the state itself
Daniel Neveux
@dagatsoin
Apr 06 2018 12:59

I think it is mainly related to the whole idea of having a view derived from the state

+1

VaseJS
@VaseJS
Apr 06 2018 13:00
so view would be like a content menu? Depending on where I am in the app, the navigation would change based on that?
or the view would change
Victor Noël
@victornoel
Apr 06 2018 13:01
it's an architectural principle, it's not an element in the application… a projection is a page for example
VaseJS
@VaseJS
Apr 06 2018 13:01
navigation changing based on state?
Victor Noël
@victornoel
Apr 06 2018 13:01
a projection is a view
the state of navigation would be managed separately from the state of the application
devin ivy
@devinivy
Apr 06 2018 13:03
i think it's confusing because of the gaming analogy. their projections are literal projections from 3d -> 2d, but we don't particularly care about that.
the "stateful" part of the gaming statement is that the camera's position is a part of the game's state.
the view (what the user sees) is a function of that position.
for web app development, our "camera position" might be a piece of the app's state representation that indicates which page we're on. and the view is a function of that, just like it's a function of any other piece of state. in other words: navigation can be seen as "just another" bit of state in your application, nothing special.
Fred Daoud
@foxdonut
Apr 06 2018 13:11
@devinivy you have a real knack :) :100:
devin ivy
@devinivy
Apr 06 2018 13:13
cheers, fred! :beers: it's fun trying to figure out what a 140 character tweet really means :)
VaseJS
@VaseJS
Apr 06 2018 13:14
@devinivy i would say that’s where my confusion comes from. 3d to 2d is very different
Riccardo
@riccardoferretti
Apr 06 2018 13:16
the way I was interpreting it is that in webapps navigation is done via discrete steps that "interrupt" the flow. This is in part due to the early days of the web: when I click on a link I leave the current page to go to another one. In a game, camera movements are continuous and there is not such strong separation - and you adjust how much state of the game you hold dynamically. For me the "navigation equivalent" in a game happens when you finish a level (think super mario) and "navigate" to the next one
in SPA the concept of navigation is blurred, not quite what it used to be, but also not as flexible as the one of a game
Victor Noël
@victornoel
Apr 06 2018 13:19
nice point
Riccardo
@riccardoferretti
Apr 06 2018 13:19
for me an interesting example is google maps. you are not really navigating when you move around the map, yet the URL always changes
imo the only reason for the url there is to restore the state shall you decide to go back there (deep link)
Janne Siera
@jannesiera
Apr 06 2018 13:24
@devinivy completely agree with your analysis. State is just everything that (might) change in any given execution of your program. Camera position / url is one of those. What's tripping people up is that they don't realize those things are part of their state. SAM, to me, is all about making the implicit state that is already in your applications more explicit, so you can reason better about how that state (might) change(s).

@riccardoferretti games can both be implemented both discrete or continuous, and often mix both. It always seems easier to reason about it in a discrete manner though (as in: 60 discrete steps per second). I would argue that continuous optimizations add complexity but are necessary because of the limitations of rendering engines and processing power on machines for high-end games.

I can definitely get behind your other comments though.

devin ivy
@devinivy
Apr 06 2018 13:46
@jannesiera yes, i think we're on the same page! :thumbsup:
Jean-Jacques Dubray
@jdubray
Apr 06 2018 14:48
Yes, for me there
Is this interesting decoupling that can be developed between the application state and the user point of view of the application state.
As mentioned, what has changed.
Jean-Jacques Dubray
@jdubray
Apr 06 2018 14:53
Is that the amount of data we can bring to the client is much bigger than what can be view (mobile, voice but also Web)