[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]

Good alternative to PHP ? I fucking hate that shit. Is flask

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: 41
Thread images: 3

File: php.png (43KB, 1184x742px) Image search: [Google]
php.png
43KB, 1184x742px
Good alternative to PHP ? I fucking hate that shit. Is flask any good ? http://flask.pocoo.org/
>>
>>59153837
http://tcl.apache.org/rivet/html/hello_world.html
sudo apt-get install libapache2-mod-rivet
>>
Node.js
>>
flask is good
>>
Pyramid
>>
>>59153837
Python, php, or homelessness.
>>
>>59153837

Node.js
>>
openresty
>>
https://golang.org
>>
>>59153837
Nose.js
>>
>>59153837
yeah Django and Flask are both light years ahead
>>
HACKlang

/thread
>>
BCHS
https://learnbchs.org/
>>
>>59153837
node seems to be taking over from the job listings I've been seeing. Node market share is up, rails and django are way down
>>
Node or ASP.net.

I hope that Rust will work eventually.
>>
>>59153837
flask is good for small things, but can be painful to scale.
>>
File: cb9.jpg (49KB, 600x801px) Image search: [Google]
cb9.jpg
49KB, 600x801px
Not bait, just an super old fag here who uses php in 2000-2001-2002 and never programmed again: why /g/ hates it? Serious.
>>
>>59154258
Holy shit that looks promising
Unfortunately I really can't into C,
Would you (or anyone) know something like this for other langs?
And with that I mean:
ORM, validation & request routing on the backend
JSON transport
Everything else on the frontend
>>
>>59153837
Javascript
>>
>>59153837

Something you will learn after toying around with other languages for a while is that there's nothing _really_ wrong with PHP. Yeah, it has all this weirdness, but it's weirdness that you're already familiar with, and you'll find that as long as you're not the stereotype who writes SQL injections with concatenation (which, by the way, is possible in any language), PHP is a very serviceable language.

Honestly, with all of the improvements that have been going into the language since 5.3, I dare say it's a modern language too. If you haven't used namespaces or managed your dependencies with composer, you're missing out.

If you're still not convinced, consider the fact that Python is STILL experiencing growing pains from 2 to 3, while the PHP 5 to 7 upgrade has mostly been painless, with minimal breakage.
>>
Go Node.js or go back to India.
>>
>>59153837
Lily: http://lily-lang.org
>>
>>59154017
>>59154092
>>59154281
>>59154805
>>59156038

NODE IS NOT A REPLACEMENT FOR PHP

PHP uses the traditional CGI model. The webserver defers to it, the CGI program does its thing and builds the response, then returns it to the webserver to display. Node is not that. Node essentially has you building your own specialized HTTP server for handling requests.

Now, it is true that the CGI model is slower. But the thing the node.js trend-hoppers don't seem to understand is that for 99% of things, you don't actually NEED to build your own HTTP server. In practice, properly configured, the traditional CGI workflow is fast enough.

There's a bigger plus, though. CGI gives you isolation between requests. You write your code sequentially, but it doesn't matter because every request operates in its own isolated process. With Node.JS, you get none of these affordances, and any blocking call wedges EVERYTHING, forcing you to write code in a sisyphean asynchronous style, which maybe the language will actually have meaningful support for in ES2017.

What do I mean by "meaningful support" for async? For all the shortcomings of Go, asynchronous code is something that Go got very, VERY right. You write code sequentially, shove it in a goroutine, and get on with your life. The default webserver has every request in a goroutine by default, and if you actually need shared state, just use a fucking channel or a mutex.

Even still, for non-trivial web applications, I wouldn't even pick Go. Because for 99% of things, you don't actually need the power of building your own HTTP server. If you just need something nice-looking that's front-end facing, build it in PerubythonHP and save yourself the headache. Save Go (or node I guess if you insist) for the back-end, in cases where you actually need massive concurrency and shared state - which again is not the case for 99% of things.
>>
>>59156351
PHP is only language could fit on ultra cheap, dead brain deploy web services.
>>
>>59154258
>hipster free
>php is a joke
>node is a joke

sounds pretentious [spoiler]yet close to the truth, will try[/spoiler]
>>
>>59156395

My point extends to any other language that uses the traditional CGI model, like Perubython.
>>
>>59153837
D with vibe.d

http://vibed.org/
>>
>>59156351
ur a fag
>>
>>59153837
yeah, flask is pretty nice
>>
>>59155579
Code Bootcamp graduates were told it was a "fractal of bad design" and that they need node.js instead.
>>
>>59156430
tv fag detected
>>
Can someone tell me why there's two billion web frameworks, web "languages", and web libraries?
>>
>>59155908

>as long as you're not the stereotype who writes SQL injections with concatenation
I'm a retard, how are you meant to assemble a dynamic query?
>>
>>59160181
Something like the following:

$stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)");
$stmt->bind_param("sss", $firstname, $lastname, $email);


Copypasted from https://www.w3schools.com/php/php_mysql_prepared_statements.asp. I don't write php but the basic idea applies in every language.
>>
>>59159134

I would say there are a few reasons:

1) Web dev is still immature. All computer science and programming is immature, but web was very much the wild west just a few years ago.

2) web is where -- by far -- the greatest velocity of development has been occurring for the last few years. For example, people realizing that Javascript is actually pretty powerful, and learning how to take advantage of that. We wouldn't have the current trend of functional features making their way into C#, C++, etc. without the popularization of 'modern' Javascript.

3) #2 combined with the low barrier of entry means that people hop from framework to framework, based on solving the latest trend of issues. I'd say that most people are onto a new stack before they've even become truly competent in the previous hot stack.
>>
>>59153837
Node w/ ES6
>>
File: killthema.png (161KB, 535x422px) Image search: [Google]
killthema.png
161KB, 535x422px
>>59160509
>1) Web dev is still immature. All computer science and programming is immature, but web was very much the wild west just a few years ago.
The only way for the web to mature is to die.
>>
>>59153837
>hating php

you should kill yourself fucking faggot
>>
>>59153837
C#

Everything else is cancer.
>>
>>59153837
you can use flask just for smaller web projects/apps for anything bigger is useless, you need django for that

i am developing in node for last 4 months and i am suprised AF... shit is FAST
>>
>>59163195
I like using C# but I would not use it for anything web related
>trapped in Microsoft's ecosystem running Windows Server with nothing but pajeets for help
Thread posts: 41
Thread images: 3


[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.