[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1692658676018.png (260 KB, 939x767)
260 KB
260 KB PNG
>Free beginner resources to get started with HTML, CSS and JS
https://developer.mozilla.org/en-US/docs/Learn - MDN is your friend for web dev fundamentals (go to the "See also" section for other Mozilla approved tutorials, like The Odin Project)
https://web.dev/learn/ - Guides by Google, you can also learn concepts like Accessibility, Responsive Design etc.
https://eloquentjavascript.net/Eloquent_JavaScript.pdf - A modern introduction to JavaScript
https://javascript.info/ - Quite a good JS tutorial
https://flexboxfroggy.com/ and https://cssgridgarden.com/ - Learn flex and grid in CSS

>Resources for backend languages
https://www.phptutorial.net - A PHP tutorial
https://dev.java/learn/ - A Java tutorial
https://rentry.org/htbby - Links for Python and Go

>Resources for miscellaneous areas
https://github.com/bradtraversy/design-resources-for-developers - List of design resources
https://www.digitalocean.com/community/tutorials - Usually the best guides for everything server related

>Staying up to date
https://cooperpress.com/publications/ - Several weekly newsletters for different subjects you can subscribe to
https://www.youtube.com/@Fireship - Short entertaining videos

>Need help? Create an example and post the link
https://jsfiddle.net - if you need help with HTML/CSS/JS
https://3v4l.org - if you need help with PHP/HackLang
https://codesandbox.io - if you need help with React/Angular/Vue

We have our own website: https://wdg.one
Submit your project progress updates using this format in your posts, the scraper will pick it up:

:: my-project-title ::
dev:: anon
tools:: PHP, MySQL, etc.
link:: https://my.website.com
repo:: https://github.com/user/repo
progress:: Lorem ipsum dolor sit amet


Previous: >>96053510
>>
We are gonna work on legacy enterprise react code in 10 years aren’t we? So help me God
>>
>>96096404
You plan on still being in webdev in 10 years?
Bro, you better upgrade.
>>
I've linked this before. I like the idea.

https://github.com/trongate/trongate-framework
>>
>>96096404
>We are gonna work on legacy enterprise react code in 10 years aren’t we? So help me God
Besides hobby projects, actual enterprises (like the one where I'm employed) are already working with legacy angular and even jQuery code... So react in 10 years won't be the problem. Seriously, from all the shit that has somehow made it, react is still the most readable and sane.

Besides, all the other hyped frameworks have such short lifespans, both in terms of actually being maintained and major versions breaking features and/or syntax, that - while the actual frameworks may be better than react - the written code is usually of worse quality. Five years ago every dickhead who hated react was like "I'm gonna use vue" when they had like 3 months experience with vue. Today it's svelte... Meanwhile react stays.
>>
>>96095736
jQuery up in this bitch
>>
File: b.png (323 KB, 2673x2160)
323 KB
323 KB PNG
i am now a fullstack react developer
>>
>>96097706
if you guys united you could take over countries
>>
Forced to use angular at work. Aaaaaaaaaaaaaaaa. To add to my pain the entire codebase uses rxjs. Just kill me.
>>
>>96095736
Should I learn Java or Go?
>>
>>96098106
I'd say both but Java will still get you more jobs than go.
>>
Anyone here know how I can reduce FOUC with firefox? I get none on mobile and on chromium but firefox keeps flashing white briefly on page loads. Apparently it's an old well-known issue with it, but none of the workarounds I found worked.
>>
Haven't been able to concentrate today because I only slept about 5 hours last night

Mental how only a couple hours lost sleep fucks up your entire day

God has a lot to answer for
>>
>>96098595
good song
https://www.youtube.com/watch?v=xQwtjkMnaNo
>>
>>96098381
what the FOUC is FOUC
>>
>>96098595
Sometimes I go to work (1h30 commute *2) with 2 to 3 hours of sleep, sometimes even less or no sleep at all.
At some point you get used to it.
>>
>>96098704
wow, i would kms
>>
>>96098660
Flash of Unstyled Content
It's when the document loads before the CSS is applied so you can (even if briefly, hence the flash) actively see the CSS being applied - document structure shifts, elements change size/color etc.
Pretty ugly. Seems to happen even with very minimal pages on firefox.
>>
>>96098766
load everything you need BEFORE the body's html
not sure if it'll work, but makes sense, you are probably deffering CSS
>>
>>96098766
https://stackoverflow.com/questions/3221561/eliminate-flash-of-unstyled-content
>>
>>96098619
Interesting

>>96098704
I can't do that, I went through a period of getting too little sleep every night, maybe 4 or 5 hours a night repeatedly, and I was falling asleep at my desk
>>
I have a bunch of ~800k pixel images that I get as pngs. I need to change for format to something other than jpg and minimize the size as much as possible.
Webp gives good compression, but takes ~300ms each.
You guys got any suggestions? I'd like to be under 50ms.
>>
I have a degree in physics and know a little js and python. What do I need to do to get someone to give me money?
>>
>>96098973
Oh and I can use node and postgres if employers care at all.
>>
>>96098917
lossy compression vs lossless compression

can people even see the difference in naked eye if you compress them too much?
>>
>>96098973
WebGL AND / OR three.js might be an option, maybe even web asambly and canvas
>>
>>96098805
>>96098814
>load everything you need BEFORE the body's html
Yeah I do that already. I tried
>link rel=preload
>hide body with inline styles and make it visible at the end of loaded CSS
>empty script block
None of it worked. The one thing I didn't try is using domContentLoaded event so I probably should try that next, but I'm not too hopeful even with that since logically the second attempt should've worked - at that point both the document and the CSS *is* loaded. Yet it still flashes, so I assume it's some render blocking issue with the rendering engine of firefox.

One thing that works is embedding all CSS in a style block rather than loading external stylesheets but at that point it's a solution worse than the problem itself.
>>
>>96099009
I'm doing lossy, and yes.
>>
>>96099030
are you sure it is not cache'd?
>>
>>96099069
You mean the browser cache? It'd help if anything, this happens even with extremely small static web pages. Like this one:
>https://computer.rip/archive.html
Click random links fast and I get the flashing behavior.
Happens even in safe mode with addons disabled. I'm pretty certain that it's entirely a gecko engine thing at this point.
>>
We are so back on hypermedia train, lets fucking gooooooooo! Elysia + htmx + alpine is bussin fr.
>>
I've been pursuing my dream of programing but I've gotten old
I feel very lonely
>>
>>96098973
>What do I need to do to get someone to give me money?
Apply to jobs and lie on your resume if necessary
>>
>>96099221
buy a dog
>>
>>96098106
Java, Go is tough if you are not mid/senior already at least in my area and the language is really easy you can pick it up in a couple of days. Knowing OOP and Java also opens you more gates (Android, Desktop, Backend) and it's going to make you a better programmer in my opinion.
>>
>>96099193
I'd swear I'm getting 0 flashiness, maybe it is cause I have 1gbps symetric
>>
>>96099435
I would just put in big bold letter

>this is not a supported web browser. Please use Chrome, Safari, Opera, etc
>>
What should I use for my next ecommerce frontend: Next, Nuxt or Remix?
>>
File: 1687850035044831.jpg (20 KB, 843x471)
20 KB
20 KB JPG
I'm using a function as a dependency in a useEffect. Why does this feel so taboo and wrong. Am I not supposed to do this?
>>
>>96099578
Java Spring Beans
>>
>>96098381
>>96098766
>>96099030
>>96099193
>>96099468
No "FOUC". With neither firefox, nor chromium on linux. On a very slow connection.
>>
>>96099468
firefox is not failing, it is being killed, on purpose, just saying
>>
>>96099748
d:^)
>>
>>96099771
it's not funny, cause as it stands now, we're absolutely kidnapped by chrome and safari, way to go
>>
>>96099578
Next if React dev, Nuxt if Vue dev, Remix if bleeding edge hipster
>>
>>96098200
>>96099275
Ok, I will learn Java. Thank you both.
>>
>>96100371
no, thank you sir
>>
Made a C++ server library and used it with HTMX it can't get more comfier than this
>>
File: 1695122591190-1.jpg (2.92 MB, 1886x2800)
2.92 MB
2.92 MB JPG
Right, the company needs me to take a google cloud developer certificate and i'm about to start.
So, i am wondering if you guys could give me some advice into it, since this is my first certificate.
Where is the best documentations or learning material?
>>
>>96100446
of course you did

post a pic
>>
File: srch.png (7 KB, 512x512)
7 KB
7 KB PNG
Whats the best way to implement a search feature regarding the sites internal content (not an external DB catalog)? Do you make a simple json file or global state object containing section titles and description or is there a better way?
How do you usually make this?
>>
>>96100823
>sites internal content
How is that content stored in the first place?
>>
>>96099212
htmx makes zero sense to me (speaking as a person that put his first html website online in 1999). I want to know what's the real advantage.
Also who really needs Elysia? What does it do that is so good compared to express?
>>
>>96100735
>>
>>96100905
Thats what I said: the internal contents (pages, section titles and descriptions/text), not from a catalog which obviously requires DB manipulation.
Im asking this because I've never done such and I dont know if theres some kind of way (maybe a library or package) that can easily take it straight out of the DOM or if its more common for the dev to just store the info in a separated file.
I want to know how anons here do it.
>>
>>96098073
rxjs is a whole other level of webdev hellscape
>>
>>96101070
why? Don't you like to have another layer on top of the layer on top of the dom (layer) to pretend you are using a functional programming language to do reactive stuff?
>>
>>96096497
o7
>>
>>96096497
> GitHub stars are the metric by which the success of frameworks gets measured. We need 1,200 GitHub stars to make Trongate a top ten PHP framework. If Trongate becomes a top ten PHP framework it will be one of the most electrifying events in the history of PHP!
this message makes it look like it's a joke framework, but it's a real one?
>>
>>96100996
So you are talking about the current location? The page is loaded in the browser at this point in time? document.body.textContent.match...
>>
i hate livewire!
>>
>>96098073
>>96101070
>>96101145
The fuck is rxjs? I mean, I am looking at the examples and I simply do not get it. Every plain js example is easier to understand and rason about. Why would anybody use that?

I am absolutely fed up with this: The very same concepts popping up again and again reinventing syntax, grammer and "rules" all over again. Why are we doing this shit?
>>
>>96100996
usually the pages are stored in a database, so the search is a query to the database. Otherwise there are external search engines you can use. There are open source, free, paid, etc just choose.
>>
>>96099212
>Elysia

ahaha pure functions as a webapp

webshitters have really set out to reinvent one wheel at a time until they rediscover ... lisp?

>>96100941
htmx is for when javascript doesn't offer you any benefit (most cases) and you want to write one program to do one thing instead of writing two programs to do one thing

weirdly enough not many people want to write one instead of two programs to accomplish the same thing
>>
>>96101496
rx is coroutines but written the same way across all (many? (all?)) programming languages

rxjava, rxpy, rxjs work exactly the same and all provide async/await-like functionality
>>
>>96101573
>htmx is for when javascript doesn't offer you any benefit (most cases) and you want to write one program to do one thing instead of writing two programs to do one thing
What are you even talking about?
>weirdly enough not many people want to write one instead of two programs to accomplish the same thing
And now you are adding yet another non-standard syntax extension to html which then gets compiled to js anyways? Seriously?
>>
It's over. Why do you make these threads? All jobs are flooded now.
>>
>>96101496
it tries to bring functional programming elements into javascript. I haven't used it, so I don't know if it succeeds. The thing with functional programming is not the syntax but certain guarantees in how memory is managed that you cannot have with javascript. But I don't know (also I'm a webshitter, so...)
>>96101573
>htmx is for when javascript doesn't offer you any benefit (most cases) and you want to write one program to do one thing instead of writing two programs to do one thing
wat?
>>
>>96101666
why would satan be telling us such a thing?
>>
>>96101675
>it tries to bring functional programming elements into javascript
But js can be used fully functional...
>but certain guarantees in how memory is managed that you cannot have with javascript.
...and that's wrong, bro. That is like not the definition of functional programming at all. Look it up.
>rxjs [...] async/await-like functionality
We've got that with js itself, why do what this >>96101145 anon wrote? Just why?!
>>
>>96101624
>What are you even talking about?
>>96101675
>wat?

you use htmx to write a single program that works like a backend+frontend web application

what's hard to understand here?

e.g. i use htmx to avoid wiring up AJAX calls and JSON->HTML rendering for an API endpoint like /api/users/123

when i make a request to /api/users/123 with 'content-type': 'application/json' in the headers i get back a json response with user 123

when i make a request to /api/users/123 with 'content-type': 'text/plain' in the headers i get back the same data but already in html format and i just replace #userdata DOM element with that html

no need for any javascript, just

<div hx-get='/api/users/123' hx-target='#userdata'>Loading user data...</div>
>>
>>96101784
what the fuck
>>
>>96101755
>>rxjs [...] async/await-like functionality
>We've got that with js itself

yeah, since 2017
even promises are no earlier than 2015

reactive-x (rxjs, rxjava, rxpy, rxetcetcetc) is from 2011 google tells me

it provides you with the same approach to writing concurrent code in any language
>>
File: 1667385949028424.png (98 KB, 1200x1043)
98 KB
98 KB PNG
i dont know jack shit about ui because the last time i wrote a website javascript hadnt' really been invented yet

this shit is still fine right?

i just want to use python and build a demo front end in a language that we can easily hire someone for later

there's an internal tool at our work that uses it and it seems pretty cool

i think i kind of get the concept of "html is the framework, javascript is the sentient bullshit behind the scenes that floods you with stupid network requests and annoying shit but also makes sites interactiv, and css is a trillion lines of english to make some stuff look "fancy""
and everything just shoots api calls to some backend thing and it sends data back and that's how you get your actual zombie DOM and how wget died

am i overlooking anything big?
>>
>>96101784
and of course when i say a single program i mean a backend-only webapp (so no separate javascript codebase for a separate frontend application), multiservice architecture notwithstanding
>>
>>96101851
>yeah, since 2017
>even promises are no earlier than 2015
OK, I know that everybody hates callbacks, but that is like 1e10 times better than what I see in rxjs.
>it provides you with the same approach to writing concurrent code in any language
ok, nice then. Still looks and read like total bullshit.
>>
>>96101784
this explanation is good, but the previous post was gibberish
>>
>>96101951
over time it gets 100x worse than simply how it reads, especially if you were unlucky enough to have a codebase during the redux-observable era
>>
tailwind is based
>>
File: 1673466227782730.jpg (257 KB, 1920x1080)
257 KB
257 KB JPG
whats a good personal project
>>
>>96101784
>>96101901
There is like SOOO much wrong with this...
Why are you even returning JSON in the first place? Just return html already. And while you're doing that... just fucking render *the whole page* on the server, then you do not even need to make a separate request!
>so no separate javascript codebase for a separate frontend application
Again: Including a non-standard html syntax plugin which compiles to js anyways is better than simply doing the *very easy* to do stuff with js? Really? Even the "alternative" web shitters are dumb as fuck. It's not only the mainstream that is absolutely insane and reinventing shit all over the place... those who seem to see a problem with that do it, too, as your example shows.

Just so that you understand it: html, js and css are *one* thing. They are the representation of what the browser will model in the DOM. You can include all of them in one file that you serve. But you are free to split it up. It's still one "app".
>>
>>96102019
I can easily see that happening... I've been doing web dev for a long time, but I have never worked with that stuff as it seems. At least not in a straight forward way.
>>
>>96102049
it's based but sometimes I worry that my sites may end up looking all the same?
Although I've already made a fitness app and an admin dashboard, and they look quite different.
Also how do I manage typography?
>>
>>96102068
I do agree that there is a tendency of overcomplicate things, but just for the base case of htmx thing about this for example: you are on a profile page of a user. You are served his basic profile informations. Then you click on the "last posts by this user" tab. Instead of reloading the page, htmx just loads that part. You send less data and the user experience is more pleasurable. As a programmer you don't have to do more work than you would otherwise, I would argue it may even be less work.
So, htmx may not be complete bullshit.
>>
>>96102068
>Why are you even returning JSON in the first place?

not necessary, used it in example because i generally plan stuff ahead and if im rendering HTML at an endpoint it's likely a JSON consumer (mobile client or something else) will need to get JSON-only data as well

>>96102068
>just fucking render *the whole page* on the server

that's the fine print, actually, you are rendering what was some 10 years ago called a "partial"

templating engines in e.g. php (twig, blade), ruby (erb, haml), python (jinja) have a concept of reusable templates

htmx takes that concept of "partials" and lets you use them through a network request so you SPA functionality

>>96102068
>non-standard html syntax plugin

if you mean htmx i mean ... i wouldn't be surprised if IETF puts this stuff in html specification itself soon

>>96102068
>html, js and css are *one* thing
sure, but react doesn't fit here, which is the whole point

>>96102211
exactly

partials-over-network is the best tldr of what htmx provides you with, >>96102068 see here https://twig.symfony.com/doc/2.x/tags/include.html

laravel's blade calls their partials "components" these days so twig is a better example as an old-timey php serverside templating engine
>>
>>96102061
there are no good personal projects. There are only things you want to do and bring to completion.
Believe me, I've been in your position and it's a total waste of time. I was a complete retard for not noticing it sooner. I wasted so much time thinking about what was a "good" project that I lost many opportunities I could have had if I just worked on what I wanted (which I didn't ironically because I was looking for the good project and getting demotivated). And I did this bullshit for years.
so yeah, just do what you want to do and don't stop and don't think it's useless because it isn't.
>>
>>96102211
Dude, you are totally overcomplicating things. Just render the whole page with all posts. The you do not have to make two request, you do not have "two" functions for returning the profile and a second for the posts and you do not need dynamic insertion of content.
>send less data and the user experience is more pleasurable.
Complete and utter bullshit. For users who want to see the posts you have two requests, for users who only want to see the profile you have one request. That's the same for a "js" version and your htmx version. However, if you simply were to send the "full" page you'd only end up with one request in every case. And you would be able to send static data. The few of user data are way less than including your htmx lib!
>>96102299
>htmx takes that concept of "partials" and lets you use them through a network request so you SPA functionality
Why the fuck do you want that if you reject modern features on the other hand?
>i wouldn't be surprised
Well, I would. It's pretty obvious and easy to understand what goes where with html, css and js.
>sure, but react doesn't fit here, which is the whole point
What? Again, just so you understand it: html, css and js ARE three aspects of one thing. You can't have visuals without css, you can't have semantics without html, you can't have dynamic content without js.
>>
>>96095736
I HATE GIT SO FUCKING MUCH. I JUST WANTED TO ROLL BACK TO HOW MY CODE WAS AT A PREVIOUS COMMIT. DO GIT REVERT AND SHIT AND SPAZES OUT ABOUT UN TRACKED CHANGES. AFTER TRYING A FEW OTHER THINGS WITH GIT STASH AND POP, ALL MY LIST COUPE COMMITS ARE BORKED. I DIDN'T EVEN DO GIT RESET. ITS LIKE GIT TRIES TO ADVERTISE ITSELF AA READY VERSION CONTROL BIT ITS SO FUCKING JANKY.
>>
File: magit.png (8 KB, 400x400)
8 KB
8 KB PNG
>>96102612
not my problem
>>
>>96102335
>so yeah, just do what you want to do and don't stop and don't think it's useless because it isn't.
In a way you could say I took this advice to heart, because I don't want to do anything and I don't (can't) stop not doing anything.
>>
File: 1669811639957227.png (30 KB, 590x361)
30 KB
30 KB PNG
cancer
>>
>>96102638
Bitch I'm not using emacs I use visual studio code
>>
>>96102612
Holy filtered, understanding git doesn't automatically make you a good dev but not understanding it sure as hell outs you as a complete retard
>>
File: 1666596065179673.jpg (35 KB, 757x704)
35 KB
35 KB JPG
What domain host is recommended now days?
>>
how much does a upper medior or senior charge per hour if he's working for western clients from eastern europe?
>>
>>96102605
>you can't have dynamic content without js
this is i think where you stumble

if i write a bash script that does a curl to two static HTML files on two different URIs behind HTTP servers and concatenate them to get one HTML file, do i then have dynamic content, yes or no?

same goes for partials
and again, about partials

>>96102605
>Just render the whole page with all posts. The you do not have to make two request

if you can't see how HTMX builds on top of partials you would have to go back in time and tell people who thought "hmm maybe i'll dynamically include some HTML for the footer because it's the same everywhere and simply reusing the same one would be nice"

to stop overcomplicating things and just make copies of your footer instead

and for another interesting point which no one brings up and which explains why HATEOAS is very good to have - if i consume an HTMX webapp with a non-browser program i dont need any js to render the dynamic page on special conditions, parsing it would work much the same with e.g. beautifulsoup4 and bits of custom logic to substitute elements wth partials in certain scenarios

the HATEOAS benefits that HTMX brings also make applications more crawlable/parsable
>>
>>96102605
>Just render the whole page with all posts. The you do not have to make two request,
Maybe I don't want to render the posts unless the user asks for them, to save on queries, data or just because there is already enough information on the page and I don't need more. Maybe the component to show all posts will be reused in another section of the website too. I can think of many use cases.
I will say that it would be much better if we could see some sites that make heavy use of htmx in production and that would show that the advantages are real and strong.
The talking theory is something I don't like, despite me doing it right now.
>>
>>96102718
I follow tutorials and manual pages and this shit doesn't act like how its described to. The fuck is that my fault?
>>
>>96102612
you always secretly make a zip file of the whole folder on the last git commit and then just substitute the shit without telling other devs so they don't think you're a brainlet for forgetting arcane, unintuitive commands you use once every 3 months
>>
>>96102950
>it would be much better if we could see some sites that make heavy use of htmx in production and that would show that the advantages are real and strong

for the past 12 months i've noticed it coming up more and more, i suspect htmx won't be - for a while - used by babel/webpack/typescript types

htmx is getting picked up mostly by startups and devs influential enough to get their enterprise to do htmx instead of react where it really counts

people who want to get stuff done and want it done yesterday
>>
File: thumbsup-c1816.png (452 KB, 1200x627)
452 KB
452 KB PNG
>>96102987
I'm doing this shit from now on until I get a better hang of it. I just don't get why I couldn't just revert to an older change without it flipping shit like all the tutorials and shit show. It makes no sense. Thank you anon. I'm trying to polish up my mediocre web app for a job fair coming up. God I'm sick of the stress.
>>
fuck websockets fuck you
>>
File: image-705710-529701088.png (149 KB, 693x656)
149 KB
149 KB PNG
>>96103269
>>
>>96096471
upgrade to what, I assume software dev? that sounds like a good idea the goal was to accelerate my own suicide.

what jobs do anons have when they come in here and use the word "webshit"? reading sicp and getting neetbux isn't a job but it does sound alright
>>
So, what is the ultimate answer as to why an entry-level job requires 2+ years of experience?
>>
This is the answer to the German anon. The thread got deleted before I could post the answer.

>do you mean give them a token via cookies that's timeboxed and won't work after N minutes?
Yes, JWT is better than sessions if you have a lot of users because the backend can check if the JWT is correct very quickly. The negative is that it's harder to revoke to token if something has gone wrong.

I'm assuming that you're creating the backend, i.e. the REST API and so on. A JWT token will be created for the user when they login and it's saved in the browser. That JWT token is then included in each API call in the header, i.e. "Bearer [the JWT token]". You can protect certain API endpoints with JWT tokens and you can create refresh tokens that will be created after a while after the fresh token has expired but that will have fewer privileges, and you can demand admin privileges to really sensitive endpoints like delete endpoints. Something like this if you use Flask

@jwt_required(fresh=True)
def delete(self, user_id):
jwt = get_jwt()
if not jwt.get("is_admin"):
abort(401, message="Admin privilege required.")

user = UserModel.query.get_or_404(user_id)
db.session.delete(user)
db.session.commit()
return {"message": "User deleted"}, 200
>>
>>96102943
>comparing bash to your new favourite frontend framework
Can't tell if stupid or troll.
htmx is client side dynamic content in a stupid way. Every example you have given where you use htmx, server side content would be more appropriate.
>it's the same everywhere and simply reusing the same one would be nice
We include that from the fucking server you fool. Have have done this since cgi in the 90s.
>HTMX webapp with a non-browser program i dont need any js [...] bits of custom logic to substitute elements wth partials in certain scenarios
facepalm
>>96102950
>Maybe I don't want to render the posts unless the user asks for them
Hide them.
>to save on queries
Best done by serving static content, which would be trivial if you simply did not have to query in the first place.
>Maybe the component to show all posts will be reused in another section of the website too.
The server has to have an endpoint anyways. Don't expose it as rest and simply make it an internal api.
>that would show that the advantages are real and strong.
Said *every* shill for any framework ever. Proof is still missing in action.
>>96103122
>htmx is getting picked up mostly by startups
So they'll be gone before they get relevant. Good thing.
>devs influential enough
nice bubble. youtube is not the real world. Meanwhile the real world still uses and will continue to use react, bootstrap and even jQuery.
>people who want to get stuff done and want it done yesterday
Those people know how to fucking use fetch() and not depend on yet another niche hobby project dependency.
>>
>>96096404
and we'll be paid greatly for it
>>
>>96102159
>Also how do I manage typography?
depends what you mean by manage
it's pretty common to just make new components that wrap the styling you want
>>
>>96098973
a CS degree
>>
should i make a custom cms for a small flower shop or what does the cool kids use these days?
>>
>>96096718
>Im a react andy, the post
>>
>>96104368
Absolutely not.

Install WordPress, pick a nice theme, slap it up on a host, send invoice. Get it all done before lunch. Why the fuck would you ever consider reinventing the wheel or overcomplicating a job like that?
>>
>>96104493
wdg cred
>>
>>96104570
If you aren't deploying a whole microservices system written in Rust on kubernetes for this small flower shop with 10 users, you will never have our respect.
>>
>>96103520
nah it's much easier than that:
step 1. change nothing about your skillset
step 2. call yourself a "full stack engineer"
>>
Bump
>>
[blog]
I fucked up.

I learned Go, and I feel like I can make anything (in webshitting). Sometimes it takes a long time, because while I know exactly what to do, and usually have an idea of how to do it, it can get tedious when I realize I need a few hundred LOC to do the next step in a project. So I wanted to alleviate this by checking out .net core. It's also great, but I feel like the LOC I save myself from having to write is wasted 2 or 3 fold having to look up how to do things with their prebuilt stuff. With Go I just write code and do stuff. With .net I have to constantly google and rely on the dot operator to see what's available on a class/model... One makes me feel like a professional hacker, but gets really tiring, the other makes me feel like a retard asking a program to do what I want, but takes away like 80% of the work on my end. But .net is also annoying because it feels like there's a million pre-built things that I'll never learn how to use or even know exist in the ecosystem.

I hate this.
[/blog]
>>
File: 1681721875394168.gif (957 KB, 112x112)
957 KB
957 KB GIF
retard question
i save an array of strings to a postgres database. postgres changes that array to something of the form
{"string1", "string2"...}

and returns it like that when I retrieve my data with findAll from sequelize. So it returns it as a big string with curly braces. am I missing something? why doesn't it return it as an array javascript can use?
>>
>>96108008
It doesn't look like Sequelize has a DataType that allows for arrays as a column.
You will have to do JSON.parse and JSON.stringify on get and set.
>>
>>96108412
Nevermind, you can do
type: DataTypes.ARRAY
>>
>>96108447
yeah that's what i have in my model but i'm just getting a string back and all the searching i've found has people doing string replacements on the brackets and splitting by comma delimiters to get their data back. surely this is not the needful?
>>
>>96103638
>strawman
>strawman
>ad hominem
>strawman
>proposes - what is essentially - 90s tech
>another strawman

you just don't know what we're talking about here do you? go inform yourself on the subject matter then come back

you should also solve whatever personal and mental problems you have before trying to discuss technology
>>
I have to ask. Why do some WebDev and SWEs say that they hate their jobs and wish they did something like civil engineering or mechanical engineering? Do they honestly think they'll be doing world changing things, not get bored, overworked, or something? Mech engineering fucking blows and civil will bore anyone to a very slow death.
>>
How the fuck do I get and stay motivated? I was programming and designing my site a lot, then slowed down and now I just can't seem to get started.
>>
>>96109375
amphetamines
>>
I need to build a decent sized project using C# and angular. What should I build?
>>
>>96109649
a site that hosts a picture of my dick
>>
>>96109034
every doctor I know is on the verge of a mental breakdown
>>
>>96109669
that's too easy because your dick is too small
>>
>>96109768
buy a domain and we'll see
>>
hi wdg, i wish you a great day
>>
File: Texas-Dumpster-Murder.jpg (143 KB, 500x700)
143 KB
143 KB JPG
>>96109794
fuck you
>>
File: 1501887579158.png (97 KB, 333x158)
97 KB
97 KB PNG
>>96109801
>>
>>96108008
if you need to store an array shouldn't each of those elements be their own record?
You could also use json type and save it that way
>>
>>96110019
well it's from a form field that can take multiple files, so it gets stored as an array of filename strings in the database.
this is a react/node/postgres stack, so the file list array is going through multer and sequelizer and getting regurgitated back out. idk wtf i'm doing.
>>
Should I switch from SDET to React webshitter? The latter pays far more for some reason.
>>
>>96110071
I don't know how postgres arrays work, but you could jam it into a json column if you want to do NoSQL in SQL.
A normalized SQL schema is easier to work with. For that, you would normally store these in a files table. create table files(id int auto_increment primary key, name varchar, size int, path varchar, hash varbinary, etc.) then have a mapping table between userforms_files(userform_id int, file_id int, foreign key(userform_id ) references userforms(id), foreign key(file_id) references files(id)). This way, you can add/remove/change files without having to touch the userform record. You can also find out which userform a given file belongs to, how many files they have, etc.
>>
>>96108008
that's what you get for using shitty ORM's or even ORM's at all, how you receive the data is a job of your pg client not database fault
>>
I'm learning web dev now, how would you go about passing data to and from a postgres db to svelte? not quite sure how to do that, I've used pocketbase orm with svelte before but it makes no sense to use it after learing real databases
>>
>>96112361
to be clear, I just want to make a project where I show a table with all the data in the frontend and I can modify it wiht some add, remove or edit button cause I suck at css and all that
>>
>>96112361
You can't pass directly to client-side code in your browser from your database, you need some server-side middleman e.g api/postgrest/sveltekit api route that connects to postgres and passes it back to front-end.
>>
>>96112390
and how do I go about doing that? I'm looking online and it all looks like a mess to me
>>
What's a good way to tell users that something is draggable? Pic rel can be dragged left/right to show the stuff out of view, not too sure if users will intuitively know that though.
>>
>>96112589
If you're using Svelte, use a full-stack framework like SvelteKit that allows you to run specific code only on the server, which would allow that server-only code to process incoming requests (from users), authenticate with the database (using credentials) and do select/updates to the database.

Easiest way to get in to postgresql on sveltekit would be to use Vercel Postgres -- https://vercel.com/storage/postgres (see the sveltekit example), or Neon (which Vercel Postgres uses under the hood, but is cheaper)
>>
>>96112589
Depends which way you want to go, there are multiple ways to do that but every one of them involves having some kind of server but for api you would need to create e.g express nodejs http server that has endpoints to return data and endpoints to modify data, then in your client-side (svelte) code you would call fetch to your server to get the data/modify the data inside the database. The reason you need server is because postgres can only talk with its own protocol and browsers talk mainly http and exposing database directly to the client could be dangerous.
>>
>>96102612
git reflog
good luck
>>
>>96112678
change cursor on hover
>>
>>96112361
To query a database from the client (web browser) you have to be able to talk to it. However web browsers don't support database communication protocols, so you need a layer between your database and your client. This layer is usually a HTTP web server and is usually referred to as the "backend" of your web application.
>>
>>96112726
I'm using Sveltekit so I guess the server is already there, if I do like
>>96112707
says and try to use the server already provided by Sveltekit maybe I can just boot a postgress db server and make the two communicate somehow, now I gotta learn about the backend side of sveltekit, I'll be back in a day or two after understanding and testing some stuff
>>
>>96112707
Vercel storage seems pretty cool for DX, but boy do I fucking hate this

https://github.com/vercel/examples/blob/main/storage/postgres-sveltekit/src/routes/%2Bpage.server.js

Literally the only way to set up your DB table structure is to try/catch a SELECT query, literally check
error?.message === `relation "users" does not exist`
and then run `CREATE TABLE IF NOT EXISTS`. Absolutely niggerlicious
>>
>make your back-end in an interpreted language
>/wdg/ says "nooo that's dumb because they're not real languages and aren't fast enough"
>make your back-end in a compiled language
>/wdg/ says "nooo that's dumb because your database will be the bottleneck, not the application"
I suppose the only winning move is to not listen to zealots on /wdg/
>>
>>96095736
What's wrong with keeping console logs
Final users won't see them
>>
>>96113116
Devs and curious people will see them. Just looks unprofessional doesn't it.
>>
>>96113116
harder to read code full of console.log()'s
and it makes you look unprofessional I guess? I am now wondering if my europoor bank prints anything in the console
>>
>BRO we NEED x y z in backend NOW
This seems like session management? Just put it on the server serving the requests.
>BRO we use NEXT.JS and VERCEL we are SERVERLESS
Isn't a static page dispatcher a server?
>BRO it's in the CLOUD we are SERVERLESS (tm)
>we NEED a stateful REST session API
Dear god.
>>
>>96102975
sure it doesn't. it conspired to only not work as described for you, retard-kun...
>>
>>96113116
Well for one it outs whoever wrote this trash as a terrible programmer incapable of using a debugger
>>
>>96113116
console logs are synchronous
>>
>>96096718
>svelte
Many MooTools dev went to early facebook and created React.
One of the original MooTools devs, Guillermo Rauch who created Vercel and Next.js, employs Rich Harris and other ex Facebook devs to work on Svelte.
I think Svelte is a good bet at the moment, they even make iphone like announcements: >>96112592
>>
>>96113705
>ex facebook devs work on svelte
Dominik was such a godsend, he is a literal god of optimizing DOM, can't wait to see how svelte will dominate the framework benchmarks.
>>
I want to learn more advanced javascript for web security, but also haven't written much in a while (mostly reading source code). Any resources out there tailored specifically towards js security?
>>
>>96107903
Why don't you just pick PHP? Laravel is well established, you'll be job secure in no-time.
I don't get what your issue is really, .net is garbage, just pick something else.
>>
i suck at my job lmao

does anyone know how to capture the event for clearing a text input field using js or jquery? on change only works for typing stuff in, not deleting the contents of the field. i want to reassign a variable when the length of the field's value is 0

any time i ask a retarded question like this on stackoverflow i get blasted because i don't know the correct terms for things. help pls
>>
File: 1694592707019001.jpg (485 KB, 1080x1080)
485 KB
485 KB JPG
Is Django worth investing my skillpoints and time in?
>>
>>96113197
I use logging for debugging. It's quick and easy. But I remove these lines before committing my code obviously.
>>
How are my enterprise sisters doing with those PCI audits? Are they making you fix jQuery's vulnerabilities again?
>>
>>96113819
>how svelte will dominate the framework benchmarks
https://www.youtube.com/embed/RVnxF3j3N8U
>>
>>96113927
>.net is garbage
How so?
>>
PHP is a language that I would never choose to use and would only use if a good job wanted me to use it
>>
>>96114895
>Runes
VGH... Come home white man
>>
>>96114895
>Runes
>$props
>$state
>$effect
>signals
so it's just solid with extra steps. Sveltebros what went wrong? I thought the magic was supposed to be real
>>
>>96114895
Hmm, this change cleans up the compiled js output so much but I wonder if you want to mark everything with $state as with ref in vue because I just tested it in the playground and normal non-$state variables are still reactive. I don't like $derived though, $: looked better.

>>96115149
It's still better designed than solid but these are not even all of the svelte 5 changes. Of course you will need signals to match/beat solid, most frameworks are implementing them right now.
>>
>>96115184
>It's still better designed than solid
I disagree. JSX is great and I like solid. Unlike the weird hack shit that svelte DSL is trying to be, JSX just works. Svelte is trying to be too many things at once and it's gonna be its demise.
>>
>>96114895
every anon who shills svelte is like
>svelte is just javascript
but it
>has incromprehensible messy "rules" you have to follow just like every fucking framework
>also deviating from standard js template strings by using the dollar inside of the curly braces
seriously? And any of you people here shilled this before?
>now introducing [...] svelte 5
>this fixes its problems! for real this time. really, I swear!
>now within your still quite new framework you've got two systems in place where the newer version is opt in and the old one will still be supported...
come on. This is a mess. We need a new framework to fix this!
>>
>>96114895
Apparently this guy used to be a journalist with one of the big UK newspapers. That's quite a career change.

https://www.theguardian.com/profile/rich-harris
>>
>>96095736
Enterprise Good Morning
>>
>>96115291
I mean it was mostly javascript with some rules unlike frameworks that just go completely off the rails like angular and/or react. And now they've become the very thing they swore to destroy. You either die a hero, or live long enough to see yourself become the villain.
>>
>>96114895
breddy gud
>>
>>96114895
>use svelte, anon
>it's useState and useEffect relabled as $state and $effect + behaving just a little bit differently so that it will grind your gears just enough so that you will hop to the next framework that I will create in two years
>have fun!
>>
>>96115203
Solid's JSX is not even real JSX, it pretends to be JSX but it's actually DSL (control flow elements) because of performance reasons and you are stuck with shit styling solutions, SFC are just comfier.

>>96115291
>messy rules
like not being able to use things not on top level? this update fixes that

>deviating from standard by using dollar inside of the curly braces
???

>>96115353
it's almost like they are both reactive frameworks
>>
>>96115344
You know what totally amazes me? It's the fact that if you were to simply adopt some rules to vanilla JS, you'd end up with code that would be reactive all by itself - without a framework.

These framework people always come up with these examples that are completely screwed in one way or another. They're always creating counters and todos - while that is something where a fucking manual DOM manipulation with js would be sooo freakin easy to do. But they will still tell you how great their framework is. But then at a real project with a larger scale, for some unknown reason, all the rules make it suck.
>but you cannot a big project without a framework

of course I am using frameworks btw, just to clarify... but not seeing this insanity...
>>
>>96115291
>come on. This is a mess. We need a new framework to fix this!
This but 100% unironically.
>>
>>96115369
>it's almost like they are both reactive frameworks
Not the point. The point being that svelte claimed to fix other frameworks. Now, it's just yet another copy of these frameworks. And they're at a point where even the names are the same because the concepts are the same and inner workings are the same - so why even replace the old framework if the new is the same?!
>???
Well, he creates the const counter from a function and now has to call it in the curly braces with a dollar sign. Why?
>Because svelte, bruh. Because reactive, bruh. Because an actual getter and setter wouldn't be 2023, bruh. This sveltes your code, bruh.
>>
>convince everyone to do code reviews on github instead of zoom meetings that waste time
>boss hates change, thinks it's stupid, and wants to waste everyone's time in zoom meetings.
>reviews my stuff on github and writes dozens of lines of comments saying "this wouldn't work!" and like "why do you need to format it this way?"
>my comments are "yes, it does work" and "because it's required to be formatted that way or the api won't accept it"
>tries to make my code look as shitty as possible by writing a million comments then telling the head of product about it being buggy.

What do you do here? Boss is the CEO btw.
>>
>>96115518
>so why even replace the old framework if the new is the same?!
Because I, as a vvhite man, would rather use rvnes than whatever the facebook troons came up with.
>>
>>96115518
The counter example uses counter.count in svelte 5, $counter was svelte 4 speedwatcher-kun.

>It's a copy of other frameworks
Why not copy a thing that is good (signals)? Yes they are solid signals but solid does not have many things that svelte has, so what is your point?
>>
What do we thing of svelte 5 runes, sisters?
>>
React is the shit. You don't even have to know that much about programming, it's like python, you just stitch libraries together.

I understand why "React devs" are afraid of AI.
>>
>>96115610
>$counter was svelte 4
It is still the standard, the "new" way is opt in.
>what is your point?
Framework hopping 10 years ago? I can see the reason. Framework hopping today? Where they are not really doing amazing new stuff (tm) but just the same shit with the same shitty problems and the same shitty concepts in another package? Just to be hip? Stop it already. Stop this framework reinventing, hopping swicheroo bullshit already. It's making us all look fucking dumb. And I'd guess that we web people are dumb to some degree.
>>96115652
>runes
People who remember the cgi days call these sigils...
>>
Oh did Prince Harry already revealed the new version of Svelte ?
>>
>>96115652
>$state
good, looks like a hint to compiler, still can mutate without unwrapping, still need to manually invalidate arrays on push
>$props
very good
>$derived
meh
>$effect
good but untrack() looks weird, I think excluding dependencies in second argument array would look better
>selector
cool but kinda autistic

It's definitely an improvement in terms of composability and it will have top performance for sure until solid catches up.
>>
OMG Runes it's like Skyrim all over again it's heckin wholesome svelte sisters.

const { subscribe, update } = writable(0);


Wait a minute, not like this sisters.
>>
>>96115985
another speedwatcher-kun....
>>
svelte sisters on suicide watch
>>
>Something magical is coming
Hooks, err Runes, Runes sisters.
>>
>>96114242
I can't believe you have a job while I scrape by on welfare and cannot even afford a new bed
>>
>>96113927
i haven't seen one Laravel job
>>
>rvnes
Truly the framework for ayran vbermenschen
>>
>>96115985
const [count, setCount] = useState(0);
const { subscribe, update } = writable(0);
>>
>>96115652
Thanks, but I'm sticking with React.
>>
>>96116392
there are no laravel jobs in america, because in america companies live off central banks money, so they don't have to be profitable but only justifying their existence to venture capitalists, so they always choose the cool, inefficient tech that is the current thing among the managerial class.
Laravel is used in places where companies have to serve real clients and produce actual stuff that works or fail.
>>
sveltechads just gained access to sveltify their .js code with rvnes
>>
>pajeet mad at the suprerior aryan framework
Heil Harris !
>>
Rich Harris finally lost it, he recreated React, but with a shittier API.
Bravo Rich.
>>
>>96116392
Maybe you should look better because the Go and .Net job you see, you will never get one.
>>
>>96116464
>so they always choose the cool, inefficient tech
Laravel is one of the least performant frameworks and is solely used by hipster devs. What in the fuck planet do you even live on homie?
>where companies have to serve real clients
That's .net core and SpringBoot friend.
>>
hey new fren here. Im thinking of making a productivity app. Where users can put tasks in the for the day week etc and have a daily list of tasks as well as a journal with preset questions as well the option to add or remove other things users might want to add to their personal journal. As well as a calendar display of the month and a few tasks listed on the day etc.
is this a good portfolio project or even something I can make money from? I think it’s a good learning experience regardless so I just answered my question kek, but I would love your input thanks! :)
>>
>>96116665
Productivity apps are the most cliché entrepreneur app idea you can ever come up with, it's actually a running joke in "entrepreneur circles" that everyone of them had that idea one day.
That being said, it's a good portfolio idea because you can always expands functionnalities and third-part integrations, calendar views are MUCH more complex that you can imagine, just dealing with timezones itself is an ordeal.
>>
>>96116464
This guy get it. First of all, self taught outside of the US is mostly a meme. You will start with an internship at best and will have to work your way up, don't expect to be paid more than a fast food worker and you will struggle to find that first internship.

Second, you have to understand the self taught boom. It was only due to the FED printing a shitload of money. It allowed venture capitalists to borrow money for free and distribute it everywhere expecting to hit something big, this era is over.

Third, the only job you will get as a self taught are React jobs in meme startups.

Fourth, you're 3 years late to the party.

>Laravel is one of the least performant frameworks
The performance of a framework or tech should be the least of your concerns. Acquire 10 millions users first, then you will have all the money you need to scale.

Ship. Grow. Scale. In that order.
>>
>no sir, you can't use signal, it is react only, sir
>bitch motherfucker svelte !
lmao
>>
>>96114895
>Please don't do a vue 3 please don't do a vue 3
Well at least we don't have to type .value everywhere.
The update actually meets my needs. I just wish they foud a way to get rid of the $state() syntax when declaring a reactive value
>>
>>96116842
More like vue3 going "please don't switch to svelte, see, we will compile soon too with muh vapor".
>>
>>96116743
>self taught outside of the US is mostly a meme
I'm self-taught in Europe and I'm in the top 5% salaries of my country.

>the self taught boom. It was only due to the FED printing a shitload of money.
The self-taught boom happened well before that, there's still a massive need for competent developers, regardless of their education level. If anything: I'd say it's even harder to fill positions than ever before, I know for a fact the recruitment person in my company struggles a lot even though we offer top-pay, because the average developer really is just that bad.

>the only job you will get as a self taught are React jobs
Not really, front-end is very accessible sure, but I grew into a fullstack from a classic front-end dev position very quickly, now I do a bit of everything.

I agree on the rest, you need a lot of passion to get into webdev now and not drown.
>>
I like runes. I always thought the weird mixed declarative/side effect $ wasn't enough explicit.
>>
>>96116665
I took your idea, generated it with AI, deployed it and now I'm a billionaire. Thanks for the idea, sucker, AHAHAHAHA.
>>
Just discovered that HTMLCanvasElement.toDataURL() exists and that it can make screenshots with transparent backgrounds. It works on other canvas elements, but when I try it on
https://h5.g123.jp/game/queensblade?lang=en
it just returns a blank image. Does anyone have an idea why that is?
The answers I found online are all a billion years old and don't work.Occasionally the page randomly closes the devtools, could it be that they somehow have protection against screenshots?
I use this to make the screenshot:
```
(async()=>{
const thisCanvas = document.querySelector('#GameCanvas');
const dataURL = await thisCanvas.toDataURL();
const link = document.createElement('a');
link.download = "screenshot.png";
link.href = dataURL;
link.click();
})();
```
Yanked some of the code from another page that has a canvas and makes screenshots.
>>
C O N C U R R E N C Y
>>
>>96102612
just use LazyGit
>>
>>96116513
Svelte is finally React
>>
>>96117139
Found the Phoenix-fag.

>>96117202
Without the community and ecosystem, bravo Rich.
>>
I got two job offers. Help me decide:
1. advertised as a front end role (in the interview the manager mentioned opportunity to be involved in other roles too), hybrid work, 8k more than job 2.

Job 2. Fully remote, advertised as a full stack developer, smaller initial salary.

Im more interested in work as a full stack developer, but apparently it is a potential option in job 1 too, plus more money from the start.
Also, i enjoyed the interview for job 1 far more than job 2, and working hybrid may be better for my mental health, but idk
>>
>>96117217
oh shit how did you know? Elixir has been fuckin ace. i just redid a DataFrame CSV script to concurrently write PDFs into elixir and it took 1/4 of the time it did in Python. probably has to do with Python waiting for IO and mainly library overhead. but overall, very satisfying.
>>
>>96117202
And vue, and solidjs.
>>
File: 1664379017271260.png (101 KB, 661x339)
101 KB
101 KB PNG
is there a way to get this layout with the text wrapping around the image without using floats or other ancient techniques that have been lost to time?
>>
>>96116513
Kek. I don't like Meta but thanks I'm sticking with react. It just werks.
>>
>>96117410
>ancient techniques that have been lost to time?
no.
>without using floats
no.

You're implying that float is ancient, but it the correct way to do this. It's what float was meant for in the first place.
>>
>>96117410
shape-outside is a new way of doing that https://alistapart.com/article/css-shapes-101/ but this Anon is right >>96117610
>>
File: flags.8.png (79 KB, 256x187)
79 KB
79 KB PNG
Does anyone here know where I can get more flag icon sets like pic related? Or at least the proper term so I can search it up on my own?
>>
>>96116513
> $___()
Imagine working with that and PHP at the same time lul
>>
>>96116743
Having a degree is always good but you won't have a problem finding a job if you're good.
>>
File: 1471685523823.png (548 KB, 1920x1080)
548 KB
548 KB PNG
>>96116665
>is this a good portfolio project
Kind of, it's usually a very simple project most people can manage to make, though you can use it as opportunity to really think about the structure of your code. It's indeed a good learning experience, but I think you should think of some weird spin to this idea, something that would either make it more complex or more unique than other apps with similar ideas.
>even something I can make money from?
Maybe but the answer is most likely no, there are tons of apps like this and lots of people make something similar when looking for projects to test their abilities, like you are doing right now.

For portfolio I would recommend doing a few bigger projects instead of a bunch of small ones. People looking at your portfolio mostly will only pay attention to the impressive things. Of course, you don't need to go the extra mile and be extra schizo about it, a simple well written full stack app or something around that level of complexity is already a good start, but as I said, always try to put your own spin on it.

Pic related and similar pics are great imo, look for the toughest yellows or red/purple ones if you think you can do it. Good luck anon.
>>
>>96114326

Learning curve can be a little steep but a good skill to have.
>>
>>96113398
ok, and?
>>
Are those beginner resources good? I already know the very basics but so far I've learned through trial and error 'n stuff, not following anything specific
>>
Anyone know how I'm suppose to practice my sql and nosql knowledge once I read a bunch of tutorials? I don't know what I'm actually suppose to use it for?
>>
>>96118643
Create a complex database. One classic example is of a recipe database. It gets pretty complex once you start adding unit conversion and shit.
>>
>>96118643
Build stuff. Reading tutorials is useless imo.
>>
>>96114895
>>96115652
>What do we thing of svelte 5 runes?
Looks a lot like the vue 3 composition api.
>$state = ref
>$derived = computed
>$effect = watchEffect
>$props<myProps>() = defineProps<myProps>()

One difference: like >>96116842 says, in vue you have to type .value for refs and computed values. This is because vue reactivity works with objects with getters and setters, instead of compilation like svelte.
I noticed that in the video, the svelte runes are moved to counter.js, without code changes. This means that .js files need to pass trough the svelte compiler, because there's no way to have a reactive number in native js.
>>
>create updates for someone else's github project
how do you define this on a resume? does it count as volunteering or another portfolio piece?
>>
>>96118540
i use w3 schools as a reference all the time
>>
>>96111853
shut the fuck up nigger
>>
>>96119000
You dont, nobody care. Just put open source contributions under your hobbies.
>>
>>96118062
roll
>>
>>96112361
>I'm learning web
>Proceed to list a bunch of meme tech and ask how to retrieve data from a database
I come itt once a day and you guys never fail to make me laugh.
>>
File: 1671972756024397.png (115 KB, 661x697)
115 KB
115 KB PNG
>>96119125
coincidentally that's what I'm working on right now to practice MERN
>>
I don't see the problem with svelte 5 presentation. These changes are great. That you can externalize your code from svelte components is great and really useful.
That it now uses signals is also great.

The only thing people seem to be bothered with is that it looks like react or vue. I don't think this is bad, But when you think about rune, sure they make the declaration syntax looking like other frameworks, it solves things svelte was lacking.
This also makes svelte more performant as it reduce computation with anything thing related with reactivity (and that's not even counting signals).

>>96118975
That you can externalize your code out of components with keeping reactivity is really the big thing of this announcement. This is great. Also introducing signals is also great. But refactoring out of your component is truly the big thing to me.
To me people are just mad because the words props, state and effects (or derived) are used.
>>
>>96112361
You should build a REST API and you should use an ORM to interact with the database. Your frontend makes API calls to the REST API and the REST API interacts with the database.
>>
>>96117664
How is shape-outside supposed to replace float when it actually needs float to work in the first place?
>>
>>96112361
You have to use a backend layer. With svelte you can use sveltekit, the advantage is you'll easily be able to so server side rendering and it will be nicely integrated. For querying your database, you can use an orm like prisma, or a query generator like drizzle, they have adapters for most db (not just postgres).
Or you can make a rest api backend, and just use svelte clientside. Your app will just make calls to your backend and the backend will query the database, often with an orm, and send back the data, your client app will use it to output the UI. There are a lot of choices : node backends (like express), .net backend (in c#, with entityframework as an orm), php (laravel, symphony, I don't know about their orm), go backends (echo for example, with gorm as an orm), python (django) etc....

Depends what you want to learn, as it is what you're looking for.
>>
>>96119215
>The only thing people seem to be bothered with is that it looks like react or vue
In it behaves almost like vue, while vue these days almost behaves like react. Each just slightly different.
Under the hood the workings are different, but the presentation becomes more or less the same with every update to any of these frameworks.
The differences are just big enough to fuck with ya if you have to read code from one of them that you're not familiar with.
We're all writing in one fucking language (or one additional extension to that language - looking at you jsx), but we're talking different dialects just cause. This is great. Really well done web dev community.
>>
google changed the color of search results links to #00658d making it harder to read on white
or am I going blind
>>
>>96117923
honestly I don't know if these are called sprites or that is strictly a videogame dev term
>>
>>96119365
Yeah I guess we need a new framework to fix all that.
>>
I want to learn webdev but I'm brain damaged, is the youtube channel traversy media the best resource for people like me ? Also I should stick with the MERN stack is that correct ?
>>
>>96119365
I doesn't look like it behaves almost like vue, when you look at the presentation. In some examples, the code the compiler output doesn't even change. To me they just made the syntax a tad bit more "explicit", and the result is the syntax is simpler for making stuffs that where already possible before.
Maybe the way it computes reactivity makes it behave like vue, if that's what you're saying, this I don't really know as I'm not familiar with the internal of vue.
The changes mostly look syntaxic, and they give the compiler more granularity for reactivity, and therefore makes it more efficient.
I'm just talking about runes, which seems to be the point people criticize. That they add signals also makes it more efficient and performant.

I don't really see why people are pissed for runes, even more when the changes are just opt in (probably because they're mostly syntaxic, not so much in the internals).
Personally, I like what was presented and I see the point of these changes.
>>
>>96118763
Idk wtf to build.
>>
>>96119215
>That you can externalize your code out of components with keeping reactivity is really the big thing of this announcement.
That's exactly what the vue composition API is. That is where it got its name from.
I'm not mad that it "store" from other frameworks. Competition and learning from each other is good.

>>96119365
>In it behaves almost like vue, while vue these days almost behaves like react.
The main thing with react is that each component is a function that runs on every render, while in vue and svelte the initialisation runs once when a component is created.
>>
Can someone provide a good leetcode link for practicing solutions to logical problems? Got a technical test in a few days, i know they will hire the blue haired tranny but I need to give it my best either wya.
>>
>>96119503
yes
>>
>>96119557
Only problem I have is the mandatory $state() rune to make a property reactive
I would expect it to be the compiler's job to know which variables should be reactive and which shouldn't based on how they are used
It just look like some extra code that you have to put up with and doesn't add anything to your developer experience
>>
>>96119832
That's what I thought, also I should stay away from tailwind and stick to CSS correct ?
>>
>>96119857
I tried to create let reactive variable and it was still reactive in the component but probably did not use signals so let's are still reactive.
>>
>>96119876
only if you are an absolute beginner
>>
>>96115600
What I would do is tell him to check out the branch and test. Tell me what the results are with and without his requested changes. Guessing that's beneath him? Does he have a local environment set up?
>>
>>96119878
But will they be reactive in $effect and $derived as well ? If so what's even the point of $state
>>
>>96119876
only if you are an absolute chad
>>
>>96119915
Ok, nevermind, just ran tests again and it seems svelte 4 syntax uses signals too in svelte 5 but once you add any rune from svelte 5 the let does not become reactive anymore.
>>
>>96119876
css until you learn it, afterwards pick your "framework" poison, my recomendation is SCSS, shit's cash
>>
>>96119857
The $state rune is so you can declare it outside svelte components, in an external js/ts file.
>>
>>96119660
>That's exactly what the vue composition API is.
I don't know much vuejs (I'm mainly a dotnet dev), would you give me link to this or something (for learning purpose) ?
>>
>>96120016
That's actually kinda cool, you don't have to use runes to benefit from signals so my svelte 4 codebase should get performance boost anyway but to get peak performance I would have to use runes and signal optimizations like selected.
>>
>>96120162
Again, sounds like I am making things easier for the compiler instead the framework making things easier for me
I'm unhappy about it because this is the exact thing that made me switch from vue to svelte, I hated wrapping my variables in objects it just made the code uglier for a human reader.
But as I said before, at least this time we don't have to use .value to unwrap the variable so maybe I'll get used to it
>>
>>96119882
>>96119937
>>96120050
The issue is that I'm brain damaged, I dont want to go into the details but basically the doctor droped me at birth. I've been lurking a lot and it seem that a lot of people in the same situation as me recommend to stick to CSS or SCSS, going as far ad to label the later as a framework.

>>96107903
>I learned GO
Hello friend, you look like in the same situation as me, how is Go for people like us ? Is it hard to learn ?
>>
>>96119160
>snake case in javascript
For what reason
>>
what does target really do in tsconfig? I tried different versions but nothing changed when I tried to use a 2019 version of chrome. When I added browserslist and that specific version of chrome to it while tsconfig target was es2022, I could run my angular app on the ancient version of chrome.
>>
>>96120325
it's easier to read
>>
>>96120346
>what does target really do in tsconfig?
It target a specific version of JS to compile to.
>>
>>96116513
I don’t why but I hate seeing $. It’s just ugly
>>
>>96120449
This tells a lot about society...
>>
>>96120260
I think the $state is fine, it will explicitly mark your reactive variables while not suffering from unwrapping bullshit, not that big of a deal + you probably wouldn't want to use signals for every variable (let = useRef), on the other hand $derived expressions look weird at best and props might be cancerous to type with JSDoc but better for TS.
>>
>>96120428
why does it work on a 2019 version of chrome with es2022?
>>
>>96120260
I feel you, but I have no idea how the compiler could understand how a variable is supposed to be reactive outside of the component.
It also makes declaration a bit more explicit, you can see which variable is reactive and which is not without going through the code.
It probably brings optimization in performance as you mark variable as reactive or not, so the compiler know and likely deals with them a different way.
I don't think it is wrapped in an object, it's just marking a variable as reactive for the compiler. At least that's how I understood it.
Keep in mind it's just the beginning of svelte 5, and if I look at sveltekit developments, it ended up very different from the first preview versions.
>>
>>96120583
Do you use any features from es2022? If not then there is your answer.
>>
>>96120583
A possibility is that the your code is the same in ES2022 and ES2019 and probably the same in ES6 too
>>
HTMX is a grift. Just use a framework like the rest of us
>>
>>96120204
The official vue docs are really good in my opinion. https://vuejs.org/guide/reusability/composables.html
>>
>>96116743
>The performance of a framework or tech should be the least of your concerns
Absolute armchair retard take. My entire business is built on giving small clients fast as fuck sites/apps so they can make more money. Their local competition have shitheap wordpress sites slapped together by some retard that take 15-20s to load, mine take less than 500ms. Their bounce rates are basically non-existent once my site is up for them. I'm not using some ultra-optimized, from scratch, over-optimized stack. I'm literally using .net on the cheapest VPS on digital ocean. If you extrapolate that out to some unicorn app that needs millions of users, your scaling issues are going to cost like 1% of what something like laravel or rails would take. Less expenses, more margin, more cashflow for the business. It's a no brainer if development time is roughly equal, which for .net it is.
>>
>>96120687
Thanks, bro.
>>
I dont see why people are bitching about svelte runes. There is nothing wrong by having mechanisms to define states, effects, contexte or references. Its clearly the future of JS frameworks. I hope we will be able to create custom runes too, it would truly by a milestone.
>>
>>96120403
I would say what's easiest to read is what's consistent with the language you're using. But to each their own.
>>
>>96120713
>tfw using $cuck
>>
>>96117267
nta but you're in every single thread and it's all you fucking talk about while shitting on everything else.
>>
>>96119557
>>96119660
You people are seriously discussing the inner workings of the fucking frameworks you're using? Look, IDGAF about *how* my framework does something. What I care about is that every single one of these frameworks basically does the same. They're just reinventing the wheel over and over again, fragmenting the community in the process.
Stop it goddamn. Not only are YOU looking stupid for catering to these people, you are making every web dev look stupid. This shit is getting meme'd in other parts of software dev at this point in time. And rightfully so.
>The main thing with react is that each component is a function that runs on every render, while in vue and svelte the initialisation runs once when a component is created.
IDGAF
>even more when the changes are just opt in
That's even worse. If you are a somewhat big framework and introduce a new thing, than remove the old thing it replaces already. You're just giving me more crap that I will have to reason about at some point in the future, when I am rewriting it again in the (>>96119442
) next hot framework...
>>
>>96120692
>he develop mom and pop sites in .net
This thread keep on giving, if only there was a way to archive it for posterity
>>
>>96120264
>long text
but what do you want? Yes your assumptions are sort of right, don't get me wrong tailwind is the new bootstrap and that's not "bad" it just is, so see which one you like the most and roll with it
>>
>>96120768
just take the rvnepill already and become sveltechad rvnemaster
>>
>>96120770
Are you just assuming these are just about/contact page style websites? If so, lol
>>
>>96120768
>being this $mad
>>
>>96120840
No maybe some of them have a basic crud and some stripe cashout. Still retarded af.
>>
>>96120866
I'll put it this way, I save them 8-12k/month and keep ~10% of those savings monthly. I basically just repaint an app I built one time and sell/rent it to businesses in the same category over and over. So is the issue that you think .net is some overly complex, or cumbersome to use framework?
>>
>>96120906
How do you save 8k to 12k a month on hosting for a small or medium business and how did they manage to spend that much on hosting and maintenance to begin with
>>
>>96120952
>how did they manage to spend that much on hosting and maintenance
lmao I don't save them money on hosting... the function of my app/site saves them that much.
>>
<html>
<head>
<style>
/* main */
body {
margin: 0;
height: 100vh;
overflow-y: scroll;
scroll-snap-type: y mandatory;
}
div {
height: 100vh;
scroll-snap-align: start;
}
div:nth-of-type(2n+1) {
background: red;
}
div:nth-of-type(2n) {
background: blue;
}
</style>
</head>
<body>
<!-- <main> -->
<div></div>
<div></div>
<div></div>
<div></div>
<!-- </main> -->
</body>
</html>


Can anyone explain why this doesn't work if the scroll container is body?
>>
>>96113116
console.log()
looks unprofessional. It's fine if they're using
console.debug()
or higher.
>>
If the next thread isnt a runes edition I will be very disapoint
>>
>>96120626
>>96120639
ok I get it now
it first compiles to es2022 and then babel or whatever angular uses adds in stuff to make it work on older browsers based on browserlist
>>
>>96121196
No, I'll make it a sigil edition. Because $ is nothing without % and @
t. /cgi-bin/rocks.pl
>>
>>96121196
javascript jesus wearing wizard hat with runes would be kino
>>
New
>>96121521
>>96121521
>>96121521
>>
>>96102211
>everything you do makes you wait for a roundtrip to the server
nah
>>
>>96120744
are you retarded i literally just posted first time in a week
>>
>>96120744
i didn't even shit on anything i cited the possible reasons for why it could've performed better than python due to concurrency. it was the most neutral take with a personal opinion that i enjoyed it. im shitting on you now for being a shit flinging monkey



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.