News for hackers. Stuff that matters.
Re:Practical Front-End Architecture by lampe3 on Tuesday September 21, 2021 @10:41AM (#28605482)
Senior Frontend Dev:

HTML was never gone :) I have and still working on big e-commerce websites.

For example, Ikea for product lists sends mini chunks of simple HTML. No JS involved.

What I see is the problem that people think that "Frontend development is easier than backend development".

For me, they have different challenges and different ways of thinking. Getting a good full stack developer is kind of getting a good doctor, which has at least to specialities.

Re:Practical Front-End Architecture by nicoburns on Tuesday September 21, 2021 @04:26PM (#28609495)
> Frontend development is easier than backend development

This always amuses me when it comes from junior front-end devs who are scared to touch the backend because they've never done it before. I always tell them not to worry: the backend is much simpler.

Re:Practical Front-End Architecture by woutr_be on Tuesday September 21, 2021 @11:25AM (#28605965)
> What I see is the problem that people think that "Frontend development is easier than backend development".

I hate that statement so much. Even had some serious arguments with "back-end developers" who were constantly mocking HTML/CSS/JS. Turned out that when pushed to do it, they just couldn't do anything and had to ask for help.

Writing proper reusable HTML/JS isn't easy, it also requires thinking on how to structure and split up things. Especially when you throw some CSS into it.

Re:Practical Front-End Architecture by midrus on Thursday September 23, 2021 @11:06AM (#28630234)
I've been a backend developer for many years, and for the last 6 years I've been doing frontend.

I can assure you those developers mocking frontend devs can't even do backend if taken outside their big ass framework (django, rails, symfony,etc etc), because they believe everyhing is as easy as those frameworks put it to them. Somebody that had to work outside of that where you have to take many decisions and make tons of trade offs and find how to organize code and manage dependencies, etc will understand better how difficult frontend is. True we sometimes overcomplicate things more than needed (redux, rxjs, etc...) but even when we do not, this is still freakin difficult to get right.

Re:Practical Front-End Architecture by Scarbutt on Tuesday September 21, 2021 @11:50AM (#28606275)
For example, Ikea for product lists sends mini chunks of simple HTML. No JS involved.

Can you elaborate how? like some turbolinks thing?

Re:Practical Front-End Architecture by spiralx on Wednesday September 22, 2021 @11:17AM (#28617317)
The back-end can render that content when requested, adding very little overhead to an AJAX request just returning the raw data, and it can pre-render and/or cache objects as well. Both Facebook and Reddit do similar when loading extra content into an existing page - they embed HTML content in the JSON response for things like profile popovers or when loading more comments. Saves the front-end from having to render a template (takes time to load the template beforehand and time to render it, maybe for many items) or build it programmatically. Directly using AJHX to get HTML is the same when there's just a chunk of HTML with no metadata.
Re:Practical Front-End Architecture by lampe3 on Tuesday September 21, 2021 @03:58PM (#28609208)
I don't work for Ikea so I don't know how it is implemented.

What you can see in the Network tab is that you get chunks of html from the backend which have all the markup

Other e-commerce stores do that too.

Sometimes these chunks also have js in them.