/wdg/ - Web Development General

Dogs edition.
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

>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: wdg_corgi.jpg (450x331, 100K)

Other urls found in this thread:

phptherightway.com
localhost:8000
github.com/dasprid/container-interop-doctrine
github.com/middlewares
codepen.io/user/pen/LgKKON?editors=1100
twitter.com/SFWRedditGifs

What am I doing wrong?

$('.myButton').click(function() {
$.ajax({
'url' : 'data.json',
'type' : 'GET',
'data' : {
'duration' : '45-min',
'level' : 'level-1'
},
'success' : function(data) {
if (data === "success") {
alert('request sent!');
}
}
});
});


I'm getting the error: XML Parsing Error: not well-formed in the console.
wtf?

What are the limitations of downloading JQuery from a CDN? I am doing it on a site that uses HTML + JS, but a key feature only works on my Chromium (portable). It doesn't work on other browsers and it didn't work for my teacher either. Is the CDN download to blame? Full story here

picture is me

That seems to be a jQuery thing. By default it assumes the text you're fetching is XML, so it tries to parse it as such.

You need to specify 'mimeType': 'application/json'
or something like that.

Anyway, I wouldn't recommend using jQuery in general, if you have the choice. Pick up a modern framework for most stuff, and then use Fetch for doing Ajax requests.

Here have more dog

Attached: corgi_stylesheets.png (563x1200, 286K)

$('.myButton').click(function() {
$.ajax({
url: 'data.json',
type: 'GET',
dataType: 'json',
data: {
duration: '45-min',
level: 'level-1'
},
success: function(data) {
if (data === 'success') {
alert('request sent!');
}
}
});
});


That means that the $.ajax.dataType field needs to be set to "json" because it doesn't know the content type, and also the server isn't setting the 'Content-type' header to 'application/json'.

I think the issue MIGHT be your code. But I have never used JQuery. Take my analysis with a grain of salt.

Also it may pay checking the data.json file to see if it's valid JSON.

But everything works 100% perfectly on Chromium (portable, haven't tested the other one). If there were some logical error in the JS or something wrong in the HTML, the problem should be there too. Same for the JQuery. The only thing I can think of is that the JQuery isn't being downloaded for some reason, and thus nothing works.

what did he mean by this

Attached: 22.png (1137x405, 45K)

React is the victim of the bullshit that is called JavaScript Classes.

React 16.7 pretty much removes most use cases for classes :^)

React sucks a fat dong and Vue directives are far superior to writing JSX all day.

Yeah, it was 'dataType' : 'json'. I'm just experimenting before fetching the data in my react project. Thanks, anons

>Thanks, anons
no, thank YOU

React is over-complicated crap

Grug don't like React because Grug can't React fast

Attached: file.png (800x450, 144K)

Vue is better, wojak posting redditor.

Call back when you get even near the daily downloads of Angular, Chang

Attached: you.png (207x243, 33K)

>more downloads means better
>more stars on GitHub means better

kys please

is this a thread where you post about your minimum wage webdev job or do you guys do personal projects

哇靠!

you're too cool for us, bro

>don't use jQuery
>implement a fucking meme framework instead to do the same simple task

how about no

I finally fucking did it. I just accepted a job offer. junior sql analyst/programmer for 50k. I'm so fucking hyphy mates

Attached: happening.gif (312x213, 973K)

I assumed the project was reasonably complex, which is why I suggested using a framework.

If you're referring to this one web request when you say "simple task", I specifically suggested using Fetch for this.

congrats :)

How many libraries are too many libraries?

Attached: 16458632156692.png (262x1186, 28K)

well done. how long have you been programming? ive only been learning a few months but would love a junior role one day

How do I make optional named parameters in JavaScript? Only reliable way I could think of was
function foo({param1, param2} = {}) {
param1 = param1 || 'defaultValue1';
param2 = param2 || 'defaultValue2';

console.log(param1, param2);
}

foo(); //defaultValue1, defaultValue2
foo({param2: 'bar'}); //defaultValue1, bar

Kinda shitty looking though.

sorry for this only tangentially-related question, but i didnt want to start a new thread for it since it's stupid. to save you time it's regarding web/app development as a career and not technical in nature, so disregard if you dont care about that.

im a senior software engineer and ive been at my company for the past 5 years now. im starting to get really burned out here and will probably end up switching jobs soon as the market here is crazy and it would be nice to work for a smaller company again (my company has grown from 2 offices and ~100 employees to 7 or 8 world-wide with almost 1000 employees since ive been here).

the biggest thing is we seem to only hire entry level engineers, so i feel like im constantly interviewing/training/working with new, fresh people who have very little if any experience, not only in software, but in working a real job in general. weve even started bringing on contractors recently and that's even worse. i havent always felt like this, but ive only officially been in a senior role for this past year. is this something i should just get used to being a senior engineer? i guess ideally i would love to just come to work and work with people who know what theyre doing and dont need me to handhold them and constantly be bringing people up to speed on basic things like agile process and gitflow and stuff.

Attached: eric andre and his slow descent into madness.jpg (3174x2160, 428K)

>hello plz can you explain how to make profile upload with wamp and bootstrap.? plz thank you very much plz

>please how I install php as frontend and not backend ? I use it as php but no pages are display when i open in browser, maybe u help in comment or skype ok?

>okay so how I put javascript function in database and use it in mysql table plz. U can plz write example u can send to [email protected] please and plz make full code exmple ok? plz

>hey U can help me put images with Css inside my code? When i put URL it gives me error Uncaught SyntaxError: Unexpected end of input here is code plz help var varDateNow = new Date();//var TEST var Test2 = varDateNow.getTime(); var Test3 = varDateNow.getTime(); var Test3 = varDateNow.getTime();var varAlertTime = document.getElementById('')$(this).image.css('id=helloworld','true)'; getElementBy('helloworld').post; I am very happy if you help, please I am very happy. ok? please ok

Attached: pajeet.jpg (456x580, 44K)

ayyyy lads
I need a simple way to send messages between a few servers running nodejs. It needs to be authenticated and encrypted. Any suggestions?

Oh boy, wait till you learn about npm modules

reading this makes me feel sad and shitty.

i just got into engineering as an entry level and i'm still learning the process. my supervisor has been handholding me, but he's kind of stopping now because he wants me to do better (i've been doing there for 1.5 months) and on my own.

but it's difficult. he tells me things and i write them down, follow the steps, but there are times I forget. if i ask about something twice, he gets upset with me and says i should know it already.

first time working in the engineering field, came from a background of teaching. it's so fast paced and pressurized.

>Old company remade the modules I did for their website
>It looks much nicer now

Attached: 154896214789847.gif (435x250, 1.9M)

sorry didnt mean to sound off-putting or demoralizing. everyone has to start out and has gone through what youre going through, myself included. it is a lot to take in all at once. just try to understand that the people around you want you to succeed, so try not to feel too bad. you got hired, people wanted you there because they saw your potential. and being entry level, it's expected, so people will have patience.

personally i would love it to have one person to mentor. i have just been feeling overwhelmed lately because we've had a lot of turnover and it seems every architect or senior engineer gets replaced with an entry level candidate and a lot of us have been feeling overwhelmed by this.

youll be fine, just keep at it. the more you do things theyll just become second nature to you, and then someday youll be on here complaining about having to work with so many new faces like me.

Anyone have any good book recommendations for picking up HTML/CSS/JS? I seem to learn better with a physical book in front of me.

I've never read an HTML/CSS book. I would never be able to. It's fucking simple, really. I mean, I don't know why you'd even want to read a book on them, the shit is that easy.
JavaScript:
>You Don't know JS series
>Eloquent JS
That's all you'll really need, but as bonus:
>If Hemingway Wrote JavaScript(really cool book)
>Effective JavaScript

;_; thank you. thank you so much, i needed this.

Attached: 1450228943524.jpg (180x212, 5K)

via get_children and wp_get_attachment_image I managed to pull the 3 gallery images from a specific post to the front page
I'm struggling to work get the_permalink so that when you click the images you're taken to the post itself

why are you using `=&` ? god i wanna puke

pulled it from somewhere, I'm a student so if I can get something to work I'm happy with the code not being perfect.

well, no one writes `perfect` code, but i suggest you take a look here if you wanna continue working with php : phptherightway.com

honestly I couldn't care less about php and anything backend
I'm a front-end person for sure, have a much better eye for design than I do databases and code so as long as I can get something to work I'm happy, I'd rather priorise the time I spend making my code nice to instead making the front end and UX nice.

>honestly I couldn't care less about php and anything backend
then stop using php. if you care about UX, you would care about their security and that their data is safe ~ wordpress doesn't provide any ~ so either do it right or don't
i can pick up couple of bricks and cement and start building a house, i can make it looks really nice but doesn't mean it won't go down the next day probably

there's no real data being kept on this page
the project I have for school requires I use php and wordpress to create this site otherwise I wouldn't even bother
relax guy

How good do you really need to be with html, css, js for a rails job

>I'd rather priorise the time I spend making my code nice to instead making the front end and UX nice
Ticking time bomb.

are all people who are more back end minded over front end autistic? everyone in my class who likes database work is socially retarded and I'm getting that vibe in here too

>there's no real data being kept on this page
>$q = new WP_Query( $args);

apparently you are making a blog here, so if you want to do that and use symfony, their demo app is literally a blog and its easier to customize

making a blog with symfony :

$ composer create-project symfony/symfony-demo
$ cd symfony-demo/
$ php bin/console server:run

There's no need to configure anything to run the application. Just execute this command to run the built-in web server and access the application in your browser at localhost:8000

CAUSE YOU ARE DOING IT WRONG ! either do it right or stop and get one of your retarded classmates to do it for you

hm maybe there's code that doesn't need to be in there then because it's not a blog it's literally a front page section pulling the latest posts (in the category lifestyle) 3 gallery images, that's it. And all I want to do is be able to have those 3 images that are pulled to the home screen be able to be clicked through to the post from which they're pulled.

>it's literally a front page section pulling the latest posts
well, i think you don't actually know what a blog is ?
these `posts` are saved in the database ~ that's considered data

Jokes on you, I am currently working as front end dev + UI/UX design for a living. I know jack shit about back end.

lol nice, my intentions too

ah yeah well I understand you I thought you were referring to specifically an blog input area like a text field, my mistake.
what would you change and do you know what I should do to be able to actually have the images clickable through to the post?

javascript ? css ? idk, doesn't have anything to do with backend.

then why when I used a similar piece of code to pull thumbnails and excerpts from categories the excerpts have a "read more" button that takes you direct to the post.. I need whatever code that is and I'm fairly sure it was done in PHP

I'm a front-end guy and socially retarded.

are you asking about URI generators?

I need to show what page a user is on with the nav bar ?
How do I do this with CSS, I tried using nav a:active but that only changes the colour when you click on it.
How can I make it so that it's a certain colour when the user is on a certain page?

what technology are you using?

>I use le platform.sh

Attached: 1505943391783.jpg (259x220, 36K)

I'm only allowed to use HTML5 and CSS3.
I've got it in a kind of dirty way now by adding a class to the tag for the current page.
But I was wondering if there was a cleaner way of doing it somehow.

I've been unexpectedly assigned to lead a Scrum team from next week and I don't even know what Scrum is. Also, the codebase (very small) is all written in node+express and I never used that shit, I know meme php frameworks only and some C.
What do? The node+express dude is leaving and I've already convinced my boss that the codebase (many fucking microservices for something super simple) is pretty shit, so I might have a shot at a full rewrite in meme php.

The pay is great do don't want to fuck this up.

Attached: (((Welcome!))).png (354x112, 33K)

I don't think there is another way to do it.

Then I guess the dirty class will have to stay

trick-or-treat? ... or crash-or-compile? #gamedev

That's not dirty that's exactly what everyone does. The problem is you have no backend to automatically generate the breadcrumbs. Did you think people were just manually typing their sitemap? No, that's what the backend is for.

What should I do with my project in django/python? I have login setup, sqlite and a registration page. Give me some tasks on what to do, I'm new to this.

I meant that theres like a pseudoselector for everything but not for the current page, even the :active selector is just there for the split second the click happens.

If you don't have a backend, then the way to do this on the frontend (and without JS), would be to manually add a class to .
Having the class on is better than on the specific nav link, because you might want to have other page-specific styles as well.
In CSS, you could just simply write html.page-home nav #nav-link-home (unnecessarily verbose example), or whatever.

Use a real production database for starters.

Jquery isnt faster than any frameworks by any means. Shits pretty much depreciated for a reason. You don't use jquery if you're concerned about performance

You've got this.

I believe in you.

Why?

Is there a way to use background: url() in css but with a video instead of an image ?
It takes a gif file no problem but I'd like to use a video file as well.
Or is this beyond what the css is capable of ?

yeah, just put the video into the background like you would do with an img tag (not using css background-img, but positioning)

Can I jump straight into Java Spring without knowing any Java. I don't feel like doing another syntax rundown, figured I'll pick up that stuff while working on something.

>Can I use [library/framework] without learning [underlying technology/language]
No

too bad

What's a good quick java guide?

Is there such a plugin for wordpress like emmet? To help write code faster.

[spoiler]I know, I wish I didn't have to deal with WP either.[/spoiler]

for (i=0; i < array.length; i++){
if ((i+1)%4=0){
this value gets deleted, array gets resorted to
fill in this value and make the rest of the values run with it.
}
}


Btw I discovered Ctrl + arrow key (left or right in a block of text) and I'm fucking HYPE!

Attached: media_gallery-2016-08-19-7-Arc_2_3fba530bebe87f2d3560330529974392.jpg (630x470, 106K)

>The thread borders are like a pixel thick. The extra readability is more important than gaining a pixel or two's worth of horizontal screenspace back.
I disagree, but do what you wanna niggah

smart, and very elegant

None. All of them are long time-consuming and outdated
Why does it have to be Java.

If you're doing Web dev on the JVM, you're better off with a better JVM language like Scala.
But since you're asking about this at all, I'll assume you're a beginner and would therefore be better off with Python/Node.js/Go

crongratulations my dude, enjoy the life!

pls respond

>front end dev + UI/UX design
poast me some good designs and good UI/UX practices?plz thx

Already did

Okay.

>I've been unexpectedly assigned to lead a Scrum team from next week and I don't even know what Scrum is
Lead as in being the Scrum master ? If so, then I don't think you'll be expected to participate in coding.

Java is still immensely popular in most enterprise shit. Unless you're working for a meme startup it's usually a toss up between Java and C# on the backend

do something with registered users, like give them configs to something dumb like color scheme

I did it by putting the actual video tag in the html part (not the css part like I would do the images) It seems to work well.

if you are going to rewrite that, do it in zend expressive ~ i would be the best approach coming from express

tips using expressive :
1. since you are using node, you can use swoole for expressive and zend provide official support for swoole ~ higher performance + async programming + coroutine + more ...
2. don't use zendframework/zend-expressive-session-ext, use zendframework/zend-expressive-cache with a PSR-16 cache pool ( you can use zend cache or looks for something else on packagist ) since swoole doesn't support the session extensions ~ the cache session supports both swoole + PHP-fpm
3. implement your own authentication module ~ this may seem hard but its not - the zendframework/zend-expressive-authentication is not that good ~ but you can use it for simple APIS - ofc if you need user authentication
4. if you need database support use this : github.com/dasprid/container-interop-doctrine
5. whoops error handler is not support with swoole, so edit the `error.phtml` or `error.twig` your self, in debug mode a `error` variable is defined so ( which is the uncaught exception ) so you can do your own thing.
6. if you need a middleware, you probably can find it here : github.com/middlewares or just search for it on packagist.org

Clone the repo and play around with the borders if you like. When I get around to implementing customizable themes so the other user can have his night themes, you can get your borderless catalog threads too, friend.

Attached: 1531655803572.png (330x236, 140K)

>Clone the repo
not gonna do that, but if you ever get a working hosted version of the site, let me know and I'll play with it.

Gimme till mid/late November-ish, still need to secure the REST API and improve error handling among other things. I do like the idea of myanimelist-style customizable CSS, so I'll keep that feature in mind.

I made some examples to complement what was talking about

codepen.io/user/pen/LgKKON?editors=1100