/wdg/ - Web Development General

Previous thread
>Getting started
Get a good understanding of HTML, CSS and JavaScript.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
developer.mozilla.org/en-US/docs/Learn

>Free online courses
codecademy.com/
freecodecamp.com/
bento.io/

>What next
youtube.com/watch?v=sBzRwzY7G-k
github.com/kamranahmedse/developer-roadmap

>Useful resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
stackoverflow.com/ - Developers asking questions and helping each other
caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
youtube.com/derekbanas
youtube.com/learncodeacademy - codecademy
youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
youtube.com/user/TechGuyWeb - Traversy Media
youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp

>an in-depth comparison of VPS hosts
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/

Other urls found in this thread:

kangax.github.io/compat-table/es6/
jsfiddle.net/0kj7dmv8/
developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events
jsfiddle.net/f5hcb86f/
2ality.com/2017/07/class-fields.html
spring.io/guides/gs/accessing-data-jpa/
spring.io/guides/gs/accessing-data-rest/
abi-laboratory.pro/java/tracker/timeline/spring-framework/
tools.ietf.org/html/rfc5849
jsfiddle.net/otyjdpx8/
jsfiddle.net/945232j4/1/
github.com/dailydrip/firestorm
twitter.com/SFWRedditVideos

CJ.com have no styling for anyone else?

Trying to sign up but...

Ha, nevermind. Ad blockers apparently make that website nearly unreadable.

I'm trying to make a simple node app with an express backend and vue frontend, but I'm not sure about the best way to structure it. I want to use es2016+ shit which means I need to transpile the backend with babel, but I also need to build the frontend with webpack. What's the best way to make it all play nice?

Yarn? Or am I missing something.

>transpile the backend with babel
There is no need to transpile code, when you run it with Node.

You can use the vue-cli starter template for webpack or make your own from scratch, by adding pieces whenever you need them.

times are changing, but I still wouldn't recommend transpiling client side

>There is no need to transpile code, when you run it with Node.
There is if you want to use stage-2 features in your server code. import x from 'y' and the spread operator, etc.

>es2016+
The latest version of Node support ES2016 pretty much entirely, and many ES2017 features, so you probably don't need to bother with Babel for your backend code.

The frontend does need to be transpiled to more widely compatible code. I think Webpack has a Babel module that transpiles your code as a step in the build process.

>Webpack has a Babel module that transpiles your code as a step in the build process.
yes

I use spread and import a lot. Would this also apply to destructuring parameters? Or fat arrow binding?

spread operator is compatible though
kangax.github.io/compat-table/es6/

see
do you absolutely need import so that require() is not enough?

Making something crazy

but IE11 :(

post what you're working on

were strictly talking about Node there
IE always needs Babel for everything

Fuck old browsers desu

true, but you can't really tell corporate clients what to do

shopify theme for edgy designers

still my stat site
Converting from lowDB to levelDB at the moment, after some user suggested that as a good choice.
Also adding a column for current board-activity %, relative to the highest activity usually seen during a day. I would need to gather stats for a whole week first though, to get an accurate calculation.

damn this looks really gud
can you make graphs next ?
graphs always tingle my dingle

Why are you guys here talking about PHP so rarely?
Is it becoming it's becoming a dead language and I'm unaware of it or what?

because*
sorry, it's almost 4 am here

because c# asp is superior

Because it's not really the way the web works anymore. Preprocessing isn't flexible enough on it's own for a modern experience. You're going to need other tools. Tools that can do the same shit PHP is doing.

Can't. Under NDA :^)

PHP is excellent when used strictly as a language for making APIs.

I agree with you otherwise.

I'm working with a CMS that was built using PHP as an actual templating language.

Imagine what that code looks like.

PHP templating javascript depending on several different things. WEW it's a bloody disaster.

use vue-cli

>tfw too retarded to become a webdev after trying for a year now

I just... don't get it.

How do you guys think when you come up with your stuff? This just looks so complicated. It doesn't help that anytime I look at any actual web dev project like my brain just melts.

What is the secret Sup Forums? How do I become better?

Reading other people's code is like reading someone's hand written notes.
You need to pick some project for you to do and go through it. You'll have to look up solutions to your problems as you go and make stuff up as well.

the secret is actually designing what you want before you ever touch code

guys does anyone has a quick tutorial for MySQL for someone who knows SQL server and SQL lenguage??

if you already understand the concepts, just google what you want to get done. are you having trouble with something?

Can anyone explain what affiliate marketing is and the steps need to be taken when programming it?

Guys, one question, what's your current web dev automation stack?

*architecture

Are freecodecamp's project demo codes well written?

what's an architecture stack

I'm trying to add a login system to my Django site. It seems like Django would include all the default login, logout, reset password, etc. forms that you would need, the same way it includes the Admin features.

In fact, I found that if you add "
url('^', include('django.contrib.auth.urls'))," to urlpatterns, it seems to add this. But it gives them the default of "login/", "logout/", etc. This is fine. But if I go to those pages, there's nothing there (TemplateDoesNotExist error.) Do I have to make all those templates manually?

Also, in views.py, I can import "from django.contrib.auth.decorators import login_required", and put "@login_required" before every def view request that I want the user to have to be logged in for. It's working, but it is looking under "accounts/login/" (which is not found) instead of just "login/". WTF? I changed it with LOGIN_URL='/login/' in settings.py, but now it gives me the error TemplateDoesNotExist: registration/login.html .

So my question is: If all these pieces aren't nicely plugging together, am I using them correctly or should I be using something different? And are there default templates I can use?

I'm new to all "dis" as the kids say, how do I get a live output from the textarea so it changes the age property in the object?

jsfiddle.net/0kj7dmv8/

You're gonna want events. Either onchange or onkeypress. developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events

What would you say is the best way to learn web development?

Thanks for steering me in the right direction and not just solving my problem for me m8.

>

Depends on your prior knowledge.

But in general: Following a 'getting-started' tutorial from any of the major front-end javascript frameworks (Angular, React, Vue, Ember), and then just build your own thing and research any problems you still have.

>>tfw too retarded to become a webdev after trying for a year now
pffff, that's nothing kiddo, 5 years here. though my problem isn't that its too hard it's just that i have no education and whenever i try to make something i lose motivation halfway through so i literally have nothing to show for those 5 years

I'm If I was working with others I would have written comments and used proper formatting/ variable names. Don't feel bad for not being able to read pic related like you would English.

>What is the secret Sup Forums? How do I become better?

Learn by doing. Think of something you're actually interested in making and go through the pain of building it.

How much React/ JS Framework would I need to know to get a Junior job using one of them? I want to get into one but they all require experience already

What do you think about test-driven-development?
Do you write tests for your code and has it proven useful or is it too much overhead?

I'm receiving http posted data chunks in Node/Express.

Do I need to implement checksums for data integrity? And in case of connection failure and only partial data upload? Or will Express only run its handler if the entire http request was successful?

>DigitalOcean - Whoops! There's an outstanding balance on your account
>DigitalOcean - Whoops! There's an outstanding balance on your account
>DigitalOcean - Whoops! There's an outstanding balance on your account
>DigitalOcean - Whoops! There's an outstanding balance on your account

It's too much overhead when you're learning how to program or how to use your framework as well as learning the test library but once you have it figured out it's actually less overhead since you can happily fuck your shit up without having to worry about regression.
Also it makes you figure out the interface you are implementing before actually writing the code which is nice in case you don't do it by other means. This is one less thing you have to worry about when writing the actual implementation so again, less overhead.
I'd say once you're used to it and providing you don't have some crazy complex application environment to mock up it saves you time on the long run.

Bonus points for bloating it up and adding test coverage analysis, setting up continuous integration and so on

liek "dis"
jsfiddle.net/f5hcb86f/

I skipped the object bit, but you can feel free to implement that. I'm just a lazy fuck.

2ality.com/2017/07/class-fields.html
>this.#foo
JUST

Great, now every good app name is taken.

It's almost as hard finding an app name as it is a domain name.

...

What would be good for hosting a small online multiplayer game? Heroku, AWS?

What's your app do?

I am planning to write an HTTP-based API. Just an API, frontend isn't my problem. It'll involve PostgreSQL.
What's the solution with the least amount of pain to do this? JavaScript need not apply.

>What would be good for hosting a small online multiplayer game? Heroku, AWS?
Heroku and aws provide you with useful services and easy scalability in exchange for more moneys so provided you are willing to do some sysadmin work and don't expect your userbase to skyrocket you can try setting your app up on a cheap vps.
But maybe that's just my jew mindset

>Also it makes you figure out the interface you are implementing before actually writing the code
Yeah, I can see the advantage in that
I currently start with a rough idea, but then constantly shift things around, adding or removing features as I go.
It would probably be different on a professional work project compared to a private hobby one.

Yea if you're programming in an exploratory way maybe wait until your stuff stops changing too much and add tests afterwards.
It'll still help you against regression and to understand your project 5 months from now when you decide to finally dig up that old project you've stopped working on for reasons you can't remember

Python?
Whatever is your favourite language?

chose whatever language you're comfy with
if you're not comfy with any language chose java and spring for the sweet auto generated database calls
spring.io/guides/gs/accessing-data-jpa/

this is a better link btw spring.io/guides/gs/accessing-data-rest/

Hm, looks fascinating. I'll look into it, thanks.
Thankfully, I can just bail on the job once it works or I'd be terrified to use so much automagic.

Pretty horrendous code

Get a job so you get paid to learn new things you can employ on your own later on

TDD dictates writing the simplist solution because you're only trying to pass the test. It requires a lot of foresight to understand the problem. I recommend a mixture of TDD and ATDD

Meh, it works.

>I'd be terrified to use so much automagic
It's nice to make quick prototypes but you might get overwelmed if you need to make more complex stuff using more libraries because this framework is huge so it might take some time to figure out what's what
thankfully it's popular so there are plenty of copy paste material from friendly pajeets on stack overflow

you might want to drop starter-data-rest dependency from second link and use starter-web instead if you want to make a regular http controller instead of the weird hateoas one in example

also don't hesitate to ask for help

btw, is there a realistic chance this framework lives until 2024? Apparently this is going to run on SUSE and I don't want framework-induced security vulnerabilities become unfixable because upstream dies (or abandons Java 8)

It's a pretty enterprisy environment, they try to maintain backwards compatibility and not fuck stuff up every 2 in classic java fashion
abi-laboratory.pro/java/tracker/timeline/spring-framework/

Just change dependency versions in project build file if you have to upgrade and you'll eventually have to change a few methods but hopefully not.
2024 seems like a long time tho

SLES guarantees updates for 10 years and the last major release was in 2014.

>"hello i see you have no education on your cv can we at least see your github page to see what you've accomplished over 5 years"
>"there's nothing on there"
>"you're just the person we're looking for, welcome aboard, you can start tomorrow"

uwu c#

I've got to juggle some microsoft office documents conversion, how bad is using the C# interop component to do this? I've seen people discouraging using it but not much explanation is given.

My other choices are either paid, or free but breaks the formatting.

Im having an issue signing with oauth 1

Basically I have to have Authorization: OAuth with my parameters, but the parameters need to have quotes and be separated by commas.

I'm instructed that when signing there cannot be quotes and they have to be separated by &

Is this right? This whole thing doesnt make much sense.

Forgot to say, this will be used for an intranet web service if that matters

I had to make an oauth1 client from scratch about 4 years ago and remember having red this
tools.ietf.org/html/rfc5849

It looks bad but it's actually well explained, there even are examples

Your best bet is to find a client implementation in your language of choice tho.

Thanks, I'm reading through it.

I'm just so confused since my Auth header is exactly what they want, and my string to sign is too.

Maybe it has something to do with my encrypting?

base64_encode (hash_mac ('sha1', $stringtosign, $secret, true))

Type is HMAC-SHA1

signature is made from entire request urlencoded, hashed through sha1 using some concatenation of client secret and nonce as key or some similar bullshit

Yeah, it's just a secret and the string to sign is one line separated by & instead of newline.

Damn, I was learning PHP all this time
What should I learn next to be up to date with the world?

javascript / es6

Depends what you are doing.

Plenty of jobs in PHP.

there is literally nothing wrong with .net

PHP is fine. It still runs half of the web, even if some hipsters don't want to hear it..

But you should also learn some JavaScript of course.

"Jack of all trades, master of none -
that's how web development gets done."

ignore the hipster faggots here man and learn what you wanna learn as long as there are jobs for your craft and there are more jobs for php than for hipster python, ruby and backend js

javascript30.com

Anyone know if this JS course is any good?

ignore the old fuddy duddies in this thread and learn modern technologies unless you want to spend your days maintaining sites written in the 90s

Bruhs I gotta tell ya, I love Javascript right now

Is it just me or is JSBin really fucking slow?

Why does this not work as it should

jsfiddle.net/otyjdpx8/

you probably want
var ye = document.getElementById('yee')
ye.innerHTML = 'The number is MORE than 75! ' + 'Number is: ' + a


right now you are just getting the current innerHTML string but not setting it again

Cheers matey.

Because you are getting innerHTML not setting it.

jsfiddle.net/945232j4/1/

What would be the best framework for a messageboard system in 2017? Would it still be PHP?

there's no best framework for a messageboard system, but you shouldn't use php unless you don't have time to learn anything else or you hate yourself.
I would use spring or phoenix if I were to begin such project right now though

also here's an open-source forum engine made with phoenix: github.com/dailydrip/firestorm

Is it better to apply global styles in CSS with the body selector or with the * selector?