You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of writing this issue, the view function from the user has the signature:
view::Model->Text
Platform is executing it as-is, and rendering it. The next step would be to use some other type like Html to allow structured rendering, but views could be used also for GET endpoints for backends:
Essentially, a view is a way of seeing the state of the application in a specific way.
Given that in NeoHaskell the state is (conceptually) a single record, it makes sense to allow defining views that are executed on demand.
Right now the demand is handled by the platform automatically (when a new frame has to be rendered, it executes the function and renders it using a render :: Text -> IO () function).
This means that we have two functions that work together for the sake of the proper "viewing" of the model:
view::Model->Textrender::Text->IO()
We should allow to provide, for example, an HTTP server view adapter, so the user can write a view function that outputs JSON, and the HTTP server returns it back.
This should be extendable to anything that can query data: GRPC, IPC, sockets, whatever
The text was updated successfully, but these errors were encountered:
At the time of writing this issue, the view function from the user has the signature:
Platform is executing it as-is, and rendering it. The next step would be to use some other type like
Html
to allow structured rendering, but views could be used also for GET endpoints for backends:Essentially, a view is a way of seeing the state of the application in a specific way.
Given that in NeoHaskell the state is (conceptually) a single record, it makes sense to allow defining views that are executed on demand.
Right now the demand is handled by the platform automatically (when a new frame has to be rendered, it executes the function and renders it using a
render :: Text -> IO ()
function).This means that we have two functions that work together for the sake of the proper "viewing" of the model:
We should allow to provide, for example, an HTTP server view adapter, so the user can write a view function that outputs JSON, and the HTTP server returns it back.
This should be extendable to anything that can query data: GRPC, IPC, sockets, whatever
The text was updated successfully, but these errors were encountered: