News for hackers. Stuff that matters.
Re:How I made a website with Svelte by reaperducer on Saturday December 28, 2019 @11:22AM (#21899697)
I'm afraid I honestly don't understand. What was the reason for using a bunch of frameworks and JavaScript for what appears to be a super simple web site? I don't see anything that couldn't have been done in plain static HTML and CSS.

Is there some functionality on the pages that I'm missing?

Re:How I made a website with Svelte by Bob312371 on Saturday December 28, 2019 @11:30AM (#21899754)
How else do you explore frameworks? Do you wait until you have some massive project with financial and time constraints and then test it out on that?

This sort of site is a perfect testbed for such a framework.

Re:How I made a website with Svelte by 83hajfjeijg on Saturday December 28, 2019 @11:40AM (#21899829)
No, you make a small web app. It doesn't have to be a big project, but it should be something that benefits from what the framework can deliver. This doesn't.

If you're "exploring game engines" making a resume with one is probably not what you should reach for and if you're "exploring DAWs" your testbed shouldn't be generating a pure sine wave.

This sort of site is the opposite of a perfect testbed for a framework. This sort of site doesn't need JS, it doesn't need a framework, it barely needs CSS.

Re:How I made a website with Svelte by tashoecraft on Saturday December 28, 2019 @02:01PM (#21900911)
Please stop, people can build whatever they want how ever they wish, especially when it’s not planned to be super public. They wish to build it in svelte, that’s all the reasoning you need.

I’ve also literally seen someone use a game engine to build a resume on here, it was super cool and attracted a lot of interest

Re:How I made a website with Svelte by Vinnl on Saturday December 28, 2019 @03:59PM (#21901689)
No one said people weren't allowed to build something with Svelte or whatever, just that they didn't think it was a good way to explore it, and backed that up with reasoning. Additionally, if there were other reasons for doing it, those would be interesting to hear.

I wouldn't get too worked up about this: discussions about which jobs a tool lends itself well to can be very insightful.

Re:How I made a website with Svelte by tashoecraft on Saturday December 28, 2019 @08:46PM (#21903267)
It's more that this exact conversation happens on just about every post someone makes using some tech. Someone comes in and claims it's wrong and they should have done x. Was this the best use case for Svelte/any javascript framework? Probably not, but who knows what the OP has planned for the site further, maybe it will be beneficial to have a javascript framework in place.
Re:How I made a website with Svelte by Vinnl on Sunday December 29, 2019 @06:12AM (#21905333)
I guess, and I recognise the frustration, but if they argue why someone has done x, or OP comes in and describes what else they have planned and why Svelte or whatever was a good fit, then that would still be interesting to me.
Re:How I made a website with Svelte by saagarjha on Saturday December 28, 2019 @08:08PM (#21903095)
What is a personal website if not something that you make super public?
Re:How I made a website with Svelte by tashoecraft on Saturday December 28, 2019 @08:43PM (#21903253)
Scale. Just because it was posted on their website doesn't mean they intended to draw a large, extremely critical crowd to it.

It was also the tone the commenter posted in here and across this post that came across very condescending with a holier than thou feel. They also created this account today and have been flagged and had a mod post about their postings. So if they offered some helpful advice in a more constructive way their wouldn't be a need to tell them to stop.

Re:How I made a website with Svelte by Wolfr_ on Saturday December 28, 2019 @02:03PM (#21900929)
I made a small front-end for a web app before: http://johanronsse.be/skilliverse-10/ -

Video: https://www.youtube.com/watch?v=qicEFB_XrQQ

This is much more about what the framework solves: UI as a function of the data, no spaghetti code full of DOM handlers and cross-references that are hard to follow.

Now I just used Svelte for this project, which is indeed a simple website which might not need this at all.

Still, I invite you to do similar transitions as I have between every page and on the homepage without a framework.

Re:How I made a website with Svelte by reaperducer on Saturday December 28, 2019 @05:46PM (#21902342)
I didn't see any real transitions. I think I might have seen a bit of fade-in after page load, but that might just be a browser quirk. If the fade is why you're talking about, that can be easily accomplished with just a few lines of CSS; no framework needed.

If there's some transition I didn't see because of the browsers I used (I tried two different browsers on two different devices), then it might be worth using the framework, but I maintain that I haven't seen the demo site show anything that couldn't be done with vanilla HTML and CSS.

Re:How I made a website with Svelte by BeetleB on Saturday December 28, 2019 @02:22PM (#21901062)
> This sort of site is the opposite of a perfect testbed for a framework.

It sounds like you're saying one should use a tool only for what it is meant for.

Many disagree.

Re:How I made a website with Svelte by yroc92 on Saturday December 28, 2019 @03:35PM (#21901547)
In my experience, there’s seldom such thing as a “super simple web site”. I always run into situations where some dynamic functionality is required and vanilla JavaScript gets messy very quickly. Svelte is so compact and easy that it is the ideal tool for such scenarios.
Re:How I made a website with Svelte by saagarjha on Saturday December 28, 2019 @08:09PM (#21903104)
What kinds of things do you find yourself using dynamic functionality for on a personal website/blog?
Re:How I made a website with Svelte by Wolfr_ on Saturday December 28, 2019 @01:47PM (#21900790)
I did that the years before: using a static site generator. The goal is to explore new technologies so I can decide what to use at work. I spent quite some time on the router aspect here, which I know now more of, that I can use during the work year (where I won't have time to explore this.)
Re:How I made a website with Svelte by Vinnl on Saturday December 28, 2019 @04:10PM (#21901754)
But this is not a regular static site, right? In the sense that it does not work with Javascript disabled, which is why you needed to do this:

> Then I remembered that I would probably need to redirect all requests to index.html.

Compare that to e.g. my blog (also the result of an experiment), which has the fast page changes you were looking for, but also works without Javascript, albeit with full page refreshes when switching pages: https://vincenttunru.com/

Re:How I made a website with Svelte by skrebbel on Saturday December 28, 2019 @11:28AM (#21899737)
It's for fun.
Re:How I made a website with Svelte by spoofedboy on Saturday December 28, 2019 @02:39PM (#21901191)
I'm afraid I honestly don't understand. I don't see anything that couldn't have been done in plain static HTML and CSS.

It goes by various themes:

- Can't see the forest for the trees

- resume driven development

- hype driven development

- brag shallow blog post driven development

- over-engineering

- sell courses driven development

etc...

Re:How I made a website with Svelte by cambalache on Saturday December 28, 2019 @09:15PM (#21903410)
I agree, the reality is most people in the software world are too nice and polite, which is great but tend to foster the amount of nonsense because few people are willing to call it out for fear of being branded a hater.
Re:How I made a website with Svelte by dominotw on Saturday December 28, 2019 @01:24PM (#21900644)
same reason "hello world" examples for languages exist.
Re:How I made a website with Svelte by Scarbutt on Saturday December 28, 2019 @12:09PM (#21900053)
You must be new here.