[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ - Web Development General
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 255
Thread images: 23
File: .png (523 KB, 822x552) Image search: [Google]
.png
523 KB, 822x552
OLD THREAD >>53939563

> Discord
https://discord.gg/0qLTzz5potDFXfdT

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

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

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

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

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/

> How to get started
http://www.youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

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

>Challenge
http://pastebin.com/xshVcWjb
>>
Do I need Ajax if I learn Angular? I mean, I know some basics of Ajax and I can do it's changing of content without reload with Angular now.
>>
I did half of Codecademy Angular course and it already made me sick. That feel when it is kinda chaotic and I actually have to spend some time on it, and on the other hand, it is a meme technology and I'm just learning how to do something I already know in a new (somewhat better) way.
>>
>>53983939
I don't feel like I'm learning anything from CodeAcademy at all.
>>
>>53984046
That's true, but just to see what the technology is all about, it's decent. It helped me working with APIs the most.
>>
What's the best tutorial for Node?
>>
>>53983939
I found react/redux much more pleasant to work with. Could never get into angular.
>>
>>53983584
The main difference is that AJAX queries the server/database every time. Angular takes some of the load off the server by doing a lot of processing client'-side. Learn both if you have the time, because they serve different purposes.
>>
>>53984088
hlep
>>
>>53985193
You realize that's something you can test in less than a minute through, right?
It'll ignore "fid".
>>
>>53983400
I'm planning to start a PcPartPicker clone to practice and as a possible future full-time job (we don't have anything like PCPP in my country, and it'll be fucking huge to have a site like that).
For the past months I've been doing small-medium freelance jobs with Flask + Vue.js, and I think I'll stick to that stack.
Any recommendations for a site like this? Should I care about scaling right now or with a good caching system I'll be good? After seeing how stackoverflow handles its shit, caching sounds like a good option.
>>
>>53985271
That was an example you dense fuck. Of course it doesn't result in id = something. I was asking if there were characters that would still make it result like that.
>>
>>53985392
It was a fucking dumbass question to begin with. Fucking bellend.
>>
>>53985554
Well I'm fucking sorry for asking, wank stain. I hope I didn't improve your day.
>>
no matter what i do, i can't seem to open any of my ports with itables. i've flushed them and now only have this rule:

iptables -I INPUT -j ACCEPT

i'm using a Ubuntu server with digital ocean if it matters... using a port checker it still shows closed. At this point i'm not concerned with making tight rules just yet. I just want to prove to myself that it will just do what i tell it to do
>>
Advice on how to make this look less awful?

I think it might be best to put the "remove" button down in the bottom-right corner (on the same row as the smaller inputs), but that breaks most conventions on how to remove something. I could also place it next to the name button, since the input doesn't need to be that large, but that would be sort of awkward-looking as well.
>>
>>53986238
Firstly, give them some space to breathe and align them because it is triggering me. Probably make the boxes a liiiitle bit bigger and fonts a little bit lighter (like those on top). What is this grid alignment of the dropdowns? There is more space between the first two than between the last two. Spacings and line-heights are completely random. Black line between the forms makes me wanna kill myself. Maybe try to put a very light gray background behind the every form and make more space between them.
>>
>>53984496
God damn, all the tutorials are shit. Please link me something decent before I kill myself.
>>
>>53986406
I just fixed the alignment. For some reason setting the first to width: 33.333% is making it take up a bunch more space, but if I remove the width and just let flexbox lay them out, the animation to remove the price box when the listing is quote-only looks like shit. But for now I'll just have to deal with that.

I tried the light grey background. I think it looks better, but I really need to do something about that removal button.
>>
>>53984496
>>53986546
Tutorial: Don't use fucking Node.
>>
>>53986602
This or Rails. So?
>>
>>53986615
Use Rails.
>>
>>53986636
I'd like to, but setting all the VM on Windows 10 makes my head hurt. Too many different tutorials and ways to do it, don't know which one to follow.
But desu, knowing Node and Angular would possibly benefit me more in terms of jobs, and everyone is using it and talking you should use it. I don't know my mayn, too many memes in this field, feels bad.
>>
>>53986584
Remove margin/padding between the "Price" and the dropdown. I'd play with font color, I think that a little lighter black would be better. Play with the size of the "Remove" button, maybe make it a little bit smaller, also try to see how it looks like with just an "x" symbol. Go on Dribble or some other site, or just google good designs of web forms, soak up some inspiration and take the parts you like.
>>
I'm designing a website to solve Math questions and I have several different pages all with different questions. Should I create one huge JS file all with different ID's or create a single JS file for each individual page to avoid collision?
TLDR; making website with several pages better to use one big js file or several js files for each page
>>
>>53986766
To make it clearer: I have one page with just addition, subtractions etc in one page. I also have another with pythagoras etc. Should I put them into the same calculate function? And obviously attribute them to different ID's?
>>
Opinions on developing an application exclusively on a cloud ide?
>>
>>53986959
Cloud9 is good. The self hosted option though, I don't know about their paid hosting.
>>
Guise, I need some help
I've got this table (that gets it's rows added in via a button, but that's not important) that has 3 cells in each row
one has a checkbox, the other has the row number and the third has an input field

Now, I got removing the rows down (if the checkbox is checked pressing the remove button will remove that row), but I need help with "resetting" the line numbers

The line number paragraph does have a class, so I got the in an array
var st = document.getElementsByClassName("st");

Now, how can I change their text?


Or am I going at this the wrong way?
>>
>>53987737
bump
>>
I need more stuff like this. For everything.

http://www.codeupstart.com/project/build-kickstarter-with-python-and-flask

Shit I want a torrent. I might even consider working with Django instead of Rails.
>>
>>53987737
>>53987982
figured it out

You can do st[index].innerText to change the text value
>>
>>53988004
>they kickstart'd the whole series of videos
>after that, they are still fucking charging for the videos
what a bunch of greedy j3ws
>>
I think I am currently falling for the golden ratio meme. I kinda don't know how to fill the right (smaller) column though... It is still very wide and I just have related posts there. So one thumbnail and title + excerpt. I could almost fit 2 columns in there lol.
>>
Look what I found via Leddit.

https://masteringmean.com/about

Anybody familiar with this?
>>
Why is this thread ded?
>>
Tfw when you stare at your website and you finally get an erection because of the good design.
>>
Need some insights on this WebDev-y situation.

1) I'm a C/C++/C# programmer.
2) Did java, and academic lisp and prolog.
3)Did PHP(MVC, Smarty) + JS (couple external libs) + CSS3&HTML5.

4) Think WebDev is kind of a gimmicky thing. Because of the amount of new-age shitty JS to run your shit. I mean holy fuck compare wikipedia with some NodeJS website.
5) In need for advice because my friends wanna do the senior important ivy projects using Node.JS along with all the plethora of packages you can install with npm. And I was wondering if I should learn this new shit or rather learn other new shit that isn't mediocre.

What are your thoughts? if we were to say the paths of a software engineer are the following:

>>Ninja, WebDev, Apply Fag, Data Cruncher.

Then I would go with the first and the last in that list. With the first being good at, and the last being novice at.
>>
>>53986679
>But desu, knowing Node and Angular would possibly benefit me more in terms of jobs, and everyone is using it and talking you should use it. I don't know my mayn, too many memes in this field, feels bad.

honestly Rails is way more established than any of this other bullshit. Rails was in its meme phase in like 2010. it is no longer a meme.
>>
>>53986679
>setting all the VM on Windows 10 makes my head hurt.

why not also install linux? mac/linux is where it's at for webdev.
>>
>>53990600
I probably should. I'd rather use VM for now though. But as I said before, maybe I'll use Cloud9 for my next project, it was good last time I used it. Not the best solution but yeah.
>>
>>53990655

why do you want to use that stuff? I tried using one of those once (maybe Cloud9), and I hated it just because everything is so cramped. having your text editor and terminal stuffed in your browser sucks.
>>
Why is codeacademy made in such a way that breaking the test case with open-ended solutions and forcing a completed lesson is easier than actually solving the problem? I know the answer isn't right but it still passes me...
>>
Does anyone know of any good node.js learning resources? I've only ever used JavaScript, so I'm learning both how the back-end works and how node.js/express work for the first time together. Does anyone know any resources that are super beginner friendly and don't assume knowledge of the backend while teaching node?
>>
File: 1455559885367.jpg (192 KB, 2200x800) Image search: [Google]
1455559885367.jpg
192 KB, 2200x800
Can any of you sexy boys give me primer or some sources on how to easily spin up Drupal installations on a development server that is shared between multiple developers?

I am sick and god damn tired of having to do this shit manually. It eats up huge chunks of my time.

I want to be able to have one of the devs tunnel into the server and type something like 'vagrant up', and have the site automatically get set up.

Is such a thing possible?

Please help I am at my wits end
>>
>>53983939
I've looked at a few courses from them and they're pretty useless.

>Here's some code that does X
>Now write code that does X

They show you an example and tell you to make something that is almost identical, so there's no challenge.

Additionally, you can't finish the assignment if you even slightly deviate from the task. Didn't write it exactly as they wanted you to? Wrong. Even if you got the result using the right code, you're wrong. There's no creativity or flexibility allowed. Then it's over in an hour, unless you pay for more.

It's flashy and has a lot of mediocre tutorials for a lot of languages.But all in all it's a pretty shit site for what it sets out to do. Especially considering the wealth of free information that is already out there.
>>
>>53991565
I know you can create custom installers or something but its not commandline tho. Create some bash scripts for that probably.
>>
So I'm thinking about giving mongoose / mongo db a shot, but I'm really tempted to just go with mysql like I always do.

Speaking of mysql, is it possible for me to create a table and a database from my server-side javascript? i mean i can make it all myself via the command line mysql prompts, or with a .sql file, but it'd be cool if my app could check for the db/table and create them if not found.
>>
Spent quite a bit of time on this, incorporating feedback from people in this thread.

How does it look now?
>>
i feel like a hack;
when i couldn't get node and npm to update themselves, even after running some blog post advice i found somewhere, i just found the new versions of node and npm on my system and then forcefully overwrote my copies in /usr/local/bin or wherever.

but hey, it worked, because now shit compiles without warnings and -v returns what i want :D
>>
https://github.com/dbushell/Nestable

Any non-jquery equivalents of this? I need something that can handle trees, which will be written back to a database using the Modified Preorder Tree Traversal scheme.
>>
>>53990362
I think node.js sucks.

But eh, it is production capable. If you're half as capable as you say you are, you know you can make literally any framework work.

node.js should not hamper you in anyway, just git gud you know this shit already.
>>
>>53992383
Much better than when you started. The border around the description box seems a bit darker than the other boxes. Also, try adding border-radius to the boxes to give them a more curved look, I'm not sure if that will make it look better but you could play around with it to see if it does.
>>
>>53992233
>mongo db

not even once anon.
>>
>>53993445
mysql it is
>>
/wdg/, what VPS hosting company would you recommend with prices below Digital Ocean but with the ability to create 'team accounts' like DO has?
If I had to choose, I'd go all the way with Scaleway, but they don't currently support this
>https://community.scaleway.com/t/best-practices-to-create-company-wide-team-accounts/1953
>>
Is it considered kosher to reference global functions from inside of an angular controller (like using jQuery or any other custom defined function) or should I pass it in as a parameter somehow for good software design?
>>
Updating a database with potentially hundreds of thousands of queries at once. Using bulk statements:

INSERT INTO tokens VALUES
(v1, v2, v3, v4),
(v5, v6, v7, v8),
-- etc...
(vn-3, vn-2, vn-1, v2);


lets say I've got 500,000 of those to send in one gigantic bulk insert.

Is that bad?
>>
>>53983400
What do you guys suggest:
>odinproject
>freecodecamp
>bento.io
>>
>>53996271
500K is probably too much. I think that chunks of 10K or so would be better, depending on how stable your connection is.
>>
>>53997196
alright thanks. it's localhost so connection is perfectly stable
>>
Hey guys, I'm a beginner at web development here. I've been following the code.academy videos in the OP and have my own domain and server from hostgator.
My website right now is just a picture of dogs and I want people to be able to upload their own dogs. I've searched up on this and it appears I need to learn php as well. Now I am a little confused with this. I am using cyberduck to host my website's server, once I have all the php code, do I also put the php files there? I also have apache installed but I am confused if I am supposed to use both apache and/or cyberduck.
Does anyone have a link to a good tutorial to hold my hand?
>>
>>53996271
In practice, interacting with postgres, I found that while inserting multiple rows per query dramatically boosts performance, going above about 100 rows stops giving you any benefit in performance (but also no degradation).

For postgres, apparently there is no limit on query size in characters. But for other databases, there might, and it could be a limiting factor for you.
>>
>>53998285
http://www.w3schools.com/php/php_file_upload.asp
>>
>>53988004
>http://www.codeupstart.com/project/build-kickstarter-with-python-and-flask

dude ! I want something like this, "Build <project> with <tool(s)>" . It really makes me dwell more into said language/stack, and appreciate it more.
>>
What's a good database to use for images? Mongo apparently sucks for anything other than text.
>>
>>53998747
I recommend PostgreSQL for anything.
Yes, you can store binary blobs without any issues.
I don't know why you would do this instead of putting files into the filesystem and just storing paths in database. But you can.
>>
Are paid online courses like launchschool.com a good idea? Anyone with experience?
>>
>trying to make super simple script
>can't think
How do I overcome adhd without psychiatrist?
>>
File: halp.png (120 KB, 1920x1038) Image search: [Google]
halp.png
120 KB, 1920x1038
Hello everyone.
https://jsfiddle.net/a8qgm37x/
It runs fine at small resolutions (when i resize the window), but when i enlarge the window I see some annoying white borders. Why?
I'd like to know if it's my fault or it's just firefox.
>>
File: allfine.jpg (43 KB, 1625x672) Image search: [Google]
allfine.jpg
43 KB, 1625x672
>>53999774
Looks like firefox.
>>
File: allfine2.jpg (49 KB, 1627x663) Image search: [Google]
allfine2.jpg
49 KB, 1627x663
>>53999790
>>53999774
This one is with firefox.

Also I would recommend getting other browsers atleast for testing webs.
>>
>>53999790
>>53999804
>:(
At least my code was ok by itself...
While you're at it, would you help me to figure out how to set different front/back colors for individual tiles? Thank you a lot.
>>
var test =function() {
var testPrompt = prompt("asd");
if (testPrompt == "1") {
console.log("yay");
} else {
test();
}
};


Is there a better way to do this function without iteration?
>>
>>53999813
Okay i figured it out: in order to change individual colors i just added style:"background-color" to the div. Omg I'm a noob...
>>
>>53999859
you mean recursion
>>
>>53998747
Why would you ever want to store images in a database?
>>
>>53998938
>>54000030

filesystems are slow as fuck when all images are all stored in internal filesystem . and mongo does good with images (and any more media) when distributed) .
>>
free alternative to wordpress? No time to learn html by myself, this is for business.
>>
>>54000094

Drupal, Joomla, idk .I've never used them myself eh .
>>
>>54000094
hello pajeet
>>
>>54000085
>filesystems are slow as fuck
>somehow thinking it will be faster pulling binary blobs from a database
>>
>>54000216
If it's distributed over multiple machines, yes it will.
>>
>>54000255
Lol, just lol.
>>
>>54000298
Compelling arguments there anon.
>>
>>54000094
You're only digging a deeper hole for yourself.
>>
>>54000085
ur a dumbass bro
sure you need to keep all your images in memory to save a few microseconds for your dumbass website that only gets 10 hits a day
>not using an ssd
>>
>>54000332

whoa boy ... It will always depend upon the website. If the site has hundred and billions of hits everyday and you need high availability, then store it in the database. If you can count more in one hand than hits on your Indian blog site, then store it in the filesystem.
>>
>>54000374

No. All the high scale websites use CDNs, which sure as fuck aren't storing blobs in a database.
>>
>>54000302
Probably the most reasonable argument when unsure if trolling.
>>
>>54000442
How in your mind distributing your load over multiple machine will not lead to better performance?
>>
>>54000463
Databases weren't built to pull 200K or whatever bytes out of a single query.

Moreover, why do you think you cannot distribute a filesystem? Facebook's images are all on HDFS.
>>
>>54000482

huh for once, you're going to be FS-dependent ? which is more varying than DB compatibility with hostOS ? duh ?
>>
>>54000482
>Databases weren't built to pull 200K or whatever bytes out of a single query.
You made that up. Databases will serve as much as you ask.

>Moreover, why do you think you cannot distribute a filesystem? Facebook's images are all on HDFS.
Or you can distribute the database. Especially if your database is already distributed. Post that started this is talking about "internal" filesystems, which I'm pretty sure is supposed ot mean a filesystem that is not distributed over multiple machines.
>>
>>53999689
slap yourself in the face every time you get distracted
>>
>>53999859
 if(prompt()){test();}
>>
>I zip the wordpress theme
>upload it to cpanel
>somehow, it is an older version of my theme - different code

WHAT THE FUCK IS HAPPENING HERE AND HOW IS THIS EVEN POSSIBLE?????!!!!!
>>
>>54000984
Shit, fucking cache... Nvm, saw it on my phone.

I'll just off myself.
>>
>>54000518
>Databases will serve as much as you ask.

Not that guy you replied to but.. Yes, a DB can serve whatever you want assuming you don't go over the top. Surely you have to realize that it isn't always the best option. Storing an entire image in a DB is not good for efficiency.
>>
>>54001140
No, I don't realize that. I realized the opposite and my realization is supported by experimental evidence.
>>
>>53990362
Never use nodejs for tasks other than compiling assets (css/scss, js, images)
>>
>>54001287
>taking advice from anyone on /g/
Not even twice
>>
>>54000984
>Using Wordpress
ydi
>>
I signed up for a free coding bootcamp thinking it would be app development, but SURPRISE it's web design. I don't really care to do web design but if I want to stay enrolled until the app development course I have to complete it.

Web development seems like a huge pain in the ass, as it seems it's people chasing people chasing trends, which seems annoying as fuck. Confirm/deny?
>>
Anybody have any experience doing Web Dev in 2016 with Clojure? I want to play around with the language after reading Brave Clojure and I'm wondering what frameworks are hot (if any)
>>
>>54001713
Not necessarily. You have a lot of people, like myself, who are already comfortable with what they're working with so they don't fall for any of the memes. PHP, Python, SQL, and some Ruby is all I need right now and I'm okay with that. What really grinds my gears is people who champion other languages/frameworks as if they're fucking getting paid to do it. That's why you'll see a lot of "PHP A SHIT USE NODE" senpai.
>>
>>54001850
I don't champion any framework, I don't really care if more people use my preferred one (Django).

But I'll still shit on PHP during my free time.
>>
Has anybody here worked with Sails? I'm trying to decide on a backend framework for a university project and my professor suggested it.
>>
>>54001713
Something else I'm concerned about, with apps I imagine you are creating tools to help people with things (sounds rad as fuck) but with web design I feel like I'm just doing marketing (sounds awful)
>>
Hello, I'm the same guy from >>53999774
Could you explain to me why the container does not contain the divs? https://jsfiddle.net/8Lgomabz/
>>
File: relational-to-big-graph-23-1024.jpg (105 KB, 1024x576) Image search: [Google]
relational-to-big-graph-23-1024.jpg
105 KB, 1024x576
I need advice.

I built a web page using Django and postgresql.

PostgreSQL has served my needs just fine, but now I've reached a point where I believe the best way to solve a problem is through using a graph. Graph as in nodes with edges, relationship inbetween each other.

I want to use a graph structure to tag images, to describe it's content.

Consider picture related, and the simple graph. This graph describes a picture very well, moreso than a flat tag set would.
[Anna, Frank, Car] could have relations.

PostgreSQL is a relational database, and doesn't handle this type of structure as well as e.g neo4j.

What do I do?
>>
>>54000302
Wnat arguments? Filesystem is faster than databases. Hell, in the end databases also keep their data on disk so there is less difference than you think. Also disk storage is cheaper than database storage (resourcewise). Btw using distributed databases is not for making database faster, it's for keeping performance under load and it actually makes overall performance worse because you need to manage distribution.
>>
>>54003028
You start using database that's meant for graphs, or you start using that database in addition to postgre to support your graph data.
>>
>>53991717
Look I'm not disagreeing with you but I think it's a good introduction TO an introduction.

I wanted to get into web dev. Codecedemy helped me get a very small taste of it.
>>
>Want to try Ruby on Rails
>Fucker just shits errors everywhere with installing json over 1.8.1
>This has been an issue over 2 fucking years
>It's STILL NOT FUCKING FIXED

What the fuck I'm even supposed to do? Error 1, exit code 2 nobody has any fucking answer anywhere.
>>
I've got a nodejs problem

https://gist.github.com/anonymous/31...37634e8107a0d5

I can't seem to wrap my head around mongodb, or something. Seems like I can't connect to /find. The terminal gives me this

GET /find?book= - - ms - -
GET / 304 831.251 ms - -
GET /stylesheets/normalize.css 304 12.545 ms - -
GET /stylesheets/foundation.min.css 304 15.928 ms - -
GET /stylesheets/font-awesome.min.css 304 23.697 ms - -
GET /stylesheets/main.css 304 33.489 ms - -
GET /javascript/jquery.min.js 304 36.940 ms - -
GET /javascript/foundation.min.js 304 48.863 ms - -
GET /javascript/main.js 304 0.823 ms - -
GET /images/berks2.jpg 304 2.573 ms - -
GET /find?book=k - - ms - -
GET /find?book=k - - ms - -


This is too much
>>
>>54003472
Use something else. Rails is ded

Try Python and Django. Or Node.
>>
>>54001686
There is always this guy that trashes somebody because he uses Wordpress or any other CMS. There is nothing wrong with it. It just works and is a good option for specific cases. Go code it all from scratch in web assembly.
>>
>>54003637
Doing so, rails is utter dogshit and everyone has told me so.

Now I'm rageful at it and want to make it work.
>>
>>54003161
shit advice m8
>>
>>54003513
Your gist URL is malformed
>>
>>54000094
If it's for a business then you'll need to hire someone otherwise it's going to be complete and utter garbage. I hope you have at least $2000
>>
>>54000122
>Joomla
Top kek.


How much should I ask for a wordpress page? 200 euros?
>>
>>54000094
>refusing to spend money on your business
Not going to make it.

Also WordPress is free, as long as your time is worthless and you don't mind having your website defaced occasionally.
>>
>>54004105
Oh shit, didn't notice
https://gist.github.com/anonymous/31f34f8124ab4c52e137634e8107a0d5
>>
node.js bros, how do you structure your REST API's? my shit looks something like this:

---server.js
---app.js
---routes/
------| todos.js
------| faggots.js
---controllers/
------| todos.js
------| faggots.js
---models/
------| Todo.js
------| Faggot.js

the routes route to the controllers, and the controllers manipulate the models (which are just db's schemas without any logic).

but i find that the problem is that my exported controllers functions all have to be express middleware (req, res, next) and this makes my business logic very much coupled with express.

how do i seperate this?
>>
>>54004306
Your get() function in find.js is pointing to "/" not "/find".

Though I can't say I care for the standard generated express app structure, there are less gay ways to lay out a node/express application
>>
>>54004410
But that wouldn't really matter when I've pointed it to /find in my app.js, right?
>>
>>54000122
Tried Joomla earlier today and got stuck up on the installation. I've got a slightly better understanding of the server format and all so I might have an easier time trying again tomorrow. Never heard of Drupal but I'll look into that too. Thanks my man.

>>54004295
Someone also said it's free in reply to my post in the stupid questions thread. Thought he was just playing semantics but I guess not. Will take a closer look tomorrow, all I could see today was a 30 day free trial and then a paid monthly subscription.
>>
>>53986602
why?
>>
>>54003642
I will when it's ready and supported
>>
>>54004572
Well your route is fucked somehow.

I'd really consider dropping that convoluted express boilerplate layout tho. I'll post in response to >>54004392 about a much simpler way to lay out node/express applications when I get home
>>
>>54003642
You know that the Panama papers were leaked because an outdated insecure WordPress slider plugin gave the hackers access to the server?

WordPress: not even once
>>
>>54004831
>outdated
>plugin
not Wordpress' problem
>>
>>53986602
I'd like to know >>54004644

Is it deprecated already?
>>
>>54004831
>implying I'm using plugins

I do everything I can by myself though.
>>
>>54000085
>filesystems are slow as fuck
NTFS is, but Linux FSs are faster than any DB. There are also distributed FSs.
>>
>>54004976
Node is fine, if you don't adopt the left-pad mindset.
>>
>>54004977
>using WordPress
>not using plugins

Literally what is the point then?
>>
>>54004957
>this is what WordPress devs actually believe.

It must be nice having your platform built on the principal that every problem is someone else's fault.
>>
File: appchan and midnight caek.jpg (350 KB, 1920x940) Image search: [Google]
appchan and midnight caek.jpg
350 KB, 1920x940
I'm using Appchan X with the "midnight caek" scrip as well. Only problem is, the midnight caek script seems to add some padding to the left, which makes it so I always have a tiny bit of scrolling to the right, and it doesn't go away even if I zoom out to the extreme. Any idea what could be causing this?

Pic related. I know my basic javascript/html/css code, so if I could just change some numbers here or there, I'd love to know what I should be looking for
>>
Is there any reason why cant I do single page apps with just html5 pushstate api and vanilla js? Do I have to use those meme frameworks like react, angular etc?
>>
>Current version: 5.6
>Next version: 7.0

PHedoPhiles will defend this.
>>
>>54005358
Last time I checked /g/ was pretty fanatic of loonix and freetard software
>>
>>54005488
Of course not.
>>
>>54005300
A whole post and user management system maybe? If I build a news portal like I'm doing it now, why the fuck would I reinvent the wheel? Are you guys trolling or have no idea what you are talking about?
>>
>>54005358
Not that guy, but you implying someone is a wordpress developer just because he built a couple of sites on it makes me laugh out loud. You should use the best tool for the current problem.
>>
it's amazing how unreliable, inconsistent and nonsensical javascript's typeof is, god damn I hate this language so much
>>
>>54003642
Wordpress causes more problems than it solves.
>>
>>54006647
Seems fine to me, what exactly are you using it for?
>>
Can someone explain this Javascript array syntax to me?
array[var1](var2,var3);
>>
>>54006934
see >>54006921
>>
>>54001713
I make money hand over fist and I just had basic web dev skills in angular walking in. Abundance of work out there for it. Do it
>>
>>54005488
You're going to rewrite what's already been written better than you can write it. Your code is going to be less maintainable. It's overall going to be inferior, so unless you're doing it for fun, I would advise that you don't waste your time
>>
>>54006647
It's perfect, you're doing it wrong
>>
>>53994414
>prices below Digital Ocean
>below Digital Ocean
bitch, how fucking cheap do you want a server for?!
>>
>>54006251
There are less bloated solutions that give you that but lack the wp plugin's ecosystem, which is, again, the only reason someone would use WP.
>>
>>54007085
Do you really think you are paying for servers on DO? You are paying for the whole infrastructure and ease-of-use. You are paying to use their API to easily setup and destroy droplets. If you are NOT going to use those features, you're wasting your money.
Comparing "same" hardware against other hosting companies who don't provide those kinds of services, it's easier to see this:
>https://www.scaleway.com/
>https://lowendbox.com/

I could start searching for a VPS hosting without all the bells and whistles myself, or I could give /wdg/ a good use for once.
>>
>>54006647
What you don't want the string "4" and the number 4 to be added together to form "44" Are you retarded or something?
>>
>>54006312
>You should use the best tool for the current problem.
I don't currently have a problem that requires me to install a remote access shell for script kiddies on my server.
>>
>>54007586
that isn't to do with typeof, that's to do with javascript's dynamic typing and the fact that + is the addition and concatenation operator
>>
>>54007882
I-I'm just pretending to be retarded! H-haha! I develop in COBOL all the time !!
>>
>>54004763
*le crickets*
>>
>>54004392

You got your basic layout like dis:
-lib/
---whatever.js
---another.js
---routes.js
-app.js

And that's it.

>lib/
different JS files go in here, each separated into specific concerns as per your choice. Each file is structured in such a way so that your business logic is disentangled from the node routing function requirements with the req and res objects.
// business logic
function businessLogic(whatever) {
//business goes here
}

function businessPromise() {
return new Promise(function (resolve) {
resolve('business');
};
}

// http interfaces for your business functions
httpBusinessLogic(req, res) {
res.send(businessLogic("bleh"));
}

httpBusinessPromise(req, res) {
businessPromise().then(function (business) {
res.send(business);
});
}
// export whatever
module.exports.http = {
businessLogic: httpBusinessLogic,
businessPromise: httpBusinessPromise
};


Then you have routes.js which exports a function into which you pass your 'app' object and attach all of your routes to it in a very clear way:
const whatever = require('./whatever');
const another = require('./another');
//etc etc

module.exports = function (app) {
app.get('/business', whatever.http.businessLogic);
app.get('/business/promise', whatever.http.businessPromise);
app.post('/blah/create', another.http.create);
app.put('/blah/update', another.http.update);
// etc etc

return app;
};


Then finally you have app.js as the root of your node application, and you simply create an app object from express, throw it in the function that is returned from routes.js, and then run a server on it.
const express = require("express");
const app = express();

require("./lib/routes")(app).listen(3000);
console.log("Server is running");


I think this is far less convoluted and gay than the standard express-generator boilerplate.
>>
>>54007937
Sorry for the delay, I was playing a game.
>>
>>54008142
for a large app, this will get real messy real quick
>>
can someone advise me?

I was doing pretty well with my web. dev. knowledge for front end, but I didn't use it for a while and now I don't feel prepared for a junior dev. job.

Now, atm I hate my job and it pays terribly. Should I look for a job in web dev. as a front end dev. or apply to other jobs while I hone my skills more?
>>
Anyone using Docker? Should I be reusing my database containers for multiple projects? Say I have two projects using the same type of database. Would they both connect to the one docker container or separate?
>>
>>54004592
Look at wordpress.org and not wordpress.com

The .com site hosts it for you and provides a few other things.
>>
>>54007714
You have to do a blog/website for someone quickly. He will need some content management system. What do you choose then?
>>
I bet he says Django, watch.
>>
>>54009565
Practice in your free time until you feel comfortable enough to land a job in web design*
>>
>>54010255
Ghost.
>>
Anyone use Flask here?
I've got a before request handler where I make a connection to a TCP server and cache some data, however, everytime I attempt to fetch the cached get in the request handler, it keeps returning None, as if it didn't cache it at all. I'm using Flask-Cache w/ the SimpleCache mechanizm.

My code looks something like this:
@app.before_request
def something():
status = cache.get('status')
if status is None:
# make socket connection
# fetch some data and store it
cache.set('status', True if len(data.something) else False, 120)
>>
>>54010731
Flask here, never made it work with the Flask-Cache thou.
Aren't you missing a decorator for the cache?
>>
>>54010794
I use the cache decorator to cache my views, but here I manually interact with the cache object.

Also is there any reason why would I want to use Redis/memcached over SimpleCache? It seems like another layer of abstraction for a cache server would actually be slower than a simple dictionary when using SimpleCache.
>>
>>54010844
Probably those are better options if you are running multiple instances of your server, and you want a reliable way to share the cache among them. Don't take my word on this though.
>>
>>53983400
http://www.sumtingwong.tech
how do I make a box around the "memes" that's like the box around "startpage"
>>
>>54010922
Get out
>>
>>54011145
nou
>>
>>54010794
Okay, since you said decorator, I actually tried to give it a try with a decorator. So I moved my logic into a separate function and used the decorator with key_prefix argument but the same thing happens, the function gets executed with every request and the result is not cached at all.
>>
So my company needs an SEO consultant for a short term project, the pay should be fairly good. Do you guys know anyone reliable? Discretion is required, they may be asked to sign a NDA.
>>
>>54011535
I can.
However I will use any opportunity I have to remind everyone that HR is useless and should be pruned.
>>
>>54011567

Sure thing. What's your skype?
>>
>>54011677
>Skype
DO I need to lecture you about free software scrub?
>>
>>54011535
Me.

It's all in how you connect social media.
>>
>>54011685
You should probably lecture the interviewer. It's what he's using.
>>
>>54011702
The requirements probably differ from what you're used to in regards to SEO work. I'll be grabbing skype ID's, and screening people before palming them off to the interview. I figured I'd try to give a guy from /g/ a leg up.

TL;DR, What's your skype ID?
>>
>>54011747
Let me get home and see if they fixed their gaping IP leaking holes yet before I pos4 it.
>>
>>54012014
Well hey, fair enough, but this is pretty time sensitive. I'll check back on this thread when I can.
>>
ive generated some images into a table by using a for each loop through an array but now i want to make it so each image has a hover effect and some text appended over the image when you hover over each image

halp?
>>
>Wade Miley

pls get this fatty outta here. Him and Lind have gotta go.
>>
File: 6533CsI.jpg (111 KB, 800x800) Image search: [Google]
6533CsI.jpg
111 KB, 800x800
do you guys think it's best for a beginner to learn something like Node instead of Rails because it reinforces Javascript rather than introducing a new language (Ruby)? Or should that not be a concern?

pic unrelated thanks.
>>
>>54012683
Yes.
>>
>>54012683
Don't waste your time with node. You aren't going to get a job with "node.js" and no practical experience or a degree. Get yourself into LAMP or ASP.SEX CORE 1.0. If you go microshit, its new enough that you'll be able to razzle dazzle your way in pretty easily.
>>
>>54012729
>ASP.SEX CORE 1.0

what?
>>
>>54012729

not concerned with getting a job in the near future. just want to learn effectively.
>>
File: 1451726550158.jpg (237 KB, 500x511) Image search: [Google]
1451726550158.jpg
237 KB, 500x511
I currently have a single AJAX call to a webservice that calls a stored proc, a large stored proc that returns multiple elements used in the ui. Should I break this up into different ajax calls/stored procs? Some of the fields are like Full name, a section of data with dates, more text describing other things, ect. its just a huge cluster fuck right now. None of the fields in this returned set are ever used again anywhere else in the application. Thoughts?

tl;dr; when to break large set of returned data from an ajax call to multiple calls/returns?

Pic related. My face after seeing the code base for this project I inherited.
>>
>>54012752
ASP.NET CORE 1.0 it is what MS is calling their latest release.
>>
One of these projects have to make me money so I can just dev forever.

Eventually, hopefully.

It's all I want to do. Instagram was a trash idea in theory. Every social media site let you share images. Vine made sense, but not in the way it's used now.

I wonder how they started. Did they release to the app store and people chose it from the other apps just like them? Same thing with webpages. Facebook made since, but then again so did Xanga, but that was btfo by myspace for no obvious reason.

My ideas work in theory, but theory never seems to be relevant. The formula changes so much. but I don't think it's due to luck. No such thing.

Thanks, blog.
>>
>>54013220
Do you actually remember myspace? It was a shit box circa 2007. Everyone had custom aids (html) and sound clips. Facebook was cleaner and "invite" only. Also Facebook was great for actually making connections and such back in 2008/2009. Now its just a cleaner shity myspace filled with memes.

Instagram took off because of the filter. Do you not fucking remember anything?
>>
anyone know a library or something that will return a short summary for a given value? e.g. 'Google AdSense' might return something about what it is
>>
>>54013326
I remember everything. I remember that everyone made fun of the instragram filters besides teenage girls. I remember that in 2007 myspace only allowed CSS and not HTML. Yes, facebook made sense because of exclusivity and everyone wants to feel VIP.

None of this changes anything.

Do you remember that one shitty website spammed everywhere years ago? The my yearbook or whatever that no one used? Did you know that was a brother/sister team and they still make millions a year? That's nuts.
>>
>>54013472
No. You could write it pretty quickly though by scraping the first sentence of wikipedia articles.
>>
>>54013478
classmates.com ? From like 2000?
Good for them. I wonder if they'll see a drop off when the older generation passes away.
>>
>>54013508
Doubt it. High school was the wonder years for many people. That demand will only fall if a competing site release and has instagram filters.
>>
>>54012650

anyone?
>>
>>54013637
Need more info.

Text over image on hover is easy. https://github.com/danthom88/Image-Credit-Overlay for something I did recently that puts text over an image.

Store what text you want in the db where you store the image path. While loop through the row and echo your images wrapped in classed divs.
>>
>>54013739

its a for each loop and im using a variable that points to the source file inside an img tag

how would i add hover text using a variable so that the text is assigned to the right image? im probably sounding confusing. err... I just dont' wanna hardcode everything
>>
>>54013902
Nothing you're saying makes sense assuming you know how to web dev. Show some code.
>>
>>54013077
Is there need? Like do you need any of the fields separately? Or is it optional? Requests are resource and you shouldnt waste it on separating call that doesnt need it.
>>
Hey brehs. Is Django a good web framework for beginners in web dev? I already know a bit of python - enough to make a useful object oriented application that isn't pure spaghetti code. I want to work with python in the long run, but all the Py positions in my country are django/web dev, which isn't a problem for me, outside of the fact that I'm just starting to use it now.
>>
What is the point of sass? Isn't it just another layer of hipster bullshit.

I never thought nesting was an Issue with CSS, I thought it was clear and logical: .hello .yes { .

But no I must indent it on another line like HTML? Just to end up with the same result.
>>
>>54014856
Also this shit I read "have you ever had to open up the calculator app to figure out a column width in a multi-column design? Sass fixes that!"

No retard I have an actual calculator on my desk.
Also maybe I'm strange but I use excel to plan column widths and layouts and find it very suited to this if you have an experience with formulas. And I enjoy it.
>>
File: gfhj.jpg (15 KB, 295x369) Image search: [Google]
gfhj.jpg
15 KB, 295x369
how to use a loop to spit out images like this?

see pic

im stuck at the part getting to the next row
>>
>>54014907
x=0;
while {
if (x = 0){
<div class="row">
}
<div class="col-xs-4"><img src=" ' +img+ '.jpg"></div>
if (x=3) {
</div>
x=0
}
}

psuedocode. get it?
>>
>>54015049
forgot the x++ but you can figure out where that goes.
>>
>>54015049
also if x=2, not 3. drinking a bit.
>>
>>54008871
It won't. Everything is separated by concern, and all routes are clearly laid out. Also not every lib/ file has to have a http interface.

Also we have plenty of large apps at work that use this layout.
>>
>>54014907
also i hope you arent the person that leaked their idea in a thread last week. I just assume people won't follow through, so...
>>
how did you learn to think programatically?
>>
>>54012729
>Don't waste your time with node. You aren't going to get a job with "node.js" and no practical experience or a degree
I did. And I got paid more than any php position was advertising for.

Stop giving shit advice Pajeet. Learn what you find interesting, someone will pay you to do it.
>>
>>54015049

how would i do this with a Razor C# for each loop?
>>
>>54015181
at a young age on ritalin.

Everything in life is a series of nested conditionals. it sounds autistic, but think about it.

>>54015240
use a while
>>
>>54015049

what should be in the while ()?
>>
>>54015491
i=0; i<myarray.length; i++
>>
>>54015049

this is what i have so far. not working.

var images = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];

while (x = 0; x <= images.length; x++) {
if (x == 0)
{
main.innerHTML = "<div class='row'>";
}

main.innerHTML = "<div class='col-xs-4'><img src='images/" + images[x] + ".jpg'></div>"

if (x % 3 == 0)
{
main.innerHTML = "</row>";

}

}
>>
var images = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
var x = 0;
while (i = 0; i<= images.length; i++) {
if (x == 0)
{
main.innerHTML = "<div class='row'>";
}

main.innerHTML = "<div class='col-xs-4'><img src='images/" + images[x] + ".jpg'></div>"

if (x == 2)
{
main.innerHTML = "</div>";

}
x++;
}

>>
>>54015611
err...change the x's in the conditionals to i

I missed that part
>>
>>54015620
disregard
>>
>>54015611
>
while (i = 0; i<= images.length; i++)

do you even know js
>>
>>54015611
and in the if (x==2) at the end set x back to 0.

Actually I would probably do if (x ==2 || i == images.length)

Just in the case you don't have your modulus 3 = 0 or however people say that.

Make sure you include the bootstrap cdn or none of this will work.
>>
>>54015665
Yes, 16 years worth. This could be any number of languages I know so I'm just throwing out a similar syntax to what was given.
>>
File: tfw bad at maths.png (82 KB, 632x569) Image search: [Google]
tfw bad at maths.png
82 KB, 632x569
>>54015693
oh
just wondering because you have some really basic beginner errors in your code
i think i fixed it though

var images = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];
var html = "";
for (var i = 0; i < images.length; i++) {
if (i % 3 === 0) {
html += "<div class='row'>\n";
}
html += "\t<div class='col-xs-4'><img src='images/" + images[i] + ".jpg'></div>\n";
if (i % 3 === 2) {
html += "</div>\n";
}
}
html += "</div>\n";
main.innerHTML = html;


does this do what you want
>>
>>54015735
I didn't want anything. I was helping the other person.
>>
>>54015780
i thought you were him
sorry
>>
>using while loops
>using for loops
>using synchronous blocking code
Not going to make it.
>>
>not rendering the whole thing on the server
>>
>>54015735

that doesnt work the images aren't 3 across
>>
>>54015881
>not using JavaScript on your server
>>
File: smallbasic_adjust2.jpg (102 KB, 1000x814) Image search: [Google]
smallbasic_adjust2.jpg
102 KB, 1000x814
Why not learning C# as modern web developer?

- xamarin for applications
- unity3d for games
- asp.net core for websites, services, game servers, mobile api, ...
- azure for cheap and easy hosting
>>
>>54016590
>xamarin
Useless
>unity3d
Useless
>asp.net
Oh boy, microshit
>azure
Oh boy, more microshit
>>
>>54009670
thanks my man
>>
File: jstips-header-blog.gif (1 MB, 1600x700) Image search: [Google]
jstips-header-blog.gif
1 MB, 1600x700
> modern web developer and not using:

cordova -> mobile applications
express -> websites, api, game servers
amazon -> cheapest hosting
>>
>>54016669
Anyone who uses javascript to manage game servers is a fucking moron.
>>
>>54016657
- Xamarin is not useless at all if you have to create multiple cross-platform and stable apps by month.
- Microsoft hosting is pretty good and very cheap.
- Unity3d is in high demand and works perfectly with azure.
>>
>>54016701
Actually is nodejs who has official javascript api.
I don't think that java or c# is better to handle game server logics.
>>
>>54016590
Agreed, learning C# and ASP.NET MVC right now. I've always liked C#, it's like C++ done right. Blown away by Visual Studio to be honest family, IntelliSense just werks without doing anything with jQuery, Angular, etc, it has Bower integration, and more things I'm slowly discovering. By far the best IDE I've ever used.
>>
How significant will Ubuntu 16 LTS be for web servers? Any major differences to Ubuntu 14 LTS?

Final release is scheduled for a week or two from now I think.
>>
What's the ASP .NET MVC alternative in Java world?

Javas Web Server rocks?
>>
>>54017885
Not knowing java, but I believe Spring is pretty popular.
>>
>>54017901

I found too many resources about Java Spring.

I'm thinking to trade ASP .MVC by Java MVC Tecnology (Spring, maybe). It's a good trade?
>>
>>54014592
If you can choose one, Flask.
Else, sure, stick to Django if that puts weaboo shit on your desk -- I mean, food on your table.
>>
>>54017978
C# >>> Java. Also .NET core is bringing massive performance improvements. Also it's platform independent killing off greatest Java advantage.
>>
>>54016725
Of course not. C++ or Erlang.
>>
File: Capture 16.png (42 KB, 1605x964) Image search: [Google]
Capture 16.png
42 KB, 1605x964
Please only answer in relation to html/css. I want my website to be as it is up top-left. Currently I have it so using the <ul> tag, withthe image being included in the list. How can I make it like this (with the image beside the rest of the elements) without having it included in the list? The reason I need to use an alternative method is that I want borders around the link elements and can't do so without also putting a border around the image/logo (I already know a bit about the div tag and giving specific elements IDs - admittedly not much however - and I can't get it to work no matter what I try). Any ideas? I can post screenshots of the relevant parts of my html/css files if necessary. Thanks lads.
Thread replies: 255
Thread images: 23

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.