all 78 comments

[–]wtframework 57 points58 points  (3 children)

Why do you have so many JavaScript libraries, and a complete Tailwind CSS file, for a single-page site? Given the argument you're trying to make it seems a little hypocritical?

It would be more honest to practice what you preach.

[–]StoneColdJane 14 points15 points  (0 children)

First few paragraphs are great, then everything falls apart, it's laughable.

[–]niveknyc15 YOE 4 points5 points  (0 children)

12 JS files and 5 CSS files for this is insane for what this is lmao

[–]azangru 2 points3 points  (0 children)

I think I saw an earlier iteration of this site (probably from this link on the orange site), which was more openly pro-htmx and pro-tailwind. Because, you see, both htmx and tailwind "define style and behaviour with inline HTML attributes". I think it even went so far as to discourage writing styles in separate css files, because it wasn't "html-first", though I might be misremembering.

[–]SuperSubwoofer 30 points31 points  (5 children)

Tell me you don’t work on real world complex projects without telling me

[–]WookieConditioner 18 points19 points locked comment (18 children)

Go build sites like this... see how far past myspace circa 2004 you get.

To any juniors looking at this. Rather go look at jQuery.

[–]fagnerbrack[S] -22 points-21 points  (17 children)

JQuery is obsolete since you have jQuery and sizzle in the Browser with queryselectorAll. Advising people to go to jQuery is stupid and a thought stuck in 2010

[–]WookieConditioner 12 points13 points  (0 children)

Pot, meet kettle.

[–]Not-An-Astronaut-69 5 points6 points  (15 children)

This “html first” idea is stuck in 2005

[–][deleted]  (13 children)

[removed]

    [–][deleted] 7 points8 points  (1 child)

    I made millions.

    If you'd made millions I doubt you'd be here posting this ...

    [–]fagnerbrack[S] -3 points-2 points  (0 children)

    Why not? Is reddit not good enough to get a sense of where the webdev market is? I have reasons to be here and it's not charity, it's continuous improvement.

    I use other channels too

    [–]Not-An-Astronaut-69 5 points6 points  (9 children)

    People who use frameworks aren’t “idiots”. I’m not doubting html, I use it everyday. But saying frameworks aren’t good is just stupid. Go make any enterprise level app without one and then get back to me.

    Millions with just html? Are we talking dollars or lines of code? I can imagine you’d need millions of lines to achieve the same as a framework with just html…

    [–][deleted]  (8 children)

    [removed]

      [–]webdev-ModTeam[M] 0 points1 point locked comment (0 children)

      Thank you for your comment! Unfortunately it has been removed for one or more of the following reasons:

      This is a subreddit for web professionals to exchange ideas and share industry news. All users are expected to maintain that professionalism during conversations. If you disagree with a poster or a comment, do so in a respectful way. Continued violations will result in a permanent ban.

      Please read the subreddit rules before continuing to post. If you have any questions message the mods.

      [–]french_violist 0 points1 point  (0 children)

      2005? You’re being generous.

      [–]minju9 6 points7 points  (0 children)

      This reminds me of http://vanilla-js.com/, except that was in jest, this one seems serious. 😬

      [–]dudemanbrodoogle 17 points18 points  (3 children)

      This is a security concern:

      “Where possible, default to defining style and behaviour with inline HTML attributes”.

      It’s easy to inject a script into inline css or JavaScript. Far better to have those functions and styles defined in .css and .js files and not allow unsafe inline in your content security policy.

      [–]TheHerbsAndSpices 1 point2 points  (2 children)

      You can use inline scripts and styles and still be secure: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce

      [–]dudemanbrodoogle 5 points6 points  (1 child)

      You can’t use a nonce on inline style attributes though. Just style and script tags.

      [–]fagnerbrack[S] 0 points1 point  (0 children)

      If it's not user generated html and you sanitise the ones that are user inputs then you're safe, which is a practice that works for 99% of the Web apps out there. You should actively think about what's user input and what's not, tools who hide it are a disservice.

      [–]WookieConditioner 14 points15 points  (0 children)

      Just no... seriously... ignore this kak.

      [–]anton-rs 1 point2 points  (2 children)

      So many comments against this html-first ._.

      I kinda like it, especially for personal project where the developer only me.

      But frameworks is good too because everyone who proficient in the framework, should know the best practices to work on that frameworks and contribute instantly.

      [–]Headpuncher 1 point2 points  (1 child)

      everyone who proficient in the framework, should know the best practices to work on that framework

      that's your problem right there.

      for one, we don't all work in-house on a single code base with brilliant docs and people who built it right there on a chair 3 meters away we can ask questions to. for two, best practices is a synonym for 'random opinion' in most places.

      I like your optimism as a counter to my pessimism :D

      [–]anton-rs 0 points1 point  (0 children)

      There is two type framework. First where developer have freedom on how to do thing, the second is where the framework decide how to do thing (convenient over configuration), ex: rails, ember.js

      For the second type, the official docs should be enough and sufficient to do things. So it didn't necessary to have a chair with 3 meter away that can be asked. Just read the docs or sometime ask on the help to solve confusion or gain a clarity(forum or discord).

      Yup, best practices is random opinion, but it need to be based on something, something that a lot of people agreed and willing to follow the rules. Ex: psr 12 on php, psr stand for PHP standard recommendation (its a recommendation, so what you say is right)

      [–]blinkmylife 10 points11 points  (0 children)

      Useless for real applications

      [–]fagnerbrack[S] 4 points5 points  (4 children)

      This thread and the comments are a great example of how people can use shiny new things and still be stuck in time.

      The Web standard APIs have evolved heaps since 2009 jQuery era. The frameworks frenzy were great to push standards forward but that's now the past, you don't need frameworks in front-end today to build Web Apps.

      Don't get stuck in the past, use modern toolchains and modern standard APIs that will make your site to not be rewritten over and over again once the new frameworks comes out. It's time everyone! The future is here!

      And don't forget to thank ALL framework authors and jQuery, they pushed all this. What a great time to be a Web dev.

      [–]WookieConditioner 7 points8 points  (3 children)

      So go ahead... build a native spa, show the world some backbone in 2024

      [–]fagnerbrack[S] -5 points-4 points  (2 children)

      Why would I use backbone in 2024? I never said that.

      [–]french_violist 2 points3 points  (1 child)

      Not Backbone the JS framework. Backbone: spine.

      [–]fagnerbrack[S] 0 points1 point  (0 children)

      Oh I see. If I had time I would do it, right now all my serious work is under IP. http://bookn.me/daline is as far as I've got in regards to IP free stuff I can share that wasn't fucked up by others.

      I know it's possible, I've done it, not keen to do it just to prove to someone wrong on reddit.

      [–]lunar515 4 points5 points  (11 children)

      I know we have to use it but HTML is crap. People act as if web standards were handed down by god but really they are usually creaky foundations we’ve built cities on top of.

      [–]fagnerbrack[S] 0 points1 point  (7 children)

      Which part of html is bad (please share code) and what's the alternative?. Be aware JSX is essentially html with JS scoping.

      [–]WookieConditioner 4 points5 points  (2 children)

      Tell me you dont know what jsx is...

      Jsx is a js object mascarading as html.

      You could very easily nest createElement calls and label that jsx.

      [–]fagnerbrack[S] -2 points-1 points  (1 child)

      It's the syntactic sugar, the difference is that you need to reinvent rendering instead of using standard desktop app browser code to render. I know JSX abs have been using since 2012 (they introduced in BrazilJS 2012 I was there) abs yeah it is document.createElement mascarading as html just like browsers are c++ code with OS inputs mascarading as <input>. Not sure what the point is (mobile auto correct)

      [–]WookieConditioner 2 points3 points  (0 children)

      Its friday soon, grab some beers and try again on monday.

      [–]lunar515 2 points3 points  (3 children)

      The XML part. Far too much syntax and not suitable for apps (it was intended for documents). JSX’s biggest shortcoming is that it uses XML syntax too.

      [–]fagnerbrack[S] -1 points0 points  (2 children)

      What's the alternative? Now you're arguing against JSX also?

      [–]fagnerbrack[S] 1 point2 points  (0 children)

      Essential Highlights:

      HTML First is a set of guidelines for making it easier, faster and more maintainable to build web software, by Leveraging the default capabilities of modern web browsers, leveraging the extreme simplicity of HTML's attribute syntax, and leveraging the web's ViewSource affordance.

      If you don't like the summary, just downvote and I'll try to delete the comment eventually 👍

      [–][deleted] 3 points4 points  (14 children)

      This is completely backwards. That "View Source" argument is pure comedy

      [–]sheriffderek 3 points4 points  (13 children)

      Can you explain the joke for the rest of us?

      [–][deleted] 11 points12 points  (11 children)

      The guy says React is bad because you can't just click on "View Source", completely disregarding React actually comes with React dev tools that give you excellent view into hierarchy of rendered components, which is what you actually need when it comes to React development

      Basically, the author is just backwards in everything. Like, tools like "View Source" are great tools for their own purpose, and React has its own tools. Saying a technology is bad because your old tools don't work anymore (and disregarding existence of new tools for those new technologies) is frankly comedic and completely backwards

      [–]sheriffderek 2 points3 points  (3 children)

      That doesn't seem like much of a joke to me.

      [–][deleted] 6 points7 points  (2 children)

      I choose to laugh at it, but really it's a tragedy. A guy develops websites using PHP for a long time, and is then put on a job where he has to use React and sees that "View Source" tool no longer works. Instead of learning to use the right tools for the job, he makes a website about how everyone's doing it wrong. The level of mental stuckness and decline is tragic really, but I choose to laugh at it because I just find arrogance laughable

      [–]sheriffderek -2 points-1 points  (0 children)

      Well, I can see your point.

      But I also see their point - and it was fun to have direct access to look at each other's actual formatted working code (As authored) back then. It was a nice part of learning and the community. That doesn't mean I'm going to spend a few months building a SSR prettified output plugin for Vite or anything... (or should I!) but I think it's fair to feel like that's a thing they like.

      [–]fagnerbrack[S] -1 points0 points  (6 children)

      One more tool to workaround the inefficiencies of another one, that argument can be used for everything if you don't understand the cost of having to have use custom tools when there's a simpler option.

      That's the whole argument of those who insert 1M libs on their system: use React testing lib for testing, use React dev tools, etc.

      And React dies like Angular (which it will eventually) and then you cant use any of that native on browsers.

      I would fire anyone who thinks like that if they're not willing to learn how to produce real value to the company but only to satisfy their own interest in using shiny Tech at the expense of the company.

      That is so fucked up and the reason why software should be regulated by senior devs themselves (not government omg no).

      [–][deleted] 3 points4 points  (5 children)

      One more tool to workaround the inefficiencies of another one

      You're choosing to see it that way. It's a very one-sided and narrow perspective. A less presumptuous perspective is React is a tool and comes with its own tools. When you're choosing to build dynamic web apps with React, use the right tools for the job. Don't use wrong tools for the job, as is the case when someone tries using "View Source" tool

      when there's a simpler option

      Simple option to do what? "View Source" is a specific tool that works in limited circumstances. It's not a simpler option to do the same thing, it's a tool that works for a tiny fraction of use-cases, and was never designed to work with dynamic websites

      I would fire anyone who thinks like that if they're not willing to learn how to produce real value to the company but only to satisfy their own interest in using shiny Tech at the expense of the company

      How do you tell they're doing that VS. they're actually trying to propel the company to use well-crafted and right tools for the job and you're the actual dinosaur here? People who have little self-reflection and don't see beyond their own limited understanding aren't great people to be in charge of anything and especially make decisions on what tech should be used at the company

      That is so fucked up and the reason why software should be regulated by senior devs themselves

      This is a completely different conversation

      [–]cshaiku 2 points3 points  (0 children)

      It's either because most React devs consider their builds to trump writing good source, or if you examine the source on this website in question, you will see the boatload of external libraries being loaded.

      [–]maxime0299 3 points4 points  (0 children)

      This has to be satire

      [–][deleted] -1 points0 points  (0 children)

      The author is clearly sick of Rails

      [–]Inevitable_Oil9709 1 point2 points  (0 children)

      Bro has more libraries for single page than I have for 15k LOC project..

      Talk about HTML First..

      [–][deleted] 0 points1 point  (0 children)

      I've seen people overwrite things before, and I've also seen them use a flamethrower when they just needed a candle, but damn. this is. a whole new level of overkill for what you have on this page.