• 0 Posts
  • 15 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2023

help-circle


  • And no, I have not tested it because I don’t know how I’m actually supposed to do that.

    depends on what you backup and how.

    if it’s just “dumb” files (videos, music pictures etc.), just retrieve them from your backups and check if you can open the files.

    complex stuff? probably try to rebuild the complex stuff from a backup and check if it works as expected and is in the state you expect it to be in. how to do that really depends on the complex stuff.

    i’d guess for most people it’s enough to make sure to backup dumb files and configurations, so they can rebuild their stuff rather than being able to restore a complex system in exactly the same state it was in before bad things happened.








  • Access control and offering a sound interface.

    You don’t need getters and setters if every attribute is public, but you might want to make sure attributes are accessed in a specific way or a change to an object has to trigger something, or the change has to wait until the object is done with something. Java just has tools to enforce a user of your objects to access its attributes through the methods you designed for that. It’s a safeguard against unintended side effects, to only open up inner workings of a class as littles as necessary.

    In a language without something like private attributes you’d have to account for far more ways someone might mutate the state of objects created by your code, it opens you up to far more possible mistakes.





  • It becomes pretty nice if you use a templating engine to generate html server side. Context: 95% of my work projects are java with spring boot and JavaScript applications for the front end.

    I used turbo (other js library, very simmiliar) for some prototypes and having the complete state of an application in the backend and the ability to reuse so much of my html templates allowed me to iterate pretty fast on ideas. And using htmx or turbo does not mean you can’t write js ever, but you can use it for purely ui functions and leave a lot of application logic to the backend, while still avoiding full page reloads and other cool features of typical JavaScript applications.

    Big fan of the idea behind htmx, would love to actually use it for stuff that goes into production. I guess it would also be really nice for existing projects with lots of html allready written.