Mindcontroll Forum Index
Mindcontroll Forum Index FAQ Memberlist Search

Mindcontroll Forum Index » Programs/Programming Development » ASP 0wns PHP... Goto page 1, 2  Next
Post new topic  Reply to topic View previous topic :: View next topic 
ASP 0wns PHP...
PostPosted: 10-21-2002 01:34 AM Reply with quote
Mr Tac
Expert Shoe Maker
Joined: 07 Apr 2002
Posts: 117




There TumTum, i have spoken...
ASP 0wns PHP

_________________
<img src="http://www.mrtac.plus.com/images/Tac_Sig.jpg"a
View user's profile Find all posts by %s Send private message Send e-mail Visit poster's website

PostPosted: 10-21-2002 02:35 AM Reply with quote
TuMTuM
Will code HTML for food!
Joined: 17 Feb 2002
Posts: 425




And why does it own php?
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-21-2002 03:49 AM Reply with quote
Mr Tac
Expert Shoe Maker
Joined: 07 Apr 2002
Posts: 117




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'];
}
?>


Last edited by Mr Tac on 10-21-2002 05:55 AM; edited 1 time in total

_________________
<img src="http://www.mrtac.plus.com/images/Tac_Sig.jpg"a
View user's profile Find all posts by %s Send private message Send e-mail Visit poster's website

PostPosted: 10-21-2002 04:47 AM Reply with quote
TuMTuM
Will code HTML for food!
Joined: 17 Feb 2002
Posts: 425




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.
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-21-2002 05:22 AM Reply with quote
Mr Tac
Expert Shoe Maker
Joined: 07 Apr 2002
Posts: 117




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 Sad

_________________
<img src="http://www.mrtac.plus.com/images/Tac_Sig.jpg"a
View user's profile Find all posts by %s Send private message Send e-mail Visit poster's website

PostPosted: 10-21-2002 07:41 AM Reply with quote
Shn
R.I.P.
Joined: 10 Feb 2002
Posts: 738




($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

_________________

The Shning, more useful than The Useful Site
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-21-2002 09:35 AM Reply with quote
TuMTuM
Will code HTML for food!
Joined: 17 Feb 2002
Posts: 425




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 Smile.
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-21-2002 11:06 AM Reply with quote
Mr Tac
Expert Shoe Maker
Joined: 07 Apr 2002
Posts: 117




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.

_________________
<img src="http://www.mrtac.plus.com/images/Tac_Sig.jpg"a
View user's profile Find all posts by %s Send private message Send e-mail Visit poster's website

PostPosted: 10-27-2002 07:25 AM Reply with quote
js995
Deletes your posts
Joined: 10 Feb 2002
Posts: 226




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.
View user's profile Find all posts by %s Send private message

PostPosted: 10-27-2002 10:01 AM Reply with quote
Shn
R.I.P.
Joined: 10 Feb 2002
Posts: 738




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)
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-27-2002 11:12 AM Reply with quote
js995
Deletes your posts
Joined: 10 Feb 2002
Posts: 226




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) Very Happy
View user's profile Find all posts by %s Send private message

PostPosted: 10-27-2002 01:06 PM Reply with quote
Pezko
Senior Member
Joined: 09 Feb 2002
Posts: 186




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 Sad


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 Smile

[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]
View user's profile Find all posts by %s Send private message

PostPosted: 10-28-2002 09:22 AM Reply with quote
TuMTuM
Will code HTML for food!
Joined: 17 Feb 2002
Posts: 425




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 Razz
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-28-2002 09:40 AM Reply with quote
Dawgy
Burn your flag.
Joined: 09 Feb 2002
Posts: 463




PASCAL
View user's profile Find all posts by %s Send private message Send e-mail

PostPosted: 10-28-2002 03:16 PM Reply with quote
Pezko
Senior Member
Joined: 09 Feb 2002
Posts: 186




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 Smile
View user's profile Find all posts by %s Send private message

ASP 0wns PHP...
 Mindcontroll Forum Index » Programs/Programming Development
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 2  
Goto page 1, 2  Next
  
  
 Post new topic  Reply to topic  


Video Games Suck - XXXSwim - Archive
  Powered by phpBB © 2001-2005 phpBB Group. Designed for Trushkin.net | Themes Database