/wdg/ - Web Development General

>Previous thread
>Free resources to get started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good introduction (independent of your browser choice)
developer.mozilla.org/en-US/docs/Learn
freecodecamp.com/
codecademy.com/

>Further resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
github.com/kamranahmedse/developer-roadmap - Roadmap
stackoverflow.com/ - Developers asking questions and helping each other

>Tools
jsfiddle.net/ - Use this and post a link, if you need help with your code
caniuse.com/ - Check browser support for front-end web technologies

Other urls found in this thread:

github.com/webpack-contrib/purifycss-webpack
github.com/gelstudios/gitfiti
gist.github.com/malarkey/4031110
twitter.com/SFWRedditVideos

What are some good books?

Been learning Python on and off for the past month and I can do most basic stuff now.Should I proceed to learn some framework now or practice some problems?
Would eventually like to get into web dev

why not both?
You can learn Django and practice some code problems on codewars/codefights/hackerrank on the side.

about what?

>about what?

I wonder...

Do you have to start and end php external files with

How do I let customer edit content in his spa?

Yoy can do

I came to ask the same thing. Theres a few paid services if you google cms api. But i want a self hosted solutuion. Something where i can specify schemas and get an admin panel and json api. Does anything like this exist?

I was thinking about headless wordpress for a while.

can someone explain to me why it is so difficult to make a simple curl request in javascript

fucking cors doesn't even work, what's the point?

Where is your issue? Is it with XmlHttpRequest/Fetch? Or doing things asynchronously? Or is it with setting up CORS on the server?

I want my clients to fetch data from different servers I don't control, and then perform some operations on that data.

from what I understand is that I need to set up cors, and their servers need to set up cors too.

my honest to god face when php 7.1 is waaayyyyy faster than nodejs

suck it memesters

how many lines of code for a simple chatroom in php 7.1

in node it's 10.

CORS is a security feature, without it many things would be impossible to host on the web

20 million lines of npm dependencies

>security
>feature

what's the difference between proxying it through a server and loading it directly

the user will never know the difference.

friend needs a simple static site for his business, which sells tickets to seminars. it has to be something he can maintain (little webdev experience) so im thinking wordpress + woocommerce. whats a good meme theme for this purpose

I don't think you really have to do any setup on the client-side for CORS. It's basically just on the receiving server to allow the request by adding some headers to the response, which tells the browser that it's ok for your site to see that data you just requested.

If you don't control that server, and they don't want you in their data, then you can't really access their shit in a browser.

>>>/basicwebdevshit/
>>>/stopslackingoffandlearnthebasics/

Image you are logged in to your bank account. Without CORS other tabs could theoretically get access to your personal data.

what the fuck no, how? they don't have the domain's cookies.

I store your password in plaintext. I also send you an email with your password in it. Your login credentials are sent to the URL string.

Get at me, fags

I was always confused about this as well. Why not just not send cookies when making a cross-origin request?

wtf is this shit

Hey, any good Chrome (no bully) extensions for Web Developers?

I was thinking
>Tag Assistant
>WhatRuns
>Page Ruler

Anything you guys use?

i use json formatter, nice little tool, name can tell you what is for

is there a good vscode autocomplete extension for html tags in jsx tags? the native """"support"""" for jsx is trash. it autocompletes s but not s

use ide user, use ide
text editors are for homosexuals

I just do

...

where should i look for remote web dev jobs?
>LAMP stack (Symfony/Laravel)

Given you already know ruby, what is the best resource for learning Rails?

Is angular as hard to learn as people say it is?

Why is fighting with the frameworks always so much harder than the actual coding?

What is the best software to use for PHP developing?

*clack clack clack clack CLACKCLACKCLACK clack clack clack*

...

...I'm in.

I was playing around with Netlify CMS recently.
It works well with Hugo, Hexo, and so on, but I don't know how it could be used with SPAs or simply a normal static site that was bundled with webpack.
Haven't found a git-based CMS, that can be used with webpack alone.

Doesn't seem too complicated, but I have never tried making something like that.
During the build step, what you would need is some kind of plugin, that gives you an array of all the CMSs stored markdown files.
An array of relative paths together with each files front-matter data.
Let webpack put that into a variable and then you could just fetch further entries from your static server based on that in your live site.
No need for a static-site-generator (apart from your normal webpack build step) and no need for a server with an API.

Man I would really like that.

6 gorilion

Guys, I don't know if this belongs here but whatever.
I have a homework in JSP course. Basically I got a form, the client fills the form and it returns a bill with all the information and with taxes etc...

So the way is that when you open the webpage you're presented with a form, you fill in the blanks, and you get your bill.
Everything worked smoothly except one bit : I don't know how to remove the form. Meaning I want it to return the bill and only the bill, and remove the form. Right now it produces the bill exactly the way I want it to but the form is still there on top, blank.

I'm sure it's really dumb and easy but I can't see what to do. Help ?

You can just set up an event to fire on submit to hide the form.

Interview question:
>if you could download a movie from a torrent or pay $10 for it which option would you choose?

wtf man, is this a trick

We are a small team of internet marketers that earned more than Google per employee. Means, we are stable.
We are full time.
And we like to be small, but great team.

It means, you, as a tech person get to be the boss of tech. You are one of our 5 links in the chain that makes us outperform 100 people+ companies.

We manufacture and sell supplements for men online. Testosterone and stuff that even we take because it's so safe and clean products.

When we market, we use every trick there is to outperform, outsmart the gigants.

For that - I need you to be a tough guy... ready to take on some bitching, ready to be precise so that "meet tomorrow at 11:30" is exactly at that time, and that we can count on you for deadlines.


>We manufacture and sell supplements for men online. Testosterone and stuff that even we take because it's so safe and clean products.

since when alex jones started using upwork

Well are you a lawbreaker or not?

>every web dev job around my area asks for either .net or java
fuck, why don't those enterprise cucks try something like node for a change? .net and java ee / spring are huge slow ceremonial clusterfucks.

>implying creating a copy of a thing for personal non-commercial purposes should be a crime

Neither. I'm too intelligent for such plebian forms of entertainment.
I spend my free time fucking hookers of cocaine.

I used to work at a large billion dollar company.
They had huge machines that their entire business relied on.

They ran on Windows 95 computers, on highly customized software, without any backups.
I once asked why didn't try running it on a virtual machine so they could duplicate everything.
But they said they weren't allowed to shut the computers down because it would cost them millions in revenue each day. And it would take hours for the machines to start up again.

That's how the business world works.

any web devs on linux in here?

I often get emails from Google Cloud. And when I read the emails I have no idea what they are talking about.

Yeah, I use phpstorm/webstorm for a Laravel project and VS Code for a react native project

How does webpack werk? I spent weeks I'll willing to admit I'm a brainlet. someone please have mercy on this brainlet and teach me.

Notepad++

you specify one JavaScript file as your entry point.
Then inside your JS file you can require() or import all kinds of other resources, assuming that you have the necessary loader specified inside your webpack config.
It outputs bundled packet of JS, that you can then use in your website or app.
This is the simple version.

Now you usually also do various processing like
>minifying your JS and CSS
>purifying CSS rules so you only keep the ones present in your HTML
>inline assets in your JS depending on their size (you could specify to inline all images code split and allow lazy loading
>maybe pre-render your site/app

Webpack also has the option to run a development server that watches your files for changes.
So when you edit and save a file, it immediately re-bundles your project and automatically (hot)-reloads your site in the browser.

Top cringe.

To add.
I would recommend to start with your own webpack config from scratch.
Forget those ultra long complicated configs you have seen. It's as complex or simple as you want it.

For a start only try adding loaders for JS and CSS.
Then in your JS require your CSS assets.
It will output a single JS file, that contains all your code and styles.
That should show the basic functionality.

Then as next step you could add a plugin to minify your JavaScript code. ("babel-minify-webpack-plugin")
You get the idea.
Lots of projects also provide webpack boilerplate, that configure everything for you if you don't care too much about the inner workings and just want your stuff bundled up.
vue-cli and create-react-app for example

hows that personal home page coming?

mongodb never change the password, never give a FUCK

thank you user, very helpful. Most interesting bit to me right now is this:

>purifying CSS rules so you only keep the ones present in your HTML

I actually have a heap load of CSS that is a mess and this would actually help me out a lot. I looked at lot of configurations and removed uninteresting (those I couldn't figure out) parts. I have been able to minify my javascript. But I want to do more shit and understand it better. This will be my next step, i'll look into purifying css. ty.

Might be tricky because you also need to use extract-text-webpack-plugin (extracting css into separate files so they can be processed individually), but I am sure you will figure it out.

github.com/webpack-contrib/purifycss-webpack

I feel that I'm in that gray area point in life, where I'm good with the basics abd intermediate stuff but I'm lacking advanced knowledge... Any tips?

would an employer care if let's say I have nothing in my github account during the period of 1 year? I created a github account in the past but I didn't even logged in to it, actually I'll start to use it now that I'll be doing freecodecamp. should I create a new github account? thx in advance

What do you know?

Just a question for someone with freelance experience:

I have 2 years of industry experience in web development, but none with design.

Last week I built one page of a site for a client based off requirements we discussed, and I paid my graphic designer friend to make a logo for them and choose the font + colors for the site.

At the end it looked modern, mobile friendly, and it met all the requirements I noted from the meeting with said client.

In the meeting I told them it would cost between $1000 - $2000 to build out the things we discussed. The guy told me he was okay with that.

I spent around 20 hours putting all this together so in my proposal I provided an estimate of $1500 ($40/hour dev, meeting time, assets, paying designer, hosting + upkeep)

He came back and told me he's tempted to outsource to India because they can do his whole site for $500 (not just a page). I'm preparing some notes to have another meeting with him to attempt to justify the value he's getting. Any tips? Am I way overcharging for this shit? I've asked 5 people for an unbiased opinion and they are impressed but they don't know anything about web.

tl;dr any tips/tricks to justifying value for a custom site

I always bullshit clients with free services I provide. Which are of course calculated into the price.

Not only do you make a website, but you also make a logo for free.
Not only do you make a website, you also set up and secure the hosting.
Not only do you make a website, but once it's done he can also request two 20 minute changes to the site for free.
Is it a webshop? Then you add payment methods for free!
Plus it's pretty valuable to have someone you can talk to if something happens instead of some Indian on the other side of the world.

Holy shit, look at all the value I'm providing. It's certainly worth more than those meager 40 dollars an hour if you consider all the extra services I throw in. Because unlike you I'm the guy that goes the extra mile instead of just delivering a product and done.

Don't spend your own money on a project that has not been approved yet.

The client probably doesn't know any realiable programmer or team from another country, but it seems like a very difficult thing to explain.

Rails, PHP, started Node, but I want to go deeper more than broad if you understand.

I think that I know the basic stuff because I downloaded a huge udemy PHP course on building a CMS, and I wanted to follow it but I realized that I know everything in the course videos so I did everything myself and just used the videos for help when stuck.

Roll your own cms so it doesnt take 20 hours to make a single static page

Also I think 40 dollars is on the low side. I charge more.

Because as a freelancer chances are you will have some downtime in the future. And that needs to be paid for as well.

upload a single repo and reverse-engineer the .git file to "autogreen commits" the entire year.

does purifycss works with .vue files and .jsx files? because my html tags are inside those files. not inside the plain .html files

That's great, I still gotta get into Rails and PHP sometime. It's all about building new stuff with things you might not be familiar with I think, there are those "awesome" lists on github with apis, tools and project ideas, which basically force you to read the docs and see what you can make out of them.

There's a tool for that, I just found it today.

github.com/gelstudios/gitfiti

You can edit shit to look how you want, and perhaps make those repos private so the employer can't see them.

But, remember, if you get caught cheating, which I hope you do, you deserve it.

>tfw you commit 40 times in a day on a project, and now all your 5+ commits are light green

I need to create a simple enough python webparsing application.

Any recommendations for a lightweight framework? Django?

Did you have a contract?

You need a contract, dude. That way, if shit goes south, you at least get paid for the work you put in. I've heard of client's doing shit like this. They'll agree on a price, then when you're almost done, outsource it as "80% done", not pay you a dime, and then get it finished for a quarter of what you wanted.

You can use this as a starting point:
gist.github.com/malarkey/4031110

i.e. "my killer contract" - an open-source contract for web devs.

It's easier than React.

And if you haven't started because of people saying it's hard, then that's bad. "hard" is subjective. For example, someone might reply to this saying that React is easier than Angular. It's personal opinions. Try learning it. Decide for yourself. If it's hard, which it probably will be, stick with it. Shit always gets easier.

thank you!

No problem. Do you mind sharing your experience when you're finished? I want to see how it looks.

>he doesn't have 5 years of PHP 8 experience
enjoy being unemployed

>tfw you're too reliant on templates and VS you can't build anything from scratch without ever copying someone else code online

How do I fix this

I think my main problem was responsive design, that shit would give me a headache, and that's why I relied on themes, or frameworks like bootstrap. There's nothing wrong with that, but if you really want to be an efficient developer, then you'll have to take a course on responsive design, and learn how to do shit yourself.

Find your weaknesses, then go study up on them.

Overall, there's nothing really wrong with copying code, especially if you're in the beginning stage of your career.

Flask

Man, I'm so sad right now.

After sending out proposals the last two days, I got a reply:

>I went through your profile and I think you are qualified for this job. I am looking forward to working with you.i want you to know that you will be paid 300$ per week.You are required to work for three hours a day and you let me know when its okay for you to work each day of the week so i can work around such time with you

I searched those words in google, and find a thread from /adv/ mentioning scam.

Does anyone know about this?

Postman
A cookie editor

bump.

I'm guessing this is a scam. wat do?

Holy fuck. I posted here, and on /adv/, now it's removed from Google search....

Wtf?

It has to be a Sup Forums mod.. I can't reply to my thread on /adv/, it's saying "connection error", but I can't post on every other board.

Sketchy fucking shit...

I can post on every other board *

What do if nobody at my work cares about security? I feel so dirty working for this company

Where do you download udemy courses for free?

Can you guys see my posts?
I feel like a mod silenced me

I guess no one feels like responding to you.
You're just being a little paranoid.

I mean, everything I just said is 100% true. It's hard not to be paranoid. I just flagged the message on Upwork, and decided to not even respond.

Kind of sucks that that was my first reply ( a copypasta from Sup Forums), though.

I'm told the best practice is to keep your markup, scripts and style in separate html/js/css files. Does this also apply to small single-app pages where the style/scripts are exclusive to one particular page?

I think it's bullshit if, for 30 unique .html files, I also have to have 30 unique .js/.css files

I asked the same question (but I'm still a beginner in web dev) to a friend of mine. He said in MOST cases this is what you'd do. But he's building really simple landing pages for a marketing campaign, so it's not super important that he implement best practice in something like that

>30 unique .html files

????

Use one HTML file, one CSS file, and as many JavaScript files as you want. It's best practice to separate your .js files for performance.

var fahrenheit = (celsius * 9/5)) + 32; why is this right

var fahrenheit = (celsius * 9/5) + 32; and this wrong?

what is the extra closing bracket for?

2nd works for me