Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Writing a web app on a sane platform

Name: Anonymous 2007-11-24 17:53

I'm going to write a rather complex web application. I was originally planning to use PHP, but I have come to the conclusion that it sucks dicks.

So now I'm looking to find a saner webdev platform. In addition to PHP, I know Haskell and Python fairly well. I'd love to use Haskell, but I'm not sure what tools for web development are available, and whether any of them are any good. On the other hand, I've heard good things about Python regarding webdev, and presumably I have a wider range of choices and better community support here since Python is quite a bit more mainstream.

Does /prog/ have any experience and/or opinions regarding this? Things I need are basically session handling and database connectivity (MySQL will do, although more generic interfaces are always a plus). A simple template system would be nice too.

PS. Ruby on Fails is not an option.

Name: Anonymous 2007-11-24 18:11

>>1
Tell more about app.

JSP

Name: Anonymous 2007-11-24 18:17

>>1
scheme for everything

Name: Anonymous 2007-11-24 18:36

Haskell or lisp

Name: Anonymous 2007-11-24 18:37

Do you have a specific problem with PHP or are you just not bright enough to figure out the installation? It's quite an adequate platform as long as you get to configure it yourself.

Name: Anonymous 2007-11-24 18:46

Perl.

Name: Anonymous 2007-11-24 18:55

Use python too look cool and for readability.

Use PHP if you want to actually get something done.

Name: Anonymous 2007-11-24 19:05

>>2
I'd rather not touch anything that has to do with Java.

As for the app itself, to put it simply it's a website/community for electronic music artists where people can upload their music, review each other's stuff, manage collaborative music projects... You get the idea.

>>3,4,6,7
Lisp/Scheme are options too. Perl, I dunno... But in any case, I'm looking for a more specialized system for webdev (A framework? Is that what they call them nowadays?) rather than just a language.

>>5
I have years of experience writing PHP and I've installed it on dozens of systems, thank you. It may be an adequate platform in that the entire language was created for web development and there are a lot of tools available for various aspects of that, but the language itself is utterly horrible and a pain in the ass to write and maintain for large projects.

I guess my major gripes are the type system (see Haskell for an example of a proper one) and the fact that functional programming concepts are impossible to apply without ugly hacks (no lambdas or first-class functions, and please don't even mention create_function()). And then there's the minor annoyances that keep accumulating, like stupid syntax limitations (why the fuck can't I do func_that_returns_array()[$key]?), inconsistent function naming, lack of namespaces and so on.

Name: Anonymous 2007-11-24 19:12

C is a great language to write web apps in.

Name: Anonymous 2007-11-24 19:15

>>7
You can tune a filesystem, but FUCK FORCED INDENTION

Name: Anonymous 2007-11-24 21:22

ADOBE FLEX 2.0 FTW

Name: Anonymous 2007-11-25 3:16

>>8
Why not Java? Honestly, gtfo theoretical bandwagons...

Very, very few people on the anti-Java Crusade have ever actually touched the real use of Java.

Name: Anonymous 2007-11-25 3:20

>>8
You seem to be here to paint the bikeshed more than anything.


I would suggest you step back and analyse your needs and requirements, write your various structured systems analysis documents and then reconsider what exactly it is that you're after.

What are the major bottlenecks of your application? It'll be bandwidth heavy, you'll want to have as much server-side caching of output as possible, strong database interaction, well-written and implemented internal-accounting...

Or what? Seriously, you need to look at this from a much more technical standpoint, or I cannot take you remotely seriously.

Name: Anonymous 2007-11-25 4:30

Name: Anonymous 2007-11-25 6:51

Python + Django is a pretty good choice.

Name: Anonymous 2007-11-25 6:58

Python + Django is a pretty poor choice.

Name: Anonymous 2007-11-25 7:09

Python + Django is a pretty average choice.

Name: Anonymous 2007-11-25 8:14

Python + Django is a pretty fucking stupid choice.

Name: Anonymous 2007-11-25 8:53

Most frameworks consist of, a templating engine (which did not originate within that framework), an ORM (which did not originate within that framework, and a lot of wheel reinventing, overhead, and bullshit.


So why don't you just go with python, ZPT (or another template engine), and SQLAlchemy.
I don't know what exactly to recommend for sessions these days. Maybe someone else has strong opinions.

Name: Anonymous 2007-11-25 9:04

>>19
So instead of using a reinvented wheel, you suggest reinventing the wheel once again?

Name: Anonymous 2007-11-25 10:00

>>20
Real men re-invent the wheel every morning after re-reading SICP.

Name: Anonymous 2007-11-25 10:18

I reinvented that meme.

Name: Anonymous 2007-11-25 10:47

>>22
I reinvented that meme.

Name: Anonymous 2007-11-25 10:57

Ruby on Fails is not an option

OH GOD WHEN I LOOKED AT THE SPOILER I WSA LIKE "HAHAHAHAHAHAHAHAH" REALLY FUNNY U MAED MY DAY

Name: Anonymous 2007-11-25 11:00

I'm interested in abusing LISP to "hack" someone's (will go unnamed) computer, for reasons I'll keep to myself. I've done a little research on it, but I haven't yet found any solid evidence that you can use LISP to "hack" someone's computer.

Name: Anonymous 2007-11-25 20:47

>>25
LISP and Lisp...

LISP = ?
Lisp = Common Lisp?

Name: Anonymous 2007-11-25 20:54

Use Ruby on Rails, seriously.

Name: Anonymous 2007-11-25 21:09

>>27
Bollocks.

What's RoR got over the competition?

Name: Anonymous 2007-11-25 21:10

>>28
Rails.

Duh.

Name: Anonymous 2007-11-25 21:19

duh.

Name: Anonymous 2007-11-25 21:36

If you have a large cock, you can program it in C. Of course, in reality you can't have a web app crash every few days with segfaults.

You should write program your web interface in php and use shell executions to call your custom command. By doing so, you have the reliability and stability you need

php is the best web dev tool out there. If you don't think so you haven't programed enough web applications

Name: Anonymous 2007-11-25 22:53

>>31
<3 C

Name: Anonymous 2007-11-25 23:30

>>31

>If you have a large cock, you can program it in C. Of course, in reality you can't have a web app crash every few days with segfaults.

Of course, your C app can be a CGI prog. So a crash in the app would be no more severe than any other CGI.

Name: Anonymous 2007-11-26 0:00

Perrrrrrrrrrrrrl.

Name: Anonymous 2007-11-26 2:32

>>1,15-18
Python + TurboGears is the right choice

Name: Anonymous 2007-11-26 2:35

PHP and Xampp.

Name: Anonymous 2007-11-26 2:40

>>36
Are you clinically fucktarded?

Name: Anonymous 2007-11-26 3:00

>>36
PHP and XMonad

Name: Anonymous 2007-11-26 3:04

>>37
No, I am clinically a troll.

Name: Anonymous 2007-11-26 3:35

Yeah, use Turbogears. Sounds good.

Name: Anonymous 2007-11-26 4:07

Yeah, use Tubgirl. Sounds good.

Name: Anonymous 2007-11-26 4:53

>>1
If I had to do something for myself, I'd use Python, but I still haven't decided on a framework. On Python, you have all sorts of things, which is both good and bad. Good because you can choose; bad because you have to choose, and the community behind each of them is much smaller than it would be if it were united. That's why Python hasn't kicked PHP's ass yet.

For low-level stuff, I think there's webpy, mod_python, or just doing it all yourself and using bare FastCGIs (then again, the only things you'd need to implement are HTTP handling and session control; the rest is available in the standard Python library or similar). Databases always use the PEP-249 protocol for an interface, but don't think that makes it DB-independent; all DBs require you to use them in a way that's incompatible with others, even if the DB access is abstracted from it.

Then there are weirder stuff, like Quixote or CherryPy.

For Rails-like stuff, I've heard good things about Django and TurboGears.

And finally, Java for Python: Zope. Don't touch it with a 10 metres pole.


>>6,34
")#$(/==/"()$%!/($!%no"/%()#==#&)/%()!"


>>8
>>2 was joking, and you are right not wanting to touch anything with Java.

the language [PHP] itself is utterly horrible
the type system (see Haskell for an example of a proper one)
I don't mind its syntax, but my main gripes with it are, from most infuriating to least:
- The existence of magic quotes, register globals and safe mode, which fortunately can be disabled, except when you have to deal with bullshit code from "web designers" requiring this
- Lack of lexical scoping
- Lack of true first-class functions
- Fucking idiotic OH NOES untrappable fatal error when you define a function that was already defined (motherfucking "designers", why don't they allow function redeclaration, or at least ignore the fucking thing?), and fucking idiotic OH NOES untrappable fatal error when you call a function that doesn't exist (WTF!?).
- Fucking idiotic automatic string/number/whatever conversion; thanks god it at least has a different concatenation and addition operator, otherwise it'd be utter shit like JavaScript; they do this kind of thing for fucking morons and that's why the PHP community is full of them, "web designers". Also, because of this, the forced use of strings as keys for arrays.
- Lack of nested quotes like Tcl's {} or Perl's quote operators
- Object system leaves something to be desired, and it's borrowing bullshit from Java instead of taking it from proper OO languages
- Can't index the result of a function (WTF!?), e.g. can't do f()[0] if f returns arrays.
- Some terrible names in standard library functions ("web designers"); some dangerous functions; and some stupid crap like mysql_real_fuck_yeah_escape_string which "web designers" tend to get wrong
- Single function namespace
- Lack of tail-call elimination

the fact that functional programming concepts are impossible to apply without ugly hacks (no lambdas or first-class functions, and please don't even mention create_function())
Lol, you'd have to see the things I've managed to do with it. Sure, their implementation are all hacks, and there's no syntax for lambdas, so you have to use quotes, and there are no nested quotes, so you may end up like '"\\\\\\"\\\\\\\\'\\\\\\\\\\\\""."\\\\\\\\\\""."\\\\\\\\\\""\\\"', but I have lambdas that are simpler to define and can be used inside each other (unlike create_function), prog1, progn, a flexible apply, partial function application, promises, map, filter, reduce, and I'm currently thinking of a way to implement list comprehensions with as little suckage as possible. Of course, all of this is limited due to the lack of lexical scoping (at best, you can "export" values when constructing expressions, but welcome to quote hell), and the fact you shouldn't create a lambda in an iteration with over 1000 steps.


>>9
C and AJAX FTW


>>12,14
Ha ha ha. Are you new here? We don't like your overnegineered, bloated, ugly, powerless ENTERPRISE crap. We're here for ABSTRACT BULLSHITE, which leads to much less coding time, success and illumination. Java isn't nearly as powerful as a fucking toy Lisp I implemented in 300 lines a few months ago, let alone a serious dynamic or functional language.

Name: 14 2007-11-26 4:58

>>42

I was saging.

Name: Anonymous 2007-11-26 5:21

>>42
(motherfucking "designers", why don't they allow function redeclaration, or at least ignore the fucking thing?)
if (!function_exists('function_name')) { ... }

Redeclaration would be better, though, yeah, especially if it throws an E_NOTICE or whatever.

Name: Anonymous 2007-11-26 10:47

IIS+ASP+VBScript

Name: Anonymous 2007-11-26 18:10

OP here, just wanted to tell you guys that I settled for Django. It looks great so far, and appears to scale quite well, unlike certain other frameworks that are slow as fuck.

Thanks for all the serious replies!

Name: Anonymous 2010-12-23 0:28

Name: Anonymous 2011-02-04 15:51

Don't change these.
Name: Email:
Entire Thread Thread List