Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a co-worker (not a developer tho) who keeps singing the praises of PHP..PHP this, PHP that...

 

I'm developing an application with ASP.Net using datagrid, basically .net stuff....

 

Wondering what advantages PHP has over ASP.Net..can I have the same database capabilities in PHP as in ASP.Net?

 

Any thoughts?

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

  • Moderators
Posted

That first link is grasping at straws, the article may have been written by a politician :) I can imagine what kind if work this guys puts out :eek:

What is significantly different is "Language.NET" will force you into an object oriented approach from the start, while PHP won't. The Web typically does not require OO -- for your average dynamic Website, a few "hacked" scripts are perfectly fine if they meets the site's requirements. Deliver a live site now, rather than a beautifully abstract piece of code that's ready one year after it's needed. Paraphrasing SitePoint's recent interview with Rasmus Lerdorf, PHP's down-to-earth approach to problem solving is what has made it a success. And when you need OO, it's there waiting for you.

Visit...Bassic Software
  • *Gurus*
Posted
The problem with that argument is that ASP.NET does not force one into using a object-oriented approach to programming. It's there, and it's the predominant option, however there's nothing stopping anyone from using render tags, inline code, and many other pre-World War II programming methods.
Posted

They say that ASP.NET is more faster than PHP because ASP is compiled and PHP interpreted.

 

Here is my opinion... slowdown of ASP.NET are coming from ADO.NET and not from ASP.NET as it may seem. I think that SQL Connection to a server are rather slow.

But as they say (www.IBuySpy.com) when ASP.NET is cached... it's way more faster.

 

Some comments ? Let's continue the debate.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted

Try looking at this.

You could improve ASP.NET a lot.

Microsoft Help

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpcondevelopinghigh-performanceaspnetapplications.htm

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted
I'm new to ASP.Net and started this thread because i really want to put an end to what my co worker keeps saying..but his reason is different..his reason is "people dont like microsoft so why didnt you use PHP" !!!
Posted

...... what a dummmer...

lol

Forget it :p

Keeping annoying people with this is sensless. :p lol

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

  • Moderators
Posted

I'm sick and tired of MS bashing, if they don't like it let them work on Mac, Linux or something else that may be from the last generation of ..... :mad:

When they say they're forced to work with MS products well too bad then go into another line of work.

 

Arch4ngel, I have to disagree with your ADO comment, I tested the old against the new running exactly the same code and SqlClient flies as compared to the classic methods.

Visit...Bassic Software
Posted

PHP needs Apache server, which runs on Linux servers, which is much more secure than windows servers.

PHP, MySQL and Apache are all for free.

PHP hosting is still cheaper than windows hosting.

These are some reasons why its so popular.

Proudly a Palestinian

Microsoft ASP.NET MVP

My Blog: wessamzeidan.net

Posted

Explication

 

They are so popular because it's free.

Everyone can begin to make their own web site with PHP,MySql and Apache.

However... it cost too much for the public to buy Visual Studio 2002 or 2003 (even the lowest edition with less features). And did you think again of Sql-Server ? And Windows 2003 Server or Windows 2000 Advanced Server ?

 

And if you buy an ASP.NET Web server it cost some butter :p .

 

And what about hosting ? They got an OC-13 connection and boxes and some soft to buy.

 

PHP ? Everythings free. No operating system cost (linux) and nothing to pay (Apache is "free" and MySql is free either)

ASP.NET ? Everything is own by Microsoft (they don't give too much). Operating system start at 500$ to 800$ and the Sql-Server must be around 200$ or 400$ and if you include ASP.NET (0$ let say because I don't know the price).

 

The difference ? 700$ to 1200$.

 

Performance have a cost.

 

Other want to share their advice ?

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted

One more point, PHP don't support so well ODBC. So when you try another kind of DB... you have to download plugins and others.

 

With ASP.NET, you have the choice of language. You can even do it in C++ or in VB.

What are the choice with PHP ? :p

 

I like ASP.NET and I'll stay with it. It may be slow when not cached but it's SOOOO fast when everything is cached.

 

I'll need to learn PHP however... because too much compagny work with it today.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

  • 10 months later...
Posted
PHP hosting is still cheaper than windows hosting.

 

Look at dotnetpark.com - asp.net hosting + MS SQL for about $6/month. ASP.NET hosting is cheap these days.

  • 1 month later...
Posted

I think they both have their place but are deisgned for different purposes. Personally I love PHP but dabble in ASP.Net every so often.

 

The PHP language does have features that ASP.Net doesn't have though meaning that a forum such as this one written in PHP could not really be done in ASP.NET. These are all due to it being interpreted rather than compiled.

 

:)

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Posted

The PHP language does have features that ASP.Net doesn't have though meaning that a forum such as this one written in PHP could not really be done in ASP.NET. These are all due to it being interpreted rather than compiled.

 

:)

 

Could you elaborate on this? Perhaps an example?

Posted

Sure.

 

All the pages in this forum are generated using templates with code like:

 

evaluate("$html='".fetchtemplate('templatename')."';");

 

The template returned in fetchtemplate could for arguments sake be:

 

<html>
<head>
$header
</head>
<body>
$navbar
<hr>
$content
$footer
</body>
</html>

 

 

and say the header template is:

 

<title>$title</title>

 

Prior to that line the variables in this will have been filled using for example:

 

$navbar=fetchtemplate('navbar');
$title=fetchsetting('title');
evaluate("$header='".fetchtemplate('header')."';");
$footer=fetchtemplate('footer');
$content="This is some content."

 

The resulting page being:

 

<html>
<head>
<title>Page title</title>
</head>
<body>
<!-- navbar html -->
<hr>
This is some content.
<!--footer html-->
</body>
</html>

 

Hope that clarifies.

 

:)

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Posted

ASP.Net is a compiled language and doesn't have scripting support like the Evaluate function.

 

Also .Net will not evaluate variables in a string like PHP does.

 

You show me how it's possible and I'd be very interested to see it!

 

:)

Please check the Knowledge Base before you post.

"Computers are useless. They can only give you answers." - Pablo Picasso

The Code Net

Posted

Dim mytemplate as new customclasstemplate()

mytemplate.TemplateType = "Posts"

mytemplate.FetchTemplate()

 

Literal1.Text = mytemplate.Header

Literal2.Text = mytemplate.Footer

 

Your customclasstemplate() gets the variables via DB, text file,etc. You said a site like this cant be done using asp.net becuase it is compiled, doesnt mean you cant dynamically load data at runtime. However, this may not be the best way to do things anyways. Asp.net has usercontrols which probably be better for this situation that you can cache.

Posted
What does the evaluation function have to do with asp.net not being able to create a site like this one and php being able to. Getting back to the original topic, I think asp.net, despite its higher learning curve, is a great tool not only for web development, but if you want to include it in a company wide system that all uses managed code. From web to smart devices, to desktop apps to windows services.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...