[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
Alternative to php
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: 81
Thread images: 6
File: 1234324214324f.jpg (35 KB, 600x399) Image search: [Google]
1234324214324f.jpg
35 KB, 600x399
Unfortunately I'm working on project with php and im thinking about rewriting it in something else, it shouldnt take more than ~2 days. Any backend language that doesnt suck?
>>
Node.js
>>
Install gentoo, run batch scripts
>>
I do all my shit in C#, but that's just me.

You can host it with Apache
http://www.mono-project.com/docs/web/mod_mono/
>>
Use your custom server built with some libraries in a language you like. = most customizable shit ever
>>
>>54507969
django
>>
PHP is not that bad. Can you give any reasons, why you don't want to use it?
>>
>>54508126
>'4' - 2 == 2
>>
>>54508295
KEK
>>
Python + Flask
>>
>>54508295
Does that really work on node?
Fuck this is shit for babies.

Not even BASIC programmers are this retarded.
>>
Go + gorilla web toolkit + gorp or grom
>>
>>54508314
what does flask have over django?
>>
>>54508342
I don't really know Django tbqh, but Flask is dead simple.
>>
>>54508278
Well i dont like it, Im usually working with C and C++ web isnt exactly my forte so it might be that and OOP feels hacky and whole language design is meh, dont get me wrong i use it and i dont hate it as much as js but still would prefer something bit more sane. >>54508314
Ill look into flask
>>
>>54508455
And i love typed languages, dynamic typing always felt wrong
>>
>>54508359
Django even more, can be used by retards literally.
>>
>>54508136
formatting my laptop my, I forgot to back-up my shit.

Gentoo better be worth it, I keep hearing about it
>>
>>54508823
It is fun and really nice if you set it up well. Compiling does take bit of time but once you set it up nothing prevents you from surfing and compiling updates.
>>
>>54507969
Hahaha, fuck I feel you man. Spent about 2 weeks learning PHP to build my first web app. Watching tutorials etc. Come to find out that these videos only 4 years old are all deprecated and full of security holes.

This was while on break from an Aussie community college. My teacher recommended using c# in the .net framework using mvc but he's biased because it's what we've been learning for the last 6 months and I'm pretty sure windows sponsors some of the course.
>>
>>54509176
I know the language but well i hate it. Im thinking about Go or C# tho im not using windows. Asp net should work on linux as well tho.
>>
>>54509199
Do c# and post tutorials on youtube. Would be much appreciated.
>>
lua
>>
>PHP is shit
Yes it is very easy to write shit with PHP. Most don't follow proper practices. Most source online is old as fuck. I would say c# but than you're locked into their ecosystem. Python is babies first sjw language.

http://www.phptherightway.com/
>>
>>54509315
Yes i read it and my php code is fine thats not the issue. And yes you can write good code even with shit language but why would you do that? I have issue with language itself it has lots of insecure and deprecated crap, its inconsistent and syntax is ugly (tho this is my own opinion and not real criticsm) its like better javascript at least it can do math, kinda.

I dont like python either so it really is C# or Go maybe Java? Damn... Web sucks.
>>
>>54507969
There's a couple of suggestions I can give you, although they all have their own ups and downs.

>ASP.NET (C#)
Uses C# and the .NET framework, and is mostly focussed on OOP principles as C# was mostly meant as an OOP language. Downside is, it's windows focussed. You can use Mono as >>54508162 says, but take into account that Mono isn't a perfect .NET replacement.

>Java
Java servlets are Java's way of programming websites. It's a bit harder to get into than asp.net, as Java has a slightly more complicated way of defining everything. It also requires a specific server like Tomcat, or a more featurerich server like Glassfish. It isn't bound to Windows though.

>Python + some framework like Flask or Django
Python is a multipurpose multi-paradigm language, so you get to choose whether you want to go OOP or something else. Webframeworks usually focus on OOP usage though, in the form of an MVC structure. Python uses a different syntax compared to PHP, which might take some getting used to. However like Java and PHP, you're not forced to use one OS or another, and there's a lot of documentation available for it. There's the small issue regarding a split community over python 2 and 3, but unless you're doing something out of the ordinary, just stick to Python 3.

>Node.js
Effectively javascript for backend purposes. It works different compared to other languages, and that might take quite some getting used to. Node.js' biggest advantage is scalability due to the way it handles requests. It also might be more useful for socket programming. It's less useful for general websites though.

>Other languages (Ruby, Perl, Go)
Don't know these, except that Ruby and Perl have a syntax similar to Python.

As for strongly typed languages, C# and Java will fill your need. Python also optionally can be used in that way.
>>
Use JavaScript for everything
>>
You can also use node.js with typescrypt
>>
>>54509612
Does typescript fix js nonsense like 2 + '2' = 4? I mean, can it do proper math, comparison and whatever else is dictated by common sense?
>>
>>54507969

For the web: ruby. Hands down.
Look at it, love it, never look back.

You might want to do the following steps:
1) install RVM
2) install Ruby
3) take a few hours for a Ruby tutorial (i.e. RubyMonk)
4) Install Nanoc
5) Freak out about how easy it goes, notice the world is a nice place, play in the sunlight, become a code artisan get a hipster haircut
5) Come back and thank me
>>
node.js is the way to go mah nigga.
>>
>>54509551
>ASP.NET is Windows focused
You can also go full dangerzone and use ASP.NET Core on Linux with coreclr and everything.
>>
>>54509638

You might notice that the number 5 occurs two times.
Yes, I did this on purpose. :P
>>
>>54509638
Is that sarcasm?
I actually never used ruby at all tho language does seem simple enough to pick it up. Why is it better than lets say Go?
>>
>>54507969
>rewrite

Don't. It's a massive time sink.

Just suck it up and use PHP.
>>
>>54509647
I know, though that isn't exactly newb-friendly. Mono would be easier.
>>
>>54508295
>'4' - 2 == 2
but:
>'4' + 2 == '42'
>>
>>54509667

> Why is it better than lets say Go?

Go is something you need for heavy load concurrent distributed proogramming, i.e. something like facebook where you have A LOT of requests an so on.

Ruby is an all purpose langauge, so you can use it for stuff like scripting or general programming. It's frameworks are centered about the web though.

# run python from ruby
result = exec("python script.py params")

# get three files
["file1.txt", "file2.txt", "file3.txt"].each { |file| File.new(file, "w") }

# do a http request (one of many possibilities)
require 'net/http'
result = Net::HTTP.get(URI.parse('http://www.site.com/about.html'))

# countdown
10.downto(0) { |i| sleep(1) ; put (i = 0 ? "Allhu Ackbar! BOOM!!" : i)}
>>
File: ruby-rails-sinatra.jpg.jpg (15 KB, 357x169) Image search: [Google]
ruby-rails-sinatra.jpg.jpg
15 KB, 357x169
Ruby + Sinatra
or
Python + Flask
>>
>>54509800

I messed up the last line, sorry..

You should get an idea of it, though.
>>
>>54509800
Thanks!
Okay so ruby might be next, I've decided not to do the rewrite but for next project im gonna use something else. Syntax seems bit weird but at least there is no indentation nonsense.
>>
Check out Golang + Gin.
>>
>>54509866

Yes, everything feels wierd when you start something new. But you can get very productive with it and it's a great language.


I mean I'm not here to preach, it's definately no mistake to learn Python and hack the Django framework. There are also plenty of jobs for this.

Or node.js (where the cool kids are at theses days) is definitely also here to stay.

There's just a lot of nice things out there.
>>
File: baller.jpg (59 KB, 922x106) Image search: [Google]
baller.jpg
59 KB, 922x106
>>54509632
Yes.
>>
>>54509940
Oh, forgot to mention that '2' + 2 becomes 22. Just according to keikaku.
>>
File: js.jpg (49 KB, 576x402) Image search: [Google]
js.jpg
49 KB, 576x402
>>54509957

obligatory
>>
>>54509982
I wonder who thought this was a good idea.

Even '2' + 2 = '22' feels inconsistent, but when you go even further to '5' - '4' = 1 you just hit retardation.
>>
Node + typescript or Ruby + sinatra or Go + Gin ? Or should i check all? Know a bit of node and its js so meh.
>>
>>54510034
Oh wait if im going node typescript way dont i have to use some framework like Express? If so than fuck it.
>>
>>54509940
>>54509957
Should also be noted that once compiled, it will still work the same as JS does. It just tells you to fuck off in the editor.
>>
File: 1352748837641.gif (2 MB, 187x155) Image search: [Google]
1352748837641.gif
2 MB, 187x155
>>54509982
muh seids
>>
C#
>asp.net mvc if you are on windows
>asp.net core if you are on linux or mac
>great language, don't fall for the "it's shit cuz microsoft" meme

NodeJS
>fast and lightweight
>uses javascript, which is easy to learn
>great tutorials out there
>you can use typescript if you want static types

Python
>flask or django are the most popular
>easy to learn language
>very flexible

Ruby on rails
>only played around with this one, but i assume it's popular for a reason

Clojure
>if you are feeling adventurous and want to take on some initial challenge
>similar for the average OO programmer as dark souls is for the average candy crush player
>once mastered, it's really productive and fun
>>
>>54510097
it doesn't compile like that, so it wouldn't
>>
File: breismile.gif (3 MB, 280x250) Image search: [Google]
breismile.gif
3 MB, 280x250
>>54507969
>not being able to comprehend PHP
>not using the best language for web development in web development

Why not go with something shitty like .net or python then?
>>
>>54509638
ruby really shines for those small static website using nanoc or jekyll, first you don't have to worry about performance, and second the development is fast thanks to the language syntax and huge load of gems.
>>
>>54510425

>PHP
>best language for web development

nice meme
>>
>>54510425
Knowledge isnt an issue and obviously im still using it so gtfo and learn to read.
>>
>>54507969
Maven + Spring

lelelelele
>>
>>54508295
===
>>
>>54507969
java with spring boot
>>
C#

https://www.nuget.org/packages/FAP.dll/

Can be implemented in under 10 lines. The same guy also wrote a react js library for it, he seems to hate react js and is a little too up himself about it.
>>
>>54509982
>* == =
?
>>
>>54510462
Whats even the actual difference between dynamic and static websites?
>>
>>54509982
This never becomes a problem if you know what you're doing.
>>
>>54510679
Dynamic is when it changes a lot or as direct result to your input. Like shopping sites, or 4chan.

Static is when it always displays the same content and doesn't change often. Like blogs or homepages (of companies).
>>
>>54510951
You can cut meat with spoon as well, doesnt mean spoon is good for cutting meat.
>>
>>54508295
or maybe he is wondering why someone would subtract a number from a string
>>
>>54510679
Static websites are just html, sometimes a little JavaScript, but ultimately it'll always be the same until the author actually edits html files and reuploads them to the server.

Dynamic websites are different, content can be changed from the website and necessitates the use of a backend. This is actually surprisingly easy until you need SEO. You can set a dynamic website up for a noob and they'll never have to learn Linux commands like ssh and scp.

>>54510975
No, a good blog can be dynamic, it's dynamic for the author at least if he wrote a publishing function.

>>54510986
Smart man.
>>
>>54510951
this

in 3 years of using javascript i have never encountered something like this in real life, only when read about it in a blog and tried it out myself.

also, i'm not a jquery meme sitebuilder
>>
>>54510097
The entire purpose of typescript is to tell you to fuck off during design time, not runtime
>>
Personally, I'm a C45X kinda guy myself, but that all depends on what sort of OSd you're going to use.

I heard that Illizar (Dutch edition) is on the up and up, but can't attest to it myself. They used Irgo Bloopsdun back in school, but that was a dilly droppel, if you know what I'm saying.

For you needs in the cabrinkle portions, you'll probably need to schlimizy zong on the pongface in order to meet the querbaple figures, but it's a long shot in Derpintine standards.

Just saying...
>>
Personally I'm using typescript w/ angular and C#/Asp.net on the server. If you have Visual Studio there's an extension called Typewriter that lets you write templates that iterate over server-side namespaces and generate typescript types.

It can also read information about WebAPI controller actions, I'm using that to automatically generate angular services that handle HTTP requests for these actions, including typing info for parameters and return types.
>>
>>54508295
If this is the kind of program you write perhaps you could go to a board more your level? Like /mlp/ or /aol/
>>
>>54510975
No, you're wrong anon.
Dynamic is when page is preprocessed server-side before serving to client.
Static is when page isn't preprocessed by the server and content is immediately served to client.
>>
>>54509982
fuck that's ugly.
>>
>>54511805
>Typewriter
We have been searching for a tool like this for months and ended up forking Swashbuckle and modifying it.

THANKS anon, you are my dev team's hero!
>>
>>54508175
This. Write your own httpd module like a man.
>>
>>54512403
Can you even host your own modules? And aint that bit insecure?
>>
>>54511037
At least you can talk
>>
>>54510609
>>54510647
this. it's actually easier in the long run because the language isn't retarded like php
>>
>>54512992

It doesn't matter which memejs he uses, what matters is his plan.
Thread replies: 81
Thread images: 6

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.