A
abx_2112

  • Dec 10, 2003
  • Joined Aug 13, 2002
  • What can I say, I've talked about this before but I just cannot resist the topic.

    For a period of time I was hired to deliver some applications (nothing really fancy) in ColdFusion. I felt pretty much frustrated at first since writing code in CFML is REALLY ugly and annoying... but in the end is the same old s***. The language is OK, you can pretty much do the same stuff you can do with PHP and viceversa with some counted exceptions. For example:

    • PHP has a bigger set of API's.
    • PHP has a nicer support for arrays (associative arrays)
    • Everyone knows this, PHP is free (even though some ppl would prefer to say cheaper)

    For ColdFusio you have:
    - Better built in debuging.
    - Comes with Verity's Search Engine which rocks no matter what other people tell's you. There's just no open source alternative for php as good as verity's out there. Some times I think you are actually buying the engine and that CF is the added value.
    - CF gives you a lot of sugar so you can do the easiest things even easier. Sending e-mail is just one example as it is their form tags. Just keep in mind the complicated stuff is harder to develop in CF than PHP.

    Anyway, there's already a bunch of libraries for php out there that do all the "dirty work" as kilbey1 mentioned before. PEAR is just one example of a Repository where you can find tools for automatic for handling and some other of that stuff (sugar). Even better, there's a lot of open source applications already built in php... thousands and I am not lying. This makes PHP the language of choice for open source web infrastructures. Let me list some benefits of this:

    • Larger development community (WAY larger), you'll never feel alone.
    • More popular (its used in more sites than CF). And this is because it works so nicely with Apache (again, Open Source)
    • You'll find it easier to integrate open source infrastructure if you are using PHP. With all this sudden interest by the corporate IT world to take advantage of OS, You'll find lots of extensions to plug to you php installation to communicate with all the stuff (well, most of the stuff). I dont know if you get me in this point...
      😕

    Anyway, the main reason I stayed with php over CFMX is because is such a pain to write in that UGLY CFML!!!

    Dont know if you agree, flame me if you dont 🙂

    Regards,
    a

    • The probability is 1 ?!

      I doubt it... that's like saying that every natural number has the digit 3 in it. I think i'll check if the probability of picking a natural number WITHOUT the digit 3 is actually 0. 😛

      • I feel I was (am) completely ignorant in this subject. I'm afraid I didnt give enough thought to the problem, so i deserve the sarcasm 😕

        yes that's a great start it's so much harder to load one of your pages in a hidden frame then it is to fake the http_referer.

        anyway, thinks for the info drawmack 🙂

        • yes that's a great start it's so much harder to load one of your pages in a hidden frame then it is to fake the http_referer.

          Care to explain?

          • Nice puzzle 🙂

            So I have not checked bubblenut formula but I wanted to ask him:

            What's the number then? (it's just one number) 😛

            Lets see if someone other than weedpacket post it before i do.

            • Well, you can not rely on HTTP_REFERER. A good start would be to encrypt a session variable and check it is comming OK.

              • you got the point 🙂 mark it as resolved if everything is ok now.

                • or... if you dont mind, just do this:

                  <table>
                  <form>
                  <tr>
                  <td> [...]
                  </td>
                  </tr>
                  </form>
                  </table>

                  This should not be the solution but it is a simple hack.

                  • It never returns true if the element I am search for is sitting in Index zero.

                    since you are returning the position of the element you cant expect your function to evaluate as true when the element is found at position 0 of the array... agree ?

                    You might want to look the manual for array_search and take a look at the warning a the end of the man page.

                    Hope that helps,

                    a

                    • There's no built-in search engine. Either you build your own search script or use something like mnoGosearch

                      • Or, now that you are going through the array, start suming instead of assigning values to the new array?

                        you follow?

                        Pd. array_sum is not ment to work on multidimensional arrays

                        • Originally posted by Weedpacket
                          So what's client-side about that? It still gets processed by the server and the client still receives HTML and optionally some Javascript. It's perfectly feasible to write a PHP library to do the same thing. Cripes, old CGI.PM could do that!

                          I agree. I was just pointing out why somebody else said CF is "server side and client side". Keep in mind there ARE libraries which already do that (PEAR QuickForm) even though I'd prefer to use my own code.

                          The thing about PEAR (and other libraries) is that, even though it adresses the need for a framework, it's not that mature yet. This is an issue I really look forward to be improved.

                          • So if you are on *NIX you would always choose LAMP ?

                            Another question, what about verity? I really need a tool that indexes content of .doc, .pdf, .xls, etc for LAMP. Until today I havent been able to search within MS Office documents and it sucks cause is the format chosen by everyone (almost)

                            • Originally posted by drawmack
                              1) you really can't compare php and coldfusion because one is client and server site (coldfusion) and the other is stricktly server side (php).



                              Not true. You can compare them --as a matter of fact you did. They are not completely different just because php does not output javascript (or any other kind of client side stuff).

                              • Well, I know how a lot of people here doesnt like this topic, but I actually LOVE to get in the middle of these fights and stand for PHP.

                                Why? Well, I think it's good way to point out the good and bad things on the tools I work with, and I'll end up better prepared for marketing my PHP solutions.

                                So go on and flame...In general terms, what's so good about PHP to compete with .NET, ColdFusion, etc? Why does those alternatives suck? (or desnt?)

                                In particular tell me how can I offer something as good as verity collections in ColdFusion and with competitive price (for those who dont know, ColdFusion license comes with Verity). I cant find something similar for PHP.

                                • I use phpedit. Dont know if all those you talk about are just as good.