Live data from Hacker News

Immutable Web Apps

immutablewebapps.org

21–30 of 66 posts

Re: Immutable Web Apps

#21
A couple of weeks ago, I demonstrated a blog configuration for a client that was both immutable and serverless -- but you could change the design and add/modify/delete blog entries, of course.

I did a video showing off the web-app side. I'm probably going to do another one showing off the server-side stuff.

It was fun to do. The various pieces of tech are all now coming together nicely.

Re: Immutable Web Apps

#22
post #15

The example on this page is really bad. Remember the time of framesets? We wrote fallback code, at least a little excuse, to all the browsers and users who did not understand framesets. There are too many "single page applications" (why don't call them "Javascript applications") which just show white space without Javascript enabled (not even to speak about ill-functional Javascript).

While I agree with you that not showing a clear message if JS is disabled on the client is bad, I would say that's outside the scope of this manifest. This is about building and deploying SPAs, not about graceful degradation etc.

Re: Immutable Web Apps

#23
The proposed solution in "index.html contains fully-qualified references to the static assets" seems backwards. Changing resources from `./main.js` to `https://assets.myapp.com/apps/1.0.2/main.js` makes the opposite of an "immutable application" in that loading the script will effectively be a side-effect and depending on other factors than just the index.html link with it's child directories.

Overall it seems like a good framework, but not making all resources self-contained + relative, seems like a step backwards in that you're locking your resources to a specific domain, which might or might not be available.

Re: Immutable Web Apps

#25
Interestingly, this is shocking close to something we've been building for our internal dashboards. The only slight variation is that we serve the URLs of the JS from one of our backend services over CORS - because we want access to the code for the dash to be subject to authentication, so all our fraud controls etc aren't super easily visible.

So if there's no valid auth, it goes to our `service-dashboard-asset` system and requests a URL for the login app - injecting the script tags into the page, then the user can authenticate.

Then the page refreshes, the auth is present, and it goes to `service-dashboard-asset` and requests a URL for the actual dashboard, and now injects this script tag in instead.

Re: Immutable Web Apps

#26
This has been a very interesting read. I've been wanting to build a single page personal website as a means of learning. I'm not a star in webdev so I have a lot of hours ahead of me.

I might actually deploy it like this, why not?

If anyone has any good book or other resources to get started in building a website like this for people who already have back-end and programming experience but lack html, css, js etc.. please reply them to me! Thank you

Re: Immutable Web Apps

#27

This has been a very interesting read. I've been wanting to build a single page personal website as a means of learning. I'm not a star in webdev so I have a lot of hours ahead of me. I might actually deploy it like this, why not? If anyone has any good book or other resources to get started in building a website like this for people who already have back-end and programming experience but lack html, css, js etc.. pl…

I have found MDN [1] to be an exquisite resource for web technologies. I only use it as a reference since I'm already familiar with HTML/CSS/JS, but I would imagine their learning documentation to be high quality as well.

[1] https://developer.mozilla.org/en-US/

Re: Immutable Web Apps

#29

This has been a very interesting read. I've been wanting to build a single page personal website as a means of learning. I'm not a star in webdev so I have a lot of hours ahead of me. I might actually deploy it like this, why not? If anyone has any good book or other resources to get started in building a website like this for people who already have back-end and programming experience but lack html, css, js etc.. pl…

I really like Vue.js for SPAs. I come from a Node/Php/Go back-end. Vue was the second front-end framework/library I learned, the first being Angular 1. Vue is way more intuitive. If you have experience with JS its really easy to get rolling. If you have no JS experience, just remember typing is a myth and you'll be fine ;). They also have a few examples on their website.

Re: Immutable Web Apps

#30
I wish there was some "why"

> Static assets must be hosted at locations that are unique and independent of the web application environment(s)

Why? Meaning a different domain or is path enough? What are "static assets" compared to every other file served by a web server? I assume meaning will never ever change, so images are not "static assets"? What if I name them by what they are and commit to changing the name when I change the image?

> Static assets are the files (javascript, css, images) that are generated from a build of a web application codebase. They become immutable when they do not contain anything environment-specific

> Static assets must not contain anything that is environment-specific

So, static assets are only immutable when they don't have anything environment specific. Oh, and static assets always don't have anything environment specific. I'm confused in the wording. Clarification required. So my build generates some environment-specific CSS file and in one paragraph that's a static asset and in another it's not?

Post reply on HN