Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Website Design/Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=64)
-   -   PHP or ASP.Net? (http://www.chiefdelphi.com/forums/showthread.php?t=20966)

Greg 07-06-2003 18:00

PHP or ASP.Net?
 
Ok, what is better in your opinion - PHP or ASP.Net? Provide a reason for your answer :)

apk 07-06-2003 18:21

php: no M$ included :)

Petey 07-06-2003 19:05

Re: PHP or ASP.Net?
 
Quote:

Originally posted by Greg
Ok, what is better in your opinion - PHP or ASP.Net? Provide a reason for your answer :)
PHP is free, open source, non proprietary, and so horribly wonderful. anything .NET is automatically inferior to everything else.

--Petey

Specialagentjim 07-06-2003 19:42

Professional or Personal stand alone websites: Normally PHP, as its free, open source, yada yada yada.

However, ASP.NET does have its advantages. Such as its tight integration with Active Directory and some of its new uses which haven't been published too much.

I'm not saying one's better than another, I'm just saying they have their own uses.

Personally, I develop for asp.net, but thats mainly because my office uses it so thats what I taught myself. (Gov't tends to like going m$, they just find it easier than trying to figure out a whole new OS [linux]. However, we are going to move to php and MySQL within the next few years for our new projects, mostly as a proof-of-concept for the state of florida gov't system. We'll proboly implement it first, and from there [as long as we do it well] it should spread throughout the state fairly easily).

AJ Quick 07-06-2003 19:59

PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.

Raven_Writer 07-06-2003 20:27

Quote:

Originally posted by AJ Quick
PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.
I'm with AJ on this....I use ASP on Brinkster...for the only reason Brinkster doesn't support PHP.

If my host would allow Windows 2000 server users PHP, then I'd not be contacting Tech Support all the time.

PHP also has more easier syntax in my opinion.

A simple difference:

PHP Code:

PHP Text Output:
<?php echo("text here");?>

ASP Text Output:
<% response.write("text here");?>

Also, in ASP, you have to do something like <%response.write("asdfasdf" & non_text_data & ".")%> Where as in PHP, you can just do <?php echo("Data variables allowed in quotes");?>

............... 07-06-2003 20:46

Quote:

Gov't tends to like going m$, they just find it easier than trying to figure out a whole new OS [linux].
And also main programs that they use ie Oracle Software would be expensive and painful to upgrade licenses and Computers etc.
back to the topic PHP mainly becasue of OpenSource and Simplicity.

Greg 07-06-2003 20:52

Well, I tried both PHP and ASP before, and I kinda like PHP better myself :) One more question: how to use classes in ASP.Net code on Brinkster? If I just put them with the rest of the code like this
Code:

<script runat=server>
Sub Page_Load()...
End Sub
...
Class MyClass
...
End Class
</script>

It puts the class inside the page main class, and usually this screws things up. And codebehind does not work on Brinkster. I tried using the <%@ Assembly %> directive too... :(

Raven_Writer 07-06-2003 20:57

Quote:

Originally posted by Greg
Well, I tried both PHP and ASP before, and I kinda like PHP better myself :) One more question: how to use classes in ASP.Net code on Brinkster? If I just put them with the rest of the code like this
Code:

<script runat=server>
Sub Page_Load()...
End Sub
...
Class MyClass
...
End Class
</script>

It puts the class inside the page main class, and usually this screws things up. And codebehind does not work on Brinkster. I tried using the <%@ Assembly %> directive too... :(

Beats me really, I just use functions, no classes or whatnot. (That's why all my sites from them are dull).

Alfred Thompson 08-06-2003 22:14

.NET Rocks! I've seen PHP and it is ok but you can do so much with .NET. And you can program your site in Visual Basic .NET, C#, J#, C++, what ever. THe Visual Studio .NET IDE is the best I have ever worked with. But then I've only been programming for a little over 30 years. :-)

I like .NET so much that I went and got a job at Microsoft. But I liked .NET for years before I made the move.

seanwitte 09-06-2003 13:03

Its not really a valid comparison. PHP is better than old-school ASP, but ASP.NET is an enterprise-capable framework for distributed applications. Its competitor is J2EE, not PHP so much. I can see why you would like PHP over ASP.NET, but there are some killer development tools available for .NET. For the last few years I've been working on a product in VB that uses ASP as the presentation layer. The improvements in .NET are unreal, but ASP still has a place for simple web sites.

Heres an implementation of echo for ASP:
Code:

<%@ Language=VBScript %>

<SCRIPT LANGUAGE="Javascript" RUNAT="SERVER">
       
        var ECHO_TOKEN = '%d';
       
        //-------------------------------------------------------------------------
        // FUNCTION:        echo       
        // PURPOSE:        Writes a message to the Response stream that contains
        //                embedded data elements to avoid concatenation.
        // ARGUMENTS:        text -        message string to output. embedded tokens
        //                        will be replaced by the non-formal arguments
        //                        passed to the function at runtime, in order.
        //-------------------------------------------------------------------------
        function echo(text)
        {
                _echoHelper(text, ECHO_TOKEN, echo.arguments);
                return;
        }               
       
        //-------------------------------------------------------------------------
        // FUNCTION:        echobr       
        // PURPOSE:        Writes a message to the Response stream that contains
        //                embedded data elements to avoid concatenation, with an
        //                extra break tag at the end.
        // ARGUMENTS:        text -        message string to output. embedded tokens
        //                        will be replaced by the non-formal arguments
        //                        passed to the function at runtime, in order.
        //-------------------------------------------------------------------------
        function echobr(text)
        {
                _echoHelper(text, ECHO_TOKEN, echobr.arguments);
                Response.Write('<BR>');
                return;
        }                       

        //-------------------------------------------------------------------------
        // FUNCTION:        _echoHelper
        // PURPOSE:        Parses a string and replaces token values with elements
        //                in the args array in order. Index 0 of the array is not
        //                included. Performs operation without concatenations.
        // ARGUMENTS:        text -        message string to output. embedded tokens
        //                        will be replaced by the non-formal arguments
        //                        passed to the function at runtime, in order.
        //                token -        replacable string
        //                args -        array of values to insert into text
        //-------------------------------------------------------------------------
        function _echoHelper(text, token, args)
        {
                var start = 0;
                var finish;
                var i;
                               
                for (i=1; i<args.length; i++)
                {                       
                        finish = text.indexOf(token, start);                       
                        if (finish >= 0)
                        {
                                Response.Write(text.substring(start, finish));                               
                                Response.Write(args[i]);
                                finish = finish + 2;
                                start = finish;                                               
                        }
                }
                Response.Write(text.substring(start, text.length));
                return;
        }       
</SCRIPT>


<HTML>
<HEAD>
</HEAD>
<BODY>

<%        dim ip: ip = Request.ServerVariables("REMOTE_ADDR")

        echo "This page was requested on %d from IP %d at %d", Date(), ip, Time()       
%>

</BODY>
</HTML>


Scudzey 10-06-2003 01:07

I myself use PHP all the time. Its a simple language that has great integration with mostly any type of SQL server. I have a PHP and web serverr urnning off my computer here right now, it was on windows and now is on linux. I also have a coulple of other places where I use PHP, such as on scriptlance (to bring in some online cash) and helping my friend with his site, plus it's also juts fun to goof around with.

AlbertW 10-06-2003 05:02

php. why? asp (not going into .NET here) is propreitary, doesn't run on anything but IIS (which means it inherently has security holes) and the syntax is extremely convoluted. i tried learning ASP a while ago, and it set me off the track of hypertext preprocessors (i started using perl for everything. recently discovered that php was alot better for alot of things i was doing.) not to mention that php has unparallelled integration with SQL. like asp, php also has a company behind it (zend) that is pushing development and keeping it organized, but at least zend isn't a coporate money-hogging control freak. :D

seanwitte 10-06-2003 09:42

ASP 3.0 for Sun ONE and Apache
 
Quote:

Originally posted by AlbertW
asp (not going into .NET here) is propreitary, doesn't run on anything but IIS (which means it inherently has security holes)
I didn't know Chili!Soft was bought by Sun, but there you go. I haven't read much lately, but if Mono works there will be an OSS implementation of the CLR as well. This will run on Apache and Sun ONE.

http://wwws.sun.com/software/chilisoft/index.html

blueWarrior 10-06-2003 10:11

Quote:

PHP totally wins over anything out there. Barely no one uses ASP, and that is for a reason.. it is terrible.
Wow, you are very out of line. I am a PHP, ASP and VBScript programmer.

You have to remember that PHP is only for small individual projects, whereas ASP is a professionals language, honestly speaking here guys.

Here is a quote from a man who is heavily involved in PHP.

Quote:

ASP.NET technology is better than PHP technology.
Read the blog article:

http://www.edwardbear.org/blog/archives/000189.html

So basically it IS a good language. Easy to learn, powerful etc. but if you want something that is universally used, powerful, extendable and PROFESSIONAL check out ASP.NET.

MS has powerful and easy to use OS's and languages sure...but thats only when they actually work. ;) :p


All times are GMT -5. The time now is 08:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi