The following is an e-mail interview with Amy G. Dala. Amy is a seasoned hacker whose antics have always surprised & inspired us over at Cretaria.
CRETARIA: Would you explain how you came about writing web-apps that use zero JS in the first place? What was the project that started you down this road?
CRETARIA: I assume there were moments with that first project — I respect that you can’t go into the details of a client project — where you said to yourself: ‘I could put some JS right here, and that would be an elegant solution.’ No?
CRETARIA: An aside: what back-ends have you been using to ‘lean on’?
CRETARIA: After you had let me know that you’d be down for a little ‘Q&A,’ I tried making a toy ‘No-JS’ web application, using OTP coupled with Cowboy as my back-end. I wanted to see if I could get into the same head-space as you. Here’s what I observed as I went along.
- I didn’t think about JS until late in the project’s life
- When it was time to solve problems where JS would typically be employed, there seemed to be no solution other than JS
- In several cases, I put some JS in there (as a place-holder until I figured out how to accomplish things without it). The JS was a fine solution but I genuinely felt that it was a dirty hack; it felt like a kludge
What are your thoughts on my observations?
Amy: I hope you figured it out in the end! Your last point is the
place. I mean, think about it even on a source-code level. The page
loads, then, afterward, you tell some scripts in the footer to
observe the presentation in this pristine state, then to go around
and mess about with it. Is there any other place in the stack
where we architect code to work like this? Maybe some Nginx configs,
or langs that use
goto… But it’s not like half our
codebase is made up of those!
CRETARIA: I see your point about the source-code. It’s unique, for sure. I suppose templating engines — like DTL, or the likes in Rails — have us approaching problems slightly different, where things get coded pro-actively, not slapped on. Would you agree?
CRETARIA: What are some cautions you would give anyone about to try ‘JS-free’ web-development?
CRETARIA: A final two questions. What’s the worst hack you have had to make using the templating approach? Lastly, are you going to start a ‘No-JS’ movement? And of course, feel free to share any final thoughts on everything.
A million thanks goes out to Amy. G. Dala for her time in sharing her whimsical ‘No-JS’ development credo. It was a fun e-mail exchange & it’s never regrettable to hear what others are trying in the trenches of hacking.