/wdg/ - Web Development General

> Discord
discord.gg/wdg
OR
discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#Sup Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/
>Crockford on Javascript
youtube.com/playlist?list=PL7664379246A246CB

>Frontend development
github.com/dypsilon/frontend-dev-bookmarks

>Backend development
en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
backendDevelopmentBookmarks.md

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

>NEET guide to web dev employment
pastebin.com/4YeJAUbT/
>How to get started
> [YouTube] 2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer
youtube.com/watch?v=sBzRwzY7G-k
> [YouTube] Javascript is Easy - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.
youtube.com/watch?v=zf_cb_Nw5zY

>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com
openshift.com

Other urls found in this thread:

mobileangularui.com/
mail.aol.com/webmail-std/en-us/suite'
docs.asp.net/en/latest/tutorials/first-mvc-app/
twitter.com/NSFWRedditImage

tfwnogf.com

I just sent this to a recruiter as my work sample ;_;

I tried phpmailer with my gmail account and the mail account that comes with my shared hosting account.

Neither worked out. I'm running out of ideas and suspect that even with a local mail server I'd be unable to get things working.

...

React.js problem:

I have two React components. One is a container component that handles the state and logic. It encapsulates the second component, which is just a stateless functional component that renders UI.

The stateless component is going to render an accordion div to the page. When one accordion element is expanded, the others need to be closed. What's the best way to go about dynamically adding classes to elements in a situation like this, or in React in general.

I want to keep my styles separate from the components if possible (i.e. no inline styling, just my single external stylesheet).

Why didn't it work? Did you try to debug?

Somewhat. It told me I needed to activate support for insecure apps in gmail. I did that. Still getting the same error message.

Need your advice dear Sup Forumsentooman.

>be front-end developer fresh out of college
>currently doing my internship in a company as a jr. front-end developer
>hate all task I had to do (newsletters, basic responsive design, layout testing, legacy css/sass optimization, etc...)
>realise that I pretty much hate all tasks I have to perform

I'm considering to go balls deep back-end but not sure what stack/language to choose.
Have some experience with PHP but don't really liked it that much during my education period.

What would you advice dear Sup Forumsentlemen?

Ruby/ROR
PHP/Laravel
JavaScript/Node etc...
Somethingelse ???

>Ruby/ROR
>PHP/Laravel
>JavaScript/Node
start with those, I'm waiting for this procastination to end to finally make a portfolio, probalby a VPS with different backend languages showing the same frontend.

is this stupid??

I am planing to learn all 3 in the end but which should I concentrate on to get me some nice job as, at least, jr back-end developer?

1. Make a default accordion class that starts with each element closed
2. Make an 'accordion-open' or somesuch class that overrides the default one and displays the content
3. Add a click handler to the accordion
4. When one of the accordion panels is clicked, detect whether or not it has the 'accordion-open' class. If it does, remove it, if it doesn't add it. If you're a jQueryfag, there's a .toggleClass function that does pretty much what you'd expect.

Your accordion's "state" is handled with css, so it can remain a stateless component.

Aim for the one with most use I guess:

php
javascript
ruby

but there are good jobs (but few) for ruby since is not very popular in my country.
ymmv so do your homework, spend 1 week for each while you decide, js and php mostly

If you're already familiar with javascript, start with node. Git gud with express, and you should have a pretty solid grasp of the fundamentals of handling http requests and whatnot. After that, you should be able to jump into any other backend framework a lot easier.

If you're not already decent with javascript, I would either still use node, or try a few other languages and stick with whatever one you like the best. You should probably start with a minimal framework before you go for something full-featured like rails, as it does a lot of 'magic' for you: >Ruby - Sinatra,
>Python - Flask,
>NodeJS - Express,
are all good options. Unlike some anons here, I don't think PHP is necessarily a bad option, but you should be aware that (IMO) the way you do things in PHP doesn't always map well to other languages, so you might have trouble migrating to other things if you learn the 'PHP' way first.

Also, there's no reason to learn all of them. What most companies want is someone good with one language, not someone that barely knows a lot of them. Learn one of them first, get good with it, then try to learn another one to help cement the language-agnostic components of backend in your mind. After that, you should be pretty well equipped to learn whatever weird framework you want within a couple weeks or so.

Finally a solid advice.
Thank you user!

What format should I use for a site's logo?

Typically I'd use a PNG, but is support for SVG etc decent now? I want it to look good on high DPI screens too.

Another option to consider is Java with Play or Spring framework.

Personally I'd look at back-end job adverts, see which languages/frameworks pay the most, and pick that.

What kind of projects should I put on my github page?

You're not going to get hired.

PHP/Phalcon 3

Phalcon isn't babby's first framework tier like Laravel, but it's very flexible and fast as shit. I just got done rebuilding some piece of shit that pajeets built in Laravel and saw an 8x speed improvement. But you've got to know what you're doing to use it.

>Personally I'd look at back-end job adverts, see which languages/frameworks pay the most, and pick that.

This

>Java with Play or Spring framework

Ehh...

My non-production webpack bundles are 2Mb and take 9 seconds to render, am I right in thinking something is off? Here's my config:

var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = require('path');

module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./index",
module: {
loaders: [
{
test: /\.js?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0'],
plugins: ['react-html-attrs', 'transform-class-properties', 'transform-decorators-legacy']
}
}
]
},
output: {
path: __dirname,
filename: "scripts.min.js"
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};

>Personally I'd look at back-end job adverts, see which languages/frameworks pay the most, and pick that.

Where I live it's .NET central and I really don't feel like becoming confined in MS cage.
I do, however, like what MS did with TypeScript, this is some next level shit right there.

>Phalcon isn't babby's first framework tier like Laravel

I'll take this into consideration for sure but I don't think I'm ready for this kind of high level framework.

I think I'll go with NodeJS - Express for now as this user suggested My goal right now is to get my foot in the door somewhere for back-end position.
And since I'm semi-decent in JS already I think it will be next logical step for me.

What do you guys think?

welcome to node.js

This is part of the reason I'm skeptical of React. Handling something like adding a class to an element should be trivial. The fact that you have to think this much about the allocation of state for something this menial is ridiculous

The suggested answer is not "The React Way (TM)" of doing this either

I know JS like the back of my hand, but I have a feeling that node will fade in popularity except for niche applications.

Node is a good quick way to serve static files, and for dynamic stuff, it's no worse than C#, Java or PHP. What's more, NodeJS is still home to one of the quickest Web Socket implementations (if you avoid Suckit IO). Some of the stuff you can do if you apply some thought is very cool. Especially URL redirects and Rewrites. That shit's a pain when using Apache.

>send resume
>they dont even send me a simple "no"

Javascript is a disgusting franken-language though. Node is only good for concurrency, and there are better alternatives.

Redirects or rewrites aren't difficult in Apache. Though generally you just handle redirects at the application level.

No-one knows this?

Javascript's data structures alone justify the existence of the language. JSON's probably more common than XML now. And the language it popularised functional programming tenets like lambdas and closures, which the C#, Java and PHP language designers are taking shafts up the ass to include in their work.

Javascript's account for numerical types is fucked, and at a certain level, the OOP model is confusing. But there are very few languages that are as flexible. Lua perhaps... and no one complains about that. Even though it's best interpreter is slower than the best JS one, and they're so close semantically.

Wordpress on PHP is probably quickest way to get job but you will hate yourself. PHP with some framework is fine tho. Java or .NET will get you real job. Python for startup tier. Keep away from Node - javascript is shit and it's a lot less popular on backend than people think. Golang looks nice but not many jobs yet.

> trying to use decorators with eslint

Is there a backend job for somone who knows only a little dev but a lot about networks?

here. I mentioned doing it that way because user specifically said they wanted it to be a stateless component (and also because of the .toggleClass thing). You could easily do it "The React Way (TM)" by either making the accordion a stateful component and storing the open/closed value there, or storing the open/closed value for all accordion panels in the container component (probably the most recommended way). It would be fine to do it any of those ways, really.

png unless you don't plan on supporting old browsers. You could have the svg fallback to png, but then you might as well save yourself the trouble and just go png.

>Keep away from Node - javascript is shit and it's a lot less popular on backend than people think.
[citation needed]

I'm never getting a job.

pure css

Whats the best way to start developing web apps with a 2-man team? Im thinking learning laravel + js but any suggetions are welcome.
I want a change from my job working for literally pajeets using legacy oracle forms shit.

Come here bro, give me a hug.

Use Docker.

I showed the recruiter my samples and he cut contact immediately.

Thoughts on isomorphic development? What frameworks are good for this?

Same thing happened to me a while back. I applied for a job and emailed a guy my application + resume and he got in touch. He asked me what have I created that I'm most proud of - I sent him a link to a project on my Git. Haven't heard from him since and that was 6 weeks ago.

I wonder what they are looking for.

My site sucks, but 1000s of unique visits a week and it shows I know PHP.

Must I really do a parallax scrolling webpage with an HTML5 video of a hipster drinking coffee and typing on a macbook pro? "This man can HTML! - Mom's other son, Tyree" animate.css
"His github is a wall of green dots! - not myself"

Should I contribute to the most meme frameworks known to man just so my github looks better?

I fucking hate the current year.

I can understand why I got overlooked. My code was messy, I didn't use a framework, and my last commit was some time last year.
Seems like you were in a much better position to get hired though, and you most likely will long before I do.

I've been trying to branch out these days. I'm making a mobile app with Angular that fees off a PHP API that I'm creating, hopefully someone out there will see that as being worthy of at least a phone interview.

I'm hoping that the recruiter is just waiting for a response back from the company. More likely I just got dumped.

>I'm making a mobile app with Angular that fees off a PHP API that I'm creating
That sounds familiar. Not sure if you were the person I was talking to about Cordova a week or so ago.

I'm the one doing the same thing through Cordova but with JQM.
Post some code sometime. I'd like to see how you do things with Angular.

You should try sending them a follow-up email if you haven't already done so. Let them know you're still available and still interested. I did the same but they didn't reply to that either so I gave up.

And yeah, I'm the same guy. For the past few weeks I've been fucking around with Cordova on and off. I started out by making the interface because I figured the API would be the easy part, wrote everything in HTML/CSS and JS - I basically wasted a lot of time. I only started learning Angular today so it might take me another few days before I have anything worthwhile to show. Right now I'm learning the basics of it before I start using mobileangularui.com/
For the first time in a long while I'm actually motivated to code continuously for hours on end.

>I'm actually motivated to code continuously for hours on end.
Good stuff. Those times are the best. What's your app about?

>wrote everything in HTML/CSS and JS - I basically wasted a lot of time.
Is that a bad thing with Angular? That's how I did it. AJAX to PHP pages for whatever I need post_picture, login, register, retrieve_pictures etc.

>mobileangularui.com/
I just checked this out and now I'm switching to it.

The drag features are perfect.

why does this site reject my login? I feel like I've done everything perfectly, including the referrers and everything but it just won't budge

import urllib.parse as parse

c=requests.Session()

tmp_headers='Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'
headers={'User-Agent':tmp_headers}

inbox='mail.aol.com/webmail-std/en-us/suite'

#we can set params! params=payload
get=c.get(inbox,headers=headers)

authKeys=getSessionKey(get.content) #

Holy shit, finally someone else who uses phalcon. Thats what we are using where i work. We are developing web based solutions aimed at enterprise only. Phalcon is a beast

fuck forgot my picture, should help clarify things a bit

In the case of someone who wants to freelance web dev their way into a real job quickly...
Is it smart to go from knowing html/css and basic js to learning to create wordpress templates or should one pick a framework and learn the whole backend?
Is wordpress the best cms?

About what- javascript being shit or less jobs? For former there is enough info in net and frankly every good dev should understand it by himself. For later search for node in any job listing and then compare it to Java or PHP or anything else big.

Wordpress is one of the worst but also most popular. Take it off you want easy job. Take framework if you want real work and future.

>tfw need to write airbnb styleguide lint at work

The ; are killing me. Just when I got so comfy skipping unnececary ;

at least plugins make it quick to fix it

I cannot fucking figure out how to asynchronously upload a file using a XMLHttpRequest object. I can't fucking do it.

I've been doing this for like weeks, using blobs, encoded strings, arr buffers who the fuck knows.

Is it an issue with my web host? Why can I post a text file but not a small image, when both are read as binary string? Am I a fucking idiort?

Should I just give in and learn jQuery?

Fuck this Gay Earth

Is there any way to have vuejs play nicely with complex objects? I've noticed it automatically creates getters and setters for data in Vue instances which is kinda screwing me over right now.

Should I just give up? Vuejs can do some really neat things with simple data but it just seems like whenever you add a touch of complexity, things fall apart with it and the only way to make it work is restructuring your entire project around it.

What do you reckon is a good backend framework to learn, if you you're a "junior" in Ember.js?

I'm thinking the standard node+express, but how about sails?

Why would you serve static files in node when Nginx exists?

post code

It really is. Actually I have invested in phalcon's development heavily and pay the developer a full time salary so he can continue development. Spread the word. Phalcon stronk.

>I fucking hate the current year.
there's your problem. a 2 minute phone conversation reveals your eq (emotional quotient) is rock bottom and they move on.

Why would you ask these dirtbags?

Currently buying a domain for a close friend's company website. Who's information should I put in the whois?

Gee I don't know, what do you think?

Of his company.

Gotcha. Should I put his name as well?

Haven't decided what to make the app about yet. Doing basic login and CRUD operations for now.

>Is that a bad thing with Angular?
Nope, not a bad thing at all. I was just saying I wasted a lot of time doing nothing but fucking around with those instead of making something worthwhile.

Yeah, it really is good. Much better than using JQM imo.

I've been making an imageboard with ASP.NET WebForms and I've somehow fucked up my Oledb drivers for my database

How 2 fix?

>2016
>webforms

no way user, why the fuck.

just use fetch

>webforms
What is wrong with you? Did you find 10 year old programming book?

is this bait?

Make a replacement webpage for a family businesses. Will replace it more fully in like half a year. Just want to make a single long page with info on it and have each little section folded up so they can expand if they click on it. Stuck with wordpress cause its already set up and I dont want to have to yank it.

Any tips? Also what size should I make my pictures I have a couple hundred in lightroom and need a recommendations for a couple sizes. One for body pics and one for a couple pics at the top.

>wordpress
>single page
>half a year
lmao what the fuck?

Will make a new website in half a year. And do a real job of it then. For now I have a shitty wordpress site. Would like to replace it with a single page to sit there until I do something more.

Honestly I will still want a single page in half a year just a long well done one with wordpress completely yanked this thing sucks I dont have a blog.

Are there standard picture size conventions? I was looking on google for average phone resolutions and the only thing they is dependable is most people have low ass resolutions on their phones.

>Front-end development

Fuck me. Why is the first image displaying, but the second one isnt? The only difference in jade is the src is a variable in the second one. Where does this ::after thing appear and why does it not show the picture.

>standard picture size conventions
just use bootstrap and responsive images

Scr != src

this is why you use a proper text editor

If you're just making a single page site, there's literally no reason to use WP. I have a sneaking suspicion you're doing something fractally wrong here.

>standard picture size conventions
Just make sure the file size isn't huge and use css to size them responsively.

oh man

brb killing myself

Im trying to make a temp page in place of the wordpress thing that is here so I can ignore it for 6 months until the off season when I actually want to spend time on it.

Well the images come off my camera into lightroom at 6016x4016. What should I use as image size when I prepare them to be used on the web?

>What should I use as image size when I prepare them to be used on the web?

It depends on how much detail users need to get out of the image, but in general, you want them as small as possible without giving up image quality.

If you intend the image be quite large, you could probably cut them down to around 1000px longest axis without sacrificing much quality.

What's a web service for c# and is it possible to connect it to a standard web pages?

Thanks.

Web api project template in Visual studio is standard REST api.

dont do that

use your brain

help me /wdg/,

i want to get into .NET MVC but cant find a decent tutorial. I've been watching a youtube tutorial with a ATM Application, but stopped after 30 minutes because it just felt rushed and all over the place.

are there any good books, tutorials or videos out there?

Don't learn .net stay as far away from ms products as possible. If you want to do back end learn nodejs and or golang. .net market is oversaturated and all .net devs hate themselves

Fuck off semicolon hater

lol good luck finding a nodejs or golang job

Bumb

Try docs.asp.net/en/latest/tutorials/first-mvc-app/ . Also i hope you are using Visual Studio.
I am .NET dev and i am happy with myself. Mainly because i can use god tier language that is C# instead of shit that is javascript.

I make 350k writing js. Sure there are a lot of .net jobs if you don't mind working for slave wages. 35k a year in the bay area won't even be enough money to live in a ghetto.

Any lads familiar with any ecommerce platforms, such as hybris, ecommercetools etc. ?

>I make 350k writing js

lol

I bet you also have a mathematics degree and your dad works at Nintendo.

Is this code shit? Should I change it to a switch?

yeah it's shit.
you should change it to not hardcoded strings.