Funny how you mention PHP needs all these third party applications(debugging???). Maybe you need them.
comparing .net vesus PHP
Hmm... I've never had problems debugging PHP. Echo, print_r(), and mail() (and I'm sure some others) are very handy for pinpointing problems.
The only thing you really need to do PHP is an editor. Which editor you chose is up to you. I wouldn't consider it a "3rd party" requirement since in theory, you could use Notepad or whatever default editor your OS came with (any editors better than these are just icing on the cake). I believe this is the same for .NET since MS did release .NET SDK which allows you to compile some flavors of .NET.
Something to ponder, and caxibrema try this out if you get a chance: purposely build an infinite loop in PHP and ASPX. PHP will time out (as specified in php.ini). What will ASPX do? I know regular ASP just locks up IIS requiring an IIS service restart.
One thing you didn't touch on is the error handling. ASP (and I'm guessing ASPX) has try/catch available. PHP has some error handling, but its not as plush as ASP(X)'s (of course, this is just opinion).
Funny how you mention PHP needs all these third party applications(debugging???). Maybe you need them.
here is my answer:
Well once i had problems doing something like this:
$_SESSION['user'] = new User($user, $pass, $permissions);
the problem was that in the development server was with an newer version of php than the production server, and this older version had an bug serializabling objects... so in the development server it just worked but in the production it didn´t...
i lost something like 2hrs looking in my code for the error and if i had an debug the problem was going to be really more simple to discover.
Hmm... I've never had problems debugging PHP. Echo, print_r(), and mail() (and I'm sure some others) are very handy for pinpointing problems.
here is my answer:
i dont use this, i use an debug much userfriendly called PHP4 Debug Helper which show session, get, post, arrays variables...
The only thing you really need to do PHP is an editor. Which editor you chose is up to you. I wouldn't consider it a "3rd party" requirement since in theory, you could use Notepad or whatever default editor your OS came with (any editors better than these are just icing on the cake). I believe this is the same for .NET since MS did release .NET SDK which allows you to compile some flavors of .NET.
here is my answer:
what i was trying to say is productivity not making the things... using an ide like vs.net im sure ur going to develop faster than in an editor... that´s why i said that
well about error handling
One thing you didn't touch on is the error handling. ASP (and I'm guessing ASPX) has try/catch available. PHP has some error handling, but its not as plush as ASP(X)'s (of course, this is just opinion).
here is my answer:
i refered error handling in php when i said exception handling... with exceptions you can make something like this:
class Exception {
function Exception() { // Contructor
log("Error ...");
}
}
so when u create and raise an exception u automatically can log, send mails watever...
well i want to put something clear: i program with php, i love php but i have to be aware of the concurrence... i like php because of its simplicity in syntax (i was an java programmer) and its libraries (graphics, xml, email, odbc, ect...) its incredible simple...
thnx
Sérgio
Originally posted by caxibrema
here is my answer:
Well once i had problems doing something like this:
$_SESSION['user'] = new User($user, $pass, $permissions);
This was a versioning issue - which some folks have documented is a shortcoming with PHP. The only thing you can do in this case is troubleshoot or research php.net (which I wouldn't be too surprised if they have this issue documented).
Originally posted by caxibrema
here is my answer:
what i was trying to say is productivity not making the things... using an ide like vs.net im sure ur going to develop faster than in an editor... that´s why i said that
This is a personal preference and NOT a shortcoming of PHP. When I was in an ASP shop, one guy was strictly a Visual Studio coder. It worked great for him. But for me and another coder, we chose Edit+. I wouldn't consider it an IDE. Its just an editor with some nice features. Did it slow us down? If it did, me and this other guy wouldn't have been fired a long time ago. As long as whatever you use gets the job done, this shouldn't be held against the language itself.
Originally posted by caxibrema
i refered error handling in php when i said exception handling...
This is a feature of PHP v5. But not available in PHP v4. Just checking the feature set of v5, it does include catch/throw/try (nifty!).
Originally posted by AstroTeg
This is a feature of PHP v5. But not available in PHP v4. Just checking the feature set of v5, it does include catch/throw/try (nifty!).
ok... but i was talking about php 5 because oo paradigms arent well implemented in php 4.
PHP only supports partial encapsulation (such as support for declaring methods and fields in the class) and partial polymorphism (no overloading, no abstraction). PHP also lacks support for such concepts and accessibility in that there is no concept of private, public, or protected functions in classes as well as the Overloading.
Source: Migrating to Asp.net
Originally posted by AstroTeg
This was a versioning issue - which some folks have documented is a shortcoming with PHP. The only thing you can do in this case is troubleshoot or research php.net (which I wouldn't be too surprised if they have this issue documented).
Ok, i understand your point of view, in that time i couldnt change the version of the production server but what i was trying to say was that if i had a debug it was going to be painless.
Originally posted by AstroTeg
This is a personal preference and NOT a shortcoming of PHP. When I was in an ASP shop, one guy was strictly a Visual Studio coder. It worked great for him. But for me and another coder, we chose Edit+. I wouldn't consider it an IDE. Its just an editor with some nice features. Did it slow us down? If it did, me and this other guy wouldn't have been fired a long time ago. As long as whatever you use gets the job done, this shouldn't be held against the language itself.
Ok, i understand also... i said that because i was surprised with the productivity of building a webservice. For example, in my last job one task i had to do was a comunication with a server of a credit card (called hipercard) to validate and charge.
we had to open a socket on an specific port, understand, implement the specific protocol of them (disgusting), testing and debuging (It took me about one week). If the server had webservices im sure could have done it in one day... PS: I wasn´t fired neither.
PS: an open source implementation of the .net framework is in development (http://www.go-mono.com/)
There's also the DotGnu project in which reimplementing .NET is a part.
i was surprised with the productivity of building a webservice.
Don't fall into the trap of thinking that web services are a Microsoft invention that need .NET to be implemented. All a web service is is a program that is accessible via HTTP (i.e., over the web) that does some sort of processing (i.e., provides a service) for the benefit of another program that is accessing it. I've written web services in PHP; half a dozen of the things scattered around one organisation, all calling on each other to provide what each can't provide itself. The only human interaction is indirectly.
WHy does PHP need 3rd party programs, ive made my own. ASP.Net is only useful for the Windows Server (might i mention at the moment).
PHP
- its interpretated at time of execution (im sure until 4.x) but im not sure about php 5.0
From my understanding that hasnt changed and probably wont.
separation between presentation and business code
PHP
- u need a third party api (i.e. FastTemplate)
Have you ever heard of making your own templating system.
finally what i want to conclude it that PHP its suitable for small/medium applications (where u dont have $$ for buying vs.net, etc or when u want something simple) and asp.net its something more enterprise
Now i dont know how you came to that conclusion. But its 100% incorrect PHP can be used and ive seen it used in enterprise applications. Ill find a link later if i can find it.
Im not saying you dont have good points i just think you need to get your facts striaght, i admit i havent used ASP.Net and too be honest i can not see myself using it
Very basis responses from there but i only skimmed it through.
They also dont have much clue about the comparison saying C++ is like PHP. It should be a comparison between PHP and C, C++ has nothing to do with PHP.
Think of it this way.
i havent used ASP.Net but from what ive seen ASP.Net can do everything PHP and vice versa.
However a fair comparison would be PHP and ASP (remember ASP.Net uses a completely different model to ASP).
They also dont have much clue about the comparison saying C++ is like PHP. It should be a comparison between PHP and C, C++ has nothing to do with PHP.
Well, PHP4 does have some native support for classes and objects, and PHP5 is more object oriented.
That said, one can do OOP in pretty much any programming language.
My rating to asp.net is 3/10 and to 8/10
whatever you says, php is best .
-Easy to learn
-Larger community
-Best user Manual
Here is one simple php coding
<?php
require_once("db.php");
$link=db_connect();
function db_connect()
{
global $dbhost,$dbuser,$dbpass,$dbname;
$result=@mysql_pconnect("$dbhost","$dbuser","$dbpass");
if (!$result) {
return false;
}
if (!@mysql_select_db("$dbname",$result)) {
return false;
}
return $result;
}
$result=mysql_query("SELECT fname,lname FROM user",$link);
while($row=mysql_fetch_array($result)){
echo" First Name :$row[fname] , Last Name :$row[lname]<br>\n";
}
?>
Now .net guys can u do the same thing as easy and shorter way the php did the above things(connect to database,fetch records to array and display it ?
Page navigation and datagrid things in asp.net are nightmare....
I am also learning asp.net for the sake of uni assignment and guess what ,its pain in the ass. Asp.net has their own tags which i hate..
However I do agree asp.net has some good development environment. Do you want me to install vb.net in PC. Do you know how much space and RAM does it take ? And how much vb.net cost ?
OK OK.. lets Talk about Database. thats another story.
Don't fall into the trap of thinking that web services are a Microsoft invention that need .NET to be implemented. All a web service is is a program that is accessible via HTTP (i.e., over the web) that does some sort of processing (i.e., provides a service) for the benefit of another program that is accessing it. I've written web services in PHP; half a dozen of the things scattered around one organisation, all calling on each other to provide what each can't provide itself. The only human interaction is indirectly.
Sure, and its called Web Services Description Language (WSDL) 1.1 http://www.w3.org/TR/wsdl but what i was talking about its some facilities of vs.net has like how to consume an webservice (project, add reference) and that u only need to worry with the coding of the method u want to provide not the configuration, etc...
Have you ever heard of making your own templating system.
Do u mean making an framework for doing this? if so, u have already implemented in php (as millions of things) the freemarker of java as i mentioned before, called FastTemplate http://www.thewebmasters.net/php/FastTemplate.phtm
Now i dont know how you came to that conclusion. But its 100% incorrect PHP can be used and ive seen it used in enterprise applications. Ill find a link later if i can find it.
ok, show me an example other than yahoo, something really critic, that have a heavy load...
Im not saying you dont have good points i just think you need to get your facts striaght, i admit i havent used ASP.Net and too be honest i can not see myself using it
how u can say that php its better if u dont know them? and more, u are write that asp.net can do the same things but how about the alterning coloring lines in a table that was from an query? in asp.net its only an property, in php i had to hard code it.
However a fair comparison would be PHP and ASP (remember ASP.Net uses a completely different model to ASP).
It isnt a totally different model, as we can have in a web site asp coexisting with asp.net. actually there are some point that they arent compatible like configuration files, ado.net & ado.
Now .net guys can u do the same thing as easy and shorter way the php did the above things(connect to database,fetch records to array and display it ?
datagrid is something really powerful if you know how to use, i can do what u have done only with properties of components. (without a line of code)
I am also learning asp.net for the sake of uni assignment and guess what ,its pain in the ass. Asp.net has their own tags which i hate..
in asp.net u dont need to know what is the tag... the vs.net hides from u... u only need to know what methods, what webcontrols to put, etc.
However I do agree asp.net has some good development environment. Do you want me to install vb.net in PC. Do you know how much space and RAM does it take ? And how much vb.net cost ?
sure that php doesnt cost anything, its an advantage of php, but what do u prefer: ram or productivity?
OK OK.. lets Talk about Database. thats another story.
i didnt got the idea...
These language debates erupt periodically and most of the time they devolve to debate about "facts" that at the end of the day are not particularly relevant to getting the work done. Statements about "ready for the enterprise" are particularly silly; "enterprise" is a term used in marketing "spin" and has no technical or quantifiable meaning.
The talk about templating is amusing. Why do you think PHP was written in the first place? Separation of presentation from business logic is a programming discipline, not a technology. If you want to apply an additional abstraction layer to enforce discipline on yourself, go right ahead. There are several. Choice is good. Or simply do your templating in PHP. Nothing wrong with that.
The remarks that PHP is an interpreted language are not correct. PHP3 is interpreted. PHP4 is compiled to bytecode at runtime, then executed, like Perl (an approach that can yield big performance improvements). But really .... who cares? The proper question is "what are the performance implications of using this tool for this particular application?" PHP's performance is well documented, and if you desire to avoid the overhead of runtime compilation, there are several "accelerators" that cache bytecode images of scripts. " There is always a tradeoff of developmental flexibility vs. runtime performance when you use a compiled language; PHP gives you a choice. Choice is good. At the end of the day, if raw speed was your only goal you'd be writing in C and dealing with the issues that would come with that choice.
Third party" is not a bad thing (again, choice is good), and it's worth pointing out that the #1 accelerator comes from the very people who wrote the Zend engine that powers PHP.
You should choose a language that you're comfortable with and solves your business problems with the least overall expense.
But don't overlook the libre aspect of PHP. Free software is not just about free-as-in-beer. If you love ASP and have to use a "development environment" go right ahead; just be aware of who you're dealing with. Microsoft maintains business partners for the purpose of eventually killing and eating them. Don't let your company and your product get fat and tasty. Personally, I regard "migrating to ASP.NET" to be the equivalent of "migrating to the slaughterhouse."
how u can say that php its better if u dont know them? and more, u are write that asp.net can do the same things but how about the alterning coloring lines in a table that was from an query? in asp.net its only an property, in php i had to hard code it
Im sure that must have hurt a lot what is it 3-4lines of code.
To be honest if you think ASP.net is better because of the quick fixes it has your obvious "kissing and wiping there butts" (dont take it personally).
I feel hard coding to be more effective than like i said ASP.Net's quick fix. Ive seen a lot of ASP.Net sites and they seem to break a lot (maybe its just the ASP.Net sites or the programmers doing the work). A simple ' put into a .Net site and i see a nice bit of code.
Now to me this is quite a security risk (ASP.Net developers should look into building there own Error Handling Function/Class, which isnt so revealing).
datagrid is something really powerful if you know how to use, i can do what u have done only with properties of components. (without a line of code)
This is way ASP.Net is so flawed. Like i said a simple ' in a query connecting to a database displays a nice piece of ASP.Net Code.
At the end of the day though it comes down to what you feel comfortable with or whats going to get the job done neither PHP or ASP.Net can do everything.
Originally posted by caxibrema
Sure, and its called Web Services Description Language (WSDL) 1.1 http://www.w3.org/TR/wsdl but what i was talking about its some facilities of vs.net has like how to consume an webservice (project, add reference) and that u only need to worry with the coding of the method u want to provide not the configuration, etc...
And then you discover later that Microsoft has "embraced and extended" the standard and now their version of the concept is compatible only with other Microsoft .NET web services. Don't say that Microsoft doesn't do that.
Problem with that is i there arent many useful Web Services that ive seen that use .Net