ASP vs. PHP

Status
Not open for further replies.

Ardax

Ars Legatus Legionis
19,794
Subscriptor
ASP.NET. It's worlds better than classic ASP. Since it's unclear what you're referring to, Richard is spelling it out. And I'd much rather be doing ASP.NET than PHP.

As for SQL, there's SQL servers that run on Linux too, you know.

Normally these kinds of choices are driven by softer factors: What other technologies do you need to interoperate with? Who else might work on it and what skillsets will they be expected to have? What do you have licenses for?
 

chaoticlapras

Smack-Fu Master, in training
57
[url=http:/civis/viewtopic.php?p=27287733#p27287733:3jorhm2w said:
Ravensroke[/url]":3jorhm2w]Neither. ASP.Net on Windows or something Python or JVM based on Linux.

I meant asp.net, but yeah. Python... Why is everyone obsessed with it, it's horrible.



Can't really specify any details on what it's for, sorry. But it will need to run a lot of things.


I'll probably go with asp.net then, thanks for helping guys.
 
[url=http:/civis/viewtopic.php?p=27287885#p27287885:3m4qemd8 said:
chaoticlapras[/url]":3m4qemd8]I meant asp.net, but yeah. Python... Why is everyone obsessed with it, it's horrible.

You don't know jack about server-side web technology (as evidenced by you having to ask this question in the first place) and you have the gall to dismiss something that's quite popular and that powers some fairly large web applications as "terrible". Your willful ignorance is entertaining.
 

chaoticlapras

Smack-Fu Master, in training
57
[url=http:/civis/viewtopic.php?p=27288399#p27288399:1o1ysz9j said:
Ravensroke[/url]":1o1ysz9j]
[url=http:/civis/viewtopic.php?p=27287885#p27287885:1o1ysz9j said:
chaoticlapras[/url]":1o1ysz9j]I meant asp.net, but yeah. Python... Why is everyone obsessed with it, it's horrible.

You don't know jack about server-side web technology (as evidenced by you having to ask this question in the first place) and you have the gall to dismiss something that's quite popular and that powers some fairly large web applications as "terrible". Your willful ignorance is entertaining.

Oh, sorry, I've entered a topic that I don't know some things about? I just find Python difficult to work with personally - I'm just stating that I don't see why everyone has suddenly moved to it. Oh, did I say terrible? I thought I said horrible. Get your quotes right before attacking me for asking a question and stating my opinion on Python.
 
[url=http:/civis/viewtopic.php?p=27288435#p27288435:3chvwyam said:
chaoticlapras[/url]":3chvwyam]I just find Python difficult to work with personally

Unless you're building applications where you're measuring size in KLOCs without a shred of irony, this statement makes little to no sense.

Django does a lot of heavy lifting for you. If the thought of having to develop in Python really scares you, perhaps pay someone else to build your site for you?
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=27287525#p27287525:3o97wizp said:
Richard Berg[/url]":3o97wizp]If the "ASP" in question were the 90s "classic" variety, it would be important to stay far far away.
I would extend this statement to "standard" ASP.NET at this point as well. Standard ASP.NET is worlds better than Classic ASP, but it's still not a particularly good solution. It's server based web pages, with an event-driven model relying heavily on postbacks to deliver information to the server to act on. You can use AJAX with it but it's a pain (really, the AJAX toolkit overpromises, underdelivers and makes everything a pain to work with when building things).

If you're going to be using ASP.NET and you need a full framework then ASP.NET MVC is the preferred way to go. If you just need server endpoints for XmlHTTPRequests to hit and will be using plain old HTML/CSS/JS then WebAPI is what you'd want to use.
 

Pont

Ars Legatus Legionis
26,160
Subscriptor
Not really. ASP.NET MVC for web pages and ASP.NET WebApi for REST services. It's been that way for a while.

ASP.NET WebForms came from an era where JavaScript and AJAX specifically weren't particularly trustworthy. It used the PostBack and ViewState models, which worked but were very heavyweight and not really compatible with AJAX. Then they tacked some AJAX support on with UpdatePanels in a later version. The web services stuff (ASMX) was all SOAP-based and their REST support was tacked on and cumbersome.

All of those were a product of a different era.
 

Pont

Ars Legatus Legionis
26,160
Subscriptor
I'm just stating that I don't see why everyone has suddenly moved to it.
First, there was perl. Perl was insanely popular. But when people started writing real software in it rather than little scripts, it became apparent that the language itself was fundamentally not well designed for writing maintainable, bug-free software. The plethora of side-effects and syntactic shortcuts led to most programs being unreadable to anyone other than the person who just wrote them -- and even to him after a month or two of not working with the code daily.

Python was a suitable replacement for perl. It had better OO, more modern features, and few OMGWTF gotchas. The significant whitespace syntax, while controversial, succeeded in making python programs mostly readable from one author to another. But it was still powerful enough to match the terse programming style of perl. Python was also easily embedded into other things. While lua eventually became more popular for embedding because it was even simpler, python was used as the scripting language in a few game engines.

PHP went completely the opposite direction. It was a hackier, less-powerful, more stupid version of perl that was only useful for vomiting out horribly insecure, brain-damaged web apps. Its cheap hosting and let-you-do-anything-you-want style let PHP spread like herpes across the web. A self-perpetuating infection of oozing puss and scratchy sores.
 

CanSpice

Ars Tribunus Angusticlavius
7,147
[url=http:/civis/viewtopic.php?p=27294031#p27294031:r36yr42q said:
Pont[/url]":r36yr42q]
I'm just stating that I don't see why everyone has suddenly moved to it.
First, there was perl. Perl was insanely popular. But when people started writing real software in it rather than little scripts, it became apparent that the language itself was fundamentally not well designed for writing maintainable, bug-free software. The plethora of side-effects and syntactic shortcuts led to most programs being unreadable to anyone other than the person who just wrote them -- and even to him after a month or two of not working with the code daily.

:rolleyes:

You can write unmaintainable code in any language. Bad programmers are going to write bad programs no matter what language they use, be it Perl, Python, or PHP.
 

Ardax

Ars Legatus Legionis
19,794
Subscriptor
Pont":24z5mw2u said:
Not really. ASP.NET MVC for web pages and ASP.NET WebApi for REST services. It's been that way for a while.
True, but the object model and current best practice has been changing pretty frequently - see HttpResponseMessage vs IHttpActionResult - never mind the changes coming down the pike with Owin/Katana. It wouldn't be so bad if everything was documented well, but current info is scattered across blog posts, StackOverflow, MSDN, CodePlex, etc.
 
[url=http:/civis/viewtopic.php?p=27295099#p27295099:2vayjyv2 said:
CanSpice[/url]":2vayjyv2]
You can write unmaintainable code in any language.

Perl actively encourages writing unmaintainable code, though. The motto of the language is "There is more than one way to do it". Perl is not designed to be a programming language for writing large, maintainable programs. It's designed to do small, simple scripts primarily focused on lexical text parsing.

Regurgitating the idea that somehow all languages are equivalent because anyone can write crappy code in any of them is unthinking drivel. Some languages are better than others at certain classes of problems, and nearly everything is better than perl in nearly every context, in large part because it's been forever since an update was released. Trying to pretend otherwise is vapid.
 
[url=http:/civis/viewtopic.php?p=27295099#p27295099:acj88yew said:
CanSpice[/url]":acj88yew]
You can write unmaintainable code in any language.

Perl actively encourages writing unmaintainable code, though. The motto of the language is "There is more than one way to do it". Perl is not designed to be a programming language for writing large, maintainable programs. It's designed to do small, simple scripts primarily focused on lexical text parsing.

Regurgitating the idea that somehow all languages are equivalent because anyone can write crappy code in any of them is unthinking drivel. Some languages are better than others at certain classes of problems, and nearly everything is better than perl in nearly every context, in large part because it's been forever since an update was released. Trying to pretend otherwise is vapid.
 

CanSpice

Ars Tribunus Angusticlavius
7,147
[url=http:/civis/viewtopic.php?p=27295289#p27295289:1jzlsc4c said:
SituationSoap[/url]":1jzlsc4c]
[url=http:/civis/viewtopic.php?p=27295099#p27295099:1jzlsc4c said:
CanSpice[/url]":1jzlsc4c]
You can write unmaintainable code in any language.

Regurgitating the idea that somehow all languages are equivalent because anyone can write crappy code in any of them is unthinking drivel. Some languages are better than others at certain classes of problems, and nearly everything is better than perl in nearly every context, in large part because it's been forever since an update was released. Trying to pretend otherwise is vapid.

Trolling aside, I'd like to point out that the last update was released two months ago.
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=27295143#p27295143:kjfdrxby said:
Ardax[/url]":kjfdrxby]
Pont":kjfdrxby said:
Not really. ASP.NET MVC for web pages and ASP.NET WebApi for REST services. It's been that way for a while.
True, but the object model and current best practice has been changing pretty frequently - see HttpResponseMessage vs IHttpActionResult
Those two focus on very different use cases. HttpResponseMessage is used to craft a response directly to the browser with a standard HTTP status code and result/error response (and exists in the System.Web.Http namespace, the same namespace as WebAPI's core functionality uses). HttpActionResult is used to tell the MVC framework that you want to trigger a specific action on a specific controller. I won't argue that the latter is newer than the former (by virtue of WebAPI being newer) but they don't serve the same purpose at all.

...never mind the changes coming down the pike with Owin/Katana...
I have to admit I'm not familiar with either of these. A cursory search makes me think that OWIN is going to be easily ignorable by most web developers. Unless they really need it (kind of like MEF which itself is in flux).

It wouldn't be so bad if everything was documented well, but current info is scattered across blog posts, StackOverflow, MSDN, CodePlex, etc.
When it comes to released features I haven't had much difficulty with finding the basics on MSDN. Admittedly I'm not using the absolute latest and greatest (MVC 4 and first release WebAPI). Most of the documentation I find on CodePlex from Microsoft is related to unofficial tools and framework extensions and SO is, of course, not really documentation and shouldn't be lumped in as such. It's closer to this sub forum "Help, I've got a problem. How do I fix it?". If there's a real documentation problem it's that quite often there's stuff on ASP.NET that should be in the official MSDN documentation but isn't (for what reasons I can't fathom).
 

Ardax

Ars Legatus Legionis
19,794
Subscriptor
krimhorn":1dpsqg7z said:
HttpActionResult is used to tell the MVC framework that you want to trigger a specific action on a specific controller.
IHttpActionResult was created to wrap HttpResponseMessage, more or less. You could also build pipelines that took and returned IHttpActionResults, which isn't too different from what you could do with HttpResponseMessage.

A cursory search makes me think that OWIN is going to be easily ignorable by most web developers.
OWIN is the future of ASP.NET -- it's what MVC 6 is based on. There's a lot of nice work and good things coming, but it's not going to be an entirely seamless transition.

If there's a real documentation problem it's that quite often there's stuff on ASP.NET that should be in the official MSDN documentation but isn't (for what reasons I can't fathom).
Because documentation is lagging, as usual. Entity Framework's been bad for that too.
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=27296881#p27296881:1iwiwrmr said:
Ardax[/url]":1iwiwrmr]
krimhorn":1iwiwrmr said:
HttpActionResult is used to tell the MVC framework that you want to trigger a specific action on a specific controller.
IHttpActionResult was created to wrap HttpResponseMessage, more or less. You could also build pipelines that took and returned IHttpActionResults, which isn't too different from what you could do with HttpResponseMessage.
That's what I get for not being on the latest and greatest. What a terrible choice for a name. Confusion is understandable in that case. It certainly got me (I didn't notice the interface defining character on the class name :/ ).
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=27296955#p27296955:ae304rsd said:
Ardax[/url]":ae304rsd]Exactly. MVC 6 looks like it's going to smooth out all of those warts where things have grown organically over time. Between now and then though, things are... messy.
Do they have any information on the MEF roadmap and how it will work with MVC 6 (or, indeed, if it's supplanted)? I'd read that the MEF2 release was supposed to make it trivial to essentially create an MVC application "plugin" but that work was put on hold for various, unspecified, reasons.
 

Ardax

Ars Legatus Legionis
19,794
Subscriptor
Do they have any information on the MEF roadmap and how it will work with MVC 6 (or, indeed, if it's supplanted)?
I've never used MEF so I haven't been looking, but I haven't seen anyone say anything about it either. I think MS's plans are for you to Bring Your Own Container (Linky), so there's no explicit plans for Unity or MEF. It looks like that with all the Roslyn stuff "plugins" are just a matter of dropping extra assemblies (or even just code) into the folder where the site's located.
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=27299209#p27299209:2xdrvoim said:
Ardax[/url]":2xdrvoim]
Do they have any information on the MEF roadmap and how it will work with MVC 6 (or, indeed, if it's supplanted)?
I've never used MEF so I haven't been looking, but I haven't seen anyone say anything about it either. I think MS's plans are for you to Bring Your Own Container (Linky), so there's no explicit plans for Unity or MEF. It looks like that with all the Roslyn stuff "plugins" are just a matter of dropping extra assemblies (or even just code) into the folder where the site's located.
Yeah, that's basically MEF's process as well. Which is unfortunate as it requires more balancing of assemblies than we were looking to do. Some of what I'd read that the MVC5/MEF2 integration was going to enable are truly external assemblies (loaded via a CompositeCatalog with multiple DirectoryCatalogs) instead of assemblies that had to exist within the specified folders (generally \bin or the application's shadow directory) in order for the framework to be able to use them.

Essentially our goal was pluggable areas with their own \bin folder. That's simply (and unfortunately) not possible right now).
 

Drizzt321

Ars Legatus Legionis
34,925
Subscriptor++
[url=http:/civis/viewtopic.php?p=27291205#p27291205:15le6d70 said:
krimhorn[/url]":15le6d70]
[url=http:/civis/viewtopic.php?p=27287525#p27287525:15le6d70 said:
Richard Berg[/url]":15le6d70]If the "ASP" in question were the 90s "classic" variety, it would be important to stay far far away.
I would extend this statement to "standard" ASP.NET at this point as well. Standard ASP.NET is worlds better than Classic ASP, but it's still not a particularly good solution. It's server based web pages, with an event-driven model relying heavily on postbacks to deliver information to the server to act on. You can use AJAX with it but it's a pain (really, the AJAX toolkit overpromises, underdelivers and makes everything a pain to work with when building things).

If you're going to be using ASP.NET and you need a full framework then ASP.NET MVC is the preferred way to go. If you just need server endpoints for XmlHTTPRequests to hit and will be using plain old HTML/CSS/JS then WebAPI is what you'd want to use.

Never used the old ASP, but I had the 'opportunity' to use the older ASP.NET, and the postbacks drove me mad. I have heard some pretty good things about the newer ASP.NET with their MVC framework though. Not a bad way to go.

As for PHP...it can be handy for quick, fairly simple server side web apps. And by simple, I mean quite simple. Don't try and be a full enterprise application. You'll just get into too much trouble. Might be useful to be familiar with if you to do work converting a PHP web app to another language.
 

Violynne

Ars Scholae Palatinae
881
[url=http:/civis/viewtopic.php?p=27310897#p27310897:1mf0sbbn said:
Drizzt321[/url]":1mf0sbbn]I have heard some pretty good things about the newer ASP.NET with their MVC framework though. Not a bad way to go.
So far, I'm not convinced, but to be fair, I am still an entry-level player to MVC. We're looking at alternatives for our current situation, and I'm feverishly trying to grab as much info on MVC as I can.

It's definitely powerful, won't deny that, but the issue for me is breaking old habits, thus, if anyone is new to ASP.NET, I highly recommend going the MVC route as to not learn the old habits in the first place.

For us, the biggest boost to .NET was web clients using AJAX, which removed a considerable number of postbacks.

I'm hoping I can change my own attitude within the next few months regarding MVC. It's always hard to learn something new when many of the tutorials come no where close to representing what I need the new technology for. I remember having this issue going between ASP and ASP.NET since they were so different. I still don't think I've wrapped my head around ASP.NET enough to call myself an expert. There's just so much to it, and many programmers like myself only use a small percentage of it.

Working in the health industry, my goal is to make a dynamic interface to be used on multiple platforms, which MVC can provide, based on the few tutorials I've done.

I just wish learning wasn't so tedious. :p
 
Status
Not open for further replies.