11-17-2004, 04:20 AM | #1 (permalink) |
Addict
|
PHP or ASP
I'm creating a database for a website. I have a basic understanding of PHP (reading and writing from files, passing variables around).
Would it be better to carry on with PHP or to learn ASP to connect the site with my database. I also wouldn't mind knowing what the best database would be, microsoft access seems appealing because I can create tables through the programme itself, but php seems to be linked with mysql any advice on this would be appreciated |
11-17-2004, 05:44 AM | #2 (permalink) |
Addict
|
php IS closely linked with mysql, but mainly because both are free alternatives and opensource.
I'm currently learning php because my job dictates it, but it looks like ASP.NET will also feature highly in my near future. You need to pay for Access or MS SQL. ASP/ ASP.NET servers and hosting packages tend to cost more. With MySQL Admin and other programs out there, you can also create tables visually. Have a look around. As php/mysql is cheap and MS XP comes with one instance of IIS, you can just buy a beginner book, like the 'for dummies' series (I have one on my desk) and make your own mind up by trialling it on your desktop. Dreamweaver and other web editing tools also feature support for php/mysql now too. |
11-17-2004, 08:46 AM | #5 (permalink) |
Rookie
Location: Oxford, UK
|
I had to make this exact choice a while ago - but if you know what you're doing I'd go with PHP. Access and Microsoft-type solutions might have the nice point-and-clickiness, but PHP is nowadays an extremely powerful language and works very well with mySQL for database apps. Best of all it's a free solution and works exceptionally well cross-platform (my app has been served from Windows, Linux and Mac OS without anyone knowing the difference)
__________________
I can't understand why people are frightened of new ideas. I'm frightened of the old ones. -- John Cage (1912 - 1992) |
11-17-2004, 08:47 AM | #6 (permalink) |
Professional Loafer
Location: texas
|
I would tell you to go with PHP also. PHP will work with both windows and linux, unlike ASP.NET. Incase something happens to your server, you won't have to port code over to make it work with something else.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane." |
11-17-2004, 09:40 AM | #7 (permalink) |
Crazy
Location: here and there
|
php works best with MySQL, but it also works with PostgreSQL and any ODBC compliant database. It can also run on any webserver and with any operating system.
For building databases graphically, check out DBDesigner4 http://www.fabforce.net/dbdesigner4/ its opensource, works best with mysql but also works with other databases. can reverse engineer and you can actually graphically build the db. I like phpMyAdmin for administration of a database, but i like DBDesigner for building them.
__________________
# chmod 111 /bin/Laden |
11-17-2004, 09:07 PM | #8 (permalink) |
Junkie
Location: Florida
|
Ahh, what a timely thread. I'm ready for a rant.
Windows is such a godawful atrocious platform for web development that it even managed to make php suck ass. Let me compare: Install PHP + access MySQL DB on Red Hat / Fedora: -up2date -i php -mysql_connect($host,$user,$pass) -voi fucking la. Install PHP + access MSSQL DB on Windows: -Go through PHP installer wizard. -Select "install under IIS 6 or above" option since I'm running IIS 6 on Win2k3 -Roll back install when it breaks, re-run setup and choose "IIS 4 or above" option. -Change permissions so IIS user can access PHP stuff. -Configure IIS to recognize index.php -Enable MSSQL extension -Wait for 10 minutes as all .php files refuse to load and eventually time out -Attempt to restart IIS service. -Wait 5 minutes as it attempts to shut down, times out, and is caught in limbo where it's eternally in a state of shutting down. -Reboot server. -Find out that IIS user does not have access to MSSQL extension DLL. Why in the FUCK did that make IIS just sit there? That doesn't even make sense. Would it kill them to throw in a simple "access denied" error? -MSSQL login failed: "Not associated with a trusted SQL Server connection" -Make sure integrated security is disabled in php.ini since I'm using SQL authentication and sending a username & password. it is. -Try ODBC connection. "No such DSN". -Remove User DSN, re-add it as System DSN. -Some sort of different error message. -Try ADODB library -"Not associated with a trusted SQL Server connection" -Go back to MSSQL library -Try running PHP script from the command line. For no fucking reason at all, this works like a charm. -Loosen up permissions to MSSQL extension and associated DLL's knowing it won't fix a damn thing. Of course it doesn't. -Give up for the night and start drinking. Windows is excellent for word processing. It does a fine job of checking e-mail and Web browsing. Hell, it's even great for gaming. But whoever the fuckhole is who said "Hey, let's take this pile of crap and rig it into being a server platform!" needs to be dragged by his balls through broken glass and razor blades and then drowned in a vat of rubbing alcohol. |
11-22-2004, 09:06 AM | #10 (permalink) | |
Insane
Location: Michigan
|
Quote:
IIS works just fine if you use the tools designed around/for IIS. ASP.NET is quite nice and works just as easily as php does on Apache. I use both OS's and both Webservers and I tend to keep php/mysql on Linux and use my Windows boxes for MSSQL ASP/ASP.NET. |
|
11-22-2004, 07:23 PM | #11 (permalink) | |
Insane
Location: Wales, UK, Europe, Earth, Milky Way, Universe
|
Quote:
Totally agree with most of the other replies. Just bare in mind how M$ likes everyone to use only software written by them so they tend to ignore other technologies out in the real world and don't provide compatibility with them unless the technology gets popular and then its only "ohhh, ok, if we _must_... but we're only devoting $5 to the development...."
__________________
There are only two industries that refer to their customers as "users". - Edward Tufte Last edited by welshbyte; 11-22-2004 at 07:27 PM.. |
|
11-23-2004, 07:07 AM | #12 (permalink) |
Upright
|
It depends what you need. I started with ASP but quickly took up PHP, I've been doing PHP for about 4 years now.
I love PHP, the speed is fantastic, the code is very structured and easy to write, it's very easy to debug, it's extremely cheap to role out. It works very well with mySQL. However. If you're looking to work as a developer, you'd be hard pushed not to go down the .NET route, everywhere I look I see people advertising for .NET developers, .NET fits in great with Windows Servers, if you're running a Windows based server, active directory or the like, .NET will give you massive scope that you will not get with PHP. Again, it's another example of the best technology losing out to the Microsoft Money Machine. Access is a fine desktop database for organising your CD collection, but you need to get over it very quickly and start writing proper ANSI spec SQL. You don't need a visual editor to build tables, you just need to spend an hour or so getting to grips with the syntax, then you'll be able to migrate to Oracle, MSSQL or any other DB that comes up very easily. Andrew |
11-23-2004, 07:47 AM | #13 (permalink) |
Addict
|
I guess this belongs in another thread and has probably been hashed to death, but having dealt with the procurement process and middle management I don't think that the swing to microsoft servers is as much of a money mochine thing as laziness on the part of the less technical decision makers.
It's easier fr a manager or director to justify a purchase of hardware or software X in order to meet compliance with MS driven industry. There's just SO MANY options available to save money with *nix and open source alternatives that it makes the whole decision making and purchasing process bog down. It's easier for them to regurgitate the very good MS marketing schpiel. When your IT director keeps seeing the IBM advert in his Financial Times, CNN, airplane adverts and TV then it makes it easier for you to swing him in that direction. Same with this. Anyway. Back to topic....? |
11-24-2004, 06:01 AM | #15 (permalink) | |
Insane
Location: Michigan
|
Quote:
|
|
11-24-2004, 12:06 PM | #16 (permalink) | |
beauty in the breakdown
Location: Chapel Hill, NC
|
Quote:
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws." --Plato |
|
12-10-2004, 10:20 PM | #18 (permalink) | |
Crazy
Location: here and there
|
Quote:
PHP and MySQL are a scripting language and a database while IIS is a webserver. PHP and MySQL run just fine on windows with either Apache or IIS as the web server. with mono you can run asp.net on a linux box and serve asp.net pages just fine under apache. Also while it's not free (about $500), Sun has bought Chilisoft ASP and renamed it Java System Active Server Pages which can serve VBscript. There is also a Perl module which works with Apache and mod_perl to serve ASP. But i still think PHP is a better way to go.
__________________
# chmod 111 /bin/Laden |
|
12-11-2004, 07:53 AM | #19 (permalink) | |
Crazy
|
Quote:
When I started programming I learned Perl, and then quickly moved on to PHP. ~5 years or so ago I got hired at the company I still worked for and we are a Microsoft shop pretty much. I learned VB and ASP and still code in it today. The biggest difference when it comes to coding is the syntax. PHP is C based, ASP/VBScript is well, VB based. I find it kind of difficult when coding to switch between VB style and C style (JavaScript), so as we progress into the .NET realm I'm going to move on to C# and try to leave VB behind as much as possible. |
|
12-11-2004, 09:58 AM | #20 (permalink) |
Crazy
Location: here and there
|
i work as a programer for an e-commerce company and we have been running on a LAMP shopping cart for a while now, the PHB decided to buy a new shopping cart which is all VBScript. So now I am learning VBScript from fixing/tweaking a poorly coded, undocumented shopping cart.
and i hate that language. Just plain hard on the eyes.
__________________
# chmod 111 /bin/Laden |
12-11-2004, 10:53 AM | #21 (permalink) | |
Junkie
Location: Florida
|
Quote:
If (blah blah blah) Then -- you don't need a fucking "Then"! It's implied! php's functions are guilty of this to some extent. For instance, "mysql_escape_string". As opposed to what? "mysql_escape_ramdisk"? Of course I'm going to be escaping a string, don't make me needlessly type it. I assume you're dealing with ASP pages on IIS? If so, does randomly choose whether it wants to give you a nice error output or just do a '500 Server Error'? Sometimes when I'm debugging a script it'll just spit out a 500 error. Then I'll cut out the entire contents, put in a 'response.write "xxx"', reload, then delete that and paste in the exact same original code. THEN, about 60% of the time, it will give me the nice debugger output. Programming on Microsoft platforms really friggin' sucks. |
|
12-11-2004, 12:30 PM | #22 (permalink) |
Crazy
Location: here and there
|
no, i usually get the debugger errors.
The main thing that bugs me about PHP is the lack of consistency in function names and parameters. like why is there a underscore between 'words' in some functions (i.e. preg_match) and not others (i.e. stripos) and why do some functions take parameters in the order subject, pattern (i.e. trim, strip_tags) and others pattern, subject (i.e. preg_match) or some take arguments of handle, string (i.e. fwrite) while others take string, handle (i.e. mysql_query)
__________________
# chmod 111 /bin/Laden |
12-11-2004, 02:07 PM | #23 (permalink) |
Junkie
Location: Florida
|
Yes, exactly. I can never remember if it's "urlencode" or "url_encode" because the use of underscores seems to be totally random.
They seem to be trying to make it a little more consistent, though. For instance the new mysqli library conforms to the "handle, string" standard. Of course this makes it a pain to convert existing code if you don't have an abstraction class. That's another stupid thing, actually. The new mysqli library is much faster, but they got rid of persistent connections. PHP's line is that they could cause the MySQL server to get clogged with dormant connections (which is a non-issue if you configure it properly, and is rare if you don't). Well when your database server is on a remote network and you have to repeatedly send it small queries, persistent connections are nice. Don't take away useful features to protect me from myself. |
01-08-2005, 06:39 AM | #25 (permalink) |
Upright
|
The posts that using IE on Windows are totatly false.
Everytime I reinstall - I do a search, grab anyone of the hundreds of auto Apache/PHP installers available - done like five minutes later. Then I jog over tp httpd.conf - set it up the way I want. I am sure the correct answer to the original question is which do you want to work with? Do you want the vast amount of powerful Microsoft tools available to you? Then you go with ASP. Do you want the tens of thousands open source scripts available to you, and a much more community orientied group of users? Then go with PHP. They both work well, they both get the job done, though which one is better is going to be determined by what the job is. Me I know so little about ASP I couldnt even tell you that it stands for Active Server Pages. I am very happy with PHP and Javascript - have found that there is basically nothing I can not make with the that, and maybe a little client side vbscript or wscript thrown in if I am trying to make something for a desktop. Though as was mentioned above - if you have a type of code you are used to working with - stick with it. If you really know PHP and Javascript - you would know that there is bascially no difference between the two - makes using the two very simple - as long as you remember you are writing script and dont write your for look like - if ($i=0;$i<count($money);$i++) Discovered that doesnt work will in javascript |
01-16-2005, 10:13 PM | #26 (permalink) |
Tilted
Location: Ontario, Canada
|
If we're talking PHP vs ASP 3.0, from my experience, I'd choose PHP over ASP easily. It runs smoother, is easier to debug, is free, and implements itself very easily with both IIS and Apache.
However, if you're talking ASP.net, I'd take it anyday over PHP. I have my personal reasons, but as a business application developer (both Web and Windows based applications) its just makes everything much faster in development speed and functionality, as well as full Object-oriented programming. Yes, there is an implementation of OOP in PHP, but not as powerful or structured as that of ASP.net (being that ASP.net's code-functionality is based on VB.net/C#). Plus debugging has been made very simple with it, and it implements well with most databases via ADO.net (including MySQL with a little work). Yet, like anything Microsoft does, there is a fee involved (as IIS is only shipped with Windows 2000/XP/2003 Server) and in order to get the most functionality out of ASP.net, you'll need Visual Studio 2003+ (2002 just doesn't cut it as it doesn't have full ASP.net 1.1 support, only ASP.net 1.0). This is not to knock PHP though. I have programmed extensively with it in the past, and it is a very powerful web-scripting language. Anything you can do in ASP 3.0 you can do in PHP, and then some. I guess it boils down to whether or not money is somewhat of an issue. If not, I'd look into ASP.net (not ASP 3.0). MS have also released a free slimmed down version of Visual Studio just for ASP.net called WebMatrix (www.asp.net) I haven't used it myself, but it might something worth looking into.
__________________
" Can't keep my eyes from the circling skies, Tongue-tied and twisted just an earth-bound misfit, I " |
01-21-2005, 10:01 PM | #27 (permalink) |
Upright
Location: wouldn't you hate to know
|
I agree with Nooze2k on the benefits of asp.net. Though my experience with PHP has been limited I have had extensive experience with the previous versions of asp and can say that asp.net is simply incredible. WebMatrix is also a very slick editor (for free). The ability to cache datasets/pages based on your business logic can provide HUGE performance increases.
I do believe it is important to do what you know and start learning what you should know.....so I'd suggest completing the project in PHP but start jumping into that next language you are intersted in. |
01-24-2005, 01:23 AM | #29 (permalink) |
Junkie
Location: Florida
|
I don't have much experience with ASP.NET yet, but the big thing that annoys me is how it tries to do everything for you. I hate how its default behavior has it generating cookies and sessions and viewstate data and form fields, etc., etc. on its own. I think it causes too much overhead and perhaps more importantly, never lets you get experience on how to handle things on your own.
One coworker of mine is a big ASP.NET fan. One time he spent the better part of a day trying to figure out how to make session data portable across servers, because evidently it does not provide you with a way to do this. Eventually he asked me if I had any ideas, I said "why not just generate a session ID on your own and store it along with the data in an SQL database?".. problem solved! That was a no-brainer for me because that's how I did it back in my Perl days. If I had cut my teeth on ASP.NET, that probably never would have occurred to me either. |
01-28-2005, 08:46 AM | #31 (permalink) |
Addict
|
Well I did it, using php using phpmyadmin and dreamweaver the database works fine and I think after a bit of research on the matter that php is the better solution but asp the more popular through microdofts grasp on all things computerlike. cheers for all the advice
|
01-28-2005, 09:43 AM | #32 (permalink) |
Upright
Location: massachusetts
|
XAMP will set up PHP on windows as easy as a hot knife slices butter...
check out XAMPP. It is a installer that installs apache, php, mysql all at the same time, all configured to work with each other, right out of the box. it comes with several useful examples, as well as PHPMyAdmin, which makes mysql almost as point and click as Access.
Much easier than trying to configure all these things on windows from scratch. http://www.apachefriends.org/en/xampp.html |
01-29-2005, 09:10 AM | #33 (permalink) | |
Junkie
Location: RI
|
Quote:
thanks |
|
Tags |
asp, php |
|
|