/wdg/ - Web Development General

Merry Christmas /wdg/!

Previous thread: >COMPLETE BEGINNERS GUIDE
github.com/kamranahmedse/developer-roadmap

>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.org
codecademy.com
hackr.io
theodinproject.com/

>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-1D4x

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: wdg_elf_lite_brite.jpg (1884x1070, 413K)

Other urls found in this thread:

youtube.com/watch?v=6sqO3B1CRAg
freenom.com
uazitaliaclub.it/il-tuo-profilo.html?view=registration
swoole.co.uk/
github.com/swoole/swoole-src/
github.com/swoole/hhvm-swoole
packagist.org
swoole.co.uk/docs/modules/swoole-scheduler
twitter.com/SFWRedditImages

>above the fold section takes 100% of view port

BUT HOW WILL THEY KNOW THEY HAVE TO SCROLL

Merry Grav-Mass!

youtube.com/watch?v=6sqO3B1CRAg

Attached: Abby_GravMass.png (572x895, 649K)

Just letting you all know that Jesus was crucified for being the "King of the Jews".

Oyest of veys.

Hello, /wdg/. .NET dev here trying to pivot into full stack dev work. Which front end framework works best with ASP? I've heard good things about Vue.js, but it seems like Angular is the most popular and/or is paired most often in a dotnet stack. I haven't heard anything about React other than it's facebook's and it exists. What do, wdg?

also Merry Christmas, everyone.

React is most popular one by far, do you research. Each framework has it's pros and cons. I suggest you check the stats for each, job offers, downloads, etc.

Angular tends to be the most popular because the companies that use asp.net tend to want full enterprise solutions.
But if you're just rolling with it, whatever you want for the front end works. React being the second most popular obviously.

Does it make sense that every time a user loads/refreshes their account page (holds their usage details) I'm making a new query? Feels like I should be caching it.

Angular.

angular and react are bloated because of over engineering, angular is probably the most bloated out of the two

Someone please revamp the OP, these resources are outdated and have too much bloat.

include javascript.info maybe?

Found the chinese drone.

Where can I find free domain and hosting? I'm just a student learning web dev and I don't have money to pay for it.

Ask your university, they should give you some webspace.

why can't i find one single good fucking example of implementing authentication with react and redux?

i don't fucking want FIREBASE i want JWT authentication

What are your specific gripes? I'll probably remove codecademy because it kind of sucks, in my experience anyway.

w3schools only, final destination

Merry Christmas /wedgie/!
The webpage I'm working on needs to load images every once in a while and it works fine on my Windows localhost but the actual page is gonna be on a CentOS machine.
Once I move it there, do I have to give it read/write/execute permissions so it can move images there or is there something else I need to do?

One of my django templates is having the django template syntax just appear as plain text in the html (eg instead of {% load static %} loading the static files it just appears written as text in the page). any ideas? new to django and couldn't find anything after a lot of googling

freenom.com for free domains (tld selection is a bit iffy but hey, it's free)

Free hosting is a bit dodgier.
You can (ab)use the AWS 12 month free trial and/or various other cloud provider trials.

Why is HTML5 so trash?
For instance, removed the abbr attribute from TH
Okay, I said instance, but here's another one,
made nesting BUTTON inside A tags illegal
Like, how are you even supposed to use a BUTTON that's not a submit button with javascript disabled if you can't wrap it in an A tag?
Google really screwed things badly with HTML5

How would you even submit something with an A tag? it's not POSTing

You're not.

Either use a button as a submit button on a form or style the a tag to look like a button.

>I did horrible hacky things with HTML because I didn't know how to use CSS and now i'm upset that they made it illegal.

Recommendations for books on Ruby and Rails?
I've been a full-stack ASP.NET developer for several years, so I get the MVC pattern and I know front-end development, so my focus here is just Ruby/Rails.

I applied for a job that's Ruby with no Ruby experience and I want to get a head start in case I get the gig.

Why's Poignant Guide is an interesting introduction to Ruby, although it's more of an intro to programming in general rather than just Ruby, so as someone already familiar with programming, it might get tedious.

>ruby on rails in 2018
I had to upgrade the packages for an ancient ror app in 2015, it was a total nightmare and the code wasn't half bad.

Attached: 1322124221977.jpg (698x672, 26K)

the job is for one of the largest tech companies in the world (you know them).
If it gets my foot in the door, I'd program in COBOL for them.

been learning react but barely started learning redux haven't got into thunks/middleware yet

should i just scrap it and learn the new Context API is it a viable replacement?

You could have the href call JS that calls the submit() on a form variable. I wouldn't see the point in this unless your HTML structure was such cancer that you need the buttons that submit a form to be everywhere except inside the form.

learner here, I'm trying to place a background image on this thing but it's not showing up, what am I doing wrong?



Title
subtitle and stuff

.header {
text-align: center;
padding-top: 30px;
padding-bottom: 30px;
margin-bottom: 30px;
}

.header-index{
background-image: url(/assets/img/headerimg.jpg);
width: 100%;
height: 100%;
}

I'm doing the "register user" part of a website.
What would be the least retarded way to generate a confirmation link?
They'll click it from their mail.

Is shopify a meme? I have a friend that wants to hook me up with sweet gigs being a code monkey for their design ideas. Apparently shopify is what they use.

Check if the path to your image is correct

Attached: tried it.png (669x170, 148K)

Hey anons,

I'm doing an internship at a startup and have been assigned with finishing up some API endpoints.

The boss is really busy every day so I don't really talk to him and feel like I'm not learning anything more other than googling stuff. Will just doing REST all day be a useful skill to have? I'm hoping to do more back-end stuff, they're using Putting and Django but I'm mostly just adding functions and not really interacting with the framework at all.

your image path is absolute, not relative to the css file

>finish up all the work you have to do
>start working on your personal projects
>start finding a new job
>stay long enough to add experience to resume
>?????
>profit

the image is in root/assets/img/

forgot pic

Attached: N0dVvHB.png (313x64, 3K)

Serious question coming from someone who's not entirely new to the web scene:

Why would I ever choose to use PHP? How does it fit into modern stuff? If I have react and node why would I bring in another scripting language -assumption- just for dealing with html? Just for speed? Its almost 2019 and I still see so many PHP dev jobs, is it legit something I need to learn?

from what I've read it's very easy and quick to work with, and about 80% of the internet is powered by it. I like that you're not limited by any templating language, you just type

angular is getting less attention every day. React is the most popular Vue is loved by the community but still not as big in the job market.

Ye ive already worked with plenty of c# and go and multiple js frameworks which is why php seems even more alien.
Like the whole "put your script inside the html wherever you want" feels like it's asking for suboptimal solutions and spaghetti code. Now of course you can do similar stuff in react with jsx but why would I use php over react then? It seems to me that it all comes down to speed and if that's the case I'm unconvinced that the performance is so significant that PHP has a place in the future of the web

That being said I have not done my research on the topic, I just keep seeing allegedly knowlegable people answer PHP for "best programming language" and I scratcheth the top of my head

you're gonna have to wait for That PHP Guy to come to the thread cause I actually agree with you, he probably won't today considering it's Christmas but check the thread tomorrow.
Since you have experience with C#, do you recommend it for backend dev on personal projects? I'

fuck I posted without finishing, I was gonna add: I'm interested in it but also looking at Python/Flask. What's your favorite backend language?

What’s the best way to make an e-commerce site from scratch (what frameworks and tools to use)? Or is it better to use something like WordPress or whatever.

any dev here with experience with stock photo sites?
If I use a stock photo with those watermarks plastered all over it am I breaking any copyright laws?
I know you can get versions without the watermarks if you paid
but I want to use the ones with watermarks over them in a video and it's going to be monetized, but it suddenly got me thinking
is the watermark there to stop people from using it, or is it like "you can use this, but we're gonna advertise ourselves too" kind of deal

Need to register on a website but its registration page is outdated and requires old captcha (which doesn't exist anymore) so registering gives an error.
Tried emailing website, no reply.
Any way of tricking the registration script into thinking I've completed the captcha?

uazitaliaclub.it/il-tuo-profilo.html?view=registration

The website is quite old so I'm hoping the security measures are not very good.

How the hell is react bloated? The api is like five functions.

What kind of algorithms should I be studying for a front end interview?

Yeah the difference in weight between angular and react is enormous

But he said the A tag is only when JS is disabled, so he can't use JS.

>want to change product pic to a new pic and keep the same filename
>store platform/cloudfront caches the old pic

Attached: 1466699976493.png (367x321, 177K)

2 months into self learning, comfortable with HTML and CSS, to some extent with JS but yet to dig into the deep stuff.
As expected, keeping my shit together (mental wise speaking) is being harder than actually learning, which can take a toll on the process.

Any tips from self taught devs?

attempt to build something you give a shit about to realize how hard it is, but how fulfilling of a process it is. Organize that shit too, I dunno.

I know this feel. Gotta create/get a button that clears the cache.

Seems like an oversight of whatever CMS you're using.
They should append the modified timestamp to the images.

>They should append the modified timestamp to the images.
to the filename? i'd rather have an aesthetic and hopefully SEO-compatible filename that also doesn't reveal how old the pic is. it's a very small shop not a dropshipping cancer store. i hope it will clear up in 24 hours.

As query parameter, not in the files name.
Our system at work forces reloads like this, on changed files it appends a timestamp parameter to break caches.

oh ok. i use a dodgy free platform since i mostly sell on ebay so idc about paying for a professional site so i just gotta deal with their quirks. at least they did get around to fixing the pain in the ass bug where it would often change your urls to the default auto-generated url when you edited a product or stock levels

I use node for backend but that's just cause I'm super efficient in it, I think Go and ASP.NET are fantastic but I can't really talk about preference.

I don't like Python at all, I have limited experience with it but the whole "indentation is syntax" just throws me off.

Go does it right, you can take away my semicolons but I need my curly fries or I'll be angery.

I think anything goes for personal projects though, and you should probably try out everything at least once if you don't have a strict deadline for finishing.

that being said why the fuck would I ever use PHP, can any PHPgod anons out there answer me?

Attached: 39090174_552283081858753_2667065877819555840_n.jpg (305x259, 8K)

unix 101:
direction starts with / is absolute path
direction starts with a directory name its relative path, like:
/C:/Users/YurmomLol/Pr0nz

reverse palindromes, sorting algorithms fizzbuzz are some of them, when I say sorting algorithms I mean sorting algorithms without the built in features like .sort, etc.

like css/filename.css or img/image.jpg

Let me ask you guys a question.

Let's say you lived at a place where the average household income is 35k a year. You're a web dev in that town making 55k a year. You deal with no traffic, can come in when you want, leave when you want, work from home if you want, and the town is really chill even though there isn't a lot to do. Your side income takes you to between 75 and 100k a year total.

Do you stay at the job or do you go somewhere else?

I've been offered jobs for 85k and 125k in the last 6 months and I keep turning them down and I'm not sure why. Probably because I was single and didn't really feel like working harder because I keep launching side projects that make me extra money.

What would yall do?

What do you want to know?

I've written out an app with a PHP backend and launched it in one day. It does exactly what I need it to do and I can write it super fast.

PHP is trash if you use it for anything front-end. It makes some of the ugliest code there is, but if you use it solely as a way to interact with the db and do some back-end validation then it's god-tier.

>just works
>fast enough
>easy setting up
>tons of things you could do. framework? cms? wp? etc.
>tons of resource online
>tons of php developer and pajeet coder if you want to cut cost

Your UI framework doesn't have anything to do with authentication

Based

I have naked JS nailed down with a few projects, I understand how it works under the hood and all it's concepts. What would you recommend as the next step? Vue? React? Where is the best place to learn a framework?

Does anyone know some resources to learn or rather understand backend development?

I don't want to learn a framework just because I want understand backend development but I don't know how to get started on this.

just use swift or kotlin then
what's the problem?

HI, im back, won't be long here - i was really busy for the past couple of weeks ~

hi c:
>put your script inside the html ..
we don't actually do that in php and that's not the right way to do it, if you take a look at php frameworks , you will see that each framework have its own templating engine , because php is not one at this point, we don't just mix it with html, for templating there's Twig, Plates, PHP Mustache, Blade and other templating engines that are written in php, i would recommend Twig if you don't want to use a framework.
>why would I use php over react then?
you don't actually have to, but think about this, facebook made react, but instead of using it in the backend they use `Hack Lang` a fork of php, the reason is that React can't handle that production level, but you probably won't need a huge performance if you are gonna make a single page application, you can write your api in whatever lang / framework you want, but i would probably use the one that provide more tools for the web, one that when i get stuck , i can just google the error and find 100 different answers over the past 25 years of PHPs lifetime.
> I'm unconvinced that the performance is so significant
PHP + Swoole or HackLang + HHVM both have better performance than React / Node, PHP Swoole Http Server even have a better performance than GoLang Http Server.

Take a look at event handling

Never heard of Swoole. I know exactly what to do with this. Fucking awesome. Thanks.

After I'm done with JS I need to learn some PHP and specially Laravel.
Is Laracasts a good resource or should I head somewhere else?
This shit could land me a job and I don't mind paying for a subscription.

Swoole is a php extension that provides async support, coroutines ( like in go lang ), async web server, web sockets server, tcp .. etc, async mysql, redis and http clients and more.

website : swoole.co.uk/
source : github.com/swoole/swoole-src/
hhvm support ( limited ) : github.com/swoole/hhvm-swoole

if you are looking to get a job fast that would be the way, but if you are gonna make a project with php, i would never recommend laravel, instead Symfony, Zend Expressive or just pure php with some packages ( packagist.org )
also check the PHP Resources in the thread

example of `hello world` http server ( note windows is not supported )

It says it provides sockets. Am I right in my guess that I could create something in PHP that will run constantly and push data to connected clients on a 10 minute timer?

yes, you can do that.
btw, if you want to do the same in windows, you can use ReactPHP, but i won't provide the same performance as ReactPHP is written in pure php while swoole is written in C ~

swoole.co.uk/docs/modules/swoole-scheduler

>forgetting the closing '

SASUGA PHP

I am so hard right now. Thanks.

Attached: swoole.png (2048x873, 102K)

I'm trying to understand how to implement a session authentication system. I'm not sure if I should create another table to store sessions and a foreign key for the users or store inside users in a new column. I guess I will also need to store an expiration time.

Also, what should happen when the expiration time expires when the user still connected? Should I update when user makes a new request?

I'm not sure if I should use JWT or session, session seems easier.

I wish there was a good PHP book to get into that shit. There are so many jobs for PHP hackers...

I need to learn Laravel as a requirement for a job I have lined up through a relative.
But obviously I'd like a somewhat stable PHP base.
I'm pretty sure you have a better insight than me about the best PHP frameworks than me but this one is a must.

I'm no expert but after doing some research I ended up getting two books:
>Learning PHP, MySQL and JavaScript - Robin Nixon
>PHP Objects, Patterns and Practice - Matt Zandstra

Oh my god, I finally understood the meaning behind the syntax of executing anonymous functions inline. I always thought it was weird.

Defined: f = _=>{return 123}
Anonymouse: _=>{return 123}
Call Defined: f()
Call Anonymous (_=>{return 123})()

It's cause you're putting parenthesis at the end of it! I was confused for years on what order and where to put the 4 parenthesis needed to do it. Now it all makes sense.

>php hackers

Where are these jobs? I'm looking for more side work. Are they more temp gigs?

Always new table.

If you update when user makes new request, you don't have an expiration date.

You have to define what a session is first. When a user logs in, you validate
his password and user name. This is when a session is created. You send a
session table id on a cookie, and you when he accesses a "forbidden" path, you
check the request for that session id. If one exists, you let him through
without having to log in again. On logout, expiration, you simply delete the
session by its id. JWT come in when you want to store the session in his
cookie as not simply raw session id.

The session itself has a user data, which contains the user id. That's how
you get user data from the session. You do a lookup on the user tablle from
user data.

The alternative is to store all the data in the cookie, and delete cookie
on logout.

sessions 101

Subscribe to Laracasts and learn Laravel.

>2018
>

what's the difference between using % and vw/vh in CSS? shouldn't it be the same? Specifically talking about margins and shit, I don't think they behave the same even though it should represent the same number

% is more compatible with old browsers

vw/vh depends on the viewport size. % on the other hand depends on the on the parent size.

for example you have something like this:


and you set the height and width of the child to be 50%, it will be 50% of the parent size. However if you set it to 50vh/vw, it will be half the size of the viewport.

% refers to the container which could not be the whole window size.
Percentage uses the local scope while vw/vh always refers to window size.