Re: Re[3]: [PHP] How to argue with ASP people...
It should be noted that the MS KnowledgeBase article about trying to do a dynamic include (as of when I last used ASP, years ago) made absolutely NO mention of using: !--#include %=FileName% --! and tells you to just 'read' and 'print' the file -- which doesn't execute the ASP at all, and there is no 'eval' function (as far as I could find). So, assuming this #include stuff actually works, I guess it's just the documentation that sucked, not the actual technology. For *THIS* problem. I fought with ASP for only a few months, but it felt like years, and I hated every minute of it. I actually wrote comments in ASP like: % /* Microsoft sucks, Microsoft sucks Can't moveFirst in an empty record set */ % My co-workers knew when such comments were written, since I would sing them as I typed. (Yes, really) I had a lonng song before that two months was up... Boolean expressions don't short-circuit is another verse I recall, off the top of my head. Sadly, I lost all my copies of that song/project. Oh well. If somebody out there actually *LIKES* ASP VBScript programming, more power to them -- So long as I don't have to ever use it again, I don't care what you use. Oh yeah, here's a good one: *EVERY* error message coming back from SQL Server had the same error number -- Even when the error *message* was different! That's got to be in the running for dumbest software design choice on the planet. TimeLife music presents a collection unlike any other. **The Best of Richard Lynch** Remember the classics such as - Microsoft Sucks, Microsoft Sucks! - Can't moveFirst in an Empty Record Set - Boolean Expressions Don't Short-Circuit and the ever classic - ASP, I Think It's Giving Me Cancer of the Rectum And for a limited time, we'll include documentation that leaves out most of what you're looking for. Order yours today! -- --Matthew Sims --http://killermookie.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Ya.. I just had an argument with my collegue (who is ASP programmer). He said that in ASP he can use a global variable to store the counter and then when the IIS is shutting down he can grab that event and dump the counter variable to a text file. I just betted him that i can also do that with PHP. /sagar - Original Message - From: Chris Shiflett [EMAIL PROTECTED] To: Sagar C Nannapaneni [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, January 04, 2005 10:12 PM Subject: Re: [PHP] How to argue with ASP people... --- Sagar C Nannapaneni [EMAIL PROTECTED] wrote: But just 2 days ago i came along a situation where i have to write a hit counter for my website without using a database or a text file. Just using a global variable i wanted to do this. I dont know whether php can do this...(or may b i missed it out)...but i couldnt get any equivalent thing in php like we have GLOBAL.ASA in ASP. If GLOBAL.ASA isn't considered a text file, then you can probably use SQLite. Just don't call it a database. :-) What sort of situation did you encounter where you were required to persist data without the two primary means of doing so? You can persist data in memory, I guess, depending on how permanent you need this to be - your hit counter would be reset when the server reboots. It could be like the high scores on an arcade machine. :-) Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[3]: [PHP] How to argue with ASP people...
On Tue, 4 Jan 2005, Richard Davey wrote: Hello Ron, Tuesday, January 4, 2005, 5:59:31 PM, you wrote: RC You then do %=filen% to go back into ASP to get the value of the RC variable into the HTML code that you wrote. ASP is not including the file, RC it is only supplying a file name for SSI includes whether apache SSI or RC IIS SSI. The server parsing the HTML recognizes the HTML comment is RC sentax for server side include and includes the suppplied file name. Perhaps this is a better example for you: script1.asp % StrName = bob % script2.asp !--#include file=script1.asp-- % Response.Write Hello StrName % Clearer now? I understand what you're saying perfectly, but in the context of ASP scripts I am afraid it's wrong. Best regards, Richard Davey -- With this new example you are still using SSI from the web server to include an ASP file. ASP itself is not including the file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[3]: [PHP] How to argue with ASP people...
[snip] ...stuff... [/snip] I think we can all agree that PHP and ASP can do the same things, so the one glaring difference is COST. An efficient Apache / PHP server can be set up for much less than an IIS / ASP server, even if you take the same 'box' to do it with. Given the same 'box' you will find the Apache / PHP server to be much more efficient. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: Re[3]: [PHP] How to argue with ASP people...
On Wed, 5 Jan 2005, Jay Blanchard wrote: [snip] ...stuff... [/snip] I think we can all agree that PHP and ASP can do the same things, so the one glaring difference is COST. An efficient Apache / PHP server can be set up for much less than an IIS / ASP server, even if you take the same 'box' to do it with. Given the same 'box' you will find the Apache / PHP server to be much more efficient. I totally agree and would add more secure -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
--- Sagar C Nannapaneni [EMAIL PROTECTED] wrote: I just had an argument with my collegue (who is ASP programmer). He said that in ASP he can use a global variable to store the counter and then when the IIS is shutting down he can grab that event and dump the counter variable to a text file. I just betted him that i can also do that with PHP. This just demonstrates that your colleague may not really know what a global variable is - what is really happening. Not understanding the underlying mechanism certainly isn't a unique characteristic of ASP developers (many PHP developers are guilty of the same), but it seems to be more prevalent among them. I credit this mostly to the unnecessary abstraction of details in the language. Of course, this comes down to a difference in perspective. ASP development places more responsibility on the language and less on the developer - much like Java. It is safer. PHP places more responsibility on the developer and less on the language - much like C. It is more flexible. As a manager, you like ASP and Java, because they limit the likelihood of your developers making a mistake. As a developer, you like PHP and C, because you want the power and flexibility, and you have confidence in yourself. This isn't true for everyone. Some managers are technically astute and choose flexibility over safety, having confidence in their ability to manage the project as well as hire skilled developers. Some developers choose safety over flexibility, because they see programming as a job, not a craft, and they're not looking to impress anyone - they just want a paycheck. Ask your colleague if there is a tradeoff concerning the convenience of a persistent process when it comes to performance and scaling issues. There are advantages and disadvantages to each, and PHP certainly doesn't win on all fronts. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[3]: [PHP] How to argue with ASP people...
It should be noted that the MS KnowledgeBase article about trying to do a dynamic include (as of when I last used ASP, years ago) made absolutely NO mention of using: !--#include %=FileName% --! and tells you to just 'read' and 'print' the file -- which doesn't execute the ASP at all, and there is no 'eval' function (as far as I could find). So, assuming this #include stuff actually works, I guess it's just the documentation that sucked, not the actual technology. For *THIS* problem. I fought with ASP for only a few months, but it felt like years, and I hated every minute of it. I actually wrote comments in ASP like: % /* Microsoft sucks, Microsoft sucks Can't moveFirst in an empty record set */ % My co-workers knew when such comments were written, since I would sing them as I typed. (Yes, really) I had a lonng song before that two months was up... Boolean expressions don't short-circuit is another verse I recall, off the top of my head. Sadly, I lost all my copies of that song/project. Oh well. If somebody out there actually *LIKES* ASP VBScript programming, more power to them -- So long as I don't have to ever use it again, I don't care what you use. Oh yeah, here's a good one: *EVERY* error message coming back from SQL Server had the same error number -- Even when the error *message* was different! That's got to be in the running for dumbest software design choice on the planet. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
[snip] I'm a passionate freak of PHP from the past 4 years (that i can remember). And i love everything that php can do. But just 2 days ago i came along a situation where i have to write a hit counter for my website without using a database or a text file. Just using a global variable i wanted to do this. I dont know whether php can do this...(or may b i missed it out)...but i couldnt get any equivalent thing in php like we have GLOBAL.ASA in ASP. [/snip] What do you think GLOBAL.ASA is? From M$, - A file that stores information about an Internet Information Services (IIS) application, such as initialization in structures, and objects that have been given application scope. So, you still have to use a text file. Next! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Sagar C Nannapaneni wrote: I'm a passionate freak of PHP from the past 4 years (that i can remember). And i love everything that php can do. But just 2 days ago i came along a situation where i have to write a hit counter for my website without using a database or a text file. Just using a global variable i wanted to do this. Not possible in any language. Well, it's possible in a way I guess. The count could be stored in memory, but as soon as the box is restarted, memory is dumped, etc., you'll lose the count. I dont know whether php can do this...(or may b i missed it out)...but i couldnt get any equivalent thing in php like we have GLOBAL.ASA in ASP. GLOBAL.ASA uses a file to retain it's settings. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Leif Gregory wrote: Hello Richard, Monday, January 3, 2005, 11:27:05 AM, you wrote: RL ASP has no include function. This makes life very very very RL difficult to write decent code. Not that I like ASP, and I'm not an ASP guru by any means, but this statement is incorrect AFAICS. I use to do this all the time in ASP. !-- #include virtual=includes/databaseconnect.asp -- I'm not an ASP guru either, but this doesn't look like ASP syntax to me. This looks like an Apache SSI. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
[EMAIL PROTECTED] wrote: !-- #include virtual=includes/databaseconnect.asp -- is html... :-) /G @varupiraten.se Standard comment in HTML, but it has another use with Apache, and I didn't find any reference to this type of syntax for ASP. From the Apache Docs at http://httpd.apache.org/docs/howto/ssi.html... Including the results of a CGI program This is one of the more common uses of SSI - to output the results of a CGI program, such as everybody's favorite, a ``hit counter.'' !--#include virtual=/cgi-bin/counter.pl -- Including a standard footer If you are managing any site that is more than a few pages, you may find that making changes to all those pages can be a real pain, particularly if you are trying to maintain some kind of standard look across all those pages. Using an include file for a header and/or a footer can reduce the burden of these updates. You just have to make one footer file, and then include it into each page with the include SSI command. The include element can determine what file to include with either the file attribute, or the virtual attribute. The file attribute is a file path, relative to the current directory. That means that it cannot be an absolute file path (starting with /), nor can it contain ../ as part of that path. The virtual attribute is probably more useful, and should specify a URL relative to the document being served. It can start with a /, but must be on the same server as the file being served. !--#include virtual=/footer.html -- -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] How to argue with ASP people...
Hello John, Tuesday, January 4, 2005, 2:52:27 PM, you wrote: JN Standard comment in HTML, but it has another use with Apache, and I JN didn't find any reference to this type of syntax for ASP. !--#include file=whatever.asp -- and !--#include virtual=whatever.asp -- are both perfectly valid ASP syntax that will work on **IIS** Obviously you can do the usual stuff as in PHP, with: % filen = header.inc % !--#include file=%=filen%-- etc etc It's no different really. PHP might be significantly better than ASP, but it's still not *that* archaic! Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Richard Davey wrote: Hello John, Tuesday, January 4, 2005, 2:52:27 PM, you wrote: JN Standard comment in HTML, but it has another use with Apache, and I JN didn't find any reference to this type of syntax for ASP. !--#include file=whatever.asp -- and !--#include virtual=whatever.asp -- are both perfectly valid ASP syntax that will work on **IIS** Obviously you can do the usual stuff as in PHP, with: % filen = header.inc % !--#include file=%=filen%-- etc etc It's no different really. PHP might be significantly better than ASP, but it's still not *that* archaic! But, is !--#include virtual=whatever.asp -- actually calling the file from the ASP script like include() and require() will do in PHP? Or is it ISS calling the file after the script is processed in the same manner that Apache would call !--#include virtual=whatever.html -- with SSI? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
--- Sagar C Nannapaneni [EMAIL PROTECTED] wrote: But just 2 days ago i came along a situation where i have to write a hit counter for my website without using a database or a text file. Just using a global variable i wanted to do this. I dont know whether php can do this...(or may b i missed it out)...but i couldnt get any equivalent thing in php like we have GLOBAL.ASA in ASP. If GLOBAL.ASA isn't considered a text file, then you can probably use SQLite. Just don't call it a database. :-) What sort of situation did you encounter where you were required to persist data without the two primary means of doing so? You can persist data in memory, I guess, depending on how permanent you need this to be - your hit counter would be reset when the server reboots. It could be like the high scores on an arcade machine. :-) Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
John Nichel wrote: Richard Davey wrote: Hello John, Tuesday, January 4, 2005, 2:52:27 PM, you wrote: JN Standard comment in HTML, but it has another use with Apache, and I JN didn't find any reference to this type of syntax for ASP. !--#include file=whatever.asp -- Sorry. I left out the word dynamic when I type the original complaint. You can't do: include /known/safe/path/$whatever.asp and have it pull in ASP and evaluate it. Or am I mis-remembering the horrors of ASP? It's been awhile since I've used it, and you don't have enough money to make me use it again. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] How to argue with ASP people...
Hello John, Tuesday, January 4, 2005, 4:32:13 PM, you wrote: JN But, is !--#include virtual=whatever.asp -- actually calling the JN file from the ASP script like include() and require() will do in PHP? Yes. We used to split all of our ASP projects up this way - a class includes for the database abstraction, one for templating, an overall config one that held global vars and loaded the rest of the includes, etc - sound familiar? :) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] How to argue with ASP people...
Hello Richard, Tuesday, January 4, 2005, 5:28:18 PM, you wrote: RL You can't do: RL include /known/safe/path/$whatever.asp RL and have it pull in ASP and evaluate it. Actually, you can. RL and you don't have enough money to make me use it again. Likewise, I have no intentions of using ASP again either, but it can still do it. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] How to argue with ASP people...
On Tue, 4 Jan 2005, Richard Davey wrote: Hello John, Tuesday, January 4, 2005, 2:52:27 PM, you wrote: JN Standard comment in HTML, but it has another use with Apache, and I JN didn't find any reference to this type of syntax for ASP. !--#include file=whatever.asp -- and !--#include virtual=whatever.asp -- are both perfectly valid ASP syntax that will work on **IIS** Obviously you can do the usual stuff as in PHP, with: % filen = header.inc % !--#include file=%=filen%-- When you do % then you have broken out of ASP and are now writing HTML. You then do %=filen% to go back into ASP to get the value of the variable into the HTML code that you wrote. ASP is not including the file, it is only supplying a file name for SSI includes whether apache SSI or IIS SSI. The server parsing the HTML recognizes the HTML comment is sentax for server side include and includes the suppplied file name. Ron Clark Sysadmin/Webmaster Armstrong Atlantic State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[3]: [PHP] How to argue with ASP people...
Hello Ron, Tuesday, January 4, 2005, 5:59:31 PM, you wrote: RC You then do %=filen% to go back into ASP to get the value of the RC variable into the HTML code that you wrote. ASP is not including the file, RC it is only supplying a file name for SSI includes whether apache SSI or RC IIS SSI. The server parsing the HTML recognizes the HTML comment is RC sentax for server side include and includes the suppplied file name. Perhaps this is a better example for you: script1.asp % StrName = bob % script2.asp !--#include file=script1.asp-- % Response.Write Hello StrName % Clearer now? I understand what you're saying perfectly, but in the context of ASP scripts I am afraid it's wrong. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[3]: [PHP] How to argue with ASP people...
--- Richard Davey [EMAIL PROTECTED] wrote: Perhaps this is a better example for you: script1.asp % StrName = bob % script2.asp !--#include file=script1.asp-- % Response.Write Hello StrName % Clearer now? It looked to me like he understood before. If your example is the only way to include files, it demonstrates that ASP cannot do it (ASP stuff happens between % and %), but that this limitation doesn't prevent an ASP developer from modularizing code when there is support for SSI. The point is that you're relying on a mechanism in the server (e.g., Apache or IIS) and not in the language. The include and require language constructs in PHP can be used independently of support for SSI. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming Soon http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[5]: [PHP] How to argue with ASP people...
Hello Chris, Wednesday, January 5, 2005, 12:58:43 AM, you wrote: CS but that this limitation doesn't prevent an ASP developer from CS modularizing code when there is support for SSI. There is always support for SSI on IIS, infact removing this support is a registry editing hassle in its own right. So to assume you will have this functionality is, unlike with Apache, perfectly valid for the vast majority of ASP developers. Still, you are right it is indeed a server controlled feature, it is however one you can actually rely on having. I guess from M$'s point of view it makes sense - to them you only host ASP pages on IIS boxes, and IIS always pushes scripts through the SSI DLL, so there was probably no real need to duplicate an already existing feature. It is a testament to PHPs vision they think more outside the box than this, but the net result is the same. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Hello Richard, Tuesday, January 4, 2005, 10:28:18 AM, you wrote: RL Or am I mis-remembering the horrors of ASP? It's been awhile since RL I've used it, and you don't have enough money to make me use it RL again. You're telling me!!! grin I wrote three, count 'em, all of three ASP database front ends before I'd even heard of PHP. I then got into PHP and just a month ago I was asked to make a few changes to one of those ASP apps I did a cpl years back and I sat there staring at the code going Where the H*ll did all the opening and closing curly braces go? I can't tell where a while statement ends and a for loop begins. It actually took me a while of staring at it before anything started coming back to me. After I made the changes, I just felt, well, so dirty ;-) Cheers, Leif Gregory -- TB Lists Moderator (and fellow registered end-user) PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F Web Site http://www.PCWize.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
I was happy as an ASP developer - you can use MSXSL for XML processing, ADO for database, and the file scripting object for file processing. The weakness shows up when you want to do something that Microsoft has not built into ASP or JavaScript or the COM objects I just listed. You're stuck writing your own COM object in VB or C++. I was in a C++ shop and writing C++ COM components for use in ASP is just horrible. PHP has a much larger library. Try to find something you need to do that will require you to write a COM component if you use ASP, and it's built into PHP. On Thu, 30 Dec 2004 08:38:18 -0800, Tony Di Croce [EMAIL PROTECTED] wrote: I am fairly new to PHP, but I am loving it... I have recently gotten involved in a business venture and I have been using PHP so far... Recently I have taken on a partner, and he is a big ASP guy... I am not totally against ASP, but it would have to be pretty good to get me to switch at this point (PHP seems to do everything I need)... But I will need to convince him of this... What points can I bring up in PHP's favor? In what areas does PHP trounce ASP? -- td -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
You can spend a small fortune in ASP adding in COM objects (or writing them) so it will eventually have maybe HALF the functionality of PHP. http://php.net/ ASP's Object Oriented feature set is a joke. All the object-ness is built into pre-packaged stuff from MS -- You can't actually create a class. ASP has no include function. This makes life very very very difficult to write decent code. ASP database drivers are slower than PHP's, for those few databases that ASP even supports. $$$ -- ASP costs a *LOT* more than PHP, by the time you get done factoring in *ALL* expenses. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Hello Richard, Monday, January 3, 2005, 11:27:05 AM, you wrote: RL ASP has no include function. This makes life very very very RL difficult to write decent code. Not that I like ASP, and I'm not an ASP guru by any means, but this statement is incorrect AFAICS. I use to do this all the time in ASP. !-- #include virtual=includes/databaseconnect.asp -- Cheers, Leif Gregory -- TB Lists Moderator (and fellow registered end-user) PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F Web Site http://www.PCWize.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Not to offend u or backup ASP but ur just wrong... You said: You can't actually create a class. That's not true! u might not be knowing the syntax of creating a class in vb or js script. Sorry but this is the truth my friend. On Mon, 3 Jan 2005 10:27:05 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: You can spend a small fortune in ASP adding in COM objects (or writing them) so it will eventually have maybe HALF the functionality of PHP. http://php.net/ ASP's Object Oriented feature set is a joke. All the object-ness is built into pre-packaged stuff from MS -- You can't actually create a class. ASP has no include function. This makes life very very very difficult to write decent code. ASP database drivers are slower than PHP's, for those few databases that ASP even supports. $$$ -- ASP costs a *LOT* more than PHP, by the time you get done factoring in *ALL* expenses. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- M.Saleh.E.G 97150-4779817 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
I'm a passionate freak of PHP from the past 4 years (that i can remember). And i love everything that php can do. But just 2 days ago i came along a situation where i have to write a hit counter for my website without using a database or a text file. Just using a global variable i wanted to do this. I dont know whether php can do this...(or may b i missed it out)...but i couldnt get any equivalent thing in php like we have GLOBAL.ASA in ASP. /sagar - Original Message - From: M Saleh EG [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: John Sands [EMAIL PROTECTED]; php-general@lists.php.net Sent: Tuesday, January 04, 2005 11:14 AM Subject: Re: [PHP] How to argue with ASP people... Not to offend u or backup ASP but ur just wrong... You said: You can't actually create a class. That's not true! u might not be knowing the syntax of creating a class in vb or js script. Sorry but this is the truth my friend. On Mon, 3 Jan 2005 10:27:05 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: You can spend a small fortune in ASP adding in COM objects (or writing them) so it will eventually have maybe HALF the functionality of PHP. http://php.net/ ASP's Object Oriented feature set is a joke. All the object-ness is built into pre-packaged stuff from MS -- You can't actually create a class. ASP has no include function. This makes life very very very difficult to write decent code. ASP database drivers are slower than PHP's, for those few databases that ASP even supports. $$$ -- ASP costs a *LOT* more than PHP, by the time you get done factoring in *ALL* expenses. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- M.Saleh.E.G 97150-4779817 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
mail.pmpa wrote: Can I do any session handling before calling header(Location: $url); ? Yeah, sure. You just can't have any output before you redirect with a Location header (unless you use output buffering as a workaround). This is basic HTTP and ASP has to play by the same rules. If you can have output before Response.Redirect, then ASP is just doing the buffering for you before it sends a Location header. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] How to argue with ASP people...
Hello John, Friday, December 31, 2004, 8:14:31 AM, you wrote: JH This is basic HTTP and ASP has to play by the same rules. If you JH can have output before Response.Redirect, then ASP is just doing JH the buffering for you before it sends a Location header. Which is exactly what it does. It would be interesting to see a how to do X from ASP in PHP article perhaps :) Doing a reverse type article would require lots of you must buy this component, install this DLL, etc though ;) Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Hello Tony, Thursday, December 30, 2004, 4:38:18 PM, you wrote: TDC I am not totally against ASP, but it would have to be pretty good TDC to get me to switch at this point (PHP seems to do everything I TDC need)... But I will need to convince him of this... While I know for sure that there is nothing ASP can do that PHP cannot, I think your question should perhaps relate to your business venture more than a personal is it better or worse?. ASP, on a Windows server, is actually a very stable development platform - just as PHP is. If you have specific needs for components that already exist in the ASP world, then perhaps it is a better route for you. Or if you simply must host on a Windows server (although that's another security related kettle of fish altogether), then again ASP would work. Ultimately what are you express needs? because PHP can confidently do anything you realistically need of it - so it doesn't really come down to features at the end of the day. It comes down to requirements. Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services I am not young enough to know everything. - Oscar Wilde -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
I used response.redirect in asp to avoid form re-submit, so I can have form handling functions and other related functions on the same file. new_customer_form.php : form action=form_results.php Customer fills form and hits submit button. form_results.php : function validate_form_data(){ if true show_results(); } function show_results() {...} Now customer is on results page in show_results(). If he hits the Refresh button or Back then Forward buttons in he will be prompt to resubmit the form data or cancel. If I add header(Location: form_results.php) inside function validate_form_data() instead of calling function show_results() I can avoid this behaviour. I don't know if this is the right procedure, i am learning as I develop. This was a workaround for shopping cart and customer area form handling form handling code. Probably I'm doing it all wrong :) And Robby thanks for the ob_start() tip! I apologise for my bad English writing. Pedro Almeida. -Mensagem original- De: John Holmes [mailto:[EMAIL PROTECTED] Yeah, sure. You just can't have any output before you redirect with a Location header (unless you use output buffering as a workaround). This is basic HTTP and ASP has to play by the same rules. If you can have output before Response.Redirect, then ASP is just doing the buffering for you before it sends a Location header. John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
mail.pmpa wrote: I used response.redirect in asp to avoid form re-submit, so I can have form handling functions and other related functions on the same file. new_customer_form.php : form action=form_results.php Customer fills form and hits submit button. form_results.php : function validate_form_data(){ if true show_results(); } function show_results() {...} Now customer is on results page in show_results(). If he hits the Refresh button or Back then Forward buttons in he will be prompt to resubmit the form data or cancel. If I add header(Location: form_results.php) inside function validate_form_data() instead of calling function show_results() I can avoid this behaviour. I don't know if this is the right procedure, i am learning as I develop. This was a workaround for shopping cart and customer area form handling form handling code. Probably I'm doing it all wrong :) Yeah, this is a good method for a lot of form processing. It's as simple as having the processing/validating in one area and the form/error display in another. Once the form is accepted/rejected, you just header() redirect to the form or error page. Too easy and it prevents a lot of confusion for your users. And Robby thanks for the ob_start() tip! This is a workaround, really. Your code should be structured so that you can decide if you need to perform a redirect before any output is sent to the browser. If you're going to send them to another page, why would you have any output anyhow? Using templates sometimes forces you to do this, as you perform all of your business logic / PHP code before hand and then display the appropriate templates. If you need to send the user to another page, it's easy to do so at any point before your templates are shown. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
-Mensagem original- De: John Holmes This is a workaround, really. Your code should be structured so that you can decide if you need to perform a redirect before any output is sent to the browser. If you're going to send them to another page, why would you have any output anyhow? Using templates sometimes forces you to do this, as you perform all of your business logic / PHP code before hand and then display the appropriate templates. If you need to send the user to another page, it's easy to do so at any point before your templates are shown. ---John Holmes... Yes you are right, that is what I am doing now, taking all validation / verification functions that do not output html to top, after session handling. This is my first php application as I am migrating from asp and trying to mirror my application in php. I have separate php files to handle different areas of the site and like you say I use header+footer sort of template. Thanks. Happy New Year! Pedro Almeida. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
the ob_start() in ASP is Response.Buffer=True ASP doesnt handle it for you automaticaly! Just wanted to notify ;) On Fri, 31 Dec 2004 03:14:31 -0500, John Holmes [EMAIL PROTECTED] wrote: mail.pmpa wrote: Can I do any session handling before calling header(Location: $url); ? Yeah, sure. You just can't have any output before you redirect with a Location header (unless you use output buffering as a workaround). This is basic HTTP and ASP has to play by the same rules. If you can have output before Response.Redirect, then ASP is just doing the buffering for you before it sends a Location header. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- M.Saleh.E.G 97150-4779817 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to argue with ASP people...
I am fairly new to PHP, but I am loving it... I have recently gotten involved in a business venture and I have been using PHP so far... Recently I have taken on a partner, and he is a big ASP guy... I am not totally against ASP, but it would have to be pretty good to get me to switch at this point (PHP seems to do everything I need)... But I will need to convince him of this... What points can I bring up in PHP's favor? In what areas does PHP trounce ASP? -- td -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Tony Di Croce wrote: I am fairly new to PHP, but I am loving it... I have recently gotten involved in a business venture and I have been using PHP so far... Recently I have taken on a partner, and he is a big ASP guy... I am not totally against ASP, but it would have to be pretty good to get me to switch at this point (PHP seems to do everything I need)... But I will need to convince him of this... What points can I bring up in PHP's favor? In what areas does PHP trounce ASP? First of all, ASP doesn't run on anything but Windows servers (unless you're willing to use ChiliASP... *hiss*) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Daniel Schierbeck wrote: Tony Di Croce wrote: What points can I bring up in PHP's favor? In what areas does PHP trounce ASP? First of all, ASP doesn't run on anything but Windows servers (unless you're willing to use ChiliASP... *hiss*) Exactly! Portability is key. Not being locked into a particular OS or web server allows for much more flexibility as you go forward. - Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
Ben wrote: Daniel Schierbeck wrote: Tony Di Croce wrote: What points can I bring up in PHP's favor? In what areas does PHP trounce ASP? First of all, ASP doesn't run on anything but Windows servers (unless you're willing to use ChiliASP... *hiss*) Exactly! Portability is key. Not being locked into a particular OS or web server allows for much more flexibility as you go forward. - Ben Flexibility of usage is another one. Most PHP code out there has a license agreement that is pretty flexible (e.g. PHP license) and will allow you to sell the code, build commercial projects derived from the code, or use the code for your own personal (read: free) usage. Most importantly: most PHP code out there is open source and plain text. So if you want to change something you can usually do it with ease. Or you can at least see how it works and build something on your own that fits your purposes better. I have learned a *tremendous* amount about how things work in the web by just looking at what other people have done in their projects (e.g. PEAR projects) and reading their comments (if the author bothered to comment the code :) ). -- Teach a person to fish... Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html PHP Manual: http://php.net/manual/ php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) * Happy New Year * Pedro Almeida. -Mensagem original- De: Tony Di Croce [mailto:[EMAIL PROTECTED] I am fairly new to PHP, but I am loving it... I have recently gotten involved in a business venture and I have been using PHP so far... Recently I have taken on a partner, and he is a big ASP guy... (...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
mail.pmpa wrote: Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) header(Location: $url); which, by the way, makes a hell of a lot more sense. It's just an HTTP response header like any other response header and it is called Location, not Redirect. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
On Fri, 2004-12-31 at 02:49 +, mail.pmpa wrote: Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) * Happy New Year * Pedro Almeida. Sure you can.. class Response { function redirect($location) { header(Location: . $location); } function write($text) { print $text; } } Response::Redirect(http://www.planetargon.com/;); Response::Write(bar); There, now we can compete with ASP. ;-) -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting Development *--- Now supporting PHP5 --- / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to argue with ASP people...
mail.pmpa wrote: Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) http://us4.php.net/header -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
Can I do any session handling before calling header(Location: $url); ? Pedro Almeida. -Mensagem original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] mail.pmpa wrote: Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) header(Location: $url); which, by the way, makes a hell of a lot more sense. It's just an HTTP response header like any other response header and it is called Location, not Redirect. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to argue with ASP people...
sure, add this to the top of your file: ob_start(); On Fri, 2004-12-31 at 04:50 +, mail.pmpa wrote: Can I do any session handling before calling header(Location: $url); ? Pedro Almeida. -Mensagem original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] mail.pmpa wrote: Don't mean to start a discussion whatsoever, I love php, but one thing i can't do in php is Response.Redirect . Apart from that no complains so far :) header(Location: $url); which, by the way, makes a hell of a lot more sense. It's just an HTTP response header like any other response header and it is called Location, not Redirect. -Rasmus -- /*** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting Development *--- Now supporting PHP5 --- / -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php