SitePoint Sponsor

User Tag List

Page 3 of 5 FirstFirst 12345 LastLast
Results 51 to 75 of 117

Thread: php.net

  1. #51
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Meh, I'll probably go with C# I think . I can only think of so many things at once, and decent books are bloody expensive.....
    THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
    THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
    OVER YOUR DOG. <-- MediaWiki installation guide

  2. #52
    SitePoint Wizard Mincer's Avatar
    Join Date
    Mar 2001
    Location
    London | UK
    Posts
    1,140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by dhtmlgod
    :closes door behind mincer:
    At least someone has a sense of humour.

    My comment was purely a good old sweeping generalisation about Microsoft. Not a dig at .NET in particular (which I have just started using btw).

    Come on chaps, let's be one big happy SitePoint family.

  3. #53
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Jeremy W.
    ....he'd fit right in (as long as he didn't say we should switch everything to Open Source everyday ).
    Well, MSIL can be decompiled very successfully, so it's sorta open source already in the sense, that I can get your code. - http://www.remotesoft.com/salamander/


    On the other hand, if the result is a program written in twentysome different languages, then no single person is able to understand how the program works anymore. And that is definitely not good.
    Solution: Compile the program, decompile it into one language and there you go!

    Also, I can't remember who mentioned the classes for exception handling, but zend have done it here: http://www.zend.com/tips/tips.php?id=162&single=1

    It seems quite interesting....

    ....

    It's most likely true that C# isn't more powerful than VB.NET or ASP.NET or any of that, though it's the differences in C# that makes it 'better (IMO)'.

    -Peter

  4. #54
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Pete,

    I refuse to decompile code. I'd be worse off as all teh documentation and commenting would be gone. Not good.

    C# is "more powerful" because it's often easier to do harder things. The same classes are available, but you tend to do more, faster in C#.

    J
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  5. #55
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Jeremy W.
    C# is "more powerful" because it's often easier to do harder things. The same classes are available, but you tend to do more, faster in C#.
    That's basically what I was trying to say.
    Ian Anderson
    www.siteguru.co.uk

  6. #56
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Most interesting "discussion" paper I've seen for a potential PHP# is here: http://www.akbkhome.com/Projects/PHP_Sharp/ - pretty much sums up the problems. The other way to go is simply to load .NET modules from PHP and use them as objects, which is possible today and should get alot friendlier with PHP 5;

    From The Object-Oriented Evolution of PHP, interview with Zeev Suraski ending with discussion of PHP 5;

    What else is new?
    Most notable is the revolutionized interaction with external component models, such as Java, COM/DCOM and .NET via overloading.

    PHP 4.0 was the first version to introduce this sort of integration, but the new implementation is much quicker, more complete, more reliable and far easier to maintain and extend. These elements mean that PHP 5.0 will play very nicely in your existing Java or .NET based setup. You'll be able to use your existing components inside PHP transparently, as if they were regular PHP objects. Unlike PHP 4.0, which had a special implementation for such overloaded objects, PHP 5.0 uses the same interface for all objects, including native PHP objects. This feature ensures that PHP objects and overloaded objects behave in exactly the same way.
    Going back to Mattias's point that PHP doesn't have exception handling, a good PHP developer can produce a very close imitation for PHP's custom error handling (as has been pointed out - trigger_error(). Having said that the real need for PHP 5 is to deliver a standard programming "experience" in PHP - although a good developer can reconstruct almost anything you can do in C# / Java right now with PHP 4, different developers take different approaches and some of the lesser known elements of PHP 4 have been introducing stuff which is basically a hack, like call-back functions (which fail to allow you to define a call back object in most cases). With things like assert() it's a real pain in the a$$.

    Having said all that, there's a flip side to PHP, which is flexibility. As a loosely typed language there's things you can do which just can't happen with a strongly typed language and on the web that really counts. Take this for example;

    PHP Code:
    $classname="MyClass";
    $method="get";

    $
    $classname=new $classname;

    $someVariable=$$classname->{$method}(); 
    This is the same as;

    PHP Code:
    $MyClass=new MyClass;
    $someVariable=$MyClass->get(); 
    Not only in PHP can you cast dynamically at runtime with PHP, you don't even need to know what the reference to the instance of the object is called.

    How do you declare $$classname or $someVariable in a strongly typed language?

    I read somewhere that MS have made some steps to simulating this with .NET but that it can never go this far without a major re-write.

    Another example of this kind of flexibility is the overload extension - now part of the default PHP 4.3.0 distro. It adds a whole new meaning to overloading...

    The only way you can approach the speed of development possible with PHP in a strongly typed language is with a GUI IDE like VS.

    PS - there's now an open source caching engine which is compiled and ready to go with PHP on Windows - http://php.weblogs.com/discuss/msgReader$2297 - FYI
    Last edited by HarryF; Jan 22, 2003 at 08:44.

  7. #57
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    So:

    1. Better stuff is coming
    2. Let's use PHP to do everything
    3. More extensions to do more stuff

    Gotcha, thanks. All seems vaguely familiar though, and they are all objections that have been raised in the past so I feel no need to reiterate my position

    J
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  8. #58
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by firepages
    Mika, PHP already lets you create desktop applications, can already create Flash objects , images , PDF's , has native connection to all major and many minor data soures, direct I/O functionality , process control and buffering , COM support, IMAP POP3 and NNTP functionality , low level socket manuipulation , XML and XSLT parsing , FTP/HTTP, gzip & bzip compression, PERL compatible regular expressions, is already X-platform, memory management on *NIX etc. theres a longer list but it gets boring.
    Really???! I see you can make compiled desktop application with PHP! Tell me your secret, please!

  9. #59
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wasn't really spoiling for a scrap and yes it does all summarize to the same old points but surprised you didn't pick up on me actually saying something bad about PHP.

    See I think Mattias has a valid point in general (though it's wrong to say PHP has no error handling that programmers can use). The common statement about Perl (which also applies to PHP) is;

    "There are many ways to do it"

    The counter to that though (used by experienced Perl developers frequently) is

    "Just because you can do it that way, doesn't mean you should"

    The underlying point I was making is PHP can learn something from languages like Java and C# by encouraging developers to use standard techniques, which helps make code reusable elsewhere (for example right now if I take class X from Sourceforge which uses one approach to error handling and try and integrate it with my site where I do error handling another way, I end up more or less re-writing class x). That shouldn't go too far though - being strongly typed and strict is a disadvantage, IMO, when building web apps.

  10. #60
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Mika


    Really???! I see you can make compiled desktop application with PHP! Tell me your secret, please!
    not really a secret, grab php-gtk , the b_compiler (its now part of PEAR) and off you trot, embed that in a little C wrapper and you have a clickable .exe though its straightforward enough to do pointy-clicky stuff with php-gtk anyway.

    errr x-platform as well, apologies in advance if that offends

  11. #61
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    ROFL!
    I love it when that happens Micka was being a smartass and firepages just cam along and shut him down

  12. #62
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by HarryF
    The underlying point I was making is PHP can learn something from languages like Java and C# by encouraging developers to use standard techniques, which helps make code reusable elsewhere (for example right now if I take class X from Sourceforge which uses one approach to error handling and try and integrate it with my site where I do error handling another way, I end up more or less re-writing class x). That shouldn't go too far though - being strongly typed and strict is a disadvantage, IMO, when building web apps.
    Here, we strongly agree. I mean, I could go on and on about the cool features .NET has, but none of them are the real reason I like it so much compared to PHP... The real reason, dare I say it, is that .NET is simply beatiful, from a purely aesthetic perspective. Everything is so cleanly ordered, and all the basic stuff you need (error handling, templating, caching, form validation etc) is already there, in a pretty powerful, easily used, easilty extended, and first and foremost; standardized.

    PHP, on the other hand, is the haven of extensions and custom-written classes and results in it being pretty "messy" compared to .NET. This has both advantages and disadvantages, of course, and for some people, a little "messiness" doesn't matter, but for me it does - maybe I'm shallow, but I like things to be neat. Which is probably also why strongly typed languages appeal to me - they are tidy and elegant.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  13. #63
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The way PHP is developing I wouldnt be surprised to see it being forked off at some point in the future, specifically to address the issues raised by comparing it to stricter languages such as C#.....
    THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
    THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
    OVER YOUR DOG. <-- MediaWiki installation guide

  14. #64
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Phil.Roberts
    The way PHP is developing I wouldnt be surprised to see it being forked off at some point in the future, specifically to address the issues raised by comparing it to stricter languages such as C#.....

    no no no no no

    thats not the point, if that had been the point then PHP would already be strongly typed and with enforced OO, loosely typed is part of the flexibility that Jeremy mentions above.

    I appreciate the resaons people have for preferring strongly-typed languages and each has its pros and cons , in some situations strongly-typed languages are seen as essential (never essesntial just preferential) - but the web-scripting arena is not one of those areas.

    The web-arena is full of things that will annoy those classically trained , its full of Globals and has to deal with tainted data etc , but thats what the web is, thats why PHP was built the way it was , Rasmus Lerdorf was quite capable of running his forms via a .so written in C++ ... but didn't and one assumes, for a reason , thats why PHP beat the pants off everything in its wake to date.

    I am not going to try and compare C# to PHP 1) cos I dont know C# well enough to comment and 2) because it will be impossible to bridge the gap between those who view a 'page object' as a good thing and those who don't (or at least like the option to do both) + 'strong/loose typed' it's a philosophical debate as much as anything.

    C# is just another language for developing .NET (perhaps the best (gotta be better than VB~)) , but thats all it is , Python and Ruby are 2 excellent totally OOP languages but PHP does not try to emulate those either, nor should it.

    IMO

  15. #65
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The web-arena is full of things that will annoy those classically trained , its full of Globals and has to deal with tainted data etc , but thats what the web is, thats why PHP was built the way
    I'm sorry, but that's complete nonsense. What you're saying is that in your view of how the web is, it is full of globals and such. It is perfectly possible to develop web sites with a strongly typed language just as fast as with PHP. The designs of those apps will just be very different from what you're used to now.

    Having said that, I still prefer PHP for web apps. There are three reasons for this:
    1. Cross-platform (unlike ASP.NET )
    2. Reasonably small footprint (small companies don't need big machines to put their dynamic content on the web).
    3. Fast application development.

    I find it very annoying to see that all of a sudden strongly typed languages are presented as the only proper way to develop software. This only shows that Microsoft's marketing machine works extremely well. Their CLR doesn't support loosely typed languages very well and instead of fixing that, they just declare loosely typed languages as rubbish. For most developers here I can find an excuse to believe all that nonsense, but there are some that should know better. Please, please read up on your history. There is a place for loosely typed languages, and not only in the scripting world. This has been shown throughout history and just because Microsoft are trying to hide that, it doesn't make it less true.

    Another thing I find annoying is that people here stick to a single language, and proclaim it 'the best around for all your needs'. That's not only untrue, it also makes the writer of these acclamations sound uneducated and inexperienced.

    Vincent
    Last edited by voostind; Jan 23, 2003 at 02:15.

  16. #66
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well I still gotta basically stick to what I said (just IMO)however badly worded.

    I know well enough that its perfectly possible to develop web-based applications with strongly-typed languages , I also am of the opinion that in the web-arena loosely typed langauges are certainly no loss to the developer and make for easier development (quicker ? probably not).

    Another thing I find annoying is that people here stick to a single language, and proclaim it 'the best around for all your needs'. That's not only untrue, it also makes the writer of these acclamations sound uneducated and inexperienced.
    or perhaps passionate?

    I have more than 1 string to my bow but since I know and like PHP to the extent I do I will firstly try and see if it fits in the hole , PHP IMO is a bit of a shape-shifter and can mould itself quite nicely to many needs, of course the same is true for many other languages, but I am not barraking for them.

    If it don't fit then it don't fit, if it does I have saved myself either
    a)learning another technology or
    b)hiring someone to do it or
    c)both

    If you dont recall those 'PHP is good at forms' days I can remind you, if we all beleived the 'experts' and those with CS degrees PHP would still be 'FI' and MySQL would not work.

    Its advocacy , no more no less and should be taken as such with a pinch of salt and often tounge in cheek (and that goes for the .NET geezers as well).

  17. #67
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you dont recall those 'PHP is good at forms' days I can remind you, if we all beleived the 'experts' and those with CS degrees PHP would still be 'FI' and MySQL would not work.
    I happen to be one of those 'experts' with a CS degree (whether that amounts to anything isn't up to me), and I consider PHP a good web development language, becoming better with every major release. So one part of what you said is incorrect. About the other part - MySQL - I do agree with the other 'experts': it sucks.

    Vincent

  18. #68
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing I do credit MS for with .NET is having learned from the experience of development with other languages. Where you can't knock MS is in providing user friendly environments (except when they crash).

    The guy I work with (who's far more of a developer than I am) has "done" most older languages (perhaps not Smalltalk), having learnt Assembler at Uni then gone on to C++ and Java. His main objective these days is in developing code that works at high speed (in a re-usable manner).

    His job is developing what are essentially batch processes running on a Solaris box. He's more or less replaced a whole load of C++ code now with Perl, Perl being his favorite environment these days.

    What's interesting is his opinion's of C++ and Java. His issue with C++ is mainly the overhead in development time of compiling / testing (with an interpreted language like Perl you can more or less execute the moment you stop editing). As to Java he simply says "It's dead" referring to the fact that Sun don't do much with it as well is Java not being that much better than C++ in terms of development time.

    Where MS seem to have got things right with .NET is in taking a leaf out of interpreted languages in terms of reducing compile times etc. They've also backed this up with tools geared to make common development tasks easy, such as creating web services (minus the tools like the SOAP Toolkit developing with .NET would surely slow down alot). In other words they've listened to developers need for speed where perhaps Sun haven't. Course there's a price - MS are creating dependence on their tools (for example giving away the SOAP toolkit for free basically eliminates all competition before it even gets started) but that's another story.

    Back to PHP - bought myself the January Edition of php|architect (which I think is worth the money - their first article in this issue is about implementing persistence layers with PHP)

    There's an interview with Doron Gerstel, CEO of Zend who asked the question;

    "Can you imagine what the adoption rate of PHP would be today if it had the marketting force behind it that Java has?"

    Interesting thought huh?

  19. #69
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do agree with the other 'experts': it sucks
    ... compared to PostgreSQL or Oracle yes it does

    ...but a VolkswagenBeetle Sucks next to a Porsche or a Beamer , but it does the job... it even floats , not the primary job of a car but there you go there is a often a bonus to be found.

    What irks is those who suggest that you cant drive it
    because they have a book that says it can't.

    What irks more is that then they tell others with the authority of a book that it can't without actually knowing, thats what happens so often with PHP (MySQL has of course obvious limitations) no proper OOP, loosley typed, can't be useful for anything much & thats clearly not the case (I we at least agree on that )

    RE php architect - Excellent mag, I was pleasantly surprised at the contents, I was expecting to be dissapointed (dont know why I just was)

  20. #70
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...but a VolkswagenBeetle Sucks next to a Porsche or a Beamer , but it does the job... it even floats , not the primary job of a car but there you go there is a often a bonus to be found.
    This kind of comparison often made, but in this case it's incorrect. If you want to compare MySQL and other DBMSs as if they were cars, and if MySQL where the Volkswagen Beetle, then it would be a Beetle with 3 wheels and no windows. It might drive, but that's all.

    I agree that there are often academic objections to languages or tools that are just that: academic. However MySQL is an exception. It's problems are too big too call merely academic.

    Vincent

  21. #71
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind
    If you want to compare MySQL and other DBMSs as if they were cars, and if MySQL where the Volkswagen Beetle, then it would be a Beetle with 3 wheels and no windows. It might drive, but that's all.
    For some reason, I found that image of the beetle with 3 wheels to be absolutely hilarious.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  22. #72
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Maybe you should get out more?
    Ian Anderson
    www.siteguru.co.uk

  23. #73
    SitePoint Addict MarekS's Avatar
    Join Date
    Jan 2003
    Location
    Estonia / Tallinn
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by voostind

    If you want to compare MySQL and other DBMSs as if they were cars, and if MySQL where the Volkswagen Beetle, then it would be a Beetle with 3 wheels and no windows. It might drive, but that's all.
    I cannot hold back *LOL*

    GOLDEN WORDS! RESPECT!

    I'm not a DB specialist but I kind suspect that voostind was right.

    ZEND SAYS: In selecting a database, you should try to locate a solution that will fit your long-term needs. You should look for a solution that includes: stored procedures, transactions, views, user and object level security, and triggers.

    Will MySQL fit here?

    ---------------- few days later ----------------
    .... the same article also recommends PEAR && Smarty, I can assure you you will find few here who will agree with all of the above
    Yes I totally agree - the link was/is totally unproper for this context here. In fact the italic sentence was/is almost the only sensilbe sentence for me from that zend article.
    Last edited by MarekS; Feb 5, 2003 at 03:27.

  24. #74
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    .... the same article also recommends PEAR && Smarty, I can assure you you will find few here who will agree with all of the above

    For a 3 wheeler MySQL is still pretty fast, but as you will expect in a 3 wheeler you just cant take the corners too fast, in a straight line though its pretty good, exceptional in fact.

    I would like to see sub-selects (apparantly here now?) and triggers would be lovely, transactions already exist and have done for a while though what use the majority of MySQL users have for them is another question.

    Stored Procedures and true foreign keys etc are another story and if you need them then you should be using another DB (I would say the same for transactions as well), there are plenty of good solutions postgreSQL (despite the recent hype still not as fast as MySQL for boring old selects), Interbase/firebird etc.

    For the vast majority of web-related work MySQL is perfect, hence, one assumes its popularity, regardless of the fact that many DBA's will tell youthat its useless.

  25. #75
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There's an old adage that goes You get what you pay for. I would say that with mySQL you get a heck of a lot more than what you pay for!

    After all, it is free isn't it? Would some of you rather use MS Access?

    If mySQL is a 3-wheeler VW Beetle then MS Access is Del-boy's Reliant Robin van after it has been through the crusher! (UK folks will know what this means ).
    Ian Anderson
    www.siteguru.co.uk


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •