/wdg/ Web Dev General - Put on your programming socks edition

trying out updated OP from two threads ago
improvements welcome

>old thread

>Discord / IRC
discord.gg/wdg
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
codecademy.com/
freecodecamp.com/
bento.io/

>Further reading/viewing
youtube.com/watch?v=sBzRwzY7G-k
github.com/kamranahmedse/developer-roadmap
github.com/dypsilon/frontend-dev-bookmarks
github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
codewars.com/
hackerrank.com/
codefights.com/

>Useful tools
developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.
libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
programmableweb.com/ - List of public APIs
caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
derekbanas
learncodeacademy
funfunfunction
computerphile
coding train

>cheap vps hosting in most western locations
digitalocean.com/
vultr.com/
linode.com/
scaleway.com/
heroku.com/
lowendbox.com

I'm not really gay though, I just like feminine penis

Other urls found in this thread:

developer.mozilla.org/en/docs/Web/JavaScript/EventLoop
github.com/expressjs/body-parser
angularjs.org/
facebook.github.io/react/
vuejs.org/
polymer-project.org/
todomvc.com/
hnpwa.com/
en.wikipedia.org/wiki/List_of_Internet_top-level_domains
phpdelusions.net/pdo
w3schools.com/sql/default.asp
sqlfiddle.com/#!15/fbe5ef/1
twitter.com/NSFWRedditVideo

>I'm not really gay though, I just like feminine penis
cancer

Just bought Codeacademy Pro ayyyyy

Azure or AWS?

What's the cheapest website hosting available?

Heroku free

aws, azure is trash

Why?

I am getting a better handle on javascript and I want to move on. Which library should i learn? Everyone says Jquery is outdated but it seems to have the most content about it.

You don't need a library, use modern js and you get most of what jQuery offers.

so the Procfile in my heroku webb is

java -jar target/myApp.jar

and it runs fine, but when i want to try to locally run using the same command it says mainclass is not found??

i already have defined

myApp

in the pom.xml

I'm on the same train. After much thought I've decided to learn jquery well before moving to the cool 1000 different frameworks that are created everyday, I think it's more practical from a learning perspective.

If you're backend is .NET Azure is pretty good otherwise AWS

so just continue using vanilla JS?

what a waste of money lmao

Sorry Sup Forumsuys, noob question here:

For a school project we're building a simple recipe website with Java EE.

What I'm trying to implement now is the following:

1. Entering a searchstring into a search field in the nav bar
2. Making request to servlet, saving the string in session scope (or elsewhere?), forwarding to a JSP with the frame of the Search-page, returning the response to user
3. On loading (DOMContentLoaded) make an AJAX request to a servlet that makes the SQL query and returns the result in some form (another JSP?)
4. Result is inserted in Html-div

I've been trying for a while, but haven't been able to do this. Am I thinking this right, or is there another/better way?

Avoid using server side sessions.
Avoid using frames.

Any reason you have these sidesteps?
You could send your search request over ajax directly instead of going over 2 other pages.

Thank you for quick response.

The website is not a SPA, so I have to go via the Server and load the next page. To minimize the waiting times I wanted to make the database query asynchronous and haven't found a better way to do this. Am I overlooking something?

Had the same issue writing a DropWizard app

Why do you have to go via the server?
I've made several non SPA pages at work and still don't let the server render every single page if it just queries data.
Which you already planned to do in step 3.

Your method would work, it's just an antiquated method and makes it hard to use the back navigation in the users browser.
And using a server side session could either make it hard to use a second window/tab at the same time or, when saving it non user specific, pollute your session storage pretty quick.

I need to set permissions for users, so can someone help me
I have table1 and table2.
Table1 is normal users
Table2 is admin/mod users
>They need to be in 2 separate tables, cant have them in one table and just add field like 'level' and use that to determine permissions
Table2 users should be able to add new users into table1 and table2
table1 should be able only to login, not to register

How should i set permission, how do i check on login if user is normal od mod/admin?

Should i just search for user in table1 and if it is not found, search for it in table2?

1. Learn Database normalization
2. Learn Joins

Going to do an internship in a Symphony box. Is it comfy anons? I only have experience with vanilla MVC php.

holy fucking shit just to print hello world with spring requires so much fucking work

am i just retarded or its not worth it? i am not looking into being a web developer i just want to put a search function, set up a database then process the input with java or c++

Avoid Java, it's cancer and no one seriously uses it for web dev

hmm really? it does look redundantly tedious for what it actually does (trying to understand how the fuck they handle redirect requests)

what is your suggestion then? i just want to get a website up and running, i want to work on my search algorithm more than anything.

Remember always do the exact opposite of what Sup Forums tells you to do, there is a reason why they are here and not at a job working.

What languages do you know?

PHP - Laravel
Ruby - Ruby on Rails
Python - Flask or Django

And what ever JS framework people use on the back end nowadays

why do you need a website to work on a search algo?

hey guys, I'm making a stock managing site just to practice CRUD and webshit. What features/functionality should I put in there? I have the basic, buy/sell apps, quote live prices, see your stock history and that sort of thing. What other cool features could I add?

Btw, I'm mostly focusing on backend, but any ideas for cool frontend features are welcome.

Using Python + Django, just in case anyone's curious.

part of it is just for resume, i want a working example

I'm reading this.
developer.mozilla.org/en/docs/Web/JavaScript/EventLoop

How do asynchronous callbacks or time delays fit into this model? Do they just add an event to the queue when they fire?

If you want to do frontend stuff you can implement different types of charts, technical indicators (moving average, boilinger bands, etc.).

For the backend: How about some portfolio management? Obviously simple: What you bought at what price, the development, etc. You can do some risk measures, correlations between securities

Did you work with a boilerplate? If not, search for spring + boilerplate, download and enjoy

i dont even know whats boilerplate is ;..;

>i dont even know whats boilerplate is ;..;

it's all the clutter and shit you have to write just to get your code to run, stuff that is usually copy+pasted, or that already comes in written for you in a nice framework.

It's the standard, ordinary code that every program has to have, not the particular stuff you write in to make your app different from the others.

anyone else use base vanilla languages? fuck all these frameworks. I'll use a lib if I get lazy but thats it

Why though? Is what you're doing really special snowflake enough that existing frameworks offer no benefits?

So I got my node server to serve me the html form, now how do I get it back and store it into my sqlite db? A lot of googling shows mentions of using body parser but a lot of the examples are confusing.

github.com/expressjs/body-parser
RTFM :3

why do you need node to do db stuff?

use what's appropriate for the task
most of the time unless you're building a big application, jquery/vanilla will do the job

if you need a backend js framework, use node and express

if you need a front-end view framework, choose one of the big four right now:
Angular: angularjs.org/
React: facebook.github.io/react/
Vue: vuejs.org/
Polymer: polymer-project.org/

they're all different ways of thinking, and in my experience, react and vue are very easy to pick up and just get working with, as they're just libraries. angular is much more structured and will take a bit more time to get going with. no polymer experience, but from what I understand, it's more akin to react and vue, and gaining traction.
consider these sites which will help you compare them via actual applications:
todomvc.com/
hnpwa.com/

var bodyParser = require('body-parser');

var app = express()
app.use(bodyParser.json());


app.post('/niggers', (req, res) => {

req.body is object with fields from form set

});

That's kind of why I liked learning Node. The server exists inside the runtime, so you can manage a whole server, at a pretty low level, inside one javascript file.

I would probably use a framework like express for things of a larger scale, but it was cool to do everything at a low level, and I learned a lot about HTTP and low level server stuff.

Where should I buy a domain name?

Use spring boot you retard

>if you need a backend js
>backend
>in fucking js
If you are this committed to use the absolute worst tool for the job you might as well code it in CSS while sitting on a vertical stick.

namecheap

thank u user

why is /wdg/ always full of idiots arguing about dumb shit? the language doesnt fucking matter. go back to your containment thread >>>/dpt/

Also, does it really matter what the .extension is?

I bought my last domain name through AWS route 53, since I was hosting on S3 anyway and it was the easiest thing to do. I pay $12 per year, plus a monthly $0.50 for their DNS hosting.

Generally .com is the most recognizable as a URL for most people. It's also one of the cheaper options (assuming you're registering, and not buying one secondhand).

Country code top level domains are also somewhat common, but they vary in price. Some of them are used just for alternate meanings of their initials, like .tv, .io, .gg, etc.

There are a ton of other domains as well, if you want something cool like .ninja or .dog

Here's a list of all of them:
en.wikipedia.org/wiki/List_of_Internet_top-level_domains

Its not the language (although js is utter crap but ES2016 is passable).
Its the single-threaded model, the inferior performance and the lack of scalability.

Please research before you spew shit. Thanks

Please enlighten us on the advantages of node backends vs any multithreaded language.
With node at most you can get multiple processes, but then you need IPC to communicate among them.
Node is the absolute worst choice, only useful for hello worlds.

Is PHP dying?
Can you become a self-sustaining freelancer nowadays, without learning it?
(I have no interest dealing with Worpdress unless it can't be avoided really)

no? php7 is great. Some cloud services are written in PHP

dont let JS memes fool you.

can someone give nice PDO examples tutorials
everything i saw is just stupid written
I want to see how querys work, how do i write them
bindparam and shit

Just use mysql_query("SELECT * FROM users WHERE id = ". $_GET['id']);

GitHub pages.

no

stop posting old shitty php code

no wonder php has a bad rep

i just used this and stackoverflow
phpdelusions.net/pdo

you definitely want to use PDO though.

What don't you like about the official docs?

What alternatives do I have to nodejs server backend?

It's the only one I've ever used, and it's worked for me, but a lot of people seem to dislike it, so I'm wondering what is better?

Specifically I've been using nodejs + express combo for dynamic web pages.

What to use?

.net core

shoo poo in loo, shoo!

.net is good, java is the main language of pajeets.
They and their fucking annoying "dabeedoo" accent.

Except serious businesses like Fortune 500 companies.

whats the equivalent to npm with other backends like .Net?
I also only ever used Node and npm is an amazing asset.

That's like arguing that COBOL is great, because it's used by a lot of banks.

nuget for .net, composer for php

Just applied for some jobs. Looking to bump my salary up by 50% and move away from Magento into some JS framework business.

Tell me it's all going to go smoothly and work out, /wdg/.

How the fuck are you supposed to name stuff in a SQL database?
Say I have a table called """"people""""
How do I name the columns?
Do I prefix everything with person_ ?
If I don't prefix then it gets confusing when I JOIN

w3schools.com/sql/default.asp

table: person
id
name
age
sex

select * from person p
inner join family f on f.id_person = p.id

That makes it confusing when you JOIN tho. You have one giant object with a bunch of fields. What if family had a column called name?

person.name vs family.name

how do I get it to do that?

.NET, Java, Go are great.

It does that automatically, you can just prefix the table name

postgres isnt doing that

Some of the most reliable stuff is written in Cobol.

Just tested it on Postgres with some random data. Works fine: sqlfiddle.com/#!15/fbe5ef/1

so it returns 2 name columns. What lets you do person.name and family.name?

You can rename them with AS if you want

SELECT employees.name AS "employee name", department.name AS "department name"
FROM employees JOIN department ON employees.dept = department.id;

select p.name as person_name, f.name as family_name
from person p
inner join family f on f.id_person = p.id

so I've been learning React, made a couple trivial single-page apps, but I'm noticing you can only do so much without saving info longterm... which I think means I need to learn about databases.

what should I learn? I see firebase, redux, node, express, mysql, mongoDB when Googling about working with React and databases.

anyone know of good tutorials for someone in my position or want to recommend something?

So what is the difference between and ? When is best to use each tags?

How do I learn web dev?

This makes me sick for so many reasons. Like that new fucking university of phoenix commercial.

you can think of divs as logical chunks of code, while spans are used when you want to isolate some small bit of code that doesn't belong, on its own, neatly in anything else. like a navigation bar as a whole could be a div, and each post on this page is probably a div, the footer section is probably a div. a span would be if you just wanted to do something to one sentence of a aragraph or something like that. since that one sentence within a paragraph doesn't have tags surrounding just the sentence itself, you need to find a way to surround it. so you add span tags. hope that made sense. you will see/use divs a ton and spans not nearly as often.

do you have any reason for learning web dev or specific goal in mind?

Well I'm majoring in comp sci and want to learn before interning. I'm trying to learn node js along with the mern stack because someone suggested and it looks good

Alright just before I embarrass myself when I ask my question about the issue I am currently facing, please can someone reveal how to post code on Sup Forums, if it is not even presented in a neat box automatically

Div is block element, span is inline.

[ code ]
// code goes here
[ /code ]

without the spaces next to the brackets

will look like this:
// code goes here

Thanks m8, you're a star

So this is the header section of my website so far, serving as an online portfolio. The menu part (which says "Hello" currently) will house the links to what I have been working on, while the text part (which is beneath and says "opkdsad" currently) will serve as an introductory paragraph to myself and what I do and how I can make the viewer of the website (a potential client) really happy with my skills in web development.

I am new to web development presently. Let me list out how this page is formatted so far.

It is entirely wrapped up in one , id "wrapper". No style values except for "width: 100%".
Menu part (in pic: "Hello") is a :
#menu {
max-width: 30%;
background-color: rgba(255, 255, 255, 0.1);
border-right: 1px solid #000000;
border-bottom: 1px solid #000000;
padding: 2px 0px 0px 5px;
}

Text part ("opkdsad") is another , with style value "max-width: 70%".

I want the text part to 'wrap' around the menu part - so it starts out positioned beside the menu and then, as the menu section ends, the text part returns to its natural place at the far-left side of the page.

Any help would be much appreciated, /wdg/.

When you apply for an entry level position, how good are you expected to be?

My fear is that because I only know the basics of front end(HTML/CSS/JS/jquery/boostrap) and back end(mainly node with some mysql) if I get a entry level gig somewhere that they'll throw a bunch of stuff I'm not familiar with at me without a safety net. I have a willingness to learn and I know I'm a hard worker but I don't know how much that will matter to them.

Anyone wanna tell me their personal experience with starting out?

you'll be fine.

who /hyperloop/ here?