1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is better PHP or ASP?????

Discussion in 'Programming' started by keral82, Dec 5, 2005.

  1. ruph

    ruph Well-Known Member

    Messages:
    137
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    131
    #41
    php is better :p

    anyway.. I did hear a lot of good things about Ruby on Rails also.. but never tried it out.. I'm waiting for zend php framework ;)
     
    ruph, Dec 26, 2005 IP
  2. toughguy

    toughguy Well-Known Member

    Messages:
    846
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    118
    #42
    PHP is better than ASP, so it became very popular. In PHP we can access databases very easily, which is mostly done for getting dynamic content..

    Thanks other for ur comments..

    Nice thread..
     
    toughguy, Jan 4, 2006 IP
  3. JCDev

    JCDev Peon

    Messages:
    33
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #43
    More people are familiar with PHP, so it's logical they are going to say PHP is better. However you fail to understand the most important thing: PHP is a programming language. Asp is a framework.

    I can develop ASP websites with PHP.
     
    JCDev, Jan 4, 2006 IP
  4. tarun1979

    tarun1979 Peon

    Messages:
    198
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #44
    Both Asp and Php are equally good with some if and buts. :eek:
    so don't be :confused: and be :) . just think what is your budget for a site.
    For ASP you need Microsoft Server where as php runs on Microsoft/Linux/unix servers. choise is yours
    Tarun - Delhi, India
    :) Life Insurance | free indian ads
     
    tarun1979, Jan 4, 2006 IP
  5. nfzgrld

    nfzgrld Peon

    Messages:
    524
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #45
    A book on PHP? Having coded in old dbase/clipper and mass tons of basic, which are not PHP or C like at all, I still found PHP way too easy to learn. I just put php.net in a tab for a reference and started coding. I did this AFTER running an IIS4 server with frontpage and vbscript, ASP, and all that. What a pain in the ass! Since I went linux/apache/PHP I have a lot less headaches and get a lot more done faster.
     
    nfzgrld, Jan 7, 2006 IP
  6. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #46
    Errm, what?! Have you looked at asp.net's data binding?

    For interesting situations, asp.net probably doesn't have any real advantages over PHP...except that it encourages people to write more modular code (because doing it any other way turns nasty very quickly).

    For the vast majority of the time, it's just a matter of point, click, drag and drop (in asp.net).
     
    jimrthy, Jan 7, 2006 IP
  7. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #47
    True.

    Finally, something in this thread that's interesting!

    Would you please elaborate here? I think I know what you mean, but you seem to be hinting at something beyond the obvious (write PHP scripts which dump out ASP code that IIS will serve up...sort of dynamically generate the static content which makes more dynamic content at runtime). From what you wrote, I infer that you know a way to get a page request, run a PHP script, take those results and run it through the ASP framework, and return that result.

    Which is a cool idea, but is it possible? (Well, of course it's possible. Is it practical? Does it have any real-world application?)
     
    jimrthy, Jan 7, 2006 IP
  8. stuw

    stuw Peon

    Messages:
    702
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #48
    for my money php is easier to learn (yes I also learnt asp). It's also easier to set up a test environment. All the flavours of linux I've used (red had, fedora, mandrake, debian) made it easy to get php and mysql set up, and if your on a windows box it's even easier with www.wampserver.com
     
    stuw, Jan 7, 2006 IP
  9. cmpolis

    cmpolis Peon

    Messages:
    480
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #49
    PHP is alot better, IMO, its more widely used.
     
    cmpolis, Jan 11, 2006 IP
  10. girbaud

    girbaud Peon

    Messages:
    293
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #50
    im a beginner when it comes to PHP and ASP. comparing the two languages, its much better to use php, coz its easier to learn especially for beginners like me :)
     
    girbaud, Jan 12, 2006 IP
  11. JesterMagic

    JesterMagic Peon

    Messages:
    179
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #51
    I originally came from a VB enviroment so asp coding wasn't a problem. Since then I have moved to php because of cost and the availablity of scripts.
     
    JesterMagic, Jan 14, 2006 IP
  12. IceTheNet

    IceTheNet Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #52

    Basically PHP is WAY faster than ASP.Net and much easier to learn. It was built for that reason and with the zend engine the speed difference is etreme in all bookmarks. Plus for the most commonly used database MySql it integrates seemlessly. You will usually see PHP/MySql used to gether and ASP/MsSql used together. Price Difference well PHP/MySql are free and there are many programs available that add WAMP windows/apache/Mysql/Php all at once from source fourge also Free. Microsoft products all cost alot of money and performance levels are not great. Mostly engineered for large corporations that can aford a single computer database one for the webserver and one for a network.
     
    IceTheNet, Jan 16, 2006 IP
  13. IceTheNet

    IceTheNet Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #53
    I have It Looks nasty. used a program once to generate asp code and look at it.

    for php it is simple:
    mysql_connect('location', 'username', 'password');
    mysql_db_connect('database');


    for asp it's
    Let's create the connection and recodset objects now.

    <%

    set conn = Server.CreateObject("ADODB.Connection")
    set rs = Server.CreateObject("ADODB.Recordset")

    %>

    First way to define where your database is to use relative location by utilizing Server.MapPath method.

    <%

    'Define the location of your database
    'as follows if you want to use a relative folder.
    cDBLocation = "/securedata/mydatabase.mdb"

    'Construct the connection string using MapPath.
    sConnSample = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Persist Security Info=False;Data Source=" & _
    Server.MapPath(cDBLocation)

    %>

    You may want to define your physical database location. You should always use the physical location if you can.

    <%

    'If you are sure about the pyhsical location
    'of your database, it's better to use it that way.
    cDBLocation = "c:\securedata\mydatabase.mdb"

    sConnSample = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Persist Security Info=False;Data Source=" & _
    cDBLocation

    %>

    After defining the location, it's time to connect to the database and get the records!

    If you want to tell me that that is easier OK! Cook-coo Cook-coo
    ya! it is no way close to easier. and it is way slower not to mention want's to use Microsoft.jet as database via OBDC a less than speedy connection for this It can hook to MySql but the same remains true OBDC. Jet is feeble database at best it gets bogged very easy with too many records(not many by recall) I think I did one with 1000 records and it was complaining severly SQl server runs as much as $25,000. moved it into mysql and made a questionaire online at hawsepipe.net or .com don't rember off hand one of those.
     
    IceTheNet, Jan 16, 2006 IP
  14. PhilosopherStone

    PhilosopherStone Guest

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #54
    Is this asp.net or is this the programming language?
     
    PhilosopherStone, Jan 16, 2006 IP
  15. cottoncandy

    cottoncandy Peon

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #55
    I prefer php. :)
     
    cottoncandy, Jan 16, 2006 IP
  16. Gostt

    Gostt Member

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #56
    I use both quite a bit and I would vote for PHP. I love having php.net as a resource for the language and php just seems to be able to do more with less hassle. I can't comment on ASP .NET as I don't know it but I'd probably go with C# given a choice :)
     
    Gostt, Jan 17, 2006 IP
  17. kkibak

    kkibak Peon

    Messages:
    1,083
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #57
    i think asp.net 2.0 is really great so far. i've got limited experience w/it but they really seem to have achieved something in terms of developer productivity improvements.
     
    kkibak, Jan 18, 2006 IP
  18. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #58
    I'm playing with it now.

    I don't know how it compares w/ asp.net 1. Compared with legacy asp, it's a completely different beast. It turns this thread into an apples vs. oranges discussion.

    As far as I can see, MS decided to change all the rules. The "presentation" is done in XML, which includes the ASP code. If you want to do anything that's not built into the [ton of] pre-defined controls, you write your own controls--by combining the built-in controls as much as you can (again using XML and ASP) and writing code to handle the logic (in C# or VB.NET).

    I understand that there are other ways to accomplish the same thing, but they're silly.

    MS has set up a framework which basically enforces the seperation of presentation & business logic. It forces programmers to stop, put more thought and effort into the basics before they do anything. These, like all engineering decisions, involve some trade-offs.

    It's *much* easier to hack something out in PHP.

    If you have a big team with [relatively] high turnover that's going to be working on a big piece of software for a long time (i.e. most enterprise web sites), you're much better off taking a formally structured approach like the one asp.net forces on you.

    For a big (FSVO 'big') project, I think ASP.NET is the winner. For anything smaller, you're probably better off going with PHP. (I'm trying to put together some small asp.net sites for demos at a job interview, and I keep butting my head against the wall that I don't have the time to build the infrastructure to do anything interesting).

    Then again, as with any software endeavor, if it turns huge, you should probably have written it in lisp in the first place ;)
     
    jimrthy, Jan 21, 2006 IP
  19. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #59
    You used a program to generate asp code? :confused: Why didn't you use Visual Studio? Or were you too broke to afford the new version?

    Hmm, let's see. I asked if you'd looked at asp.net's data binding. You responded with classic asp code. Generated by some 3rd-party vendor.

    For most things most people will ever need to do, here's the way to do it in asp.net:

    1) Write your stored procedure
    2) Drag & drop a control where you want it on the page
    3) Click on the part of the control that says "Bring up my properties dialog"
    4) Click on the "Choose Data Source Wizard" button
    5) Browse for a data source
    6) Select your stored procedure
    7) Tell it what provides the parameters for that stored procedure

    Now you have not written a single line of code (except for the stored procedure). VS has written the 2-3 relevant lines for you. And you have your database connection, the query, and the control's populated.

    Why am I cuckoo for suggesting this is worth looking at?

    (Yes, if you get into the really interesting stuff that MS didn't plan on you doing, it does get more complicated. Then again, trying to handle an application that complex in PHP would just be silly).

    Now you're just being incoherent and sloppy :rolleyes:

    Yes, Jet sucks. SQL Server costs $. Using asp (or asp.net) with MySQL isn't optimal.

    That's the problem with religious debates like this. The topic is "Which language is better?" Not something concrete (and meaningful) like "What are the tradeoffs in choosing a database backend when I consider PHP vs. ASP?"
     
    jimrthy, Jan 21, 2006 IP
  20. jimrthy

    jimrthy Guest

    Messages:
    283
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #60
    Using ASP.NET 2, all your real coding is done in either C# or VB.NET (you take your pick).
     
    jimrthy, Jan 21, 2006 IP