*** Please be civil, notice the "Friendly" in the thread subject ***>Free beginner resources to get started with HTML, CSS and JShttps://developer.mozilla.org/en-US/docs/Learn - MDN is your friend for web dev fundamentalshttps://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etchttps://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScripthttps://javascript.info/ - Quite a good JS tutorialhttps://flukeout.github.io/ - Learn CSS selectors in no timehttps://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSShttps://roadmap.sh/roadmaps?g=Web+Development - Guided beginner roadmaps>Resources for backend languageshttps://nodejs.org/en/learn/getting-started/introduction-to-nodejs - An intro to Node.jshttps://www.phptutorial.net - A PHP tutorialhttps://dev.java/learn/ - A Java tutorialhttps://rentry.org/htbby - Links for Python and Go>Resources for miscellaneous areashttps://github.com/bradtraversy/design-resources-for-developers - List of design resourceshttps://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related>Need help? Create an example and post the linkhttps://jsfiddle.net - if you need help with HTML/CSS/JShttps://3v4l.org - if you need help with PHP/HackLanghttps://codesandbox.io - if you need help with React/Angular/Vue/wdg/ may or may not welcome app development discussion in this thread. You can post and see what the response is.Some app technologies of course have overlap with web dev, like React Native, Electron, and Flutter.We have our own website: https://wdg-one.github.ioSubmit your project progress updates using this format in your posts, the scraper will pick it up::: my-project-title ::dev:: anontools:: PHP, MySQL, etc.link:: https://my.website.comrepo:: https://github.com/user/repoprogress:: Lorem ipsum dolor sit ametPrevious: >>103493347
State of JS 2024 results are out. (see also OP pic)https://2024.stateofjs.com/en-US/
>>103577366>2nd nav item is "T-shirts"
>>103577366are they retarded, or am I? where is the full data display?
>>103577523yeah also didn't know how to navigate it right away.You can proceed to the next page with the left/right nav buttons on the top or go directly to a category with the category buttons on the left
>>103577523>>103577555the side menu is where the actual data is
PSA: if you've enabled sourcemaps on Astro (disabled by default), upgrade now because you're leaking server code (not environment variables however). Upgrade to v5.0.8 or v4.16.18https://github.com/advisories/GHSA-49w6-73cw-chjr
>>103577339Good thread>Next.js is only 68%Interesting
>>103578441imo Next.js has just become too bloated/complicated with features intertwined with Vercel that there's some real fatigue in using it.It's still the best option for an app-like experiences (like a social media site) on the web but for simple marketing websites I'd 100% go Astro.
uh, I've never understood this.How is it more efficient to tell the server what I need, then have the server render the whole response and send me back the finished HTML, instead of responding with some JSON data and letting my browser update the site?There isn't "0 JS overhead". And it's not like having the client update some page is an unimaginable workload....>SEOGoogle has 0 issues rendering sites clientside.And even then you can still send the first response statically generated and then let the client take over afterwards.
Also>React more performant than Vue>Wordpress more performant than React or Vuelmao, what?I am feeling kind of bullshitted already
>>103578659>How is it more efficient to tell the server what I need, then have the server render the whole response and send me back the finished HTML, instead of responding with some JSON data and letting my browser update the site?Because:- 1) a server is generally more powerful than a client, especially on mobile- 2) it takes time on the client to download and parse the JS scripts first before requesting the JSON content- 3) you can cache the pages on a CDN meaning no server actually needs to render it out- 4) If there's round trips to I/O such as a database or KV store, it's going to be slower doing the request from the client side because the server would be closer to the storage.- 5) It's possible for the JS thread to crash, and reqeusts to fail which forces you to implement JS logic to show loading spinners and failure states which means more bloat
I'm getting so tired of chasing the latest reinvention of the wheel all the time, bros...
>>103578922>1) a server is generally more powerful than a client, especially on mobileyes true, but even a mobile client has no problem updating a component on a website by itself.If it actually is a problem, then the solution is to remove the slow bloat instead of moving the slow bloat onto the server.>2) it takes time on the client to download and parse the JS scripts first before requesting the JSON contentYes, the very first response may very well be rendered by the server.After that the client is ready to take over and there is no overlap where the client is still parsing JS while already wanting to request more data. (if done correctly)>3) you can cache the pages on a CDN meaning no server actually needs to render it outyeah, but do you need Astro for that then?>4) If there's round trips to I/O such as a database or KV store, it's going to be slower doing the request from the client side because the server would be closer to the storage.But the requests is performed the same way? Whether the response is HTML or JSON. The server is always fetching the needed data from the DB, with the only difference that it then either renders something or sends the data as is.>5) It's possible for the JS thread to crash...
>>103579105>>1) a server is generally more powerful than a client, especially on mobile>yes true, but even a mobile client has no problem updating a component on a website by itself.>If it actually is a problem, then the solution is to remove the slow bloat instead of moving the slow bloat onto the server.It's more that it takes more time for the site to become interactive if you're relying that the client downloads and parses a JS bundle first and rendering out the page contents. If you run lighthouse benchmarks on any of these kinds of sites it's heavily blocking.>>2) it takes time on the client to download and parse the JS scripts first before requesting the JSON content>Yes, the very first response may very well be rendered by the server.>After that the client is ready to take over and there is no overlap where the client is still parsing JS while already wanting to request more data. (if done correctly)Yep, that's the purpose of server rendering, to improve that first load of meaningful content. The general pattern though for SPAs is to serve up a generic, non-server-rendered .html shell and have the client do all the work. Which works for certain dynamic applications but not for marketing sites.>>3) you can cache the pages on a CDN meaning no server actually needs to render it out>yeah, but do you need Astro for that then?No, but anything that relies on server rendering would benefit here because you get to periodically render out the page with fresher content. The bonus of using Astro as opposed to alternatives though is it's server islands feature that allows you to server render front end components (react/vue/svelte) and optionally hydrate them on the client, on a component-by-component basis i.e. send the JS to the client for the component if they need to interact with it.
>>103579105>>103579249>>If there's round trips to I/O such as a database or KV store, it's going to be slower doing the request from the client side because the server would be closer to the storage.>But the requests is performed the same way? Whether the response is HTML or JSON. The server is always fetching the needed data from the DB, with the only difference that it then either renders something or sends the data as is.Yeah I'll give you that. It's more that there's more requests headed to your server (app html + js + the API call) before you get to render meaningful content. Astro kind of gives you the best of both worlds with allowing you to server render + aggressively cache the app shell as well as defer dynamic I/O intensive components, having them just return HTML content.So instead of fetching JSON to render with a client-rendering lib, you're actually just fetching HTML.https://server-islands.com>>It's possible for the JS thread to crash>...Don't underestimate how much shitware extensions users have installed on their browsers that fucks up the DOM enough that it causes crashes on node additions/removals from the VDOM libraries. Error trackers like Sentry really show you how many users have this.
>>103578483i think the fatigue comes froma) endless caching changes and ways to do itb) the industry has consolidated on vite, whereas vercel has refused and is instead rolling their own, which is still slowc) server component paradigm is great for static sites, but makes app-like experiences feel slow on interactions due to server round tripsi have an "app-like" project on next 15 and while turbopack is much better, it's still a far cry from vite. mixing RSC with client interactivity w/ react-query can be a bit of a nightmare because whole pages are blown away on navigation, so you're either re-fetching prefetched data or introducing waterfalls by fetching on the client>>103578682the astro team has a habit cherrypicking their performance stats, they've done it a few times now in ways that negatively targets nuxtin this case, they don't differentiate between nuxt 2 and nuxt 3. 3.x was completely rewritten to the point where it's essentially a different framework (think remix vs next) so it doesn't make sense to portray them as the same tool
>>103580097>the astro team has a habit cherrypicking their performance stats, they've done it a few times now in ways that negatively targets nuxtin this case, they don't differentiate between nuxt 2 and nuxt 3. 3.x was completely rewritten to the point where it's essentially a different framework (think remix vs next) so it doesn't make sense to portray them as the same toolto be fair you can always check the real world data from http archive, but astro only represents 10k sites and I'm guessing most of it is blogs. fwiw, sites hosted with a Shopify front end score 75% good CWV. https://lookerstudio.google.com/reporting/55bc8fad-44c2-4280-aa0b-5f3f0cd3d2be/page/M6ZPC?params=%7B%22df44%22:%22include%25EE%2580%25800%25EE%2580%2580IN%25EE%2580%2580WordPress%25EE%2580%2580Next.js%25EE%2580%2580Nuxt.js%25EE%2580%2580Gatsby%25EE%2580%2580Astro%25EE%2580%2580SvelteKit%25EE%2580%2580Remix%22%7D
>>103577339>Cordova 19%OK i don't particularly like it either, but how else to make a mostly-vanilla js app that builds to an android apk?
>>103577339I worked on a Capacitor app for about 13 months. It's okay. Some plugins are a little lackluster or buggy and it seems like it's just one dude doing it all over there. There were plenty of NOT FOR USE IN PRODUCTION or whatever in the docs. Made me a little nervous bringing it over to production, but I suppose it has the advantage of letting web apps more faithfully run on mobile phones. It can never replace native development in terms of software quality, though. Anybody else ever replace a native Android/iOS app with a web app via Capacitor, or use KMP, Xamarin, etc?
anyone who uses S as the highest tier in a list deserves to be gassed
>About to ask this thread some stupid question>Come up with a solution while thinking how to explain my problem
>>103582615https://en.wikipedia.org/wiki/Rubber_duck_debugging
>againhttps://m.youtube.com/watch?v=oMRgdpXLElE&pp=ygUSTG9vayBhdCB0aGlzIGdyYXBo
how can I find themes like this? Its really hard to find a simple website theme like this.https://www.rejuven.hu/
>>103583609you mean ecommerce templates? anywhere on the internet
>>103577339I'm trying to learn cookies, and I've come up with pic related.It kinda works, but I always need to refresh the page in order to see the changes, why?How can I make the show immediately?
>>103584337>I've come up with pic relatedsorry, here's pic
>>103584337>I always need to refresh the page in order to see the changes, why?because you're using a server-side language
>>103584116I learnt a lot from this post
>>103584454>>103584343>>103584337thus... you can use fetch "async" to avoid re-rendering the page, which at your point in learning process would be the most sensible thing to do. after that you might want to worry about how react, vue or svelte do it
>>103586174>>103584337* fetch is javascript in case that wasn't clear
>>103587389you read my mind, I'm going to slowly, maybe, dump some of the meems I have from /wdg/ and /g/ ITT
thank /g/ for this one
Is there an IDE that can SSH into my wordpress website, download the files and let me work with it locally and/or remotely to test my javascript/typescript web app development?
>>103589160vscode with microsofts ssh extension? the host requires either curl or wget to download vscode server on the fly when you connect to it though.you can also just ssh into it and nvim/vim/emacs/etc.
>>103589351no webdev, but I still laughed>>103588488DI / IoC is unironically fucked up. Absolute enterprise cancer.Used a Service Locator once in a Flutter project and that was quite alright iirc.Testing frontend stores actually seems kind of painless right now.The only time I really suffered was at my last job, when our tests used an absurde monstrosity of mocks, that ended up being so artificial, that I am not even sure we tested anything useful.
for this one you got to thank one curious anon on this general, that saw I mentioned some cool universal shortcuts and dug for the full pot of gold
I love Vue
>>103588480Is that a bunch of old GPUs stuck together? Nice
>>103589521I was hoping the IDE would fill in a bit of my inexperience with a web dev project structure, and it also has to apply to my WP website.Is there such a thing as baby's first web app on a wordpress hosting plan?
Anyone here ever made a (text based) game on web tech?
>>103590780bussin
In my first job out of college right now. Am I stuck in webdev for my whole career now?Is my life really just gonna be adding forms and buttons to react apps, making API controllers and migrations?
>>103591381yes anon, that is all webdevs can ever do.How unfortunate for you.Unless you switch to a job where you can use some tech you enjoy using and build things that are interesting to work on.Wouldn't that be something.You might even get the chance to plan how the application is built yourself, which is where most of the fun is. Wouldn't that be a crazy thing.
i'm a thirty year old bum who worked at a bar for 10 years before it closed and now i'm fuckedshould i become a frontend dev or would i be better off just killing myself
>>103577339How do I pivot from firmware to backend? I don’t hate firmware but there are just aren’t many jobs nearby and my current job is a dead end.
>>103591679you can, but it doesn't hurt to have some luck.Got my first dev job at 30 as well.(did some hobby webdev 1.5 years before that and also some other game modding/scripting the years before that, but never anything serious. JS was the first mainstream language I really learned)Got lucky somehow getting a job as a frontend/mobile dev without mobile experience, because there was a company in the same building where my NEET-course was taking place and they took me as an unpaid intern for a while.Whatever you do, you'll probably have to go in with some low expectations on the initial role, but after 1-2 years you'll be able to make a HUGE jump to something else, if you actually manage to somehow land that first shitty position.Best is to learn via some hobby project that you thoroughly enjoy working on and where figuring out how to do things is part of the fun.>>103591729learn a popular backend language that you like and you are good to go.Node/JS/TS, Java and C# seem to be some common ones. Also starting to see more Go jobs here and there.Doesn't hurt to know SQL and knowing how to quickly hammer an API together.Or what are you specific concerns or doubts?
Do you guys use openapi specs to generate code in languages like golang?Should I be using openapi or smithy? I'm considering using smithy bc it seems like it can also generate stuff for grpc and not only HTTP REST APIs however I haven't worked with either before.
>>103591729maybe also take a look at this backend roadmaphttps://roadmap.sh/backendjust out of curiosity, for what kind of devices did you develop before with the firmware?
good night bump
How the fuck does regex work? I have a if (input == /[abc]/) but the statement is not executing when the input matches the regex.I'm angry about this.
if (input == /[abc]/)
>>103594700String.prototype.match
>>103594710okay this solved most of my woes but now I'm concern that .include and .replace in my program are not working.
>>103594877neither of those methods mutate the string, but rather return a string that has been mutated. are you sure youre using them correctly?
>>103577339I tried to compile Iosevka today, it didn't work, that shit consumed the 100% of my 12 core CPU and all my 32GB of RAM, I stoped it after 30 minutes.Why are webdevs so fucking retarded?
>>103594906No but now that you explain it like that I can see what my problem is.
>>103594944well, .includes returns a bool, but yeah. the return types are important when using methods.
>>103594939https://github.com/be5invis/Iosevka/blob/main/doc/custom-build.mdlooks like you just built everything? did you try only build a small subset? why not use a release?
I fucking hate react so god damn much.Hate javascript too.
>>103595057>Hate javascript too.js is supposed to be your zoomer gf, with a killer face and body, but with extreme brainrot, it makes for a good fuck
>>103595112I'm too eternally virgin to make sense of that analogy. But let me continue my rant.>backend dev for ~4 years>sometimes handed some shit code from india but usually a pretty good developer experience>polymorphism, type-safety, null-safety all making things breezy>decide to enter into front-end and learning react>start helping my company's one front-end dev with the massive react codebase in typescript>oh fuck why does this object have extra properties? These don't match its type>why is this null? why is this undefined? what the fuck is even the difference?>setThingy(previous => {...previous, someStuff: previous.someStuff.filter(s=> s.id !== previous.someStuff.map(t=>t.filter(f=>f.id !== otherThing.id)))}>mfw objects are mixing their properties with other objects and I don't even know whyWebassembly is our only hope
Is anyone working with Spine? I'm trying to extract an animation from a web event, but it doesn't look the same when I load it locally. I found the json file, the atlas file, and the png file and loaded them in the spine web player locally, but the character's hair remains stiff, while in the original it's swishing.Let's take the animation that appears when the page fully loads, where the character is facing away.>https://act.hoyoverse.com/ys/event/e20241220preheat-thygrj/index.htmlThe png is here:>https://act.hoyoverse.com/ys/event/e20241220preheat-thygrj/images/main_k_a_character.d8d5936e..pngThe .atlas and .json files are inside the vendors file:>https://act.hoyoverse.com/ys/event/e20241220preheat-thygrj/vendors_ccf94cc433ee5740af2d.jsThey are still called `main_k_a_character.atlas` and `main_k_a_character.json` but I couldn't find their direct URLs, so I converted the object into a string to insert it in a .json file and inserted the atlas string in an atlas file, after replacing every "\n" with a new line.I extracted them here for your convenience:>https://files.catbox.moe/nddald.atlas>https://files.catbox.moe/4nmew0.jsonSo any clue on what makes the hair on this animation swish? I should be able to take care of the other animations by myself after that. Could be something simple that I don't know because I don't professionally work with Spine. My entire experience with it extends to downloading and running animations locally like that.
>>103595147there's tow options1. your code is well designed and accounted for side effects by a senior and all of that you're witnessed make sense2. a nigger monkey has "made it work", but shat all over the code
>>103595147>.filter(s=> s.id !== previous.someStuff.map(t=>t.filter(f=>f.id !== otherThing.id)))}you do understand what this does?
>>1035954313. react is a framework entirely designed around making 1980's technology do backflips and behave like a modern program by making the developer jump through ridiculously ludicrous hoops and encouraging bad practices and making something as simple as changing the value of a property way more complicated than it should beMeanwhile typscript is a thin bandage layer on top of a 90's scripting language made in 10 days in order to attempt to make it less shit, but somehow overcomplicates it to the point that you spend even more time trying to figure out what it's complaining about than you would if you had just used javascript>>103595450It does nothing I made it up in 3 seconds as an example of how stupid react is
>>103595506>It does nothing I made it up in 3 seconds as an example of how stupid react isthat's standar js lad, off course you're struggling when you don't know the basics
>>103595535Lol.Sorry if you tried to decipher some jardon code I made up. It's okay to admit you wasted your time.
>>103595548your made up code use somehow existing js syntax, which you don't know or understand, but I do, pro-tip: I was trying to help you
>>103595558>which you don't know or understandNot long ago I actually didn't have much experience with it, which is why it didn't frustrate me or make me angry. I understood that the problem was me. But now I do understand it, I write plenty of TS in react every day, and it pisses me off daily because it is needlessly illogical and complicated just for the sake of continuing the legacy 90's web technology. When every modern browser supports webassembly now making these stupid JS frameworks completely unncessary. It's only required now by companies that already have their massive JS frontends and its too late to switch to something good.>I was trying to help youThat's kind of you but I don't have any specific issue just came to rant
>>103595594it's alright lad, I understand, front end ecosystem is a shit-show, nobody denying that
always remember to take advantage of shortcuts
template
>>103596302>templatenot really, ignore
>>103595430Is this the correct board and thread to ask? I don't think anyone outside of 4chan would help me with such an "unethical" activity, where else can I ask?
bring back flash, please
>>103595430>So any clue on what makes the hair on this animation swish?most likely some .js code
>>103596344does anyone have the original screencap of the thread of op looking for this picture and he draws it impeccably? not even yandex is able to find it and i dont think i have it saved.
>>103596400not me, sry lad
>>103596352yes, it runs in a browser and uses web technologies. ther eis nothing unethical about stealing from gacha games.please link to Spine and its documentation.>>103596385duh.
>>103595430>but I couldn't find their direct URLshm, the blob can be found when sorting the Img requests by payload size in the network tabblob:https://act.hoyoverse.com/2345ac2d-a75c-4e85-964f-01543b57076fThe json is just bundled with the vendor file it seems.Isn't there still lots of code you'd have to copy and use in the same way to tell the spine library how to perform the animation exactly? Never used it, but I'd assume that it's not just a simple drag and drop.Maybe try to animate just 1 or 2 pieces of the Atlas yourself and then you see what the code appears to look like and copy the matching/necessary vendor code over?>>103595147I think almost all your problems will go away if you were to stop using React and also switch to TypeScript instead of just JavaScript
>>103596446>duh.as you can see by his post he wasn't considering any js code in the files he pulled
this is the friendly webdev general, not the /g/ meme dump thread
>>103597228be nice, hes building up an archive of vaguely-computer0related memes to put on his resume
>>103591679Learn Wordpress
>>103597265Fuark I just realized I haven't pushed any commits to my meme dump repo in over a year no wonder I haven't gotten any callbacks from recruiters. You literally cannot get hired in this market if your meme portfolio is less than perfect.
>>103597300its so over
>Vite on topDiscarded.
>>103598063but why