Forum Moderators: open
I am primarily a marketing and design person - so advance apologies for what may be a 'silly question' for you!
I work with an external programmer/database integrator, using ASP to control 'dynamically generated' pages or portions of otherwise static HTML pages.
I literally leave 'holes' in a table or HTML layout and indicate with a comment where the database driven content should appear. This is usually to allow clients to maintain certain sections of content within a page. My programmer, who is very good, will then do the rest!
He has suggested that we use PHP4 instead of ASP for future projects. He is an excellent Perl programmer, but I wondered if there are any advantages/disadvantages in using PHP4 over ASP?
As you can probably see from my description above, my projects are not massively complex, database driven sites - rather corporate sites where the requirement for a database solution is 'content management' rather than 'e-commerce'.
Any advice would be greatly appreciated!
My programmer has also said that he 'likes' PHP a lot more than ASP.
The site in question will be hosted on Windows2000 servers with Perl libraries installed and will use a SQL database. I/we have used Perl scripting successfully with this hosting company who are extremely helpful.
Are there specific hosting issues when using PHP4?
Anyone else run into problems with PHP
Hope this helps.
If you are choosing the OS based on the language choice, then I'd consider the databases and functionality. mySQL can't handle a large number of concurrent connections very well, as in hundreds of users requesting database access nearly simultaneously. While PHP can connect to Oracle, SQL server, postgres, access, or anything else, many of these are traditionally run on a Windows platform and having 2 machines(one the web server, the other a database server) may not be ideal. Also consider things like email functionality mentioned above as well as the need to interact with microsoft components or whatnot.
I've never used ASP, because most of the stuff I write is designed for a unix environment and budget is also an issue. But I don't always write in PHP either. Depending on the application, I may toggle sections of the system into pure compiled C++, which can perform much faster calculations but is a bear regarding ease of programming for the web. Its all about picking the right tool for the job. It sounds like your programmer has a few tools available to him/her which is very good.
1. I use office 2000 to get my site on the go, and uses ASP to connect to a database "dictionary of terms". I guess I dont really have to know anything about ASP for that. And eh, the server is Windows NT
2. Im learning C at college. I hope to continue learning it and become proficient in the language.
Whats the similarities between C and PHP/ASP? And what road should I go down when I become handy with C? Its a little vague n off topic but im sure an experienced user can cast their memory back to when they were as much in the dark as I :)
I hear about this ASP / PHP debate all the time. Seems like Unix is preferred over windows, and thus PHP is preferred over ASP
Binary file attachments to multipart forms. PHP 4.0.* had a flaw which prepended the content-type to files, thus corrupting binary files.
Since 4.1.* is not yet stable (since I last checked), you may get stuck with 4.0.* and therefore run into this problem if you are dealing with and type of client file uploads.
I know this was a big deal on the *nix side of things, but I'm pretty sure it was not a problem with Micro$oft products, as a result of the Windows executable.
With PHP, you simply do not have the customization, simplicity, documentation, or support that comes along with becoming a PHP developer.
On the hosting.. you should rely on a Linux box. Anything Micro$oft is guaranteed to drop off the network sooner or later. I've done, and seen, enough NT administration to make me sick to my stomach.. and 2000 is no better.
Good luck.
I actually ran Spinnaker (yes there was such a beast not so long ago), then move to ASP. Then I had to hire some programmers because I was unable to maintain some of the sites.
Three things I discovered - there are more PHP programmers, they are cheaper, and they know much more then ASP programmers. I run PHP exclusively now.
ASP is essentially 6 objects that get invoked under IIS. If you read a database and the database takes 10 seconds to respond, then the poor response is caused by the database.
If the server can only handle 5 simultaneous users and everyone else waits then it is the server that is causing the poor response.
If your ISP is being overwhelmed with traffic, then the ISP is the bottleneck. I have a site that is serving 25000 to 30000 pages an hour during peak activity. This is because ASP is fast to server pages that fast when all the pieces are put together properly.
PHP means Personal Home Pages was developed for that market. ASP was developed for high volume sites. ASP.NET moves the performance notch up by using compiled code instead of interpeted code.
[Added]That's also not what it's used for. It's used with all sorts of sites now. It's not just a developers special tool for his personal home page anymore.[/Added]
For more info on PHP, visit this page [ru.php.net...]
Java by its very nature is interpeted and files the role of Javascript, VBScript and Perlscript. JSP, I expect is made up of compiled objects just as ASP.
The current version of ASP (ASP.NET) compiles Visual Basic, C#, J++(Microsoft's version of Java) and Perl and a dozen other languages too, including COBOL.
I don't really follow when you say that Java is "by its nature interpreted." Before you can run a java servlet or a JSP page you must compile it, therefore it is not purely interpreted. When I say purely interpreted I am talking about things like VBscript and JavaScript...
So the difference between ASP and JSP pages is that you have to compile a JSP page and only then you can run it, ASP page runs without compiling and has to be interpreted every time user asks for it. Yes you can instantiate compiled COM objects in ASP, but the ASP page itself is still interpreted. With JSP you can you beans and servlets in a similar way to COM objects, but the JSP
page itself is compiled into a java servlet. You also can write a JSP page in JavaScript but it is a little convoluted (requires special add-ins) and it is simpler to write JSP in Java.
When you are talking ASP.NET you are talking a totally different animal than ASP.
ASP.NET has a lot more in common with JSP than it has with ASP. ASP.NET is compiled to run on an engine (common language runtime) similar to the one required to run JSP (Java virtual machine), With one big difference being that you have to run Microsoft engine on Microsoft platform of course ... :)
<added>
Don't get me wrong, I am not anti-Microsoft. I am actually very excited about writing a .NET based production system. If you believe Microsoft ASP.NET is supposed to beat the pants off the whole JSP/J2EE team...
[gotdotnet.com...]
</added>
[php.weblogs.com...]
Since the programmer guy knows Perl, he'd probably be much happier with PHP. PHP was made from the best bits of all the main UNIX languages, including Perl and C.
Regarding the pet shop, there are too many holes in that to be called a proper benchmark, it's just another typical microsoft spin document. That's not to say I dont think Java is slower (I'm quite a pro Java person, however speed has never been one of its high points). But I really dont agree with that comparison as a benchmark, especially since Suns version wasnt meant as a benchmark peice of code, but rather designed to show the portability of the langauge.
[theregister.co.uk...] - "Pet vs Pet: MS opens .NET benchmarking wars"
Aaaanyway, arnt we comparing PHP to ASP not JSP.
I work as a server side programmer, doing mostly ASP, if I'm lucky we get some Perl through. The only time I've had to touch PHP is in my free time (ya see, my boss is something of a drone to the Microsoft wagon), and I have to say I love it (However Perl will always be my number 1 language). The language is so much more pleasing to write, the ASP syntax gets on my nerves it's so patronising. And if a programmer is happy writing a langauge, they will be more productive (which is why I'm writing this and not the ASP code I'm supposed to be doing, dont tell the boss :P ).
PHP is available for more platforms. It irritates me when people say "Windows is more available so lets just use ASP with IIS", they have just let Microsoft make the desision for them. Greater market share doesnt technically mean better, we all know Microsoft are sitting in the docks now facing the Anti-Trust law suit. I'm sure you are grown up enough to make desisions by yourself. Maybe even run some of your own benchmarks, who knows you may get some interesting results since you'll be testing on your hardware.
PHP has speed. Open Source is a great for many reasons, and in this case, you can compile the PHP environment yourself for your hardware so that it will take advantage of your processor instructions and cache better. ASP comes in 1 size fits all flavour only, sure they will have some optimisations, but you cant beat compiling it on your own hardware.
Now add to that compiling Apache, MySQL (or your choice of DB app) and your own compiled Linux (or any *NIX you like) Operating System and you have one heck of a fast web server.
Security exploits. Microsoft has problems with bad press we all know this, and they really hate it when someone finds a bug that can be exploited to take over a PC or DDoS (Code Red, nimda). These cant be helped, programmers are just humans, we make mistakes, let us forgive them. However, Microsoft are more and more beginning to keep exploits they find a secret (they even have a nice little group in which to keep their secrets, awwwww) and patching them up. Now at first, all is well and good, if they dont tell anyone there is a whole, then no one will exploit it right? Wrong... "Security through obscurity is no security at all" a well known phrase every one who has had to deal with locking up servers should know. All they do is leave those hapless people running IIS vulnarable until they can be bothered to patch it (maybe they delay the patch until the next service pack... hey who cares? no one knowns right?) or someone else finds out about it, then they can spring into action with a patch really early and look like the good guys.
Again, Open Source wins here, it encourages people to look through the code, bring exploits to the attention of the authors and the public. Now owners of the software will easily know they are vulnrable, and they can take intermediate steps to prevent it while they wait for the official patch (heck, they can patch it themselves, they have the source! but most people arnt up to this, I know I couldnt). With more and more eyes looking though the code for various reasons, there will be people spotting possible holes in the code, it may not have been what they were looking for, but with more eyes you can bring to light any potential problems faster. And with the exploits being made public, the programmers working on the project and others can learn from the mistakes made, thus improving the level of quality of the code and ending world hunger (okay the last bit is over the top, you get the idea).
[theregister.co.uk...] - "MS says stop discussing hack exploits"