/wdg/ Web Development General

Previous
>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
freecodecamp.com
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtube.com/watch?v=Zftx68K-1D4

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

>PHP resources
pastebin.com/gfBPg24A

Attached: web.jpg (300x278, 22K)

Other urls found in this thread:

masonry.desandro.com/layout.html
ideone.com/YX4xRZ
rclayton.silvrback.com/speaking-intelligently-about-java-vs-node-performance
dev.to/restoreddev/choosing-php-in-2018-3e1h
twitter.com/AnonBabble

What does /wdg/ think about golang?

Second for La Creatura de las JavaScript

reply to this post if you are trying to create a startup.

tell us about yourself and your project.

( you don't have to reveal everything, user, I know you are probably paranoid someone is going to steal your billion dollars idea )

Attached: presentation.jpg (800x530, 44K)

I'm making a social media site based on synchronization and bringing people together :)

I'm not gonna go into details but I'm writing it with Angular, Angular Material, Flex-layout, Node, MongoDB, and Express. Uses Passport, JWT, and JSON for logins/validation. Figured if it ever went viral might as well use one single language for everything so future employees can all be on the same page front end and back.

I hope you are working on your pitch ;)

I'm also trying to create a social media. I know how to make it go viral but I don't know jack about mobile dev. So I'm learning that atm in order to create a Minimum Viable Product.

I wish you all the best, stay strong, user

How to make form for uploading jpg files in PHP? I need also to make login/registration form, and ablity to download uploaded files based on logged user

What language are you using? If you're also using node I recommend checking out things like NativeScript or Ionic.

Can't vouch for Ionic because I never touched it, but NativeScript is pretty easy to pick up.

Any easy ideas, which would make my PHP portfolio look even more beautiful?

Attached: 35E32E0223F449728DCFC2FC70D8742A.jpg (1032x1400, 775K)

Is getting into web dev viable job?

No. Ever since Node any front ender with good js foundation can switch over pretty easily.

I'm learning how to use Ionic atm because I have some knowledge in Angular. It's going pretty good. Haven't look into NativeScript, maybe I should?

Native uses Angular too.

I have a script that fires before DOMContentLoaded (it needs to) and this
const mainHTML = document.documentElement || document.getElementsByTagName('html')[0]; but often times mainHTML will be undefined if I try to do something to it like change the style. How can I "watch" and trigger only when html and head exists? MutationObserver?

When WOULDN'T Html and head exist?

I'm not sure what you're asking but based on you saying you only want it to fire when something else happens, you'd wanna just use an if statement

It's a userscript with
// @run-at document-start

sometimes I'm getting errors with mainHTML being undefined, doesn't happen 100% of the time

I've had problems with userscripts in the past. Have you ran the script you want in console after the page to load to check if it actually works outside a userscript?

If it works in console then that means it's an issue with userscripts and you may have to try your own onload or even set a timeout.

>user submits text in form
>text gets appended to a .txt. file on the server through node's createWriteStream function
Is there any possible way this could go wrong? Besides the user submitting junk / edgelord values. I'd like to have a feedback form of sorts which I can then check in the morning by writing 'cat responses.txt' and reading what emerges.

my friend has an idea for an app and i wanna give it a shot

i heard a nice way to make an app cross-device is to just use a webview. does this have any drawbacks? i've also looked into using ionic but it uses angular and i'm not familiar with it

Seems to happen mostly on greasemonkey and not on violentmonkey, this new update with the async stuff is fucking dogshit. Multiple times document.documentElement will be undefined and document.head will be undefined too. My test case is basically opening a bunch of tabs at once, some of them will fail and some will not

Go Go fuck yourself

I think it's not worth using. If you need "speed", just point the thing that needs to a C++ handler.

PHP, Node.js, Python, Ruby are all superior to Golang for web dev.

I've only used the Chrome version TamperMonkey. Most the time I have to put the whole thing in a document.onload for it to work.

Brainlet here, can you guys help me figure out what CSS I need to use to get dynamically generated divs to stick? I tried using a table, I tried using standard divs but I cant seem to get these to stack at all.
>inb4 put 1 & 3 in the same column
Cant do that because there are another 4 sections of various sizes that need to fit in as well, and they cant all be put in the same column because of the way they are generated.

Attached: help.png (1884x2516, 27K)

Heres a screencap of the webpage that im actually having this problem with. Each one of the categories is generated via PHP, and I can put them into any container and any order that I want, but they need to be stackable.

Attached: menu.png (1179x859, 96K)

dont know but google css grid

1,3{
float:left}
2{float:right}
3:after{
float:none;
clear:both;
}

this is the old school way to do it, you should learn grid and flex

The problem is that each individual section is generated via PHP and all share the same css. Doing it with child selectors wont work either because it will break if one of the menu items is removed or modified in the future.

Il take a look at the flex though, maybe that will work.

can't you just add class one two and three and then style them?

No, all of the sections share the same classes, they are generated with PHP and there is no way to give each section it's own class. Flexbox seems to be my best option after reading up on it.

Just make 2 classes left and right, then float left for the left and float right for the right class. In the loops you can check the index if index % 2 == 0 then add left else right.

What are some dynamic web projects to start with as a begiimer?

>In the loops you can check the index if index % 2 == 0
explain this, I don't get it but it seems interesting

I'm telling you this, just in case you didn't know, if you already know, ohwell.
You can set multiple classes per element, as in
class="class1 class2 class3" and call the elements by those classes
like .class1.class2.class3

wont work because of pic

Attached: justfuckmyshitup.png (1508x4320, 35K)

What book would /wdg/ recommend to read preferably available on Kindle store if I want to learn how to create a website with :
> user registration, authentication, different user types for different functionality
> dynamic forms, for example adding extra fields by clicking + sign.
> all of custom form data go to data base
> data visualization with graphs, charts...
Also what technologies should I learn, where is so many I can't choose.

masonry.desandro.com/layout.html

what kind of employee uses node?

serious question. all i see are macbook freelancers whose lifestyle can only be supported via trust fund.

and fun hobby projects like ghost.js that would be legitimate if not written in javascript

I'm guessing when you display the data you're looping through the array of objects or whatever your structure is, so a for loop the first argument is the index/starting point. So when you loop through the array you can add the class based of if it's even or odd add the corresponding class.

I get it now, thx, neat trick

Anyone else here studied webdev just to make their own forum to discuss video games and anime?

But then I would have to learn c++.

Go was made for the web.

Should I choose Java/Csharp instead?

Nope studying/finishing up this last project so I can start applying to jobs with a strong portfolio.

MERN stack

have any of you ever had to work with cassandra?

what problem are you havin?

I hate when people here ask a question, then don't reply for hours on end

Attached: 1537909175738s.jpg (250x211, 10K)

what database to use with node? or better question, is mongodb shit?

Any relational database like postgresql/mysql/mariadb will do if you care about not losing data.

Use Mongodb only if you want to do the thing it was made for: storing unstructured documents. Most of the time you're not doing that unless you're gathering raw data for analysis.

If you want a fast access cache consider adding full text indexes to your database or if it involves expensive computed queries, cache them by putting the results in a redis/memcached store.

bump

dont lose the thread

no problem, i've been researching it and schylladb and wondering if anyone has here who works has ever had to deal with them, and how they are to work with

Just had a 3 month break. Wtf did I miss? What's the state of React, Vue, Angular? Anything new??

I learned it so I could start my own travel blog. Then some people asked me to make a webshop for them, so I did. I made some Wordpress and Prestashops themes and plugins for things I needed to do. Which forced me to dig a bit into PHP and Javascript. And now I'm reading some books and making some interactive websites to git gud, including an obligatory forum. I'm now busy with an email service out of curiosity.

I never intended it to become more than a hobby. But now I can't find a job in the field I studied in, except very basic underpaid work as a glorified secretary, it becomes very tempting to switch careers. But I secretly don't want to admit I spend years wasting my life studying something for no return. Only to start over again as a webdev, which I should have done all along. It's like admitting you're a dumbass.

Is this a parody of an Indian asking a question?

not him but I have a mysql database and adding a full text index to the post message field the INSERT queries get super slow, is this normal?

With the webshops I received half a months wage, for a couple days work. Which really made me think.

Scylla is very much for enterprise users. I'm assuming you may have read Discord's take on Cassandra/Scylla?

Yes the more indexes you have, the slower time to insert. The number of indexes is a multiplier for the cost of an insert statement.

fight that feel user, it doesn't sound like you have experience and wouldn't be starting at square one anyway. you could be miserable for a little now or miserable forever later if you don't give it a such.

I have these indexes
forums table:
forum id
forum name

posts table:
post id
thread id
forum id
date (unix)
author id

threads table:
thread id
author id
last post id

users table:
username
username with id

and the inserts are quick but any time I try the fulltext one it goes to shit

yeah, it's because every word is indexed and indexes are recalculated on every insert.

Thanks. I'll keep that in mind.

Netflix.
Linkedin.
Trello.
Uber.
PayPal.
Medium.
Wal-Mart.
eBay.
NASA.
Groupon.

Node is unironically one of the best backends despite all the hate and misinformation you'll see against it on Jow Forums.

Stack overflow and libgen.io are your best friends.

This.
It's pretty good.

And using one language for front AND backend is goat.

I'm a python guy but I'm really interested in getting into nodejs

Physics major wanting to be a webdev here. Will employers care about physics simulations written in C++ like say a double pendulum or electric fields of different shaped capacitors? I made them with a neat animation and put it on my GitHub. I take it, I should rewrite them as webapps for employers to care and forget about C++.

yes, my biggest problem I guess is that I don't know how I'm supposed to practice setting up distributed systems running cassandra, with RDMS I can easily make something simple and deploy it, but with cassandra it seems like I would have to create a pretty big test project just to learn the basics

as it is, that really doesn't have anything to do with webdev. You can have your backend call that c++ application via a web interface or api and that could make it useful. otherwise, rewriting the simulation in js or whatever web language you might be thinking of isn't very useful.

What's the best way to go about animating in React? Having some trouble with with GSAP and wanna know if I have better options.
(newfag to web dev btw)

What exactly do you need to animate? Could you do it just in CSS?

Always opt in for CSS animations where possible. If the element needs transitions, try react-css-transition-group (essentially just adds/removes CSS classes based on JS timeouts), or if you want to base your animations in JS using fancy patterns like spring, try react-motion but note that it does rerender on each animation property change.

Are youtube web developers the epitome of the Dunning–Kruger effect?
>I learned JS and been programming for a few months. Now, I will make youtube tutorials and clickbait videos about being a coder.

Attached: 1529376096300.png (1417x2006, 993K)

I'm basically just trying to get cards to fade in/out as I filter through them. They animate on mount, but I can't get any animations to trigger on them as a group or individually. I didn't want to use any CSS files, because I was using emotion js for styling. I'll probably just delete the animations I have right now and use react-motion or something else at this point.

Hey symfonyfag, I am still waiting for the answer

is there any way to autoaccept all cookies and tracking everywhere by default? accepting all these banners and popups is annoying

maybe there is a global cookie or url parameter or something that works for most of them

can we make a list of free administration dashboards for the lazy backend dev?
>gentelella
>coreui
>adminlte
>tabler
>paper dashboard

$sets = ['83hd8d','Bsu72j', '92irjs6', '38jdnz' , '2y8ejs'];

foreach($sets as $set){
echo $set ."
";
}

Bsu72j
92irjs6
38jdnz
2y8ejs

How come it skips first value?

Youtube anything is shit, no ACTUAL professionals give away their trade secrets for free like that. Maybe in small amounts to lead you to an online course or something, but not really.

How can I tell if google amp bot is making a request? I want to provide something different for the bot

you're echoing before the variable is set. on the first iteration $set is still empty. try echoing outside the loop.

>you're echoing before the variable is set. on the first iteration $set is still empty
That's bullshit though. Take a look at this.
ideone.com/YX4xRZ

it's most likely a race condition. why don't you try storing the loop output in a variable and just echoing that at the end?

bootstrap

So, I see a traineeship to become an ethical hacker and privacy officer. What does that even mean?

That they teach me how to run some standard tools and tell people to delete old data and secure their shit?

Attached: apu.png (680x521, 99K)

I'd suggest Traversy Media if you wanna self teach yourself. Perhaps the meanstack front to back series if you wanna learn a framework while doing it.

The bigger the company bigger the chances. Event loop was cool when it was a thing but with concurrent/parallel libs nowadays it's no longer appealing. It sucks cpu bound processes such as rendering because single thread.
It's good for a quick server but web shits push it because front end activists know only jabbascript hence the popularity.

You'd be better off picking up java, csharp, go. Do yourself and others a favor and keep js on the browser where it's supposed to stay.

How long does it take to go from no knowledge in coding, to a dev job, self taught?

I'm about 4 months in, atm.
I went through the freecodecamp HTML, CSS, and Javascript curriculum, and am almost finished with my first vanilla JS project (a fully functional Texas Holdem text game, that includes betting functions. I just need to add rules for card hands, which I'm not sure how to do yet. Heavily object oriented, with a fairly deep data structure.)

I'm getting pretty good at vanilla JS, though I'm beginning to see it doesn't exactly translate well to actual webdev work, alot of the time. Beginning Node.js, once I finish training in React. Though, admittedly, I'm pretty weak on the front end stuff, and I'm by far the strongest in Vanilla code.

Attached: FB_IMG_1537963812600.jpg (720x960, 50K)

>go
That's where you lost me.

That said, anyone mocking Node despite the list of big name sites that I posted earlier that use it here I suggest reading this article.

rclayton.silvrback.com/speaking-intelligently-about-java-vs-node-performance

This line in particular is what makes it worth reading the whole thing
>Over the last couple of years, I have noticed a bunch of asinine comparisons between Java and Node. The all generally come in the form of "JAVA IS 30 TIMES FASTER THAN NODE!" and then you read the fine print: ...at serving 1,000 web requests". Generally, I attribute this kind of propaganda to Java holdouts who don't understand why someone might want to leave the JVM platform for something else.

Took me 2 years but I am incredibly lazy and dedicated 1-2 hours to learning, didn't even do it everyday, not to mention I could've got the job earlier if i was actually looking.

op here.

Well it works now. dunno what the problem was before. maybe just missed br before i guess. God i hate that after python i need to add
everywhere in php.

>React
It's now confirmed overcomplicated overhyped garbage that is on its way out.

>Vue
The replacement for React. Literally just a refined AngularJS that took ideas from React and Elm.

>Angular
btfo's those two previously mentioned technologies in benchmarks as of Angular 6

Django devs are literally cringe.

>dev.to/restoreddev/choosing-php-in-2018-3e1h

Attached: Screenshot_2018-09-26 Choosing PHP in 2018.png (703x577, 41K)

>betting function
How'd you do that with only vanilla.js? Unless you mean not online poker.

But he's correct.

Pretty much this. Angular6 is GOAT. Though I've never actually touched Vue.js but I loved AngularJS so I may look into it now.

>ORM
Eloquent is a god sent ORM.

>migrations
It runs on the date created.

Angular's ssr is still pretty shit though.

Academind and Tensor Programming are the only good web dev channels

>Muh traversy media
Only for front-end. His server-side videos are w3schools tier.

It's not online, no. It calls each created player Object by name, and asks them to enter a bet, according to the blind. It handles checks, calls, folds, raises, and all ins properly. Though I'm bug fixing the math, atm. Some kinks in my calculation, but easy enough to fix

Also, as of right now, it's all console based, and requires function calls to work, though I do have functionality for playtesting that creates players, and essentially goes through a full game demo. Betting is still not incorporated in that, yet, but it's close

I've kind of noticed that too.
>following his MEANstack front to back tutorial
>leaves the backend open so you can inject shit with postman or CURL
>leaves it so you can blank post shit to it and crash the whole fucking server
>makes it so frontend wise you can still blankpost to it if you type something into input then delete
>leaves it so you can register the same username/email multiple times causing login confusion

I had to fix all this shit myself, but I pretty much learned Angular solely from him so not gonna bash the guy for creating free tutorials for us.