Mindcontroll Forum Index Mindcontroll

 

ASP 0wns PHP...
Click here to go to the original topic
Goto page 1, 2  Next
 
       Mindcontroll Forum Index -> Programs/Programming Development
View previous topic :: View next topic  
Author Message
Mr Tac



Joined: 07 Apr 2002
Posts: 117

Posted: 10-21-2002 01:34 AM    Post subject: ASP 0wns PHP...  

There TumTum, i have spoken...
ASP 0wns PHP
Back to top  
TuMTuM



Joined: 17 Feb 2002
Posts: 425

Posted: 10-21-2002 02:35 AM    Post subject:  

And why does it own php?
Back to top  
Mr Tac



Joined: 07 Apr 2002
Posts: 117

Posted: 10-21-2002 03:49 AM    Post subject:  

Via ASP:

Connecting

Code:
<%
   Set Conn = Server.CreateObject("ADODB.Connection")
   Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
   Conn.ConnectionString = "Data Source=" & Server.MapPath ("database/db1.mdb")
   Conn.Open
   Set Rs = Server.CreateObject("ADODB.Recordset")
   Rs.Open "SELECT * from Menu", Conn, 1,3
%>


Then to make it get from the db.

Code:  
<%Response.Write rs("Name")%>


Via PHP:

Connecting

Code:
<?
{
   $DB_SERVER = "REMOVED";
   $DB_DATABASE = "REMOVED";
   $DB_USERNAME = "REMOVED";
   $DB_PASSWORD = "REMOVED";
   mysql_pconnect($DB_SERVER, $DB_USERNAME, $DB_PASSWORD)
      or die("Unable to connect to the mysql server");
   mysql_select_db($DB_DATABASE)
      or die("Unable to select the mysql database");
}


Then to make it get from the db.

Code:
   $query = "SELECT * FROM testing";
   $result = mysql_query($query) 
      or die("Unable to get group list"); 
   $num = mysql_num_rows($result);
   while($row = mysql_fetch_array($result))
{
   echo $row['content'];
}
?>
Back to top  
TuMTuM



Joined: 17 Feb 2002
Posts: 425

Posted: 10-21-2002 04:47 AM    Post subject:  

I see code, I see 2 different kind of databases, but I do not see any arguments.
By the way, you can see what the php code does, the asp code however is unclear.
Back to top  
Mr Tac



Joined: 07 Apr 2002
Posts: 117

Posted: 10-21-2002 05:22 AM    Post subject:  

I even told you what the code does, its simple:

First section, connects to a DB.
Second section displays the info from the DB.

That one line "<%Response.Write rs("Name")%>" does what this does:


$result = mysql_query($query)
or die("Unable to get group list");
$num = mysql_num_rows($result);
while($row = mysql_fetch_array($result))
{
echo $row['content'];
}
?>



I will argue in detail once I sleep, been up almost 2 days :(
Back to top  
Shn



Joined: 10 Feb 2002
Posts: 738

Posted: 10-21-2002 07:41 AM    Post subject:  

($num = mysql_num_rows($result);
this line isn't always needed. )

Now, how does asp verify the login/password ?

And how do you select a specific row of the db ?

and how do you scan all lines of the db results one by one, so you can make some code for each line ?
like this : (but replacing the echo with something more elaborate)
while($row = mysql_fetch_array($result))
{
echo $row['content'];
}



I prefer php because we see exactly what it does and we have control over it.
I don't like languages like vb, asp...
so, if i don't like them, it means they're bad !


anyways, ask a normal and sane programmer what he prefers, he'll tell you this : php > asp
Back to top  
TuMTuM



Joined: 17 Feb 2002
Posts: 425

Posted: 10-21-2002 09:35 AM    Post subject:  

There is nothing more I can add to Shn's post, but this: PHP has a large community and people are always busy making it better, wich is ofcourse caused by the open-source aspect. I think Mr Tac only likes asp more, because he mastered that language and has just started learning php :).
Back to top  
Mr Tac



Joined: 07 Apr 2002
Posts: 117

Posted: 10-21-2002 11:06 AM    Post subject:  

While i am dancing with your comments "Mr Tac only likes asp more, because he mastered that language" - I have been reading and learning and i still feel asp is better.

Im going to get a proper discussion going on soon, i so need to sleep, i been working php/mysql so far, and some simple maths script, i have converted a ASP DB driven website of mine, into PHP/MySQL.

So far i still think asp is more better, i will state my reasons soon.
Back to top  
js995



Joined: 10 Feb 2002
Posts: 226

Posted: 10-27-2002 07:25 AM    Post subject:  

ASP is a very poor language for server-side coding because ..

1) It lacks extendability, PHP can write PDF's, GIF's, access system resources, use system function calls natively, and interact more closely with the webserver than ASP can.

2) To run ASP you either have to use IIS (which is a security hole by definition) or a very weak ASP compatibilty module for Apache.

3) The code powering ASP is all closed source, which as we all know, relies on security through obscurity. This is a classic Microsoft trait, and it suffers many weaknesses. Expect problems and security weaknesses galore with applications based on ASP.

4) PHP has better native support for databases than ASP. ASP is mostly used by people integrating it with Microsoft Jet, which is actually a DB interaction layer for Access. This pales in comparison to PHP's support for MySQL and PostgreSQL (enterprise level databases) and also the true high-level IBM DB2, Oracle 9i. Not to mention that database performance in ASP is dire.

5) ASP webhosting is expensive, badly administrated and rarely available, and it will continue to be this way as long as it relies on a natively flawed webserver and closed source code. PHP, on the other hand, is widely available, highly compatible, reliable and makes code easily transportable across multiple deployments. What's the point of knowing how to code ASP, when a lot of the time, you wont be able to use it ?

6) Apache/PHP/MySQL is fast becoming the industry standard for web-based applications. That alone should make it the platform of choice for people looking to do this kind of thing either professionally or for personal use.

7) PHP is open source and maintained by a team of developers and outside sources. This makes PHP more secure, more quickly updated, and a product that quickly matures new features into a stable and known state. ASP is managed by Microsoft, who have already changed it to the ASP.Net standard and ditched support for the pre-.NET ASP.

And, yes, I spent a long time working with ASP over various projects a few months ago, and because I had no PHP knowledge, I worked the project through to its conclusion in ASP. It prompted me to dump ASP, after I realised how it pales in comparison to PHP, and the additional flexibility a PHP based solution can add to these kinds of deployments.

Believe me, dont waste your time, go PHP, you wont regret it.
Back to top  
Shn



Joined: 10 Feb 2002
Posts: 738

Posted: 10-27-2002 10:01 AM    Post subject:  

one more stupid thing i'd like to add that's right for all programming languages :

It's not because it's easier/faster to code that it's better. (and that seemed to be mr tac's main argument)

(Example: VB)
Back to top  
js995



Joined: 10 Feb 2002
Posts: 226

Posted: 10-27-2002 11:12 AM    Post subject:  

good point

since its common sense that more powerful languages are the best (because you can do anything you need to in them)

C & C++ > Java > VB

(with a lot of stuff left out) :D
Back to top  
Pezko



Joined: 09 Feb 2002
Posts: 186

Posted: 10-27-2002 01:06 PM    Post subject:  

Mr Tac wrote:
I even told you what the code does, its simple:

First section, connects to a DB.
Second section displays the info from the DB.

That one line "<%Response.Write rs("Name")%>" does what this does:


$result = mysql_query($query)
or die("Unable to get group list");
$num = mysql_num_rows($result);
while($row = mysql_fetch_array($result))
{
echo $row['content'];
}
?>



I will argue in detail once I sleep, been up almost 2 days :(

Mmk. if I'm not mistaking those codes does not do the same thing.

The php code would show every post in the db, while the asp code would only show one. I might be wrong, it's been a long while since I used that spawn-of-satan, ugly, slow, crappy language :)

[edit] Where is the real discussion promised by Mr_tac?[/edit]

[anotheredit]
js995 wrote:
C & C++ > Java > VB

(with a lot of stuff left out)


C > C++ & Java >> VB

C is a nice language which lacks OO, which makes me unable to use it atm

C++ is C with OO, but they forgot to make all standard libs use it

Java is über! if it wasn't so slow.

VB IS SATAN

[/anotheredit]
Back to top  
TuMTuM



Joined: 17 Feb 2002
Posts: 425

Posted: 10-28-2002 09:22 AM    Post subject:  

I have to code something in VBA :'( . So here is my list:

PHP > C++ > VB > VBA > VBS

And the only reason I have PHP on the top is because its so fricking easy to learn, and before you say "PHP is a scripting language!", take a look at PHP-GTK.

Oh, and nothing can be possibly worse then VBS. Well, maybe bat files :P
Back to top  
Dawgy



Joined: 09 Feb 2002
Posts: 463

Posted: 10-28-2002 09:40 AM    Post subject:  

PASCAL
Back to top  
Pezko



Joined: 09 Feb 2002
Posts: 186

Posted: 10-28-2002 03:16 PM    Post subject:  

TuMTuM wrote:


And the only reason I have PHP on the top is because its so fricking easy to learn, and before you say "PHP is a scripting language!", take a look at PHP-GTK.


PHP-GTK doesn't change that it is a scripting language. As a scripting language it owns, but for bigger apps even VB owns any scripting languages :)
Back to top  
 
       Mindcontroll Forum Index -> Programs/Programming Development Goto page 1, 2  Next
Page 1 of 2


Video Games Suck - XXXSwim