Thread: Some questions

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    After reading through three or four PHP tutorials (hello world through mySQL), I'm still left wondering,

    "What's the big deal?"

    At first glance (and usually the most incorrect) PHP seems like another new technology that people will have to learn, but why bother? Sure there are some nifty features, but nothing mind-blowing.

    - r
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    31
    Rep Power
    15
    For me PHP is THE choice for dynamic web development. I have tried ASP, Cold Fusion and Perl. I really liked perl and before that I was in love with Cold Fusion. I might even still be using Cold Fusion if it had been freeware.
    In Cold Fusion I loved the ability to drop code straight in middle of html. In perl I like the million and one ways to do some specific task. And now in PHP I have some versability of perl (Thank God for regular expressions) and style of Cold Fusion.
    I never used ASP too much, but I can tell you that I really prefer MySQL over Access. :-)
    One of the first things I did in PHP was session management (That's having variables for each session and so carried over the pages). This is one very critical feature that perl and PHP are missing by default (Both CF and ASP have it). And soon-to-be-released PHP4 will also support sessions.
    You asked "What's the big deal?". Well if you're developing anything that can be implemented using databases, PHP is IMHO the best choice of the four presented before in this post. I just love the speed you can get things together with it. And well.. Learning PHP was really much easier for me than it was to learn CF or Perl (or ASP).
    What more can I say? I just love PHP. :-)
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    Okie doke, let me attempt to summarize your points since a quoted reply here is a bit more difficult than email =)

    (1) Support for regular expressions
    (2) Intermixed code w/HTML
    (3) Session management
    (4) Rapid development

    (1) Regular expression support
    I haven't used them so I'm unfamiliar with it. At what point in your application do you use reg exps? I would imagine parsing, however that's not to be understated. I'm sure that was a big part of why you liked Perl =) PHP gets a point here!

    (2) Intermixed code w/HTML
    ASP, and even better - JSP support this as well and from the looks of it, this is the same for all of these langauges - that is, none of the offer any more/less along these lines.

    (3) Session management
    Same as #2.

    (4) Rapid development
    See #3. =)

    This leads back to the question I posed before, "What's the big deal?" What does PHP offer me that I can't find somewhere else, aside from ASPs reliance on MS?

    Lord knows I would never use ASP. VBScript is a subset of an already ****ty language. JSP is all I would realistically consider, and now that I've heard of PHP, I'm rather exicted as this sort of competition is great for developers. I'm looking forward to learning more. I can't believe I hadn't heard of it sooner =)

    Thanks for your reply Dist!

    - Rob
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    no nothing mind blowing until of course you actually use it, then ..... after playing with php/mysql for a couple of hours - I found that I could create dynamic pages from a database with user interface , I do not mean I found out I could - I mean I did - its too bloody simple (yet efficient) to be true. For every possible requirement PHP seems to have the answer in one form or another and it rarely takes long to find a neat QUICK and effective solution using PHP , it appears to cover all the stongpoints of other languages in one, I commonly read in forums about peoples problems with PERL mailforms , counters, etc etc - and I often wonder why the hell they bother as most of them use PHP and some form of database ....for if while - mail() !!! how simple can it get?.
    Cross platform - easy to use and abuse (write your own functions) free ! what else could one want - ok a yacht in the Bahamas would be nice - which I will get a bloody lot quicker as I do not have to juggle VB Java ASP SQL PERL etc etc around - just PHP , javascript and a little bit of MySQL/Postgress/whatever.
    A lot of 'serious' , 'proffessional' programmers seem to sneer at anything that is too easy - why?

    ""What's the big deal?" What does PHP offer me that I can't find somewhere else, "

    nothing - except try finding all the "somewhere else" whizbangs all in ONE language - go on try .....

    &OK I am looking forward to session management in PHP4 but there are ways and means around that for now , cookies , ip address , hidden frames(yuk) database etc- all of which are easily managed by PHP !

    well thats what I think anyway - course I could be wrong - if not I will send you a picture of that yacht mmmmmmmm satelite connection????

    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    If you get that yacht, I'd like a ride =)

    Ok, seriously tho', that's exactly my question: *what exactly* are the whizbangs you're talking about?

    Using VBScript (ASP) and Java (JSP) it is very easy to create pages using databases. AAMOF, this is what I do, and yesterday it took about 15 minutes to have a nicely formatted popup window from scratch that made use of a number of SQL queries to display some information to a user.

    I mean, I've seen and used the syntax for accessing a database in all three languages and it's the same three lines:

    open connection
    execute (returning a recordset)
    close connection

    Only thing is that VBScript's error handling ability is about as robust as a house of cards on a windy day. "on error goto" <-- booooo, whereas at least PHP has the Perl-ish "die" =)

    Session management is functional in VBScript/ASP, but a complete joke as you cannot REMOVE something from the session, you can only reset it. So when I save a their original destination so I can forward them after login, it stays there already. It's rockin' in JSP because it java.util.Hashtable.

    Yeah, I think I'll just pass that as a param since I can't delete it

    Either VBScript/ASP or JSP can do any of the things you've mentioned with no difficulty and equal simplicity. I believe there's even a 1:1 mapping of lines of code. I guess right now I see PHP as "just another language" with its perks, as all language have their own.

    I am not a proponent of any particular language, I'm just trying to learn more about PHP from a bunch of sites and forums like this.

    - r
  10. #6
  11. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    .... OK - another approach, the point I was trying to make before I got carried away with the yacht, In all languages there are cons , you mention error handling in VB , ASP is likely to look very sluggish against the new Zend engine etc etc - none of the above are disastrious .

    While PHP has its cons - sessions(soon to dissapear).... well ok thats all that's comes to mind , there are I am sure more - but why work with a langauge that lets you down in one area & support it with another, when 1 language does it all? (In my opinion).

    You seem to prefer JSP - I have no working knowledge of it so I can not comment fairly on it and if you find it deals with your everyday needs sufficiently then I suggest you stick with it .

    "if it 'aint broke , dont fix it" - is a good philosophy, if however it is lacking in any serious way & if you have to resort to other languages to prop it up - well then take a look at PHP - it only takes a few minutes to get the hang of it anyway and it wont cost you a penny to try , or a windows box to run it ! (as it happens I use windows at home/work to develop (booooo hisssss shame))


    I think I want a red Yacht & anyone with a bottle is welcome.

    Simon.



    ------------------
    Simon Wheeler
    FirePages -DHTML/PHP/MySQL
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    4
    Rep Power
    0
    One question...

    In JSP, pages are compiled into servlets (check the .class files in the JSP engine's TMP directory). This way, they stay resident in Apache's memory space (or wherever the JSP mod is located) and accept requests.

    Now I think this is probably dependant upon the implementation of the engine, specifically Sun's reference impl. of the JSP engine...? Anyways, I'm not sure how ASP and or PHP handle this, as its a HUUUGE performance gainer, and a big part of the reason people use servlets instead of CGI w/<insert language of your choice> where a new process is spawned each time.

    If this is the case w/PHP (interpreted each time?) I must doubt its applicability in a high-transaction production environment.

    What's your take on this?

    - r
  14. #8
  15. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    Perth West Australia
    Posts
    757
    Rep Power
    15
    Hmmmmmmmmmmmmm - really getting out of my depth now so I must first consult an Oracle or 2 - I'll be back!

Similar Threads

  1. Replies: 5
    Last Post: December 6th, 2004, 04:59 AM
  2. A few Install questions
    By kolatracks in forum Linux Help
    Replies: 2
    Last Post: October 27th, 2003, 03:31 AM
  3. CGI::Session (& a few questions)
    By Stenyjj in forum Perl Programming
    Replies: 6
    Last Post: July 4th, 2003, 03:21 PM
  4. Online news database performance questions
    By zbriu in forum MySQL Help
    Replies: 2
    Last Post: May 8th, 2003, 10:38 PM
  5. Inserting New questions
    By woldie in forum PHP Development
    Replies: 2
    Last Post: May 14th, 2002, 09:43 AM

IMN logo majestic logo threadwatch logo seochat tools logo