Click to See Complete Forum and Search --> : Should I learn PHP or ASP?


screaming_banjo
11-26-2003, 03:40 AM
Hi

I've had a little notion of writing a website with a database, so that it can be searched and easily maintained. The idea I have would best be done with a database.

Problem is that I don't know any language for doing this!!

I'm fairly competent with HTML and a little javascript.

In a nutshell I'm hoping someone would be able to advise me what the best way to do this would be. As I don't have too much of an idea, would it be ASP or PHP or something else?

Having established what the best way forward is, then I'll, hopefully, teach myself how to do it!!

Thanks in advance for any advice.

clairec666
11-26-2003, 04:39 AM
There are other options, but ASP and PHP are what you would need.
Not having done much of either language myself, most people on here have favoured PHP, so I would go with their choice.

exemplum
11-26-2003, 04:44 AM
Hi

I'm in exactly the same boat as you, I also need to build a website with a database backend and have little knowledge of how to do this!

Like you, I have good knowledge of HTML and Javascript but it goes no further than that!

What I have found out though is that PHP is probably better than ASP as ASP is restricted to NT based servers (I beleive I'm right in saying that but I'm sure someone will correct me if I'm wrong). For a database, I'm planning on using MySQL and for the HTML editor, Dreamweaver MX as this can integrate your database and PHP requirements quite easily with your HTML build.

If you want, drop me an email and we can help each other along the way, it'll be good to learn this with someone at the same skill sets as me.

Cheers

Rob.
rob@exemplum.co.uk

clairec666
11-26-2003, 04:47 AM
I just found this site - try it! (PHP tutorial)

http://www.gimpster.com/wiki/PhpTutorial/Intro?PHPSESSID=c872a5fc3849d595b6af40d47f7555db

screaming_banjo
11-26-2003, 09:40 AM
Thanks for the tutorial, I'll check that out.

I believe for PHP I'll need to set my PC up as a webserver and have found some information on that.

While I've seen a few tutorials that demonstrate syntax for PHP, arrays, if statements etc... I still don't really get how it works with a database. How are tables originally created, linked, updated etc.. Would I need something over and above PHP?

Thanks again,


Rob: I may well be in touch, although I'm in the very early stages of the site - got a fair amount of planning to do first and it's also something non-work related, just for fun in my spare time.:)

exemplum
11-26-2003, 11:50 AM
No worries, My web project is also non work related so not under any pressure to complete it, not even got round to creating graphics yet, just at idea stage!

Found this tutorial on intergrating PHP and MySQL might be of some use.

http://hotwired.lycos.com/webmonkey/99/21/index2a.html

Just drop me a line whenever

Cheers

Rob.

pyro
11-26-2003, 12:04 PM
Let me see if I can help a little bit. First of all, I highly recommend PHP (and if in need of a database, MySQL).

First of all, here are some useful PHP links:

http://www.php.net/manual/en/tutorial.php
http://www.phpbuilder.com/
http://hotwired.lycos.com/webmonkey/programming/php/index.html
http://php.resourceindex.com/
http://www.zend.com/

or more links can be found at http://www.php.net/links.php

As for a function list, look at (and search) the manual: http://www.php.net/manual/en/

As far as setting up and managing MySQL databases, phpMyAdmin (http://www.phpmyadmin.net/home_page/) is invaluable. It gives you a GUI to use, and makes using MySQL very easy. You might find this link useful, to help you get started with MySQL: http://www.devshed.com/Server_Side/MySQL

James L.
11-26-2003, 01:10 PM
Hey Pyro,

I am just starting to learn PHP, and haven't delved into SQL yet, but do you mean that you can use a GUI interface to create your SQL database, like you would in other DB programs, instead of hand coding the database?

Thanks,

James

pyro
11-26-2003, 01:18 PM
More or less, yes. It's basically a set of form fields that allow you to view and edit the database. Very, very nice.

PeOfEo
11-26-2003, 04:42 PM
I am going to say something total different from anyone else in this thread and say learn asp.net. Instead of typing up all of the reasons why (There are many of them that make asp.net arguably the best server side technolgy on the web) just go to the link 'why asp.net in' in my sig.
EDIT: That link is such a beautiful peice of propogranda that it brings tears to my eyes. :)

pyro
11-26-2003, 04:55 PM
lol @ Peo... You do know you ASPers are outnumbered like 50 to 1 on these forums, right? :p :D

PeOfEo
11-26-2003, 05:02 PM
Hey, I only use asp when absolutely neccessary. I use asp.net! Get it right or pay the price (another old tv show refference. Salute Your Shorts, such a great show!). I know us evil monopoly fuleing M$ users are outnumbered. Thats whay when someone asks hey what should I learn I always try to indoctrinate them. Did you know that asp.net has new mobile controls that can have a page adapt for palm, packet pc, and cellphones without recodeing? Did you hear about that new asp.net viewstate that passes server variables and data through the outputted source code in an encrypted form to save the developer time with extra codeing? What about the vast arrayof new language asp.net can be done with instead of just one option that php provides? What abous asp.net is also free to run from a server, infact you only have to pay for things like iis6 w/ w2k3 because they have a built in os but asp.net can eaily be hosted off of any machine with a windows nt based os (chances are you are using one right now anyway so to argue that it is not free is not a very good argument because you have it alreay and you would have it anyway)

Sux0rZh@jc0rz
11-26-2003, 05:15 PM
i listened to you peofeo and tried to learn asp.net... then i gave up and went to php and already can do much more with php than with asp.net because php is so much more supported than asp.net. it's hard to get information on how to use it... its hard to learn it... if ur telling peeps to learn it u better start telling them a damn good page to learn from cause i gave up and went to php=P you lost me. sorry.

PeOfEo
11-26-2003, 05:28 PM
Originally posted by Sux0rZh@jc0rz
i listened to you peofeo and tried to learn asp.net... then i gave up and went to php and already can do much more with php than with asp.net because php is so much more supported than asp.net. it's hard to get information on how to use it... its hard to learn it... if ur telling peeps to learn it u better start telling them a damn good page to learn from cause i gave up and went to php=P you lost me. sorry. You never came to me for help, only for source codes :P. There is whole forum on wmh for asp.net support and there are many other forums for it. Just because it is not around here does not mean the information is not there. Plus buying a book is the best way to learn anything in my opinion. Also a good page to learn from is 411 asp.net in my sig and www.asp.net the official site

Sux0rZh@jc0rz
11-26-2003, 05:31 PM
bah... you never had that in ur sig when u told me to use it! you also never said, hey go here and learn it...

<crazed cartoon response>soHa! soHa! Zoha! Zoha!</crazed cartoon response>

PeOfEo
11-26-2003, 05:50 PM
k... btw, w3schools is a good place to learn just about anything but a server side language. The have a .net section but all it talks about are the elements such as data grid, calander text box button etc but it does not teach you the code. But to learn the scripts it helps to know vb going into it (obviosuly) or atleast have a background in programming. Without that learning a server side langauge will be much more difficult and you should buy a book in that case most definatly. The reason I am such a book thumper is just because you can sit down and read it and study it in your own time instead of having to look at a site (Its not like you have to type out their code yourself since books come with disks most oftent)

screaming_banjo
11-27-2003, 05:23 AM
Thanks for all your input! I'll look at all the options re: ASP.Net Vs PHP! I have a fair amount of VB knowledge, so maybe ASP.net will be best! That said, most of you still advise that PHP is the best way to go.

I'll look into both via the links you've given then make a more informed choice than I may have when I started out!!

Thanks to everyone!!

AdamBrill
11-28-2003, 04:28 PM
Originally posted by PeOfEo
You never came to me for help, only for source codes :P.I wish that were true less often... ;)

I think it is very hard to say which one is "better" since they both do pretty much the same thing. I've never come across anything that I wanted to do and couldn't do it with PHP, and I'm sure I could say the same thing about ASP and ASP .NET. Since my major experience with programming before I started Web programming was C, I now use PHP for everything that I do server-side, but I wouldn't be against learning ASP .NET, since it is also a very good language. In my opinion, it has more to do with preference than one really being better than the other(although people like to come up with good-sounding reasons why one is better than the other ;)).

PeOfEo
11-28-2003, 06:38 PM
I think asp.net is better if you are in the buisness world and php would be better for your wallet for personal use.

AdamBrill
11-28-2003, 10:54 PM
Originally posted by PeOfEo
I think asp.net is better if you are in the buisness world and php would be better for your wallet for personal use. I hold true to what I said...
Originally posted by AdamBrill
although people like to come up with good-sounding reasons why one is better than the other:p

PeOfEo
11-29-2003, 10:01 PM
Heh, except mine was more of a good sounding condition
if (company = true)
{
use asp.net
}
else if (no$orcheap = true)
{
use php
}
else if (justneedsomethingrealquickbutdontwanttolearn = true)
{
use cf
}
else
{
System.out.println("No, it is not possible to get someones social security with java script")
}

AdamBrill
11-30-2003, 02:32 PM
The fact that it's free certainly doesn't mean that it is inferior. The best things in the world are free. ;)

PeOfEo
11-30-2003, 02:37 PM
didnt say its inferior, its just that asp.net is so superior :D (This will probably start a fight)

pyro
11-30-2003, 02:48 PM
Originally posted by PeOfEo
(This will probably start a fight) Darn right about that... :mad: :mad:

:p

AdamBrill
11-30-2003, 02:52 PM
Originally posted by PeOfEo
(This will probably start a fight) I don't "fight" with people who have no reasons to back their claims. :p So no, this isn't going to start a fight... lol ;)

PeOfEo
11-30-2003, 04:08 PM
read the why asp.net link in my sig :p

AdamBrill
11-30-2003, 05:47 PM
Originally posted by PeOfEo
read the why asp.net link in my sig :p The main benefit(at least according to the article in your signature) is that it is easier to use. Well, that sounds a lot like a preference to me... ;)

BTW, in my opinion, the best part about ASP .NET is the fact that it can automatically save values while refreshing the page, such as on this page: http://www10.brinkster.com/adambrill/test.aspx You can use the calender without messing up the text in the input box, but besides that, I still say it is a matter of preference... :)

EDIT: I figured I would say what I don't like most about ASP .NET. So here it is: The code that it generates is far from valid. It isn't even good; it's pretty sad...

EDIT #2: I just found another thing I don't like about it. That calendar that it generated doesn't work without JS, and it's not like JS is needed for that.

PeOfEo
11-30-2003, 09:30 PM
Yes, asp.net can cough up some invalid code sometimes. Mainly the java script, the language attribute in particular. I used required feild validators and then it puts java script on the page (Just for the affect, it wont go through if someone does not fill in the feild but the js tells them whats missing). But anyways it uses the language attribute. Also a form id for the view state is invalid, well the value if it has a _ in it. That one I do not quite understand, because the formid is accespted and hurts nothing. The code asp.net my genorate might not be all valid by w3 standards but it does not hurt accessbility, that is the important thing. But I aggee with you I wish they would have cleaned that up a bit, but maybe they will in 1.2. Check out my validation http://validator.w3.org/check?uri=http%3A%2F%2Fknights.europe.webmatrixhosting.net%2Findex.aspx.
That site has lots of bad code on its secondary pages, but thats my fault. I did most of those back in the day and never redid the code. The whole site could use work but I just dont have time. Basically I want to get rid of the iframe and use includes but that would take tons of time that I just don't have. I think the site looks nice but I just dont feel comfortable using it as an example of my work the way it validates on the secondary pages :( . Hopefully my frp site will validate nicely though, it should have fewer forms and I will go about things differently.