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

LAMP 101

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 81
Thread images: 9

File: LAMP-stack.jpg (22KB, 700x300px) Image search: [Google]
LAMP-stack.jpg
22KB, 700x300px
What's the current version of LAMP stack
>pic related

In 2006 I did this as a hobby but, I guess, I'm totally out of the loop by now. For example JavaScript is huge right now, and there are no Java applets or flash anymore.

How do I get on track when I want to re-instantiate this hobby, and become a dabbling full stack developer? What are must knows?
>>
>>58688701
linux, nginx, mariadb, php7
>>
it's still perfectly valid, but replace MySQL with MariaDB
>>
>>58688701
the lamp stack is still relevant, would change apache with nginx. apache is >>>/trash/ when it comes to handling dos attacks.
>>
>>58688751
>>58688772
>>58688779
Where does JavaScript fit in? Is it replacing php as scripting language?
>>
File: obvious.png (2MB, 2000x2000px) Image search: [Google]
obvious.png
2MB, 2000x2000px
>>58688833
>>
>>58688833
javascript is client-side, the server only handles them as data files, like html and css
>>
>>58688891
So you can say that it keeps away loads from my server?
>>
>>58688701
Try
http://www.phptherightway.com/
And
https://www.railstutorial.org/
I recommend the latter but either is good.
>>
>>58688833
knowing where php and js fit in and how they work would count as a must-know
better get on that

>>58688907
javascript files are served as regular files, they are not executed on the server, so yes
but don't get too excited about offloading server processing to clients, remember that client-side stuff can be modified by the client, if you make it possible for javascript scripts to abuse your server, clients might just do that
>>
>>58688916
I wasn't really good in php or say scripting anyways. So it wouldn't matter. I have a look on rails.

I really liked about web stuff that you can see your results immediately in the browser. It's kind of a thankful hobby as you see your results right after chopping something together.
>>
>>58688701
>platform-independant
>nginx
>mariadb
>whichever programming language you prefer (java, rails, javascript, c# etc.)
>>
>>58688922
So which part has js in the current stack?
>>
>>58688963
the "stack" only refers to server-side technologies
javascript is not one of them
>>
M O N G O D B
O
N
G
O
D
B
>>
>>58688701
>JavaScript is huge right now
you could write your own web server in node.js if you fancy it op or use jquery if you are a fat lazy idiot and want your webpage to download a few mb from google every time anyone opens it.
web dev is literally aids now i would stay away if i were you.
>>
>>58688969
So I could cut it out entirely? What's the fuzz about it then? Whenever I read about webdev job ads a huge proportion of the ad is about js. I don't get it ...
>>
DNR
Docker node react
>>
>>58688980
you could, technically you can run a website with just linux, nginx, and html
>>
>>58688980
I'm not saying that I want to become a webdev but I use these ads as reference of what to learn right now to not do a frames website of 2017
>>
>>58688983
From what I gathered from google node is replacing the php part having js as base language, right?

What's Docker? Reading about it is like reading a stream of buzzwords I can't really make sense of
>>
>>58689002
You run your server in a container.
Doesnt matter if it's on Linux or Windows or OSX or cloud, it works the same.
>>
>>58689002
from what i understand, node is like a browser-less javascript engine, so you can use javascript to make standalone programs

dockers like some kind of sandboxing thing, haven't really looked into it
>>
>>58689002
>What's Docker?
A "Docker container" kinda sorta is a virtual machine that houses a single application. For example, you create a docker container for Apache with PHP instead of installing it directly onto your system. Or a nodejs application with tons of dependencies that would conflict with your system installation or another nodejs application.

These containers can be configured and can be easily built and re-created.

However, using docker is another story. Nightmare syntax, bunch of problems and regular updates that break your shit.
>>
>>58689016
>>58689030
What's my OS then
>Docker running e.g. Windows
>Windows running Docker

>>58689030
A solution to create more problems it is? Why would I want to easily recreate my stuff? I'd have it on my server anyways?

>>58689024
node is a hacked browser without a browser? This doesn't sound very efficient, tho
>>
>>58689083
you'd know if you needed something like docker
>>
File: 1484183984106.jpg (65KB, 600x797px) Image search: [Google]
1484183984106.jpg
65KB, 600x797px
>>
>>58689130
I'm not saying that I'm knowledgeable. This guy, however, >>58688983 put it like it was another stack. This is why, I asked about it.
>>
>>58688980
js makes it possible to add some client side logic at the expense of bloat
request server data without refreshing page, drag and drop ui, cool graphs ...
>>
File: yolo.png (35KB, 1316x1152px) Image search: [Google]
yolo.png
35KB, 1316x1152px
>>58688974

It's webscale :---DDDd
>>
>>58689147
docker/node/react are the current "things everyone says you totally need but probably don't"
they're the hot new buzzwords so to speak
>>
>>58689149
So on a picture site I could do some kind of album viewer function in js, and the client handles it all on its own?

Drag and drop only within the browser or also from outside of it replacing a file picker?
>>
>>58689177
I've seen react and node in ads. I can't remember to have seen docker, tho. Another big thing is angular. Some, however, say 1.0 and 2.0
>>
>>58689197
idk about ads, i haven't seen them in years

ads are bullshit in general, don't try to learn anything from them
>>
>>58689183
>Drag and drop only within the browser or also from outside of it replacing a file picker?
Dunno about that
You can do whatever you want with dom elements tho. Also since it's popular there's a shit ton of libraries you can use so you don't have to write your album viewer, drag and drop function, filepicker etc from scratch if you don't want to.
>>
>>58689083
>Why would I want to easily recreate my stuff? I'd have it on my server anyways?
There are a few reasons, let's say:
- You are developing together with other people. You distribute your "Dockerfile" to these guys, they can set up a container containing your WHOLE application on their servers, virtual machines, desktop, laptop without touching any apache configs, etc. and they get it running within ~minutes
- You want to distribute your software to other people, similar to above
- You want to deploy your application to many servers. There are other ways of course (orchestration tools such as Chef), but it's a possibility
- It may also be used in research, reproducable research is a thing researches aim for especially in cs+statistics
>>
>>58689275
>- You want to deploy your application to many servers. There are other ways of course (orchestration tools such as Chef), but it's a possibility
Okay, most use-cases seem quite rational. But what's about this. Why do I need more than one server?
>>
>>58689294
Load balancing, for example. If you have a big userbase or are doing some big calculations you can easily spawn up a few AWS or Digitalocean servers and have your application run on all of them. There's some kind of way to automatically do and configure all of this but I haven't looked at it.
>>
>>58689294
>Why do I need more than one server?
to increase service availability in response to increase in workload, host database on different host than webserver or whatever
Also consider the benefits of developing on the same environment as in production
>>
>>58689317
>>58689334
Hmm... I won't need to worry of this, I guess. Thanks anyways.
>>
>>58688833

node.js is hipster garbage
The only advantage is when you're doing something largely I/O limited with extremely little serverside processing
>>
>>58689788
I'm running a node based API aggregator that gets daily 10M requests and does 100M outgoing requests. Most are XML based. It' bretty good and developing is a breeze.
>>
>>58688751
>>58688779
>php and nginx
are you on drugs?
>>
>>58689986

What would you use with nginx?
>>
>>58690002
Static content
>>
>>58690002
routing for your node microservice empire
>>
>>58690230
Expand, pls!
>>
>>58688701
Docker, whatever language you want, whatever DB you want, whatever server framework exists for your language.
>>
>>58690449
Then for production a load balancer in front of your docker container(s) and a CDN for static files.
>>
>>58690471
And throw in a reverse cache like varnish to prevent requests from hitting your server that often
>>
>>58690482
Can varnish cache multiple simultaneous requests before the first one even finishes returning data?
>>
>>58690513
It will probably keep the last one returned.

If your process are long enough that other requests arrive before you return, you probably need the cache at a lower point in your stack and use locks. Or move to a faster language (if that's the bottleneck).
>>
>>58689183
You can make a drag and drop file uploader fairly easily. Also don't discount using JS on the backend (node.js). That combined with web sockets (socket.io) allows for some cool apps with two way communication between client and server
>>
>>58688976
>use jquery if you are a fat lazy idiot and want your webpage to download a few mb from google every time anyone opens it.

You can host it locally, you know.

Also it's something like 100kb only, not multiple megabytes.
>>
File: 1268800683_55ed3de470_b.jpg (270KB, 1024x768px) Image search: [Google]
1268800683_55ed3de470_b.jpg
270KB, 1024x768px
OpenBSD/httpd/sqlite/Lua
>>
>>58689083
>A solution to create more problems it is? Why would I want to easily recreate my stuff? I'd have it on my server anyways?

Because not all servers are equal, and your app may be completely broken on the target server due to different config or a different environment.

It's the equivalent of killing roaches with an atom bomb, but with virtualization being huge and servers having 128 core CPUs today, it's actually viable.
>>
>>58691833
Don't forget its cached in every browser already so they don't download anything 99% of the time.
>>
linux/nginx/postgres/whatever fits your needs

>>58688701
>there are no Java applets [...] anymore
Java applets have already been dead in 2006, how is this new?
>>
>>58688701
The best thing about javascript is it totally filters out all of the degenerate criminals in society who block scripts.
>>
>>58688701
GLNP?
Ganoo/Linux Nginx Postgresql ????
>>
>>58688701
FEMP stacks (FreeBSD, Nginx, MySQL, and PHP) are easier to manage than, linux (with systemd) and apache stacks.
>>
>>58692413

>nginx with php
>>
>>58692467
It works fine, i have run some PHP frameworks on a Nginx server with a couple of configuration changes unlike Apache that requires a lot of changes to different files in order to work.
>>
>>58692467
>not running php as fcgi anyway and instead using php_mod, that is about 1% faster but has a lot of drawbacks
>>
people still use mysql ? i thought everyone switched to postgresql
>>
File: ?.webm (3MB, 720x404px) Image search: [Google]
?.webm
3MB, 720x404px
>>58692528
Apache consumes more ram but handles requests faster without hogging precious CPU.
>>58692780
Apache/php-fpm
>>
File: 1467502039470.jpg (127KB, 530x600px) Image search: [Google]
1467502039470.jpg
127KB, 530x600px
>>58691790
I've read about js a little bit today. A lot of people say it's a hackjob of a language. I'm dabbling in php so switching to js isn't an issue, desu, but is it smart do so?

Btw what happened to pearl? It was way beyond me back then but some people I knew really did some crazy stuff in it.
>>
>>58691880
So when I don't host myself chances are high that my site doesn't build?
>>
it's been replaced with the MEAN stack

mongo
express
angular
node

javascript all the way through
>>
>>58692012
I wasn't ahead of tech back then and I'm even less today as it seems. But I'm certain that some sites still used it which was a pain if you hadn't had Java installed.
>>
>>58695509
Express and angular aren't in LAMP, or?
>>
>>58695509

Gross
>>
Personally I prefer just Linux+Nginx or OpenBSD+httpd if I can avoid databases and PHP.
>>
>>58695953
wanna know how I know you're fat?
>>
File: 1441338055227.gif (312KB, 530x320px) Image search: [Google]
1441338055227.gif
312KB, 530x320px
>>58695509
>mongoloidDB
>shit framework for a javascript server
>some dynamically scoped bullshit with the worst backwards compatibility ever, let alone the spaghetticode it creates
>a fucking javascript server

The MEAN stack really is a disgusting pile of shit.
>>
>>58695101
Perl was harder to use with shared hosting so it lost a lot of popularity. PHP basically replaced it, which is super sad, because it was capable of things PHP is just now getting support for now. Its made a bit of a comeback in the last few years, especially in Japan.
>>
I'm a professional who needs to actually accomplish things, so I'm on the Windows Stack.

Windows Server
IIS
SQL Server
ASP.NET
>>
>>58695509
more like MEME stack
>>
>>58696294
How expensive is win server license?
>>
File: 1204367656566.jpg (46KB, 639x346px) Image search: [Google]
1204367656566.jpg
46KB, 639x346px
>>58688701
>LAMP
>Not FEMP
>>
>>58688701
Listen to me now. I may not be an authority on the subject but you really really need to think what kind of work you plan to do.

Is it for a big website or just your personal webpage?

For a big website you use either apache or nginx, and php or node.js. For small webpages lighttpd is pretty popular, but no so secure as darkhttpd, and php or node.js are ok but really at this point if you know perl is a good idea to use that already.

As for database, mariadb all the way.
Thread posts: 81
Thread images: 9


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.