#:hatching_chick: mojo-new-web-framework

9 messages · Page 1 of 1 (latest)

delicate umbra
#

🐣 mojo-new-web-framework
https://github.com/rd4com/mojo-new-web-framework

Hello, after thinking about web-framework a lot,
and working on it for a while, it seem good enough,
so it is time for a repo 🔥!

hope you gonna like it,
it can already do a lot and seem quite user-friendly

delicate umbra
#

The idea is:
"The back-end and the front-end in the same structs!"

It works with websockets, a Dict is on the server for visitors states,
that way, less complixity 👍

Doing it that way removes the need for creating rest API,
events are sent trough websockets, which is the session,
and server send a dom-tree as json then the browser just render it.

delicate umbra
#

Just updated to 2️⃣4️⃣0️⃣6️⃣ and implemented sessiondata(),
it is a session-wide dictionnary so that components can have "global states",
note that appdata() is app-wide, "global" to all components, and all visitors!

Checkout the screenshot to see how it works, here is an example:
https://github.com/rd4com/mojo-new-web-framework/blob/master/app3.mojo

frosty fox
#

Seems interesting

#

How to use this?

#

Actually I was thinking of making a Web Framework similar to React.
Using Customised Markdown instead of JSX.
And style with custom CSS just like React.

And everything is a functional component just like React.

We can have other Mojo code in the same project like ML code and we can call it in our component.

Everything will compile to WASM so that it can run in the browser at native speed.

What do you think of this?

delicate umbra
nocturne gate
chrome moat
#

Hi @delicate umbra! I've just looked again at mojo-new-web-framework and I'm wondering if it can be used in conjunction with lightbug_http. It would be really good if it could because it would remove the need for any reliance on Python, for the socket related donkey work. How advanced is mojo-new-web-framework and does it replace the original mojo-ui-html package? Does it have all of the widget capabilities of the old framework?