Live data from Hacker News

Plain Vanilla Web

plainvanillaweb.com

361–370 of 715 posts

Re: Plain Vanilla Web

#361

Earlier quoted context omitted.

Huh? The built-in APIs aren't perfect, but we're talking about something simple as ``` fetch('/my-content').then(async res => { if(res.ok) { document.getElementById('my-element').innerHtml = await res.text(); } }) ``` Something like that. Doesn't get much easier. Gone are the days of browser inconsistencies, at least of you stick to "Baseline Widely available" APIs which is now prominently displayed on MDN.

No-framework web tinkerer here. If I had a nickel for every second of my life I've spent typing document.getElementById, I'd be able to afford new fingers. Should've been renamed to getId() and put in global scope two decades ago, if not three. At least querySelector() is a few characters shorter, but I always feel bad using such an alarmingly overdesigned tool for anything trivial.

JavaScript has functions:

    const g = (x) => document.getElementById(x);

Re: Plain Vanilla Web

#362
post #73

Earlier quoted context omitted.

As a counterpoint, many systems that were originally implemented as native desktop applications have since been migrated to the web. The motivation for this shift is not particularly strong from a technical standpoint, but it is a practical one: deploying native applications is simply too costly. The web finally provides a widespread standard for deploying applications inexpensively. Unfortunately, the technology use…

> deploying native applications is simply too costly. I do not understand why people hold this impression, especially in corporate environments. Windows supports both system and per-user deployments; the latter so you don't even need administrator rights. And with Intune, deployments can be pulled or pushed. Many desktop applications are written in .Net so you don't even need to install the runtime because it's prein…

> please then explain to me why Steam is so successful at deploying large games on multiple platforms?

if you look into the support forums on steam for any random game you'll find lots of complaints about stability and crashes, many of which are likely to be esoteric system-specific problems.

Re: Plain Vanilla Web

#365

I've transcended the vanilla/framework arguments in favor of "do we even need a website for this?". I've discovered that when you start getting really cynical about the actual need for a web application - especially in B2B SaaS - you may become surprised at how far you can take the business without touching a browser. A vast majority of the hours I've spent building web sites & applications has been devoted to admini…

I moved to south east Asia and the phenomenon of a "hotline" openend my eyes.

Every business is basically a phone number that you can message. It does not matter if you buy a pizza or furniture, book a hotel or need someone to clean your sofa.

No website. No need to fill in forms. No platform fee.

Re: Plain Vanilla Web

#366

Ironically the style of this site lets it down, the 2006 look (post-css, pre-gradients and big buttons) makes it feel like it's an outdated framework.

Literally use WebFontPicker and choose Raleway or something.

Although I'm liking the use of javascript classes, not for any technical reasons just that it's a defiant middle finger to the React crew (who you now no longer hear from) that cancelled classes.

Re: Plain Vanilla Web

#367
post #73

Earlier quoted context omitted.

As a counterpoint, many systems that were originally implemented as native desktop applications have since been migrated to the web. The motivation for this shift is not particularly strong from a technical standpoint, but it is a practical one: deploying native applications is simply too costly. The web finally provides a widespread standard for deploying applications inexpensively. Unfortunately, the technology use…

> deploying native applications is simply too costly. I do not understand why people hold this impression, especially in corporate environments. Windows supports both system and per-user deployments; the latter so you don't even need administrator rights. And with Intune, deployments can be pulled or pushed. Many desktop applications are written in .Net so you don't even need to install the runtime because it's prein…

That’s a very ironic example given that the Steam Client is a web-app hosted in Chromium.

Re: Plain Vanilla Web

#368

Earlier quoted context omitted.

Until you have a definitive answer, err on the side of simplicity.

You never have a definitive answer. It's always probabilistic. You make the decision that you think has the highest odds of success at every point in time.

Success for the current requirements? Or success for an imagined future?

Re: Plain Vanilla Web

#369
post #336

Earlier quoted context omitted.

I agree with you about the customer-facing issues which occur with vanilla sites which don't deliver good user experience. However, I'm interested in how frameworks solve the developer experience problem you mentioned: > Will this javascript file you touched affect only the feature you wanted, or another 50 pages you didn’t even know about? > When you add a new thing in a template, how many N+1 issues across how many…

> Doesn't this just change into /../ Yes and no! TypeScript helps a lot – you get quick traceability of where things are used and squiggly lines, if you break a contract. Yes a statically typed MVC framework would get you this, but in my experience the apps that get into this mess also don't use types "because types add too much complexity" (likely true for that company stage). Componentization brings the other piece…

Thankfully, there's a bunch of great and "easy to get going" languages now that __also__ have types (or optionally encourage them) that the "don't have types" thing isn't as much of a forced issue anymore (though engineers can still choose to go type-free and eventually face the wrath of lack of types in a large-scale project)

Re: Plain Vanilla Web

#370
Some good patterns here. An Event with a callback (what you're calling [context protocol](https://github.com/webcomponents-cg/community-protocols/blob...)) I think will prove useful.

My main gripe with web components is that while they expose the first half of the tree traversal (from the outside in, via connectedCallback), they don't provide access to the second half, after child elements have been created. (akin to Initialize and Load events from ye olde .NET)

Post reply on HN