0

Im a little confused when it comes to the definition of static. As far as i know, the code of a static webApp is always the same when rendered and if you want to change something it has do be done manually.

But i can't get the following question out of my mind, cause of the architecture descriptions about AWS: I have a React-App that gets(e.g. axios or fetch) filtered data from a DB through an API-Gateway -> Lambda(query) (-> DB) and displays them on the screen(FrontEnd, e.g. through a state change). Now my question is, can this still be called a static webApp and can i host it on S3 Bucket?

George
  • 1
  • 1
    A static site is one where the pages sent to the browser are always the same. Static sites, including those hosted on S3, can include client-side scripts that show content dynamically, including content from other sources such as API Gateway. – Anon Coward May 17 '22 at 23:03
  • @AnonCoward Thank you very much for your answer. Just to confirm i got it right. A website is still static if i have an input field and get (filtered)data from a database (through an api gateway) depending on the input because the „code“ or the pages are same although the data showed can vary every time depending on what the person who uses the webapp puts in the field? – George May 18 '22 at 00:05
  • Correct. The "static" here refers to the resources served up by S3 to the client. They're static since they never change, unlike a traditional solution like PHP, ASP, or CGI that delivers custom responses based off logic running on the server. – Anon Coward May 18 '22 at 02:24
  • @AnonCoward i see thanks so much - so doesnt that mean you can do almost anything (like authetication(login, signup) & payment system, etc.) with static websites? It probably just depends on the usecase if it has some downsides compared to dynamic sites or the other way around, i guess? – George May 18 '22 at 13:13
  • Correct, you can do almost anything. Note that it does require client-side scripting be available for many use cases. For a lot of cases, that's fine, but for some cases, like login for a widely available website, that might not be acceptable. – Anon Coward May 18 '22 at 16:03
  • @AnonCoward im not sure if i understood everything with client-side scripting you probably mean that i need JavaScript, right? But what excactly do you mean with the second sentence? That if a website has a lot of traffic or many users - it is not acceptable(possible?) with a static(website) one? And how widely is widely? – George May 18 '22 at 23:53
  • If you want a website to work with all possible browsers, including very low-end ones or out of date ones, or ones configured to load pages without javascript, then you will often need to customize the responses to individualize content, since you can't rely on javascript running on the user's computer to do the heavy lifting for you. – Anon Coward May 19 '22 at 00:46
  • @AnonCoward oh so thats what you meant, thank you - i didnt even know there are browsers that cant work with js, i will note this edge case - but isnt it a small percentage? – George May 19 '22 at 23:29
  • Something like 0.2% to 10% depending on your user base, with likely being closer to 0.2%. From my vantage point, it's something only the big companies with legal reasons to support all the devices worry much about, or in niche industries where old or weird browsers are common, but that's a business call, not a technical one. – Anon Coward May 20 '22 at 00:02
  • @AnonCoward interesting, makes sense and about the big companies - so when becoming a big company, you have to make your services available for any browser ? – George May 22 '22 at 13:25

0 Answers0