Fun - a new programming language for the realtime web
marcuswest.in
Fun - a new programming language for the realtime web
1–10 of 53 posts
Re: Fun - a new programming language for the realtime web
#2Re: Fun - a new programming language for the realtime web
#3Re: Fun - a new programming language for the realtime web
#4Re: Fun - a new programming language for the realtime web
#5What they are describing is essentially data binding at the language level. The thing to keep in mind is that "out of sight, out of mind" data binding can result in very slow code, but it's a fantastic pattern for UI dev.
Any piece of UI that needs extra care, e.g. a very long list of items, is implemented in javascript with appropriate lazy rendering.
Re: Fun - a new programming language for the realtime web
#6It's interesting how far we've come, no? PHP-based pages were once considered dynamic.
Re: Fun - a new programming language for the realtime web
#7How would you go about reusing code? Could you potentially separate out logic from your template?
I would also like to see how this could be done more unobtrusively. It would also be good to show what the output html looks like after it is compiled to html.
Re: Fun - a new programming language for the realtime web
#8This certainly is an interesting idea. It seems to me though that all of your application logic is jammed into a single file at the presentation layer. This might suffice for very small apps, and that's fine if it is your goal. I can't imagine that you just define all of your logic in one file. How would you go about reusing code? Could you potentially separate out logic from your template? I would also like to see h…
You can declare something akin to a function, which takes arguments and emits HTML. Imagine e.g.
let taskTemplate = template(task) {
task.title
}
for (task in tasks) { taskTemplate(task) }
I'm not decided on syntax yet.You can definitely separate out logic from template this way.
Fun outputs javascript, not HTML - the javascript then builds the DOM.
Re: Fun - a new programming language for the realtime web
#9Some of the ideas such as the state synchronization stuff is neat, but would probably be better suited as part of another framework/template language.