<wdg/> - Web Development General

Prev thread:
→ → → →

>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
youtu.be/Zftx68K-1D4 [Open] - Web Development in 2018

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

Attached: wdg.png (822x552, 868K)

Other urls found in this thread:

axios.com/
github.com/axios/axios
pastebin.com/MBM1VFhW
gatsbyjs.org/docs/gatsby-starters/
jetbrains.com/webstorm/eap/
jsfiddle.net/h4Lfdk1m/
example.com/479
flickr.com/photos/vivalazoom/40724351060/
udemy.com/share/10006I/
udemy.com/share/100026/
twitter.com/SFWRedditImages

Attached: wdg-everyDamnDay.png (2140x405, 74K)

var people = [{
name: 'Mike Smith',
family: {
mother: 'Jane Smith',
father: 'Harry Smith',
sister: 'Samantha Smith'
},
age: 35
}, {
name: 'Tom Jones',
family: {
mother: 'Norah Jones',
father: 'Richard Jones',
brother: 'Howard Jones'
},
age: 25
}];

for (var {name: n, family: {father: f}} of people) {
console.log('Name: ' + n + ', Father: ' + f);
}
// Name: Mike Smith, Father: Harry Smith
// Name: Tom Jones, Father: Richard Jones

I'm learning Angular right now. And before that, I dabbled in React a little bit.

And comparing the two, Angular feels more professional already. React felt amateurish in the way the components were created and used for instance.

am I confused?

Attached: no_fap.png (1000x500, 244K)

I'm learning Vue.js right now. And before that, I dabbled in React a little bit.

And comparing the two, Vue.js feels more professional already. React felt amateurish in the way the components were created and used for instance.

am I confused?

Attached: fap_no.png (1000x500, 678K)

holy shit how the fuck do I find out what is causing my apache redirects
aaaaaa this shit is driving me crazy
the virtual hosts redirects conf are commented out
the letsencrypt redirects are all commented out
nothing in the httaccess file
and yet my site makes 100 redirects before resolving

pls halp

Heh, I posted the original of that. It's worth remembering.

>holy shit how the fuck do I find out what is causing my apache redirects
You can set the log level to something much lower and see what gets spammed.
Also, remember that Apache is a service, stop the service and run it manually with debug flags, then see what gets spit out into console. It's not something you need to do very often but it's a useful trick worth remembering.

You could always try disabling the rewrite module and seeing if that makes a difference, it would narrow down the type of redirect anyway.

Oh yeah, also do a cURL call with maximum verbosity and pay attention to what it gets back. That will reveal a little bit too.

>email services are more expensive than a vps
Why is this allowed?

What are some core soiboi js libraries for frontend? Looking to improve looks with the classics like parallax etc...

what do you guys think of using laravel and vue.js for a cms?

Is there anything inherently wrong with still using DB + php -> json -> AJAX?

nothing

use a proper framework for the backend and maybe use Axios if you dont need jquery.

Maybe not the best place to ask but how do you settle on a proper domain name for a website when everything is being squatted on.
I spent like an hour looking for one that at least had the .net available (finding one with .com is almost impossible it seems).

>use Axios
axios.com/

I think i'll pass on using sjw software

>i can only click on the first link on google

you whats wrong with everything today

github.com/axios/axios

> Promise based HTTP client for the browser and node.js
>and node.js

No thanks.

Attached: 1469656490556.png (166x166, 14K)

mental retardation is no joke

I'm not actually a web designer or anything but i've got a question:

How do people make certain sites (lets take mangakakalot for example) automatically add links when they upload mango chapters). Say I uploaded chapter 1, it would automatically make a page that uses the mangakakalot template and add it into the chapter list

I'd love to read up on this if there are any chapters in books related to this, I sadly dont even know what to google search for regarding this

I'm not sure how you're imagination the process, but there are no new pages for each chapter.
All chapters use the exact same page. When you request the server to fetch a chapter, it searches in your database for the images/links, and then it embeds them in the visualization page before returning it to you.

I always thought that you uploaded the images to the site named x - y and then the website would automatically make it's own page automatically, kinda like this and store it on the server for accessing whenever; is that really incorrect?

Attached: hehe.png (1025x682, 20K)

Actually, better yet, lets use Jow Forums for an example, how does it automatically add a thread into all of it's threads when you start it, with the post text box being shaped correctly

when you are uploading something, it gets stored in the websites database (mysql or something)
when you for example request the index page of a website, the website looks up in the database and generates the html dynamicly (with a scripting language, php or python for example)
you are clicking on a link of a specific manga, the link has the id of the manga, and the server script again uses this id to look up the database to grab all the information of this specific manga from the database and inserts it into the html.

like says,
there may be 1000 mangas on your website, but there is only one script that knows how to grab the data from the database and only one template that defines how it is shown in the browser.

Example: pastebin.com/MBM1VFhW

Everything in "" tags is dynamic.

Attached: ReLIFE Animu 4 You.png (712x608, 124K)

Aha, so there's a template that you setup beforehand, then when you need it, it'll just insert say the image of the animu into the animu image field. Am I correct assuming that then?

it's not really adding the thread to the website.
it's inserting a new data row into the "threads" table of the database with the information like title, name, image, text

every time someone requests a page from Jow Forums, it looks up the database, grabs all relevant threads and generates the website

every time someone requests a page, may it be page 0 or page 10

- User requests page 3 of Jow Forums board
- server script asks database for newest threads 30 to 40
- database responses with 10 threads and their data
- script generates temporary html and inserts these 10 threads into this html
- sends it to the visitor
- website with 10 threads appears inside your browser window

yeah, there is something that kind of looks like a normal html file but it is used by the script, and the script inserts the right information into the "placeholder" places

Which static site generator does wdg use

But where does it store the actual image and text data, is it all inside the database?

Some databases just store the path of the image in your server.
Some databases store the whole image.
It's up to the developer.

Assuming proper development you would store it on a seperate image server though, right? would it use a seperate script to send the correct image through?

what are some good JS libraries or JSON APIs out there I can play with

storing binary objects (images) in the database allows you to scale everything at once and is easier. Scaling with a separate image server may save scaling costs at first but is more complex to manage.
Both methods are "proper" and both methods have their own strengths and weaknesses

I think the root issue here is that you're assuming a web server returns just raw pages. In other words, if I go to mysite.com/dank/memes.html, it's essentially the same as navigating to a /dank folder on my computer and clicking a 'memes.html' file. The actuality is that a server is basically a list of ways to "answer" incoming requests. Some of these may return html files directly, but you're still essentially contacting the server and saying "Hey, here's my request for file 'blarg.html'. Can you respond?".

So when you access this contents page, what it essentially may be doing (depending on the site structure) is sending out two requests. The first one simply gets the page itself (keeping in mind the explanation above). The second one says "okay, now, for this logged in user/credentials/etc., gimme the chapter list". This is part of the concept of AJAX, which allows us to rebuild PARTS of a page without having to rebuild the entire page.

When you actually load a chapter (I presume of a manga? so... an image?) it again may not actually be loading an individual PAGE per se, but rather saying "load the generic 'showOnePage.html' file", and then sending a request for the particular chapter you want. It then appends/replaces part of the page with that information.

post your udemy husbando

Attached: stephengrider.jpg (400x400, 38K)

So how do I go about making "templates" for my site? Forever ago I used php to make header and footer etc includes, but I want to move away from PHP. What's a suitable replacement for this? Is this what React/Vue/Angular do?

JQuery
Moment
Lodash
Axios

I think he's boring. I bought his MongoDB course and regretted it. He spends more time on Mocha testing than actually explaining more important concepts in Mongo. Quite disappointed desu

php is on the server. react/vue/angular are javascript on the client. php makes your server generate pages, while the others are made for your browser to generate the page after being sent raw data from the server

You can use a backend template in whatever language you want to include header, footer, sidebar or whatever else you want and use the front end for to make the pages dynamic.

How much do Udemy courses cost in your country?
They are way too cheap where I live. I assume they charge that price because no one has money in this shithole, and it's better to just earn some cents than nothing at all.
Are the courses arround $7~$10 in America too?

They are $10 right now. They seem to be like $150 at full price but I think they're on discount most of the time.

the only husbando that exists is wes bos
he's the only one who isn't boring

g a t s b y
comfy as heck if you're already used to react, can be a kind of good way to learn react as well but if you go that route it can occasionally feel overwhelming

does gatsby have themes?

Yep, they're called starters though.
gatsbyjs.org/docs/gatsby-starters/

sweet

Lato (readable) vs Source Sans Pro (classy).

Attached: 1526298220078.jpg (741x568, 92K)

>They seem to be like $150
They are always on discount, the only difference is if they are $9.99, $10.99 or $14.99.
One discount ends, another starts.
May be worthwile to google the course name, i found multiple free coupons for the courses

what skills should someone "master" to be considered a really good senior programmer?

any Atom users here? Microsoft now owns Github so you can go ahead and switch to VSCode already

>people unironically using atom
I'll just continue using my sublime text 3, thanks

Attached: 1425140025666.gif (500x382, 387K)

>Microsoft now owns Github
wrong.

What do text editors have to do with code hosting websites?

sigh...

Anyone who was using Atom already made the switch. At this point the Atom website will probably just redirect to VSC next week.

And that's a good thing!

Why would anybody do that when webstorm is the best

If they get their hands into electron and find ways to improve it across the board, I'll be happy as a clam. Until then I don't really care about the whole ordeal.

Webstorm looks nice but I'm poor

All jetbrains ides look nice but are mediocre.

>wrong.
what did you mean by that? do you have some insider info?

>What do text editors have to do with code hosting websites?
this particular text editor is maintained by the same company that owns this particular code hosting website

you could always try the EAP version which doesn't require license, although I think vscode is enough (and I do use IntelliJ and CLion for other stuff)
jetbrains.com/webstorm/eap/

>email services are more expensive than a vps
a) It needs a domain name as well as a vps to do an email service
b) what do you think the vps is run on?
They need to add their expenses and profit margin to the cost of a vps

Obviously, anyone that CAN run their own, should.

Trying to learn React, but I can't think of anything cool to make using APIs. Does anyone have any ideas?

a


Alright, why the hell is the background color showing up when I zoom to 110% in Chrome?

Attached: wtf.jpg (650x431, 28K)

also happens on 4 zooms in IE

Attached: IE.jpg (753x686, 50K)

And on 5 zooms I get this madness.

Only Firefox works correctly.

Attached: jesus.jpg (760x610, 41K)

jpg compression kind of ruined these images

Attached: jesus.png (760x610, 29K)

I'm planning to learn React just to learn React Native afterward.
Chances are I'll probably not even use it though.

Is it still ok to use transparent gif these days? There's this one instance where I have to use an image with a transparent background.
Png looks more smoother but the size is like 3x bigger than gif. Even when optimized

i need to buy my first domain, who should i go with? i'm in the US if it matters.

Any kind of band website so you can just make 1 component and use that for every tour date, 1 component for album arts etc and you'll learn how to reuse components properly and use state/props etc etc

any, goog domains, namecheap, mostly all the same

Sup, I'm looking for someone to join with me.

I need SEO mainly. React and react-native would be nice. I had a python dev that left for some reason before even starting on anything. I suspect he was working for one of my competitors trying to get info.

So what I need is a way to keep 1000s of client in sync with a timer. I need the backend to do some shit once every 10 minutes and update all of the clients instantly. I need the backend to do some more shit once every 60 minutes and update the clients instantly. Estimating 10k people that need to get stuff pushed to them every 10 minutes and 60 minutes. What can do it? I hear socketio can do 1k and I'm not sure how many simultaneous ajax calls my server can handle. What do you think?

I'll pay by project or equity per project. I intend to sell everything.

Except godaddy. Don't even use them to search for domains

I'm a retard trying to learn programming. Can someone help me out? I got stuck while trying to implement registration confirmation via email with php.

Keep in mind I know almost nothing about networks.

More information:

- I am using Windows 10 LTSB as OS.
- I am not using XAMPP or any other package. I setted up Apache and PHP manually based on tutorials.
- I am using MySQL as SGBD.
- I am using PHPMailer.
- I am trying to use Gmail SMTP server to send my messages.
- I've tried setting the script that uses PHPMailer classes to use ports 25, 465, 587 with both tls and ssl. I've tested smtp.gmail.com with telnet (which was disabled in my computer) and apparently I can only use port 587.

Attached: dumb wojak.jpg (645x729, 41K)

thanks, i'm leaning towards google now. i just need to make sure that i can maximize why whois protection and then i should be good to go.

fuck, i finally thought of a clever name and someone took it a month ago
fucking leafs

>uses windows
>doesn't use sql server/IIS/or even c#
what's even the point

Looking for help.

I want these boxes to
* take up the entire width of the page
* be next close to each other
* have responsive inner-text box

Right now:
* they do not take up width
* they have space between them
* inner-text breaks


Here's a fiddle. Help greatly appreciated.
jsfiddle.net/h4Lfdk1m/


Working w/ bootstrap

Attached: big broblm.jpg (800x600, 44K)

set the inner width to be 100% and not based on pixels
make the grid based on 12, so if you want gutter in between you can do 4 4 4 not 3 3 3 and just give them margin on each side to space it out

then you want word-break: break-all on the text

use flexbox i guess

Attached: Screen Shot 2018-06-04 at 08.13.45.png (1926x538, 349K)

*width: 100% instead of 220px

And just when I thought I understood promises
functionWithCallBack(() => {
thisReturnsAPromise().then(() => {
return thisAlsoReturnsAPromise();
}).then(() => {
//both promises resolved
}).catch(err => {
//error
});
});

functionWithCallBack(async () => {
try {
await thisReturnsAPromise();
await thisAlsoReturnsAPromise();
//both promises resolved
} catch(err) {
//error
}
});

Shouldn't those functions be equivalent?
Mocha gives me an error when I use the second.

Drop me a line, we can talk.

How are you receiving the output of those promises?

Can anyone tell me in simple words the diference between .NET, ASP.NET and ASP.NET MVC?

Guys please, my wife's son needs them.

react angular vue

CUTE!

Attached: images (7).jpg (256x256, 10K)

>.NET
a software development platform with the CLR (a JVM clone) at the bottom and some libraries and languages that target it on top
>ASP.NET
a component-based web framework that is a part on .NET
>ASP.NET MVC
an action-based web framework that is a part of .NET

overall not recommended

anyone has ide why
return 1;
return view();
return redirect();

are not working in laravel?

I don't work with PHP but usually once you returned a function it can't return again. Your function ended after return 1;

Hello /wdg/. I am a webdev-newbie and there's a problem I want to solve.

Let's say I need a site which serves images (with a simple interface having the data of the image, maybe tags... well, normal website things)
Let's assume I am storing the images in the /images/ folder, within my public directory.
What I don't know how to do is: when an user writes an url, with the image id (which could be simply the file name, or an id in a database), return a page corresponding to the image.

Example: example.com/479
Return -> html page corresponding to 479.jpg

Of course, I could write a static site generator in python, and have one html stored for each image, but that does not look like the way webdevs do things nowadays.

I am trying to work with Django right now, by the way. So if there is any specific solution...
Thank you.

Literally write an url to that image?
Not sure i understand your question. A link is just a request sent to the server to "open that image in that specific place".
If your image is on /images/folder/imagename.jpg then the url is a path to that file

>I could write a static site generator in python
Are you this mental?

I am not talking about downloading the image, but about generating a page with the image embedded. The page can contain data about the picture (stored in a database), menus for navigating the site, comments for each picture even.
You know, normal things.

In a way, it can be compared to a gallery like Flickr. flickr.com/photos/vivalazoom/40724351060/

Just less fancy (I don't need a navigation bar that shows miniatures of "adjacent" pictures or anything like that)

Currently finishing this course up: udemy.com/share/10006I/ and I've already finished this one: udemy.com/share/100026/
Where should I go from there?

The page stays the same,

The only thing that changes are the div where the image is going to be

yes, the div and the data displayed. But my doubt is how to make it "dynamic" or whatever you call it. Make an url return the page of its corresponding image.
Of course, the brute way would be to pre-make an html for each image.

I just skimmed your question so if I misunderstood what you want to do I dont really care

You want to build an image viewer and pass the paramter in the url.

So for example my imageviewer is hosted at

example.com/imageviewer

You want to open a image 123.jpg from folder images if someone requests, example.com/imageviewer/123

In a frontend framework like angular you would have a component imageviewer and you would define that it accepts parameters and that route is imageviewer/:image_name or whatever.

That's how most webdevs would do it.

I don't know django specific solution but search for parameterized components or pages however it's called.

If you just want a solution that would work anywhere, you could just scrape the url by yourself and get the image url by yourself by taking everything after the last /.

>udemy.com/share/100026/
I came up to JS, but i like it so far.
Would you say i can already start asking small businesses to make them a simple website, or is it better to finish the whole course first?
I know the rest focuses on backedn more or less, and i was gonna use WordPress for that anyways

You could definitely do some basic websites for small businesses once you have HTML, CSS, and JS down. I would still recommend just spending the extra week or two to go through the rest of the course just to get more experience with all 3 of those even if you aren't as interested in the rest of the course.

Definitely finish the whole thing, if you plan to do wordpress then I guess when it comes to the back-end part just do a wordpress course instead, but having a basic understanding of how backend actually works will be very useful for you in general.

When you finish that course you'll still be an absolute noob so just keep that in mind, but sure you can probably make decent sites for small businesses right away, you'll probably learn more doing that than you would doing a udemy course anyway (if it pushes you to learn new things, at least)

Thank you. I think I actually solved it, with Django.

What I did, in case someone else has a similar problem:
1. Write a views function with, at minimum, one variable for the urls (the id of the images, in my case). Let's call the variable "number", and the function "number_getter".
def number_getter(request, number):
return HttpResponse(number)
2. Write an url pattern that takes the variable we defined, which calls the function we wrote. For example:
path('/', views.number_getter)