Comments (2)
Hello again @JivanRoquet ,
This library was made initially to be used in https://github.com/melanchat/melanchat. You could study that for some ideas. @chekoopa might have something to say/show too, but I am not sure if their work is open source.
However, I can't say there is a enforced (or even recommended) way to do anything. Since it is a smallish library, anything past rendering is up to you. How would I prolly do it:
how to handle different views/pages based on routing (e.g. login, settings, posts, dashboard...)
should we use purescript-routing for this? how to integrate it with purescript-flame?
If you mean a single page application, then yes you could use purecript-routing/purecript-routing-duplex/native js apis/whatever and tie it back to this library with events. Other than that, there is nothing built in for routing, tho suggestions and pull requests are always welcome.
how to handle global application state (sort-of the equivalent of a Vuex/Redux "store")
e.g. subscribe/emit are fine for a few items but things become unbearable quickly without a global store
Having a single model is the equivalent to global stores. In my experience (likewise in Elm) it is not worth it to structure your application in components. I'd advise against using subscriptions for this. For example, in melanchat, there is a single model (the IMModel
record) and a single message type (IMMessage
) for the entire /im page, even if the business logic code is broken down into modules (like chat/contacts/history/etc). If you have two code units on a same page that are totally independent, then defining several mount points might make sense (that's how the lazy loaded parts in the /im page [like modals for settings and whatnot] work), but if they have to constantly communicate, I'd suggest trying to set it up as a single model first.
how to handle synchronization between backend API and application state
user authorization/authentication
integration with a full-blown UI library like Foundations, Bootstrap or Bulma
I am not quite sure what you mean by synchronization here, but you can perform IO in the update
function and then change your model in however way you need. Same as with CSS, view
only define markup, you are free to use any kind of styling.
from purescript-flame.
Hello @easafe sorry I've been sidetracked by another project but thank you very much for your extensive comment. I'll definitely look more into that in the coming weeks.
from purescript-flame.
Related Issues (20)
- Move CI to Github Actions HOT 1
- `lazy` with mutliple html composition layers appears to cause runtime errors / other odd behavior HOT 6
- Doctype HOT 2
- Monoid instance for Html a HOT 5
- Make Flame.Types.Html a real type HOT 1
- Internationalisation HOT 6
- Grouping elements in SVG
- No <kbd> tag
- Conditional rendering of fragments
- impossible to execute the ssr example HOT 6
- impossible to build examples HOT 2
- Integrating external element HOT 5
- The `tabindex` attribute does not work due to capitalization HOT 3
- Why not use /\ instead of :> for Tuple operator? HOT 1
- Question about Stale model in `AffUpdate` HOT 1
- Bug when using a function as the type of a message HOT 2
- `ReferenceError: document is not defined` on `spago run` HOT 1
- friction at running examples
- HTML elements with empty array of attributes and/or children
- Trivial ToClassList instance HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-flame.