/wdg/ - Web Development General

What's everyone up to?

Previous thread: >Beginner Roadmap and Overview
github.com/kamranahmedse/developer-roadmap
youtube.com/watch?v=UnTQVlqmDQ0

>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 to HTML/CSS/JS and Node.js or Django
freecodecamp.org - curriculum including HTML/CSS/JS, React, Node.js, Express, and MongoDB
javascript.info - curriculum providing a strong basis in JavaScript

>Further learning resources and documentation
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
hackr.io - crowdsourced collection of tutorials from across the web for learning languages and libraries (ignore sponsored stuff, look at upvotes)
learnxinyminutes.com - quick reference sheets for the syntax of many different languages (generally not sufficient on their own for learning something, but very helpful)
pastebin.com/gfBPg24A - Everything PHP

>Asking questions
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

Attached: wdg_multiple_monitors.jpg (611x404, 155K)

Other urls found in this thread:

developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
phpdelusions.net/pdo
beta.observablehq.com/@mbostock/collapsible-tree
codewars.com/
codesignal.com/
twitter.com/SFWRedditGifs

I need to learn JS + a frontend framework to make a web app. I already know programming and oop, i just need to learn the JS way, i know it has some quirks and peculiarities. where do i start? react or something else? eloquentjs and javascript.info are babbies tutorials

You should still learn the basics of JavaScript. If javascript.info is easy for you, then great, speedrun your way through it.

depends, if with the intention of getting a job you probably want react (check your area job offers just to make sure, compare to angular and vue), if you want to do it for fun then go for vue, total brainlet here btw, haven't even picked up a framework yet, but I speak from the meme knowledge of this thread

also mdn for javascript resources is pretty good

I'm getting an error:

>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's

I think it's happening when pulling data from the API to insert in a column. But how can I escape the single quote?

In the code I have something like

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

//Update table
$query = sprintf("SELECT Id, Some_API_Name FROM Accounts WHERE Status = 'Active' ");

//more code ...


The single quote is coming from that Some_API_Name and fucking up my table, how can I escape the single quotes coming through it?

Do you also already have basic HTML+CSS knowledge? Don't need to be an expert, but at least the fundamentals before jumping into React or Vue.
It's also a good idea to check out how to do manually interact with the DOM at least once (.createElement(), .appendChild()) before rushing into a frontend library.

Nvm, fixed it. Used "str_replace()" function.

Does React have any features that Vue doesn't? Or are they pretty much at feature parity and it's just basically JS-in-HTML vs HTML-in-JS?

yes i know html and css pretty gud, i forgot to mention it
for now it will be a personal/uni project, but while i'm at it i want to learn a valuable skill

I'm wondering if there's any APIs that track down street vendors. Working on something that tracks vendors that sells tacos specifically.

There is nothing you can do in one, that you also can't do in the other.
Main difference on the surface is Reacts JSX vs Vues HTML-style templates like you said.
One thing I really like in Vue is the single-file-component feature. You can kind of do the same in React with styled-components, but I think it's a bit more unwieldy.
I also generally like Vues style more and think React is a bit verbose in parts, though Reacts new Hook API seems like an interesting new way to create components.
A similar thing is planned to be implemented in Vue in the future, which is planned to replace the current mixin feature.

Imo a good deciding factor is that you want to learn it for.
If you want to primarily quickly get up and running and try to get hired somewhere, then React will be the more logical choice, as positions for that are much more common. It has a larger community and having Facebooks backing probably makes it very attractive for many companies.
If you want to get into Webdev for fun or personal projects, then I think it's not bad to pick up Vue first.
Once you learned one in depth, you should be able to quickly pick up the basics of the other in only a day or two anyway.

Yea I much prefer Vue's syntax style, and I already have intermediate skill level with Vue, but it does seem like React is used by more companies. Personally I can't stand React's syntax and JSX, but maybe that's just because I never got fully used to ES6.

what the fuck does semantic html. Do i really need to remember this garbage or just continue using the basic non-semantic?

I can't into colors

Attached: 1517253416132.png (1200x790, 548K)

Stupid question, is there a way to debug Angular's compiling process? As in whatever it does when you run ng serve?

I'm stuck ith a fucking premade template and almost all changes I make compile successfully, but all I see in the browser is an empty page.

Here's a good quick start guide on JavaScript

developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript

You should really be using PDO instead of MySQLi nowadays. PDO is a generic implementation that allows you to connect to different database types.

phpdelusions.net/pdo

Check the browser console for errors

>"Semantic HTML or semantic markup is HTML that introduces meaning to the web page rather than just presentation."

This is only important if you are an SEO whore.
just don't do anything retarded like making h2 bigger than h1 and you are good.

study color theory and design

Same, but I can't into fonts. every time I copy a nice font set it looks awful implementing it in to my design. AAAHHHHHHHHHHHHHH

I imagine its easier for new comers to html to learn with the semantic markup but I find it annoying.

Maybe but most semantic markup is just blocks anyways, just fancy names to make it easier for devs to quickly differentiate different parts of the view, and for accessibility/SEO tools to quickly identify important parts of the page , , , etc.

For this project, I'm making a thing where a user tracks the food they eat at restaurants and can give reviews to specific dishes from the restaurant. It's just a basic review site kind of thing, I'm wondering what's a good DB to use? I'm a complete newbie to databases and currently learning them. There's no relationship between the user and any other user, aside from being able to view other users reviews maybe.

The most practical / easiest solution is starting off with a relational database like MySQL. SQL syntax is very easy to learn because it's very similar to how you'd actually say it out loud (e.g. SELECT column FROM table WHERE id is 10) and for the most part doesn't require any manual programming / sorting / filtering that you'd often do with other nosql based solutions.

SQL doesn't require you to learn a whole a lot about data structures in order to properly structure your data for best reads / writes in comparison to other nosql based solutions.

Had to set up auto db backup on server so we can roll back when client messes up. Aafter tryin to overcomplicate things for a few minutes i remembered cron jobs exist and got it done in 30 sec, and solved few issues as wontfix and went home. Productive day.

Is it okay to just use string interpolation in C# or will I be screwed in the future?
doing Console.WriteLine($@"This is an { example }"); feels way more natural for me coming from ecma6.

Hey all, I'm new to Laravel, trying to figure out relationships

I have a Topic model that belongs to many Files
and a Survey model that belongs to many Files
while iterating over topic->files how can I access the file_survey pivot?

any help greatly appreciated

Attached: LaravelLogo.png (1200x821, 56K)

I'm new to webdev stuff and am wondering how much time do you guys take per day to study?
Currently getting through Javascript and it's proving difficult to retain all of the information.
Besides the sticky, any other good beginner JS resources you would recommend?

Samefag
Can anyone tell me why the console output is showing ƒ (){
return 'An apple is the color '+this.color+' and is the shape '+this.shape+'.';
} ?

Here's the script I'm trying to run:
var apple = new Object();
apple.color = 'red';
apple.shape = 'round';


apple.describe = function(){
return 'An apple is the color '+this.color+' and is the shape '+this.shape+'.';
}

console.log(apple.describe);

His bitch ass should be using a framework that does all of this for him. Doing shit like this in raw PHP he's likely to fuck up multiple things.

U gotta call ur function buddy

console.log(apple.describe());

spring is gay

having a funny little issue with how the this keyword works in js. can someone explain how to pass the local this (the cheapFlower) instead of the global this (Window object) into this function?

Attached: javascriptissue.png (1079x464, 33K)

What are full stack job interviews like these days? It's about time I jumped ship from my current company, but I'm worried about my interview skills and I feel like I've gotten complacent in my learning after working at the same place for a few years. A few of my coworkers say most aren't too bad, no whiteboarding or anything but instead a "compatibility interview" and easy technical off-site stuff like scaffolding an angular app and setting up some endpoints to just show that you aren't brain dead.

problem solved. for those interested, this was my solution

Attached: javascriptsolution.png (647x343, 23K)

function cheapFlower() {
setInterval(() => agePlant(this), 1000)
}

this should work OP. is it quite helpful to know the scoping differences between () => and function(), and unless you learned JS as your first language () => will give the expected behavior more often

Damn yep, that makes sense lol.
Thanks.

Yep

is Vue a fitting framework to use if I'm to create an web application that's similar in looks and functionality to a flowchart?

What would you recommend?

Attached: 1523159823925.jpg (3056x2102, 506K)

foreach ($topic->files as $file) {
$file->survey->something;
}

I've heard good things about d3js for turning data into design, so to speak.
Maybe this can lead you on the right track? beta.observablehq.com/@mbostock/collapsible-tree

>Currently getting through Javascript and it's proving difficult to retain all of the information.
It's going to be harder if you just go through syntax lessons by themselves and try to remember things from that alone.
Much better if you have some actual code from a project you are working on, where your mind can make a logical connection from the problem to the solution.
>any other good beginner JS resources you would recommend?
I found code challenge websites like
codewars.com/ or
codesignal.com/
very helpful to develop a better problem-solving-mindset, if that makes sense.
It depends on how you intend for the user to interact with it. I would probably look for a more specialized flowchart library first, that are specifically designed to render something like that.

>d3js
thanks, will check it out

>specialized flowchart library
It's too custom to fit in a conventional flowchart library