[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: nxif1rllu9981.jpg (48 KB, 505x640)
48 KB
48 KB JPG
>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

>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

/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.io

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: >>101324014
>>
>>101363781
someone put oil on those steps. good look anon, you gonna need it
>>
>>101363781
I know basic DOM and I'm good at react
>>
I want to try creating an app that uses speech/phrase recognition then tries to interact with a control on a webpage.

I've got experience with Python and C# and I've found some speech recognition libraries for both, so that part feels somewhat figured out. But I could use some help understanding what I should be looking for to interact with web pages.

I understand there's like API's sometimes, but if I also wanted to interact with the UI controls on a page like a virtual user how do I do that?
>>
>>101359284
Its for copying the table and pasting into google sheets as part of a workflow. A regular html table works for this which is why it makes me so mad.
>>
>>101364187
Microsft spy++ can help with locating the control and interacting it, start with a tute on doing this with windows calculator then it should be easier
>>
Do people like AWS or Azure more? Partuclarly Lambda vs Azure Functions. Used Function for a project. We only used 0.25% of the free tier capacity and performs rather well.
>>
>>101364187
What language are you using? Basically you'd want to use something like Puppeteer/Selenium that implement DevTools/WebDriver protocols to spawn a controlled Chromium instance
>>
File: markup_1000005096.png (32 KB, 480x152)
32 KB
32 KB PNG
how does one do this with html
>>
>>101364700
.cell {
display: grid;
width: max-content;
justify-content: space-between;
grid-template-columns: repeat(2, 1fr);
grid-auto-rows: 1fr;
border: 1px solid #000;
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><line x1='0' y1='0' x2='100' y2='100' stroke='black' vector-effect='non-scaling-stroke'/></svg>");
background-size: 100% 100%;
margin-bottom: 1rem;
}

.cell--topRight {
grid-column-start: 2;
text-align: right;
}

.cell--bottomLeft {
grid-column-start: 1;
}
>>
>>101364700
Tables, table body, table row, table header, and table data cells. <table><tbody><tr><th><td>
Very simple but gets messy quick.
>>
>>101364737
cool beans bro
>>
Thanks a lot for this. I thought people either used Django or FastAPI, not both. I’ve been tasked with getting a nextjs/fastAPI app up and running that uses our internal LDAP for the auth, so this should be helpful.
>>
>>101363019
you can email me at buckshotfeedback@gmail.com

anyone else interested in trying out the site let me know! especially if you're on a job search!

create tons of resumes and cover letters tailored to each job in minutes! demo: https://files.catbox.moe/a89jcc.mkv
>>
I'm 32 years old and urgently need some direction in my life.

Background: - Engineering Degree in Electronics:- 11 years old. - Diploma in Mobile Application Development: 6 years old. - Creative Projects: Built magazine covers and posters during college; good at art without formal training.

Current Situation: - Restaurant Business: Ran a restaurant for 4 years, which recently closed due to financial difficulties.

Skill Gap: Not in touch with electronics, art, or app development.
Considerations - Fields of Interest: Web development, graphic design, or game development.

Concern: Afraid of wasting time again and seeking a field with a thriving future.

Which of the above fields (web development, graphic design, or game development) has a promising future?
>>
I graduated two months ago and have been applying for jobs non-stop. The only job offer I’ve received is for a support engineer position, which involves little to no coding. The total compensation is decent, around $80k in Quebec. Should I take the job offer? Would it hurt my career if I decide to leave after a year?
>>
>>101365925
job > no job
You can keep looking for a developer position while working and leave whenever you want for a better job. Leaving after a year is fine, you can even put that on your resume.
>>
>>101365925
>Would it hurt my career if I decide to leave after a year?
you should take it and look for better yes-coding jobs ASAP regardless
>>
Anyone here learn web dev on a mac? I've got a macbook air 8gn looking to do ToP, is that good enough?
>>
>>101366347
love mac's keyboard shortcuts and trackpad, that shit's crack cocaine, just get yourself one or two monitors to connect them to if you program at home enough to justify it
>>
>>101366427
I've got the air unfortunately so can't connect, I've got a desktop as well I could install linux on, just wondering if i'll have issues with the macbook air learning webdevv?
>>
>>101366437
how much RAM?
>>
>>101365897
>Engineering Degree in Electronics

Brother I would kill for that degree, is there nothing else in technology that interests you? If not go for game or we dev.

Although graphic design can be very fulfilling I've got no clue about that job market
>>
>>101366464
8 for the Air with M1 chip, didn't bother going 16GB

My desktop has 16GB and a 1060 but then I'd be at my desk all day including for work
>>
>>101365897
all I know is that web dev is very competitive for entry positions, so if you choose this it's gonna come at a big cost in time and grinding, and even then it's not guaranteed that the whole thing won't be fully automated in a few years
It seems to me as if electronics have a very automation proof future
>>
>>101366347
Even a stinkpad is enough

>>101365897
I've been unemployed for more than 2 years before getting a slave job. Just be warned if you want to go into web dev as a newfag.
>>
>>101366489
enough yeah, moar ram would be desirable but it is what it is
>>
svelte 5 when holy shit
>>
Redpill me about the FastAPI and HTMX combo. Is it as good as they say?
>>
sonnet 3.5 is really good at unit tests, just generated 20 that all passed first go using the 200k context mode. some of them were conceptually retarded but that's my job to weed out. gpt4 can't generate passing tests to save its life
>>
how did things change so much? Years ago I would get interviews left and right, now i cant even make it past the recruiter stage before being ghosted
>>
>>101368423
with experience?
>>
>>101368501
I have 8 years of experience under my belt, but Im doing worse than when I had 2
>>
>>101368660
damn, that's tough, had no idea it was like that
>>
File: 1713882920950729.jpg (181 KB, 1280x1020)
181 KB
181 KB JPG
Does anyone have experience self-hosting a TURN server?
I have no idea which, if any, are good.
Only want to shield some user's IPs.
>>
just finished my first side project after 10 years working web dev.

confessyoursins.online
built using MEAN, thoughts?
>>
>>101369140
>try to comment
>email required
based, when the time comes you'll make bank with all the blackmail
>>
>>101369274
i see your point, will change to username instead of email
>>
>>101369140
are you a priest
>>
File: file.png (81 KB, 327x361)
81 KB
81 KB PNG
How should I handle my backend logic?

It is not exposed online, so I'm thinking should I just use a next.js b2b for auth and then trust its calls? Or should I send the jwt token and verify it in the backend?

Which is the standard?
>>
>>101363781
>That pic
So this is the babby level this general is moving in, huh
>>
>>101369459
never touched html once in my life and yet i have an amazing portfolio, funny innit
>>
>>101369479
Yeah funny you being a fraud that is
Let me guess your portfolio is CRUD app #23 and GitHub repo clone #2738?
>>
>>101369569
I bet I'm paid more than you lol
>>
>>101369784
Aight let's hear your salary webshitter
>>
I'm trying to configure a Node.js app using cPanel and Phusion Passenger. My problem was that every time I hit the index.js file, the application got initialized anew.

I fixed that problem by using "PassengerSpawnMethod smart" inside the .htaccess file.

But only the main "/" route works. Subroutes get an "PassengerSpawnMethod not allowed here" error.

Any hints how to solve this?
>>
>>101369792
math phd 300k starting
>>
>>101369858
oh, it's not a subroute related problem
>>
How long will it take for me to relearn and to write a simple web app after not doing anything for a year? The last time I touched web development was a year ago and back then I was still doing the basic shit. I just started now and I don't even know how to start. How long will this shit take me? Last thing I remember was that it took me two full days to figure out how to display xml data on a fucking table.
>>
>>101370042
2 months for me
>>
>>101369858
>>101369999
I'm not allowed to change this through the .htaccess file, which is sad.
>>
>>101370125
just self host
>>
>>101369435
nope just thought it would be fun content
>>
>>101369396
what's the point of either? if it's a sin confession website then wouldnt it be better to leave it anonymous like 4chan?
>>
>>101370618
You're not a coward, are you?
>>
>>101370618
that was my original idea but with having users require an account makes it easier to moderate content and protect against spam.
Also with accounts I can add functionality like notifications or if the site ever growns I can use your likes/comments to personalise your feed with content you are interested in
>>
File: wallpaper-main-3.png (2.46 MB, 2559x1440)
2.46 MB
2.46 MB PNG
>>101363781
I hate web dev, though it's mostly what I do at the current job, but how do I learn CSS really well? Most of my solutions are verbose, inelegant and hard to reuse. I feel like I do not know enough properties and how things work in general (e.g. I struggle dealing with stacking context a lot, especially in grid layouts).
>>
>>101368110
>Redpill me about the [meme] and [meme] combo
>>
>>101364046
>I'm good at react
good at making a website ?
you are putting things quite bluntly
>>
File: 1709882741085413.jpg (73 KB, 828x889)
73 KB
73 KB JPG
>>101363781
Best pure audio resources for anything webdev related? Can be for HTML, CSS, JS, design principles, anything.
Looking for something to listen to and learn while doing other things.
>>
>encounter protobuf
>it's a 'universal' data exchange format
>no template, guess ur boned
>all of the tools are shit
why does this even exist
>>
>>101371970
>learn while doing other things
lol
lmao
>>
hello Sirs,
qrd on affiliate marketing? is it as lazy and simple as it sounds? just make a site copypasting the most popular products with affiliate links and then spam it everywhere? and this is an entire industry? if not, what is it exactly? I just wanna make money on the side doing some sort of dev work since no one's hiring generalist junior webshitters anymore. I'm to suggestions.
>>
>>101371970
just buy any textbook on web development and put it under your pillow while you sleep. you'll absorb the information through osmosis. i did this every day in uni until i finally learned enough and dropped out to become a multi-millionaire with a tech empire. my name? bill gates.
>>
>>101371970
use that monkey framework howler I think
>>
>>101371326
htmx is garbage, fastapi is based
>>
I'm a noob, how do I use an api to display data in tables and to give the user the ability to choose which data he wants to compare and which models he wants to compare between? For example comparing the fuel consumption of two cars or comparing the engine sizes and also having a result show which one is bigger and by how much the difference is.
>>
>>101373120
Mock it in a spreadsheet, all will be revealed.
>>
>>101373240
not legal for my project
>>
My boss wants me to have a TABLE per user with all their information in rows using mongodb. This sounds stupid, is that normal?
>>
>>101373324
they call it collection in mongo
it makes more sense to have one "users" collection and each row is a user and its properties
>>
>>101373324
yes, that is extremely stupid. it sounds like your boss had a brainfart and mixed up tables with rows and rows with columns.
>>
>>101373120
have a table or grid element in html and make each cell clickable. store which cells have been clicked in javascript and when the user clicks "compare" or w/e you execute a function in javascript that does the comparison and then displays it in html

hard to be more helpful without more information or followup questions
>>
How THE FUCK does one get a good domain name in this day and age? All of the good .com are taken.
>>
>>101373643
shouldve been born 20 years ago
>>
>>101373650
I should have spent all of my money back in 1998 to buy all of the domains I could find. I would be rich today.
>>
>>101373650
earlier*
>>
How good is Node.js for CMS? I'm planning to build one from scratch. Not looking to have users. Just myself only with the intention to host my own blog.
>>
>>101373947
it's perfectly fine. just set up a database and a uWS.js server that does CRUD. chatgpt can do it all for you
>>
What are free (static) website builder+hosting that enable me to do the front end from scratch? I tried neocities but my website was gone when I tried adding a redirect from my former Google Site (Business). I just want to make a one-page landing website for my small business. maybe in the future I'll upgrade it if business are booming but for now I prefer a free and simple website (I don't care about the domain).
>>
File: 832954893608962044.jpg (45 KB, 720x720)
45 KB
45 KB JPG
does anyone else here take notes? I have a page in libreoffice dedicated to examples for certain things to keep in mind and links to resources but im just curious if anyone else does this.
>>
>>101374121
yes, anon. people take notes.
>>
>>101374092
what do you mean the website "was gone"? what happened to it?
>>
File: 832954893608958510.jpg (44 KB, 750x750)
44 KB
44 KB JPG
>>101374171
never heard it being mentioned outside of lecture notes from college courses, just wanted to be sure.
>>
>>101374178
exactly what it is. it just disappear when I tried to update another edit and in the editor, it forces me to log out (saying something about the specified page don't exist). my account also gone from neocities when I tried to login again.
>>
Is Blazor production ready
>>
>>101374255
you can use github pages. the url will be https://username.github.io/websitetitle/
>>
How comfy is this job? What's the difficulty level you would say?
>>
>>101374864
it's so easy that it's getting almost entirely phased out by website builders and AI
>>
How do I make my web app presentable? Its just a white background with 2 light blue rectangles on each side which were suppose to be side bars but they're empty and then theres a black border around my title which is in bold caps. It looks like a pile of shit.
>>
>>101375020
screenshot might help
also say what the purpose of the website is
>>
>>101375220
>also say what the purpose of the website is
Portfolio website to show off my web design skills.
>>
>>101374121
i have 3 telegram channels for notes on the same project. Whatever is takes.
>>
>>101377297
autism
>>
crazy how not only is using pydantic basically a requirement for any serious python project but i also have to use fuckin pandera which is pydantic for dataframes as well. this language is so fucking ass.
>>
My SaaS company has a .com domain. Should I get a .io domain instead?
>>
>>101378150
I don't know.
>>
>>101377952
>python
Kek. Someone asked me why I used C# for this API for automation, saying C# is so old. Told him Python is slow and inefficient and explained billing is in GB-seconds. And that our function is fast, and stays well within the free monthly capacity despite processing a lot of orders. Easy to write, desktop base was already written in it and just re-used the model for the other functions.

Python is also ugly as fuck.
>>
JS and TS are the only languages you need

Prove me wrong

You can't
>>
>>101378972
i wish every day i had done this project in C# despite never having used it. the amount of time i've wasted on type bullshit alone would have been plenty to get up to speed on C#. alas all i can do is impotently seethe here periodically when python rawdogs me
>>
>>101378981
this
I took the JS/TS pill recently
>>
>>101378981
Absolutely disgusting. I would rather create a static webapp with blazor webassembly then use JS for everything.
>>
>>101378150
Why would you though? People fight over .com domains. The .io domains only became more popular recently because there are more available names. If you want, you can have both domains and have them redirect to the same place (the .com most likely). Some websites start with a different ending and once they go big they buy the .com counterpart.
>>
>>101379028
For what reason? JS/TS just works
>>
>>101378995
I wrote desktop app in vb.net, and then refactoring into model / view model etc type thing in C#. It was easy to pick up straight away and liked it way more. That C#.. the part that's not UI now runs on Azure Functions for other purposes interacting with client site for automation processes which is called from other cloud triggers. Nice to know it can run on AWS or Google Cloud too. For about 5000-6000 orders in a month we used about 0.25% of the Azure Function free capacity (400,000gb/sec a month). I'm guessing the garbage collection is pretty good in .NET much of the execution time is waiting for a response from client site/api.

Not sure what typing is like in Pythob, but in C# I just used a public property class list and deserialize json straight into the class. So I have something like search.orderDetails[i].orderNumber specifically typed and explorable in the IDE. The classes serialize straight back into JSON for payloads too. Python should have something similar?

I just use Visual Studio Community Edition and it just makes life easy.. this wasn't even my job, but the team/sub company responsible wasn't able to get the project working.. they used completely different technology and the client never provided an api and expected everything to run through a remote desktop, like the automation runs on a server/host pc that opens a remote desktop that opens the client systems in a web browser.. so the automation had to use image recognition and assumptions basically.. honestly it was a complete shit show
>>
>>101379127
Because JS/TS might be fine for doing a ui like React, but I'm not making anything in the back end with it. I use C#, I find it easy to use, so if I had to use only one language I can technically do a web front end in c#/blazor compiled to js etc. I'm not sure if I even want to do that.

I don't need to make anything advanced. Mostly just forms to send data across, so direct in html/js/css is still simpler for a nice looking page over react or svelte or whatever now.
>>
>>101379217
you can use TS on the backend
>>
why the fuck would you ever want to use javascript when you dont have to? fuckin masochists
>>
>>101379239
Can and will are 2 different things. You can also use C#/Blazor for your front end.
>>
>>101379248
You know how women love getting choked? Some people are just complete subs.
>>
>>101379028
>creating couple mb of bloat
vs
>few bytes of js
LMAO
>>
blaze deez nuts
>>
>bitching about javascript in 2024
>in a web dev general no less
>>
>>101379332
>if you dont want to use javascript on the backend you are bitching about javascript
how about you impale your retarded no reading comprehension ass on a spear huh?
>>
>>101379298
This is intellectually dishonest and you know it, anons post is about using JS/TS for *everything* which is a big fuck no. I'd rather use WASM on front ends than have to *only* use JS.
>>
>>101363781
and then, out of nowhere, there it comes, jQuery
https://www.youtube.com/watch?v=4fndeDfaWCg
>>
>>101378981
based. Just made a fullstack app using nextjs and typescript, it literally just werks.
>>
Work: committed
Commit: pushed
Repo: backed up
>>
>>101379248
because it's a very easy language to learn and use
>>
>>101380028
>tfw sort of finished but forgot to push
yes, I am seething rn, but in reality, I have yet to verify my work with my senior
>>
>>101380119
How many languages do you know anon?
I'm talking about at least one year of professional experience, not just toy project.
>>
>>101379248
you end up loving js after a while
>>
>>101380257
i use C++ for work. javascript is stupidly easy
>>
>>101378981
ts for frontend and js for backend
>>
File: 1720642709103531.jpg (148 KB, 1348x779)
148 KB
148 KB JPG
>>101363781
unfinished-side-projects bros, whats up
>>
>>101380410
And why is that you use C++ in your job if you could just use JavaScript that is easy as fuck?
>>
File: file.png (145 KB, 1722x982)
145 KB
145 KB PNG
Anyone knows what's wrong here?
>>
>>101382707
because my job is to make software, not websites
>>
>>101370042
How many fucking times are you going to ask this dumb fucking question?? No one can answer this for you. You’re your own person and experience. You could have probably already gotten caught back up by now if you’d just started instead of asking this for 10 threads straight…
>>
>>101382827
you need to specify a PRIMARY KEY in Ingredients

FOREIGN KEY relies on PRIMARY KEY. you cant just declare a FOREIGN KEY on any column
>>
>>101378981
If you want to pay 100x what you need to for hosting, or use free tier dogshit cold start servers then yeah you’re right.
>>
>>101382886
You can use JavaScript to make software just as much as you can use it to build servers.
Come on anon, that's not an excuse to not use glorious JavaScript.
>>
>>101380245
imagine having to verify with a senior to push in 2024
>>
File: file.png (882 KB, 616x680)
882 KB
882 KB PNG
>>
Which is better:
>validate data with your back-end code
Or:
>add check constraints to the database, send data without validating, and deal with the errors that are returned
>>
>>101383386
i never said javascript was the best language to use for everything you fucking dumbass. i only ever said it's easy. if you have a problem with that then address it directly instead of doing this "hMmMmM cUriOuS" bullshit like a woman
>>
>>101383696
the higher up in the stack you catch an error, the less time and resources you spend resolving it
>>
>>101384108
Maybe that's right

I think ideally I would prefer that the database does all the validation. So if another dev works on my project at some point, and they insert stuff directly into the database, it will always be fully valid.

But maybe that's not always practical. I think I will validate with back-end code for the moment because it means IDs don't get used up (because of course sometimes if the database rejects, it will have already advanced the ID sequence). For many projects, using up IDs won't matter, but I want to avoid using them up if possible.
>>
>>101383696
Not all invariants can be cleanly expressed as SQL constraints.
I prefer the DB to do its job (persist data) and the backend to run the business logic.
>>
>>101382935
If you want to be cucked by people who are quicker to market than you, then sure, write your back-end in C
>>
File: both-is.gif (115 KB, 220x138)
115 KB
115 KB GIF
>>101383696
Defensive programming.
Protect your data from flawed back code and unforeseen attack vectors.
>>
As long as you don't do what Sony Online Entertainment did and have their choose-a-password input allow more characters than what gets saved by the DB
>>
>>101384852
>if you aren’t picking js slop your writing strings via pointers and arrays
Absolutely delusional. If ttm is the biggest and only factor you should be using rails. If you’re working on anything that matters then something in the bracket where c#/java/go live is going to absolutely shit on js with no extra work on the dev end
>>
Long story short, I dropped out from a diploma program, I wasn't in university. I failed a pre-req and it was only available a year away so I applied for work.

I luckily had an internship after my first year, and through that I had some connections and landed a job at a not for profit making ~55k. This lasted for around a year and a half before they dissolved their entire IT Department, me included.

I got advance notice I'd be leaving and I lined up a new position almost immediately, I had a handful of interviews off a handful of applications and generally I interview well.

I'm over 2 years into that as a Front End dev at a midsized tech company with 90k total comp.

So, I've got around 3.5-4ish years professional experience and ~5 if you count the internship.

I've been applying lots elsewhere to try and land literally anything but I've not gotten any calls back. in over 500 applications over the last year I've gotten a total of 1 interview.

Is the market just that bad now? what should I be doing to have a chance to increase my total comp?

I know I'm lucky to be employed without any post secondary education but it feels like I have to go back and get a 4 year degree to even have a chance of progressing in my career.
>>
>>101385115
how is that possible, wouldn't your b2b deny that?
>>
>>101385921
>JS means you pay 100x what you need to for hosting
>Use Rails
>>
>>101386144
>cant understand conditional logic
Not surprised.
>>
>>101385921
how do you cope with something like uWS.js, which is a C++ server with a javascript interface?
>>
>>101385929
>Is the market just that bad now?
yes. website builders and AI have gotten so good that web developers have been getting phased out. smaller scale employers will cut the cost of hiring a developer in favor of making simple websites with wordpress or with the help of AI, while larger scale employers have never had a huge demand for developers in the first place because they hire a small team and then keep them around. if you want to keep working in web dev and not constantly get the short end of the stick, you better start learning how to do backend. i know it seems unfair but the market shifts depending on what skills are in demand-- that's how it has always worked
>>
>>101379273
yeah but why not? it can capture requests like any other language and has passport and whatever else in the ecosystem. I have a new project and was going to use java out of habit until I realised express is just enough now and it's going in a container anyway who cares
>>
>>101386576
if you're going to use express anyway then switch to uWS.js. almost exactly the same syntax but it uses a C++ server so it's significantly faster

https://pastebin.com/bKZhcXJ2
>>
What are some good practice project ideas?
My github is empty. Preferably backend-oriented projects.
>>
>>101387098
an imageboard
>>
>>101384852
C# is fast to write and fast to execute.
>>
>>101386576
Because Blazor is webassembly. It beats the shit out of JS for client side performance it's not even close, but will have a few MB as the download instead of a few hundred KB. If you need client side performance it's a no brainer. Or when you want to make an actual app that runs client side and run/deliver by browser. Or if you need stuff to run client side and want the logic non-human readable in binary format. Most use cases UI is better served with some JS on the web. And something like C# or something else (not JS) for backend.
>>
File: file.png (748 B, 16x16)
748 B
748 B PNG
>Use ASP.NET for backend
>Everything integrates well because it's 99% made by one company
>Oh you want smart dbs? Just use entity framework
>Try FastAPI
>Uhh so to have smart dbs you need pydantic, sqlalchemy and alembic each made by a different company, each filled with compatibility bugs with each other

I spent more time fixing my db in fast than I did making my app in .net, python is such a meme
>>
>>101386341
same way motorcyclists cope with tricyclists
>>
>>101386341
>how do you cope with edgecase
I don’t because I don’t care. Most of the people using js on the backend are using express or something similar. Also if it’s a wrapper for a c++ sever is it really still a js server? Because we’re very quickly going to get into a semantics argument about writing in js vs running in js and I’d rather just skip that
>>
>>101386687
hondo.js is much better
>>
>>101387250
Blazor is trash loved only by midwit Microsoft npcs.

Blazor server is laggy, unscalable garbage that retards love because they don’t need to do “frontend”. Shit has terrible resume value since you cannot build anything other than internal enterprise apps that have a fixed user count with it.

Blazor wasm is also garbage and has more overhead than react/angular since it has to shuttle data between javascript to manipulate the dom. It also lacks all of the open source tooling that js has.
>>
>>101373643
You pay the money for the domain you want. Yes, you're getting scalped. No, it's not fair. And no, it doesn't matter. Pay up!
>>
>>101387792
Good

Anon of the month award, programmers still function on food and water and those are paid for
>>
>>101383584
Why is this?
>>
>>101387730
You didn't read before getting angry did you
>Most use cases UI is better served with some JS on the web
WebAssembly is great when the use case supports it. And WASM is client side and well supported. Not an MS thing.
Blazor full stack is not MS dependent, even AWS and Google Cloud supports ot. You're not tied into the MS ecosystem. You can even use Google IDX and not have to use Visual Studio or VS Code. This is a complete brainlet take, and Blazor is not the only path to WASM - C#, C/C++, Rust, Go are some other others. Even Python (ew).

The original point goes back to using JS/TS for everything. If I had to either use JS/TS for everything or entirely drop JS altogether. I would choose the latter and sooner use Blazor for simple UI static pages even then use JS for everything.

Fuck using JS for everything
>b-but muh uwu.js
Fuck no that's worse than fuck.
>>
>>101387716
Anon, Python is like for physics students and shit, it's good for expressing math stuff apparently
>>
>>101387729
if you mean hono then youre going to have to explain how, cause it's just the same thing but it lets you choose which template to work with. fastest general use case server you can choose from on it is bun and bun is just a uWS server but slower because it adds overhead
>>
Hey guys I'm super new and still trying to form basic concepts in this space. I've got a stupid question. It's pretty obvious what people mean when they say that they are writing a frontend - They are writing some UI in HTML/CSS/JS or using a framework, nocode tools, etc. And when someone is talking about writing the backend I guess they mean stuff like setting up databases, writing APIs and such. My question is, in the context of making a full-stack application, are the "frontend guys" and the "backend guys" both writing in the same project? Like would they both be committing code to the same Github repo, but focusing on different areas of the site functionality? Or is the backend guy off working in a totally different location?
>>
>>101387723
>Most of the people using js
since when are we talking about "most people"? you were talking about javascript the language, not the way in which "most people" use javascript

>if it’s a wrapper for a c++ sever is it really still a js server
if c++ gets compiled into binary then are you really writing c++?
>>
File: sneed.gif (740 KB, 375x304)
740 KB
740 KB GIF
>>101387250
>having to rely on fucking webassembly because you can't write good javascript code
assuming you know some sort of low level language like C, you *should* have enough knowledge to do a proper research and write *good* js code, but you aren't. How could it be possible for you to be fucking filtered by JS LMAO
>>
>>101388115
Keep seething js shill. Did yoh miss the part saying js is the better choice for most use cases for a ui? Or did you simply get upset about anon not wanting to use only js?

If I had to either use only JS for everything or never JS, I would ditch JS.
>>
>>101387974
Backend means code that runs on the server that you don't see when you use a web site. Front end means code that runs in your browser. Back end can generate part of the front end code depending on some logic inserting into the page. PHP is a good example for this and can be inside a "html" document (.php actually) but you include the php inside the html with ?php tag and write the php code that runs on the server that can then generate html/js and insert it into the document that you download/run from the server depending on inputs to the server/php document. A dynamic page etc.

A static page has no server generated content but can still interact with a back end service, that can return data and js then can change the content or the page but you can see this logic as it runs client side.

Github.. it depends where they choose to store the project, they could be. In the Php example it's all 1 page/document. The php runs on the server before sending you the resulting html/js, so it doesn't have to be as clearly separated.

But yeah Backend is anything that runs server side that you can't see in the frontend html/js.

You may typically be taking care of the entire thing as a "full stack developer" unless it's a larger project wirh dedicated people such as:

Designer - people who define the visual design language, design philosophy, a ui designer, responsible for the user experience
Front end developer - people who actually create the ui according to specification
Back end developer - people who create the logic of the webapp, what it's supposed to do for each scenario etc

That's just generalized categorization not actual role titles.
>>
>>101388216
lots of words but no answer to the anon's questions
>>
>>101387974
yes different repos
>>
>>101388351
He's confused about the scope of frontend and backend, I don't see how the anon's post doesn't answer the question
>>
>>101388529
read the question (that is, the sentence with the question mark at the end) again and tell me how explaining what frontend and backend developers do answers it
>>
>>101388351
You won't see real answers too often on here. Lots of hacks and pseuds, but I suppose that's every website since the beginning of the internet
>>
How many hours a day do I have to spend to complete a web app within 2 weeks which uses an API that displays the data a user wants?
>>
>>101389098
it depends on how pretty you want to make it. if you forego all visual presentation except numbers and buttons, you could easily do it within a day. without more information, it sounds like you just want a website that more or less directly interfaces with a database
>>
File: dense_multi_column.png (65 KB, 1295x209)
65 KB
65 KB PNG
I love multi column.
it's dense.
btw kolourPaint sucks >picrel
>>
>>101389199
Whats the difference between a website and a web app then?
>>
>>101389568
lots of people use them interchangeably but think of it this way:

website = your local restaurant
web app = youtube

oftentimes "websites" wont even need a server that does more than serve files, but "web apps" can have any level of complexity. people will say "a web app requires users to log in" or "a website only lets the owner edit the content" but the truth is that the terms are extremely loosely defined. i wouldnt worry about the terms-- just make the web app/site that does what you need it to do
>>
File: firefox_eP9VfjnbGB.png (45 KB, 1168x545)
45 KB
45 KB PNG
Bros is this cheap and would this fit my needs? I just want to host my portfolio projects (CRUD apps like social media apps, forums, marketplace, and job websites) and maybe a decent amount of traffic where I might shill them on reddit or 4chan (store pdfs, images, text, and videos on my database for demonstration purposes).

Recieved the discount for hostinger because 000webhost is shutting down.
>>
>>101390011
might recommend heroku. instead of flat pricing, they charge you based on how often your server is running (it shuts down if it's not used long enough and automatically starts up when a user visits) and how much data you're using. if you're not planning on hosting huge amounts of data and you're not planning on getting hundreds of visitors, it might be a good option

it can be a bit of a bitch to set up though so if you go with that, check back here if you need help
>>
>>101365897
Tech is in a terrible spot atm, diplomas are not valued as much as they were, people with recent experience are having trouble finding jobs. I would not get into tech atm if you can't handle not getting a job for at least two years. Game development is in an even worse state than web.
If you want to not waste time I would suggest committing to something in a meaningful fashion because any industry can go to shit.
I don't expect web dev or game dev to get better until fed rates come down and/or people stop studying CS at the rate they currently do sadly.
>>
>>101371970
Imo you can't learn anything in tech via audiobooks except surface level stories about tech history/businesses
It's like saying you want to listen to a book about math, you won't learn math without doing problems
>>101384852
nta but at my job roughly 2/3rds of our issues are due to things that would be caught via a statically typed compiled language, tbf TS helps with this but writing TS is about the same as writing Go
>>
>>101385929
Coworkers at work say they don't get callbacks (angular team), a friend of mine with 6 YoE said it's so bad they're going back to school for engineering
It's a combination of things and the dude saying it's wordpress/AI is not totally correct imo, it's mostly due to rates being hiked, too many CS grads, increasing demand for full stack devs, so on
>>
>>101388115
Let's be honest bro C and Java boomers rarely ever learn about surface level shit like prototypal inheritance and often don't even write idiomatic js code with stuff like map/filter/reduce
They see the C-Style syntax of js and then refuse to learn how it actually works for some reason
>>
>>101363781
need advice on a forum web app.
I am creating a tex editor and I do not want to direct users to Discord. I am a poor fag and can't afford to buy a service from discourse so I decided to create my own forum web application.
For the first end, I wist to use ELM. Its a delight. The only this I'm having issue with is automatic updates. I do not want my users to click some "refresh" button for their thread to get updates. I want threads to update automatically in real time and my only options to get that done are Web Sockets or SSE via ELM's port. It'd be a bit annoying but doable.
Now comes the hard part. The backend. I initially planned on using Rust with tokio stack and I know for sure that it'll get the job done. What I do not know for sure is how many parallel SSE connections can the Rust app handle. If I were to test and benchmark all the existing frameworks, that alone would be several weeks of work.
I'm thinking about checking out Phoenix Live for usage in backend. I never used it but since its elixir/erlang it is very re-assuring and can handle a lot more parallel connections than Rust app ever could without crashing. It'll be a bit slower than Rust but if it doesn't crash that's a fine trade for me.
So, should I go with Rust and tokio combo or Phoenix LiveView for backend of my forum website that automatically updates itself?
>>
>>101390132
Offshoring overseas yeah? Ive done development for my company which is completely outside my role because the people who are in those roles in my company are all in the Phililppines and cant actually do anything.
>>
>>101390184
how the fuck do you get a job without understanding callbacks
>>
i use camelCase
>>
>>101391302
*high fives*
>>
>>101391312
i_pREFER_fUCK_yOU_cASE
>>
backend pros, what do you do about this?
>>101390252
>>
>>101391343
xD'd
>>
>>101391349
You actually grant them access to these users, but you exchange the login shell for a quick sleep and exit.
>>
>>101391359
Nothing funny about this, it actually makes sense:
* You are never going to confuse keywords or libraries with your own code
* If you are about to create long names, you will think about again, forcing you to write better code.
* You can grep it really easy

fUCK_yOU_cASE is the future.
>>
>>101391372
why not just return exit code 0 without sleep? I guess they're waiting for a sleep that would be emulating the existence of some kind of DB validation, is that it?
>>
>>101391391
>fUCK_yOU_cASE is the future.
correct, backed by many billion $ projects
>>
>>101391394
Yes, you want to keep em busy that is. The only way to fuck with these people is to make them pay in some way. The longer it takes for them to handle that connection, the better.
>>
>>101391444
I understand, why not blacklist though, and what pattern do you guys use to spot them?
>>
>>101391403
Well, all those billion $ projects have already made their cASE_fOR_fUCKING_yOU
>>
>>101391349
use ufw to close all but absolutely necessary ports and make services use non-default ports
>>
>>101391349
fail2ban no?
>>
>>101391762
>>101391710
>>101391444
I guess I'm actually really at step 0, how to log that shit, what would you log, login attempts, port connections? As in, how to not generate massive lists of useless logs and target that which really matters?
>>
>>101391850
fail2ban, snort, tripware, port sentry, ufw/ip tables, CIS Benchmark has good doc for basic security settings.

Just some right from my head, for basic setup
>>
>>101383696
Always validate the input. But also validate the critical data in the database when inserting or updating, to make sure your data is correct.
Avoid a lot of foreign keys as they can be very expensive, but sometimes they are quite useful.
>>
>>101385929
>Is the market just that bad now?
Yes, seems that way. It is the same in east Asia. Lots of people who got fired, companies stopped hiring and lots of new graduates.
People with 10+ YOE take jobs previously for 5-10 YOE, people with 5-10 YOE fight for jobs previously for 0-5 YOE aka juniors.
Recent graduates get nothing as people with experience fight for the positions at the few companies that do hire.

It seems to slowly improving as the market adjusts and seniors are slowly getting jobs.
The American market seems the most fucked, the Korean and Chinese seems not good, the Japanese seems decent but low wages, and the European one seems a bit down but mostly stable.
>>
>>101387716
>Oh you want smart dbs?
What is a smart DB? I have never heard that expression before.
>>
>>101387974
>the "frontend guys" and the "backend guys" both writing in the same project? Like would they both be committing code to the same Github repo
Sometimes yes, sometimes no.
You can setup a "monorepo" where all your code is in one repository where you have directories for different projects, for example the frontend and backend, but also maybe some other projects like image processing or payment processor or whatever.

My previous company had one git repository for each project, and when the frontend migrated from one framework to the other they setup a new repository.
The backend had a few different repositories that handled different things, one monolith with a few special cases projects.
A few people worked on both the frontend and backend repositories, but most were either a frontend or a backend developer.

I think a monorepo makes more sense, as it is easier to share code and make sure everything is up to date at the same time. But it also makes it a bit more messy when you have a lot of developers who work on totally different projects.
>>
>>101391157
>how the fuck do you get a job without understanding callbacks
I am pretty sure anon meant that they do not get called back, by an HR person, after submitting an application.
>>
Would you agree that all cookies should be either http-only or client-only?
>>
File: bONmTUTo4kzS0.gif (647 KB, 500x267)
647 KB
647 KB GIF
Work: committed
Commits: pushed
Repos: backed up
>>
>page 8
>>
File: bigDecimal.jpg (75 KB, 1080x387)
75 KB
75 KB JPG
>>101378981
useless for finance because it doesn't have a proper decimal number type
>>
I'm looking for a webdev that can build my website idea. Paid of course. I think you need to know about back- and front-end. It has to scrape some content of another site.

If you're interested mail me at bobby@nigge.rs (yes this is a real email address.
>>
how do i go about learning how https calls actually work? like i can use tomcat to start a local server and then use curl to call it but whats actually going on?
>>
File: javalin.png (29 KB, 800x216)
29 KB
29 KB PNG
Thoughts?
>>
>>101394889
https creates a packet with information, encrypts it, then it uses your computer's network to send the packet to the necessary IP by searching for it on the closest DNS server (provides the routes to IP addresses)

there's a lot that happens so you could be more specific or just up how network protocols work
>>
Do people really use JSON nowadays?
I had never used this format before, but I encountered an error when I parsed tsconfig.json with comments in it with native `JSON.parse()`, I started to notice this file format.
There are around ~55M weekly downloads on npmjs.com, which makes me think it is popular. But I never saw any project use this format, and there are very few extensions for this format on vscode market.
>>
>>101390428
alright. I spent some time learning Phoenix LiveView and I decided to go with it. Now I can enjoy writing some ELM.
Not using Rust as backend for production will save me a lot of development time and since its erlang, I can chill knowing that I have the flexibility to scale and change transport from websockets to polling if need be without any hassle, compared to the Rust counterpart.
>>
>>101395824
>Do people really use JSON nowadays?
its pretty much the standard these day, bruh!
Almost every API comes with JSON out of the box these days.
>>
>>101395824
send data from one microservice to another, database, and so on, so yes it's used a lot, just not for your own personal mini website
>>
File: http.jpg (87 KB, 669x412)
87 KB
87 KB JPG
>>101394889
not sure what exactly you want to know. If you want to know in detail how a network stack functions, your best bet is probably to learn C and read the relevant portions in the source code of some toy OS.
>>
>>101394889
as mentioned in >>101395717, its a big pain.
Its less painful to get a SSL certificate from a certified authority like Let's Encrypt and let some library handle the rest for you.
>>
>>101364700
doing this the old way would be through tables. The modern way is grids.
>>
Should I use redis for my ai chat api? It's the only thing I can think of to keep the history context per user easily flowing.
>>
I can become a master in css, html, js, and etc easily. But even if I do all this what's in it for me besides employment? How can I use what I have learned to create something that people will remember me for decades? I feel that web technologies cant do that for me
>>
>>101397289
make a cool website that lots of people use?
>>
>>101397005
Are you running a model on your own server?
>>
>>101397388
that is not sufficient enough
>>
>>101397289
Ok? Thanks for sharing?
>>
>>101397289
>I feel that web technologies cant do that for me
I feel exactly the opposite, with the web you have the potential of reaching thousands maybe millions of people
with minimal capital might I add
>>
>>101397403
Yes.

I run the model
Then I have a FastAPI backend
Every time you send a prompt it fetches your history from my db (psql) gives it to the model, generates the new message, stores the new history in the db, then returns the generated message

So you have 2 db events before you get a response in the frontend per user prompt, the max size of a history is ~8k tokens. I'm trying to figure out if I should implement something like redis or if I can just ride pure psql for a while.
>>
>>101397456
my uncle made it and made it big
>>
https://jellyfin.org/ is stuff like this secure enough to put it on a remote server instead of home (private network) ?
>>
>>101397456
okay too fucking bad for you i guess
>>
>>101395824
>Do people really use JSON nowadays?
I mean it is literally the most standard way of sending process to process data over the network. Almost any network API endpoint expect to receive and return JSON.
>>
>>101397578
>I'm trying to figure out if I should implement something like redis or if I can just ride pure psql for a while.
Unless you have a lot of traffic, then yes you can just use the database for now.
If it causes too much stress on your database, then you can switch to use a Redis cache to save and serve the currently ongoing chats before eventually saving it to your DB and fetching it from your DB when an older chat is resumed.
>>
>>101397594
In the early 2000 maybe. Good for him. I doubt it would work much these days unfortunately.
Just like if you showed you could make any mobile app in the early 2010's you could get a mobile job, now you need to be a seniors seemed to get those jobs, and that was before the interest hike.
>>
File: 1713882920950726.png (2.03 MB, 1559x2807)
2.03 MB
2.03 MB PNG
>>101363781
/hsg/ tourist here. I have two questions:
>What happened to webassembly?
I remember the hype the around secure rust or C# applications directly in your browser all to well. Did they turn out to be far less secure than anticipated or too resource heavy maybe?
>Does a front end library exist that embraces building a website, but keeping it operational without js?
I do wanna dab into personal web helpers and do wanna use js for things like instant search results, but i'm also surrounded by some tinfoils who rather don't use js at all. The goal is basically amazon like pages.
>>
if i want to launch a web app in which the users interact with an llm via an API key I dont want to expose, what's the best way to achieve this? .env with credentials on server side + create an endpoint that can be queried by the client?
what if the llm is hosted on my computer?
sorry i know i am dekinai in webdev
>>
>>101398659
Are you making a proxy or not?
>>
>>101398734
no, should i?
>>
>>101398795
Then why is there an API key?
>>
>>101398806
the key is to some external proprietary model provider.
>>
>>101398865
I.e. A proxy.
>>
>>101397798
thank you
>>
>>101397628
just make the remote server only accesible via credi card nft, that's what i do
>>
>>101387844
>tell me you've never built anything, without telling me you've never built anything
>>
>>101398870
>>101398870
oh. i did say i was dekinai. anyway, i interpreted your question as creating my own proxy.
in any case, where should this API call go? server side?
>>
>>101399603
Think.
>>
I expected more activity here. I thought every moron was an infamous webdev these days?
>>
>>101399754
all webdevs are morons but not all morons are webdevs
>>
>>101400227
looks like a generic wordpress store website. honestly not that impressive
>>
>>101400227
>>101400518
>powered by shopify
so 5 minutes to make the shirts, another 5 to buy the domain
>>
>>101399529
In general you want to avoid caches if possible, since caches add more complexity. So if the benefits, aka the speed improvement, is not big enough then you most likely want to avoid adding the extra complexity that comes with using a cache.

If you are only using a "cache", for example to temporarily store cookies, then that's the way to go. But if you store the data multiple places, your database and your cache, then avoid it if you can.
>>
>>101400227
>50% tax if you aren't from usa
retard business practice
>>
>>101363781
I do all my CSS and HTML using the dom in javascript. This is now the correct way to do all web development (because I'm straight and white).
>>
>>101399534
what
>>
>>101401340
>I intentionally slow down my website because I can't be bothered to write HTML and CSS and would rather do it in a significantly more complex and inefficient way (because I'm straight and white).
>>
>>101401389
>Having all the logic for a singular object split between 3 files is more efficient and easier to work with.
This explains the dire state of the modern internet.
>>
>>101401404
>logic
lmao. i guess that's what you're not getting. html and css don't have "logic," they're just sets of values.

if you seriously think doing
let element = document.createElement("div");
element.classList.add("class");
element.style.blah = "whatever";
element.innerText = "text";

is more logical than
<div class="class" style="blah: whatever;">text</div>

then you are unironically a moron. i'm not even saying that to insult you, you just actually have low IQ if you think this and i feel sorry for you

also yes, it is more efficient. not only does it organize your information, but it is objectively, empirically faster
>>
>>101401340
>reiventing the wheel is le good
>>
>>101401429
It might be ok for your glorified text document that you call a webpage but anything with a bit of interactivity it's niggerlicous. Name one other area of programming where you would split a singular object's logic into 3 files.
>>
>>101401429
Render 100,000 particles of random size, color and movement pattern on a canvas using the second method.
>>
>>101401454
>split a singular object's logic into 3 files
nobody does this in webdev. css is not logic. html is not logic. javascript is logic, html is element layout/binding and css is visual style

software with any kind of UI almost always splits the presentation and logic of "objects." in fact, i'd wager over 90% of languages and libraries with support UI do this.

yes, of course, javascript dom editing is a necessary part of webdev, but let's see you do css keyframe animations entirely via javascript, without a .css file
>>
>>101401492
>do something that html was not designed for in html
why do you think my argument is that you can do everything in html? who said this? who put this idea into your tiny head?
>>
>>101401515
I accept your concession.
>>
>>101401519
I accept your concession.
>>
>>101401506
>over 90% of languages with libraries with support ui does this.
Name one (outside of js). Go's fyne doesnt, python's tkinter doesn't, gtk doesnt, qt doesn't.
>>
>>101387716
dotnet is fucking kino. i wished i used it at work
>>
>>101389199
this is why i like bootstrap, you can make a normal looking website with just a few classes here and there.
>>
>>101401543
>qt doesn't
are you actually retarded? anyone who writes logic in QML is doing Qt wrong. it's like writing entire functions in an HTML button's onclick
>>
is anyone actually good at css or am i just not being patient enough to understand it?
>>
>>101401649
both are true but css does a lot of things counterintuitively. it's kind of a piece of shit

afaik most people who use advanced css frequently end up using some css preprocessor like sass which makes css more logical, and a lot of people who dont need advanced css but still need a lot of it will use libraries like bootstrap and css generators
>>
File: WINWORD_o61RDoawcs.png (51 KB, 727x639)
51 KB
51 KB PNG
Help bros, at least a direction to get started

I know Laravel(server side crud) and React(client side crud) as standalone projects and created a project in each of those which is deployed on localhost. How do I get started in creating picrel? Do I initialize it with React or Laravel (ie. "laravel new projectName" or "npm create vite@latest") I can do this by myself in a week or 2 but the time constraint is 5 hours. I don't know how to glue these technologies together to get at least the core functionalities working.
>>
>>101402031
sorry anon idk laravel but with nodejs it's stupid easy. you just do
npx create-react-app my-react-app
cd my-react-app
npm init


sample uWS.js server with database: https://pastebin.com/3V8XSHLV
>>
>>101402031
>>101402089
slightly updated: https://pastebin.com/wXzNjNDh
it interprets all https requests as requests for static files so if you need to use specific GET/POST/etc. requests you'll have to reimplement that part a bit
>>
>>101402031
>>101402114
nvm i added example endpoints. hope this helps
https://pastebin.com/Hd5b7Cjd
>>
>>101402089
>>101402114
>>101402205
Thanks, although I don't understand those node and websockets (can't learn them due to time constraints), I sort of understand that the code below is where I should insert the 3rd party API. Looking at the requirements I can ditch some action verbs(PUT, PATCH, DELETE)
}).get('/api/another-get-endpoint', async (res, req) => { // ANOTHER GET
// example of another GET handler with a unique endpoint
}).post('/api/post-endpoint', async (res, req) => { // POST
// stuff
}).put('/api/put-endpoint', async (res, req) => { // PUT
// stuff
}).delete('/api/delete-endpoint', async (res, req) => { // DELETE
// stuff
}).patch('/api/patch-endpoint', async (res, req) => { // PATCH
// stuff
}).options('/api/options-endpoint', async (res, req) => { // OPTIONS
// stuff
}).head('/api/head-endpoint', async (res, req) => { // HEAD
// stuff
})

I'll just whip out your code and use Phind for my specific requirements as a last resort and cross my fingers if I don't get anything working.

For now I'll just focus on the frontend to get at least get something submitted. I'll keep /wdg/ blogged unless you want to /unsubscribe
>>
>>101402272
>the code below is where I should insert the 3rd party API
based on the endpoint and data in the request ("req"), yes. you could also use the websocket handler for that. either works

>Looking at the requirements I can ditch some action verbs(PUT, PATCH, DELETE)
yeah people almost never use these but i put them there just in case
>>
File: 1716651857213417.jpg (54 KB, 1150x1100)
54 KB
54 KB JPG
Is learning angular a bad idea? What is /wdg/s opinion on it?
>>
>>101402335
these kinds of questions always come off as weird to me. are you just learning a language/framework for fun? why? are you learning it for a job? also why? learning a framework to the point that you can perform standard functionality, even if suboptimally, takes less than a day so why bother learning it in advance?
>>
File: 1657059650234.jpg (134 KB, 1034x689)
134 KB
134 KB JPG
nextjs params are not uri decoded
>>
>>101400197
Maybe, but even the 3d printer threads felt less (brain-)dead. How does this general survive even, given the notorious increasing /g/ spam?
>>
File: 1649186239128.png (470 KB, 839x768)
470 KB
470 KB PNG
>>101402364
I'm just trying to learn something for a job.
>>
>>101403484
the worst we have is some retard replying to some posts with "retard", we're lucky
>>
File: Code_IBh1Edy9B5.png (15 KB, 653x286)
15 KB
15 KB PNG
>>101402031
Ok, I fuckin failed. I know that I needed 2 repositories. Didn't even get to touch the 3rd party API

For the backend(Laravel), I know that laravel breeze comes with authentication out of the box (with email and login)
>laravel new backend
>selected breeze->api->mysql

For the frontend
>npm create vite@latest
>selected typescript
>create a login component and stole code from tailwind

ending my blog
>>
>>101404001
rip, hope you learned something. fwiw, the docs say you can do "php artisan breeze:install" and there should be an option for react with inertia. Given your time constraint I probably would have stuck with that in a single repo.
>>
So I'm at a crossroads, I have an import form working for my book / library management project and now I want to go about adding autofill for metadata. So I have some code for autofill working you can see in the image here as a test I have an array of items set with c.s.lewis and that gets passed into the MultiSelect which then will pre-select the item, this all works.

But the problem I have is that I'm going to be pre-populating lots of fields, this is a prototype where I only need to do title and author, but langauge, genre, tags, publisher etc. etc. will be other fields and I don't want to have to have separate state for each. You can see for capturing the input user data I store all values in a BookDTO in state. Could I do something similar for the response from a metadata lookup?
>>
>>101404252
Then for example do something like this where in theory the metadata state object will be null until it gets populated via an API call and then each component can just watch a field on the object? Or would this be bad practice? Not sure how watching just a field of react state instead of the entire object behaves? I can default the object to something safe so it won't null pointer?
>>
I have 4 years experience working in companies in React. I was a fullstack developer aswell.
Is it actually possible to get a job these days in React ?

Do jeets flock to React positions like they do to Java positions ?
>>
>>101404252
Are you Indian?
>>
>>101404353
No I'm white sir.
>>
>>101402272
Are you a Indian ?
This code is incredibly bad.
>>
>>101404335
No. React is bloated shit at this point.
The docs are also a joke.
So probably.
>>
>>101404361
Ok, because your code is terrible.
Do you actually work as programmer or just learning ?
I have been working professinaly in React for 4 years, I was thinking about creating new framework , but I can't get any job atm.
Soon it things are going to start looking very bad for me.

It's a pain in the ass to see jeets and other asians coming here and taking our positions.
>>
File: IMG_20240714_042917_666.jpg (157 KB, 1280x650)
157 KB
157 KB JPG
>>101363781
I started playing with sveltekit and Ai 2 months ago with basically no web dev experience and have managed to create a site where you create a card with rpg stats and battle it with other cards in a simulation. I feel like such a hack, but the code keeps working and things keep clicking for me. Is this how pajeets are stealing all your jobs? Could I get a job doing this shit? I already have a job I like, but im in awe at how rapidly things have progressed and are going to change.
>>
>>101404369
>React is bloated shit at this point.

What do you mean "React". Your statement is over-exaggerated .
My react code is never "bloated" , I know how to create maintainable React code and I can't get a position.
I have been working 4 years as React dev.

What is happening ?
>>
>>101404387
what do you use to set up react?
>>
>>101404372
I actually work as a programmer, I'm more back end though, had to pickup web stuff on the job only been doing react for about a year on and off. What's the most egregious problem with the code?
>>
>>101404398
I mostly use webpack configuration because this allows for module federation,
Recently I started to create my own node-js/react libraries so module federation not so much in use, but
I prefer to keep webpack rather than use vite for example which is very good besides that.
>>
>>101404401
Your code messes logic with views.
This is terrible , I could show you the proper way, but I have money left for maybe 2 weeks, and I have to pay health insurance for my 1-person company.

I could create a new framework based on my experiences with React, but I can't get any job and things are starting to look very dark for me. Please give me a prayer.
>>
>>101404369
calm down grampa, react in itself is just a UI library. It's not even a framework
>>
>>101404413
>calm down grampa, react in itself is just a UI library. It's not even a framework

this. React is great for creative people. It would be a shame if they brought jeets to
code react while we are struggling to find positions.
>>
>>101404421
what kind of projects have you done with react?
>>
>>101404450
advanced and complex management systems, nested structured data,
chat applications, map applications.
I know how to create highly maintainable.
In my applications the directories often represent the visual view of the application which makes it super easy
to find things and look in places.
I was doing backend aswell.

Currently I am creating modules/packages for node-js and python-django.
Abstract class inheritence for websocket controllers both on frontend and backend.

Currently I develop two fullstack applications in React+Django, but those are 5 months work for a team and I am doing it by myself.
Can't find any job, things are starting to look really bad.
Haven't told my parents yet, I have given my self time until the end of the week.
If I see jeets being hired for similiar positions to mine I am going to be angry.
>>
>>101404412
I'm assuming by logic you mostly mean the fetch calls? Those aren't going to stay there, I'll make a custom hook to encapsulate that logic once I have everything working around it.
>>
>>101404483
>I'm assuming by logic you mostly mean the fetch calls?

No, you clearly have no understanding of the seperation of concerns.
In Import function component you are assigning tailwind classes as well as declaring methods, and passing props to components.
This is not scalable.
In my methodology tailwind classes or styled-components should have seprate layer .
I have been working professionaly for years though, and now I can't get a job.
I have two big projects that I am working alone, for which I am creating libraries but things are just starting to look very grim recently.
I am giving myself one last week, and I will have to resolve to some harsh measures because I am not going to give up .
>>
>>101404412
>Please give me a prayer.
I'm not a christian but I did my luck thingies for you, hope for the best for you.
>>
>>101390779
>Offshoring overseas yeah?
Visajeets ?
>>
>>101404252
Genuine question: Have you tried writing the same thing *without* react first?
>>101404515
>In my methodology tailwind classes or styled-components should have seprate layer
dear god, why?! If you are at that point you should *not* be using tailwind or styled components at all! The whole raison d'être of tailwind et al. is to have that shit in the component. Not that I like it, but if you are adding another layer of abstraction just to get rid of it again, then you should probably just do css again.
>>
>>101404603
>If you are at that point you should *not* be using tailwind or styled components at all
I told you that you have no understanding of scalability.
I worked with people like you who were smashing tailwind along logic and I ended up senioring those people.
He had to rewrite everything to align with my points.
Tailwind classes smashed with everything is well known anti-pattern.
You are objectively a bad dev atm, and you should work on your character as well.
First you ask for direction but when given the most basic hints you reject them and recoil.
You never worked on a big app, so you think that tossing tailwind classes everywhere is cool, because it's quick for you.
You are the sole reason why it's so hard to find React job these days. Kids like you with inflated egos, who learned Tailwind think that they are on the top of the world, while you do not grasp the most basic principle of separating views and logic.
>>
>>101404603
Tailwind is for onions fanboys . It should not affect the code architecture, dude you have lots to learn but you should work on your character and be humble.
You are not a jeet, right ?
>>
New thread
>>101404671
>>101404671
>>101404671
>>101404671
>>
>>101404603
>Genuine question: Have you tried writing the same thing *without* react first?

No, last time I wrote any vanilla HTMl JS and CSS on their own was in a LAMP stack 10+ years ago. Angular, React and Vue are much better than writing raw HTML, CSS and JS.
>>
>>101400518
>>101400926
wordpress/wix/shopify retards are a crack up.
>>
>>101401506
i built a reusable, dynamic drop down menu for my friends business website with only html/scss. Only JS i included in the document was for form input validation and smooth scroll. Hoooly fuck imagine needing 300mb+ of fucking bullshit to load your webpage.
>>
File: IMG_1156.png (54 KB, 320x375)
54 KB
54 KB PNG
>>101401725
>people who got gud use CSS preprocessors like SASS
>people who (need to) git gud use nonsense like Bootstrap/Tailwind
>bootstrap _is_ kinda chill, tho
>pic rel
>>
>>101404645
>I told you!
No, you did not.
>I seniored them for good!
>Align with my points!
Why do you insist on sounding like a donkey?
>>101404730
Sometimes it helps to focus on the actual problem instead of wrestling with the framework. From the code that you have posted I'd say you are in fact wrestling with the framework. React basically forces you to think about it in a certain way, but sometimes there are better solutions outside of the "everything is state" world.
>>
>>101404475
you’re an underperforming ESL nigger. Sorry, Mandeep
>>
>>101404858
your spaghetti tailwind code is only going to end up looking like pic rel
>>
>>101404872
>you’re an underperforming ESL nigger. Sorry, Mandeep
I am not jeet.
>>
>>101404858
imagine this>>101404880

but with method declared in function, and props passed .
You will create a hell of an app to maintain this way.
>>
>>101404858
>React basically forces you to think about it in a certain way, but sometimes there are better solutions outside of the "everything is state" world
nta but my experience with react is that react makes me think about problems declaratively, whereas when I’m writing vanilla i’m thinking about my solutions imperatively.

>>101404730
Try structuring your code in a way where it describes how your function works, instead of just saying how it works.
>>
>>101404858
tailwind is way overhyped and it's good for short demos, and hello world applications
>>
>>101404915
declarative is much better for frontends and guis .
Imperative is better for nested backend logic.
>>
>>101404671
>>101404671
>>101404671
>>101404671
>>
>>101404926
>X is always better for A
>Y is always better for B
says who?
>>
>>101405295
>says who?

Why would you write receipe type code for frontend gui with immutable objects, high refresh rate and top-to-bottom state approach ?
Declarative code and functional approach seems much better fit imho.
Obviously programming is often about breaking certain rules by invididuals, who surely are much higher skilled and more flexible than me, so that maybe was a bold take but excuse me, when you have your government pumping billions into a fallen state with imperial aspirations and masochistic approach towards its citizens , while at the same time there are mass layoffs it's hard to be always 100% objective since, lots of positions are occupied by people who don't actually know how to create a scalable React app.
This makes your blood boil, because normally in production if some low-level c++ dev implements intrinsic imperative type of approach to a complex React application, usually the company owner will not let you refactor his code because he doesn't care. He is not a dev himself
and you will have to suffer months and months in this shit after which they will fire you anyways.
Dude reality for regular dude is harsh these days, don't underestimate anons .
>>
>>101398100
Webassembly isn't that popular, it's available however, I guess we will see more & more uses of it over time.
>>
>>101403814
That pepe sure does look annoyed
>>
>>101406449
> I guess we will see more & more uses of it over time.
js/ts will always be superior in the browser.
same with js/ts frontend libraries like React.
It will always beat any form of template tag engine.

React is messy when implemented by noobs and companies on regular basis hire jeets so the tools have to be inherently noob-proved which
takes away a lot from the original aspect of programming in generaly.
This is a contradiction within itself.



[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.