Javascript You Dont Know Js Pluralsight

If W3C would finish doing initiatives like Spider web USB and give us a way to style a select box (finally going to be a thing) we wouldn't even demand web frameworks.

* Styled select boxes

* Skillful cross platform datepicker with ranges that looks practiced

* More form validation options / dynamic form validation

* A good drag api that does edge detection well in every browser

* Bring back frames (would let skilful nested routing)

* A built in rich text editor

* A expert modal API (or bring information technology back)

* A manner to submit a course via AJAX with just a property (call back Rails UJS) to just return html.


"Spider web Component" is a great name, just Shadow DOM and Custom Chemical element are terrible APIs. WHATWG should just quietly abandon them and so come with "Spider web Components 2.0" based on a native reactivity system, native VDOM diffing, and (this already a matter) CSS layers for style isolation.

Yeah, gotcha. That'southward why I have in parenthesis

> (finally going to exist a thing)

I've been thinking similar forever that if we had a standard, pure-html equivalent to jQuery's `$('.foo').load('url...')`, we could take a lot of great sites without any JS at all (I'm not talking about the minority of legit cases where react/vue/athwart shines).

Like to a link targetting an iframe, but without an actually ugly iframe.


Are yous familiar with HTMX? Sounds like what you lot desire. I'm non a huge fan, merely I call up information technology would be practiced if something like it were a native capability.

Yeah, that's the same core thought. I hateful, there are enough of solutions in JS, and it'south a one-liner with fetch anyway, but having a native style would have been cool.

I was thinking well-nigh something more like `<a href="..." target="#someDiv">`.

That could be some handy (albeit rudimentary) foundation to build maintainable sites on a static server without whatsoever JS or build pipeline.

Styling a radio button, a select box and a slider would be amazing, too.

Now the simply option is to supplant them which is quite lamentable.


Yea you lot're correct, that's similar the biggest 1. Can't believe I forgot that.

> and give us a mode to manner a select box

How many terminate-users complained what a select box is non styled?


I hear you, that's another thing that has plagued our industry. Near of the fourth dimension a regular select box is fine, but sometimes you need to accept images or something more in the options (colors, etc)


None, probably, but these days it's de rigeur to spend half a (web or mobile) projection'southward budget making sure even the select boxes are "on brand" and "delightful" or whatever. Ofttimes at the expense of usability.

Is is actually that bad?

I'm not very upwards-to-date with JS frameworks, so please bear with me. I know that new libraries popular upwards here and at that place, just if I'm not wrong, React is by far the most popular, and React has been effectually for most ten years. Vue'southward not much younger, and now it's tertiary major version.

Is there such a big deviation between JS front-end frameworks and the remainder of the earth?

The ecosystem largely settled out in 2014 when everybody was "javascript fatigue" complaining. The developments since accept mostly been refinements on details of the development setup or country management. There'south new stuff simply I'm pretty sure anybody who wrote React at the fourth dimension would be comfortable with the slight modifications in the patterns of how things fit together.

We're kind of into the next generation of frameworks (Solid, Svelte 3, Vue three) and that'due south more almost how much JS is getting delivered to the client. The current area of exploration is "partial hydration" where the goal is to write stuff using the component model just do server rendering and just send JS for the parts of the page that'll change customer side. For quite a few classes of awarding this would essentially reduce the size of JS over the wire. All this is less of a benefit than the state control React brought so I await slower/partial adoption.

More broadly, there's been a resurgence of the return everything on the server and send html diffs approach in the form of alpine and htmx. The other potential area for change on the horizon is web associates getting host bindings support then it doesn't have to bridge through JS to affect the DOM and other browser APIs.


Thank you for a thorough explanation! I've heard nigh NextJS, NuxtJS etc. and I know they're built on elevation of React and Vue, but didn't really know what kind of value they provided, now that's clearer.

I'one thousand not sure about that. 2014 is when Webpack was released and React was released the twelvemonth prior.

Maybe one or 2 years subsequently that.

> Is is actually that bad?

Information technology's non that bad. I am atomic number 82 on a big Angular 13 project and we love it, easy to work with, build, deploy. We have literally no problems at the moment. .Net 6 C# APIs on the back-end, Oracle database. It just works.

Take everything with a grain of salt.

As a user, big Angular apps experience super ho-hum and bloated.

Eg: Google Cloud console downloads like 20MB of resource.

Maybe the DX is good, but from an finish user perspective, Angular is far from expert.

> Google Cloud console downloads similar 20MB of resources.

That'due south literally the biggest (publicly known) Athwart app in existence, and the fact that it's tedious doesn't have annihilation to do with Athwart. E.1000. FWD:Everyone pages load in well under half a 2nd:

https://www.fwdeveryone.com/t/K3KKGbMyQbaCGDc-izuaow/venmo-f...

At this betoken the primary things preventing it from being faster are the TTFB from CloudFront, and the fact that Bootstrap is used as a dependency.

> Eg: Google Cloud console downloads similar 20MB of resources.

That must be a fairly large awarding. Consider they are pushing it internally, I have no thought how optimized that is.

When you consider this is cached, that means yous just take to do that once until an update. Like to any other software.

Look at what Electron apps practise in terms of constant updates. This is similar, but information technology'due south a web page.

This is simply on outset page you lot load. Every bit you navigate it loads a LOT more than more stuff. I opened the console and it loaded like 20MB, then I navigated to some other section and it loaded 15MB more.

And the trouble is not only the bytes loaded but how clunky and slow information technology is in general.

The Electron statement doesn't make any sense as information technology includes ii runtimes ffs.

I experience the same way well-nigh Angular. There some pocket-sized bugs that have had open bug for five+ years and may well never go fixed, but by and large the 24-hour interval-to-day experience of writing and maintaining code is pretty smashing.

I just don't get the concept of people being similar, I'm going to offset a project that's likely going to take the ten years to become successful, only I'g not willing to spend the twenty hours to read the documentation so that it will exist successful.

How is internationalization?

Last I asked, it was still a tire burn down, even later on more than a dozen versions and after a fully mature previous framework that was replaced :-(

Yea...Angular made a huge (and hardly documented) alter to their internationalization library that forced us to migrate to a tertiary-political party one.

Basically, they now (as of Angular 12) strength you to build a difference version of your app for each linguistic communication you support, and either serve them up at different URLs or use cookies to serve upward the right version to each user. The technical reasons make sense...your translations occur at build-time, rather than at run-time, just information technology'south a pretty drastic change that occurred out of nowhere.

Not a fan.

Are you required to use Athwart's i18n support for some reason?

I employ ttag (https://ttag.js.org) with React and like information technology. I don't meet whatsoever reason you couldn't use information technology (or another library) with Angular.


Angular tries to be a 1 terminate store and internationalization is a major feature.


I think information technology's a bit of an outdated stereotype from back in the day when this kind of frameworks started popping up left and right. It was a major shift from jquery-based sites/apps which scared many people abroad from diving deeper into front end cease. Nowadays you tin stick to 1 of the major three and you'll be fine for the foreseeable future. This new Vue version is the nigh confusing change nosotros've had since a long time ago in the fe framework space and it's still ok to get used to.


Yea, most of my Vue 3 components look only similar my Vue ii components (which wait a lot like Vue 1 components). Really easy transition for devs.


I think a lot of people got a bad sense of taste from webpack, gulp, etc. projects ~5 years ago that immediately mired you in deep config complexity to do anything. Nowadays there's a lot more documentation and emphasis on nothing config / convention / CLI tooling to remove a lot of that complexity. Things are a lot better nowadays, especially if you're doing something greenfield and can use the latest tooling like vite, esbuild, etc.

>... particularly if yous're doing something greenfield and can employ the latest tooling similar vite, esbuild, etc.

Well, kinda? I tried to gear up typescript, storyboard and tailwind the other twenty-four hour period, via create-react-app - and it's non really clear if I tin/should use npm or yarn, and what, if any bundles like webpack or esbuild/craco I need... Nor did whatsoever of the documentation/tutorials "only work" - and as concluding penalty I call back I had to download more than a gig of dependencies.

I get that in that location are many layers of tooling, only when I tin't seem to go one-half the features of qt, nor a gui for 4gl development - it does seem similar there'south a lot of churn and pain for limited gain.

Here is advice.

Using Laravel with Breeze and the set up merely works out of the box.


Appreciated, even if information technology's not a good friction match for our other tech for most of these projects. That bated, exercise I and then get Storybook and an easy way to integrate with tailwinduikit?

Honestly if anything, web frameworks are fashion ahead of the residual of the world.

The existent difficulty is that web UIs have to be very flexible and varied: you have different screen sizes, mobile vs desktop, and every website has a different UI vs native apps all looking like. And aye, in that location are over 100 different web frameworks most which have a particular use case, although you lot don't take to use the perfect tool for the job. Also, there are a few quirks left over from the old days of HTML/CSS/JavaScript.

Simply making a basic website present on modern tools is very straightforward. Clone a vite starter project, write out your DOM in React or Vue or Svelte or Solid.js or whatever, and launch a live-server with a browser inspector to fine-tune the design. There are some especially bad JS frameworks (looking at you lot Shooting star), but that'south the case for near platforms.

Honestly if annihilation, spider web frameworks are manner ahead of the rest of the world

Fabricated me chuckle. Web frameworks are sparse-to-medium layers of dealing with bs that web graphics are by nature and design. Their entire purpose orbits effectually that. Runtimes that practise not suffer from these birth traumas don't even demand all that complexity. Eastward.g. with apple tree core ui libraries you tin can in hours pattern a new flex/filigree/stack/align/etc geometry container (which takes decades in the web), tin can animate things, brand them cheap-scrollable, sizeable, constrainable out of box. Do you lot actually think that spider web reflows and size dispatch up and downwardly a bureaucracy is a circuitous issue which only a "top-notch" spider web tech can solve?

Of grade web traditionally was more game-like and does non have any guidelines and presentation standards beyond "reset", assuasive to focus on pattern better than the rest of the world (and due to widespread nature monopolized by a single platform), but calling frameworks which basically deal with its own shortcomings and ancient issues ahead of the earth is pretty misleading.

What exactly is alee of the globe in there? My bet is on reactivity, components, caching and lazy redraws, which "weren't a thing" before web, because, you know, jquery and comctl32.dll were bad.

making a bones website nowadays on modernistic tools is very straightforward … and launch a live-server with a browser inspector to fine-tune the blueprint

Ah yes, something we had at VB/Delphi 3 times but non quite as RAD. I hateful, perchance launch a live server, drop a query and run across live data in blueprint-mode, or enumerate columns and brand some of them editable out of box? Or make full a form with primary-item link? You lot can't. Spider web praises primitive/workaround things which nobody even had a name for earlier, so niggling and obvious and default it was.


Things were really a mess for a while, maybe 6-7 years ago. Nothing was compatible with anything else, even itself from terminal month. But nowadays things are pretty stable, if you stay abroad from the hotness of the month which volition exist forgotten next month.

Why are people and then obsessed with finding ane truthful mode to do everything until the finish of time. Things modify, things become more diverse, and the world is richer for information technology. At that place already are sane, sensible, anticipated and well-understood frameworks for it, it's chosen Vue, it's called React, etc. You lot don't need a committee to bless it before you can enjoy such a stable environs. This is a lot similar the 19th century US Commissioner of Patents saying "Everything that can be invented has been invented." Society and applied science won't sit withal.

Information technology's your selection to learn a new JS framework every 6 months. If you don't want to use the new affair, then don't. Simply make something valuable and utilize what suits your needs. That's all that has ever mattered.


Indeed, focus on what to build and how to build it. What you build it in is largely irrelevant.

NPM hell is what got me to move from beloved TypeScript to Golang. Coming back to pet projects a few months later was true excruciating pain every unmarried fourth dimension.

Today, information technology'due south Go in the backend and Svelte in the frontend, or vanilla JS for very small and simple tools.


As someone who programs on backend, frontend, and Android apps, I tin can't agree more than. Javascript frameworks and NPM hell is terrible. You rarely have the problems in Go/Kotlin/Java earth that are considered normal in the NPM globe.


I never understood this npm hell reference people are speaking off. Is this just the drama of updating an outdated inherited project? I've been working with node/npm since the early on days and don't consider it worse than what you detect in Java, Python or PHP.

The latest version of webpack removed polyfill, this broke another dependency, and i had to downgrade the react version to fix that!

Nothing like this did I ever see in the go or kotlin earth.


If y'all depend on a specific behaviour why dont you pin your react version?


I learnt that much later. Evidently the current version of webpack that y'all become by following the official react projection setup is missing certain polyfills!


Meanwhile my Swing skills from the 1990s remain relevant today. Coffee might non be hip, simply information technology sure does get the task done for enterprise apps


What new framework is being widely adopted that was released in the final half-dozen months? The nearly recent i I can recollect of is Svelte which came out 2016.

I accept been _very_ bullish and excited on LiveView and its cousins from other platforms. Hotwire was the get-go time it's entered my personal dev world and I've been working on a hobby trivia app since Christmas and it has been an absolute _joy_.

It's evidently non a 1 to one replacement for an honest to god frontend application, especially one that tin can be recompiled into an offline capable native app, but where you can use it, it does a lot of lifting.


It's already invented. It's called HTML. Yous then employ whatsoever language you desire to generate it. We were doing it a long fourth dimension ago with Java Server Faces. At present there's stuff similar Liveview and Turbo (Rails community)

I employ Vue 3 without the new composition api. It looks and feels more or less similar the onetime Vue.

I actually think things are pretty smashing these days. Even amid the different frameworks and tools, things are settling into a common set of ideas and concepts.

If you made the choice to build an app on React/Vue a twelvemonth or ii ago, that decision is still valid today and I think that speaks a lot for how far things have come.

How does the custom script syntax work? E.1000. 'on click call some_func()'

Is there really a JS script parsing all of that? Seems like there would be performance punishment.


Then it volition go "one-time", exactly like Django/Rails feels today and the wheel will exist reinvented with something "amend" and more circuitous.


This comment is just low-effort complaining that we see on every JS thread on this site. Vue 3 is an pick you don't have to use, aforementioned as React, Svelte or just jQuery. The implied proposition that nobody should ever publish new lawmaking is tiring.

Aye, that was one-half of my post - but the first half is my hope that eventually the functionality from React/Vue will exist built-in to the DOM (or at least broiled-in to the browser). We're already half-way in that location with WebComponents (though I'm not a fan of WebComponents as-is, but that's a tangent).

Also, I still believe that web-pages should be functional without JavaScript. For all of my traditional SSR / not-SPA projects I definitely put effort into ensuring my projects exhibit svelte degradation.

There's already a lot of things we can do without any scripting at all: animations and dynamic content, for example - and nosotros can even use CSS trigger-tricks for bones interactivity (e.g. show/hide toggles) all without scripting. What I'd love to run across next is something like WPF/XAML's declarative information-binding in HTML (just in a less broken way...) - and I'd similar to be able to submit a <class> element directly as JSON, every bit well equally AJAX-similar <class> submissions that don't replace the electric current document, all without scripting - that's the dream (oh, and CSS positioning relative to an capricious named element, I could get on...).

> We're already half-way there with WebComponents (though I'm not a fan of WebComponents as-is, but that'southward a tangent).

I think this is actually non a tangent at all, but rather, information technology'southward kinda the whole point! I doubt we'll ever get to a point where at that place'south a unmarried standard, considering a unmarried standard can't satisfy anybody.


This is me. I really don't similar using frameworks/libraries and want it to go broiled into the standard library.

"And we'll be free from having to learn a new JS framework every 6 months"

Y'all are already free from this. The merely 1 putting that force per unit area on you, is you lot. Selection something and stick with it, and spend your time learning _how_ to build things, instead of _what_ to build information technology in.

Likewise, i day I will accomplish transcendence and suffer the ills of the man realm no longer.

I'one thousand totally on board with building improve tools and solutions. And with pointing out the flaws of tools as we notice them. However it is folly to thing this work will ever stop.

I don't think that's gonna happen. The same way modern browser'south don't come with a coffee runtime to run servlets.

Something better (and different) will come after SPAs, and the bicycle will start once more.

> The same way mod browser's don't come with a java runtime to run servlets.

Servlets run on the server, I call up you meant applets? If and then, I'd argue a counter-point: WASM and <canvas>.


That's how bully humans are at generalization, only 10 years of commonage search and we reached the spider web UI enlightenment. /s


Yeah because people stopped developing any backend solutions for Python or Ruby because Django and Carmine on Rails exist.


Only if you want to play the game, there are enough of jobs using vanilaJS and <script ...> still works.

> Nosotros'll be free from having to learn a new JS framework every 6 months

The de facto starting betoken for writing browser applications is React, and that came out well-nigh ix years agone.

It's hilarious you say this as React is arguably introducing the biggest paradigm shift since hooks (which was also a huge alter) with Suspense.

It's fine to say React is a decade onetime but the fashion we write apps with React has drastically changed multiple times with the only real abiding being JSX.

And let me be a bit proactive, yes, I know react is backwards compatible for the about part, merely similar to PHP, just because the syntax is all the same supported doesn't mean that's the recommended mode to write apps today.

React arguably started the churn of JS fatigue we all complain about now.

> the way we write apps with React has drastically inverse multiple times with the only real abiding being JSX

I don't actually agree with this. Sure, nosotros went through createClass -> class -> functions + hooks, but the core is still props, state, and lifecycle.

Eh, hold to disagree. I understand your betoken, but I think those points y'all mentioned are also changing.

Take lifecycle. It used to be very explicit. So hooks turned it into this weird implicit matter where you have to know how use upshot works and how to only trigger something once, but so the empty array thing is an anti pattern etc etc. Now with suspense, that lifecycle is changing again in a fashion. I've seen some tutorials where the teacher refactors out of use effect into throwing a promise. But then yous can have use effects inside your thrown promise and dealing with module telescopic potentially.

It's tardily and im a piddling out of information technology, but to me, this is all a lot of churn and creates long periods of dubiety as developers try and decide which of these features they want to use and when.

At a sure indicate it can get really frustrating when it feels like you need to rewrite your app to stay upwards with "best practices" and attract new talent into your org. Information technology would exist one affair if the best practices were making things better functionally, but I find that argument hard to justify for anyone exterior of Facebook calibration. Angular and Vue stuck with a more traditional lifecycle ideology and there are plenty of apps edifice at calibration on those frameworks. That stability in depression level APIs gives a community time to grow and mature without leaving a agglomeration of people behind.

I honestly believe React would not exist anywhere almost the scale of what is today based on merit solitary. They were lucky to see the demise of angular 1 and learn from that fault and at present Vue is sorta suffering the same way by moving also far abroad as well quickly from 2 to 3.

Anyhow, constitutional over! :)

> But and so you can accept use effects within your thrown promise

That doesn't sound right. The linter will certainly yell at y'all for doing that, and I'd exist surprised if the plan did non crash. The "rule of hooks" due to their implementation is that yous can only call them from straight inside of a component function cake, I.e. non from within an if block or a promise.

Developer choice is one of the things people cite as a reason not to utilize React already, since you have to pick a router, land direction library, etc. What's a couple more decisions well-nigh built-in features? =)

I will say that I experience the opposite way almost hooks: I only became interested in using React subsequently hooks were added, because classes in javascript always rubbed me the incorrect way, and I want to become as close every bit possible to functional programming style from start to finish. We're using it now, and reasoning almost the app is much simpler than before. I can't say how much is due to hooks specifically vs overall React app architecture, but the components are much more pleasing to my optics!

abramsveng1947.blogspot.com

Source: https://news.ycombinator.com/item?id=30252119

0 Response to "Javascript You Dont Know Js Pluralsight"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel