|
|
|
|
|
by proc0
3791 days ago
|
|
This is great. From my experience a lot of the pain in UI comes from thinking the backend model will just plug into the front-end model. It is evident that UI models need to have a layer for processing the data unless you are coding a trivial app, and I have successfully done this by inserting a view-model layer, which translates back and forth between the model and view's data. This I guess becomes the State in SAM. I think separating presentation from content logic is still a good idea, so HTML should stay away from any kind of JS, which is where I think React.js is going in the wrong direction. SAM seems to offer a way to do reactive views without the need to mix presentation and content logic. As far as using pure functions and declarative programming, this is also the right direction for UI. Web apps are streams of data and actions, and functional paradigm handles streams orders of magnitude better than old-school imperative functions with side-effects. Good luck selling this idea to companies that use enterprise software with Java and that think process will fix all your problems. |
|