Settings

Theme

Real-Time Web Apps with Zero Lines of JavaScript

engineering.instawork.com

33 points by adamstep · 15 comments

Reader

6 threads
whereareyouwow

Wow Adam! I owe you a drink! I have been looking for something like intercooler + sse / mercure. What a great example of NoJS!

I thought I was stuck with just amp (https://amp.dev) as an option. Please ignore the nitpickers saying it is technically not zero lines of js.

If the app can be developed without writing js, it can be considered nojs. The list here (http://markapp.io) is based on that principle.

Please please keep on chronicling your adventures. So many questions but I will take the weekend to explore properly.

  • adamstepOP

    I totally agree, the benefit of NoJS comes from not needing to write custom code in order to implement a feature. Thanks for the link to that list of other NoJS libraries. If you have any questions about Intercooler, please leave a comment on the post.

DoctorPenguin

So you use JavaScript libraries to avoid writing JavaScript to use a JavaScript browser API?

  • adamstepOP

    That's right. By including the Intercooler.js library, we don't need to write custom JS when developing features in our web app. We can take full advantage of JS APIs like AJAX and EventSource by only adding declarative HTML attributes to our markup.

  • vearwhershuh

    That's exactly right.

    It's also pretty hilarious.

    I said a while ago: "The irony is that I had to learn a lot of javascript in order to never have to write any javascript again."

james_s_tayler

I think this kind of approach is really underrated. I remember from playing around with Rails that you can do very similar things quite easily.

It's not a popular approach at the moment, but I do feel like there is validity to it.

Kudos for taking the road less travelled.

zaro

So this is being done just for the sake of not writing JS?

I don't see how this will be in any way better or more maintanalbe. Also it means writing more Django/Jinja templates.

Porthos9K

Less JS is always better, but if you're using Intercooler.js, are you really creating an app with "zero lines of JS"?

  • adamstepOP

    It's true we include Intercooler.js and jQuery in our web app. What I meant is that as developers working on our web app, we don't need to write JS to implement new features. All of the logic happens in the Django codebase.

    • Porthos9K

      You don't have to write any JS at all to leverage Intercooler.js and JQuery?

      At least Milady de Winter had the courtesy to be attractive when she tried to bullshit me and my buddies back in the day.

vearwhershuh

Very cool Adam.

You are officially the worlds expert on using server sent events in intercooler. ;)

  • adamstepOP

    Thanks! There's so much potential there, we're excited to push the limits.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection