September 8, 201114 yr I love PHP, i think it is the best programming language for the web because I can do whatever I want with it and however I want it but this is my attempt to try and change how some devs use PHP because I see a lot of bad code posted on this forum. Here it goes: - Please stop using procedural PHP, OOP is the way to go, all other languages(ruby, c#, python) use OOP resources : you can start from here http://www.killerphp.com/tutorials/object-oriented-php/ or read this book http://www.amazon.com/PHP-Object-Oriented-Solutions-David-Powers/dp/1430210117/ref=sr_1_1?ie=UTF8&qid=1315474803&sr=8-1 - Please use MVC to structure your code. MVC is the way to go so even if you don't use a PHP framework, structure your code in a MVC architecture resources : you can start from here http://net.tutsplus.com/tutorials/php/create-your-first-tiny-mvc-boilerplate-with-php/ - Don't freakin mix SQL, HTML and PHP .....simply don't, organize your code in a modular and responsible way. - Stop using deprecated or old PHP functions like mysql_connect....drop freakin mysql_connect, use mysql improved extension, but better use PDO, I think all PHP developers should use PDO.
September 8, 201114 yr Yes and no. I welcome the move toward OO in PHP, but consider the case where a static web page needs to be enhanced by inserting a few variables and including a header and footer - in this case, there's no need for MVC, which will introduce unnecessary overhead.
September 8, 201114 yr Author my point was towards php developers , a developer by definition is a guy that works with php full time on all different kind of stuff, not just small scripts. @rallport....I use OOP even for simple forms...and why wouldn't you use it really? You make a validator class for your fields and reuse it in future project, scale it, reuse it, do whatever you want.Best example for this and where people always mess it up is where you don't write your code with reusability in mind.
September 8, 201114 yr OOP is too often used automatically because it's the "latest thing" and quite often leads to over engineering. I'm with Renaissance and Rallport on this. Mythriel - your example of forms might warrant the use of OOP but there's a lot of simple stuff that OOP is complete overkill for. But I would agree - when it's called for, then use it. Edit - OOP isn't exactly the "latest thing" but you know what I mean... Edited September 8, 201114 yr by Gibson
September 8, 201114 yr Author ..but there's a lot of simple stuff that OOP is complete overkill for. name 1
September 8, 201114 yr name 1 I have to agree with Renaissance, Rallport and Gibson.... let the rant / justification begin <Rant> Having studied as a Software Engineer and having skills in Java, C, C++, VB.Net and PHP I can say categorically OO isn't the defacto , there are many instances in which you would not adopt an OO approach and then there are others that are better suited to it. Developers as many now coin themselves is the reason industry and universities made distinctions between professions by title and one of the reasons why universities and professionals are pushing to licence the computing industry much like the engineering sector. The reason I mention this is the definition of Software Engineering: "Software engineering is the science and art of specifying, designing, implementing, and evolving, with economy, timeliness and elegance, programs, documentation and operating procedures whereby computers can be made useful to humanity.” Within that definition you will note "science and art of specifying, designing and implementing" among other key points, in essence this relates to understanding the use of techniques and when and where to apply them. Note that the techniques such as MVC and OO approaches are equally academic as they are practiced and their use is very very heavily documented and tied closely to software engineering. </rant> There are many other approaches that I seldom see mentioned despite people saying "OO and MVC all the way!" which isn't the case. I'm sure i could point you i the way of some hearty reading if you still think otherwise Edited September 8, 201114 yr by CSN-UK
September 8, 201114 yr my point was towards php developers , a developer by definition is a guy that works with php full time on all different kind of stuff, not just small scripts. @rallport....I use OOP even for simple forms...and why wouldn't you use it really? You make a validator class for your fields and reuse it in future project, scale it, reuse it, do whatever you want.Best example for this and where people always mess it up is where you don't write your code with reusability in mind. Yea sorry buddy its over kill to use oop on simple scripts, theres no need for it period im sure u and other people will argue the fact, but in the end its the truth, and no oop is not always needed, oop is to create reusable code from one project to the next, i can't stand people who just use oop just to say ohhhhh im smart, does not make anyone any smarter or dumber for that fact... its not rather u use oop or the other its rather ur code is of good quality and secure plus completes the task it was designed for.
September 9, 201114 yr Author echo "Hello World"; your reply is embarrassing I did not post this to start a flaming war, but just give concrete examples what do you understand by simple script? A simple script might be a contact form...but why wouldn't you want to use OOP for that? Again..it was towards php developers, not designers or whatever who code 3 lines of php once a month...a php developer is someone who uses php 8 hours/day. So let's not start a flaming war debating simple scripts.
September 9, 201114 yr I like how someone uses a forum to rant about other peoples level of skill or the way they proceed to do things yet offers up no evidence of their own OR current work. At least if I have a go at someone's design, my url is in my sig... just saying... Edited September 9, 201114 yr by pandadoodle
September 9, 201114 yr Hi Everyone, I agree with everyone to different degrees, the problem is you cant rank PHP against OO heavy weights as with PHP it is very much an after thought and not even fully implemented yet.... anyone who can remember the "OO" in PHP4 can see how it has been at least just a interface into PHP. Because of that PHP procedural is quicker in places and adopting tricks like getters and setters slows PHP down upto 100%! as its much faster to access the objects property direct Evidence: http://pastie.org/638732 not saying dont use OOP only that for best results take note of what PHP is good at and what its not... PHP ain’t Java ya know For program architecture MVC is evidently the obvious choice for many programmers creating web apps, but its not a one hat fits all... but its ruddy close. As for "deprecated" functions im standing up for mysql_* users... shock horror shot me down lol... nah really go do a speed test and the old mysql_* lib out performs by a huge way... so for anyone wanting to put through lots more querys/sec its actually the best one to go with... that said you should use the newer function available unless you need to use the old version for awhile (dont forget old packages live in pecl :] )
September 9, 201114 yr I like how someone uses a forum to rant about other peoples level of skill or the way they proceed to do things yet offers up no evidence of their own OR current work. At least if I have a go at someone's design, my url is in my sig... just saying... This is irony? Keep it on topic too.
September 9, 201114 yr Author $myVar = new SuperDuperStringPrinterFullyOOPYay(); $myVar->setUneededVars(); $myVar->setDefaultCharset(); $myVar->set('Hello World'); $myVar->print(); return $this in setters and use method chaining ... $myVar->setUneededVars()->setDefaultCharset()->set('Hello World')->print(); Ok, even if u want to use procedural, use it the right way, and that is separating your html from your php, make some procedural functions wrapped in a library and return them in your html files. I did not say use OOP because it is cool, the post was towards promoting best practices because more and more php developers do things really bad.
September 9, 201114 yr $myVar = new SuperDuperStringPrinterFullyOOPYay(); $myVar->setUneededVars(); $myVar->setDefaultCharset(); $myVar->set('Hello World'); $myVar->print(); ^^ This. Sometimes developers who know what they're doing feel the need to maybe overcomplicate things a little. Always keep it simple, if a certain level of complexity has no place then it really does have no place.
September 9, 201114 yr your reply is embarrassing I think you took me too seriously. the post was towards promoting best practices. I think that's the point we're trying to make. Sometimes it isn't best practise to use OOP. But so long as we're all on the same page in agreeing that "best practises" should be used - well then that's a good start. Edited September 9, 201114 yr by Gibson
September 9, 201114 yr Author ok...but regarding the php, html and sql spaghetti bowl mixing any comments against that ? I simply don't see a good situation where someone might do that
September 9, 201114 yr ok...but regarding the php, html and sql spaghetti bowl mixing any comments against that ? I simply don't see a good situation where someone might do that Yes it ideally should be kept apart. Doesn't mean i agree with you 100% on this thread though.
September 9, 201114 yr ok...but regarding the php, html and sql spaghetti bowl mixing any comments against that ? I simply don't see a good situation where someone might do that Of course. Spaghetti = delicious but to be avoided if possible in coding. However you don't have to use OOP to avoid spaghetti necessarily. I do in essence agree with you. I started with spaghetti php4 like probably most others, and have tried to eradicate that as far as possible from my web stuff (including OOP where approriate of course). I think the issue here really is boiling down to classes/objects vs functions. Use each where appropriate, and use both to avoid spaghetti as far as possible. That's my take.
September 9, 201114 yr Yeah, there's no excuse to mix logic into the view, even when working procedurally.
September 9, 201114 yr I wouldnt classify myself as a PHP expert but i know for sure that OOP shouldnt be used for everything, what your saying is a load of **** practically, OOP is for reusable scripts (which will in turn save you time rewriting that script by reusing it, not waste time using OOP only to use it once and to only slow the script execution time basically) And then you change your mind saying "use it in the right way", the right way is not to use OOP for everything! Like gibson said "Use each where appropriate, and use both to avoid spaghetti as far as possible."
September 10, 201114 yr I wouldnt classify myself as a PHP expert but i know for sure that OOP shouldnt be used for everything, what your saying is a load of **** practically, I agree. OOP has its place but can be overkill. I only tend to use OOP when writing plugins for applications or tinkering with a CMS core.
September 10, 201114 yr Author OOP is for reusable scripts (which will in turn save you time rewriting that script by reusing it, not waste time using OOP only to use it once and to only slow the script execution time basically) The topic was intended to situations where you have a development project for a client and he wants a custom solution, for example a custom ecommerce or cms, I see no reason not to use OOP there. OOP is not for scripts, even tho PHP is a scripting language, PHP devs don't yet understand that OOP can really boost your application development and thus resulting in a solid solution. The ruby, python and .NET devs have embraced OOP so I really think that it is time for the PHP devs to see the big picture, not talk about simple scripts.
September 10, 201114 yr ...even tho PHP is a scripting language, PHP devs don't yet understand that OOP can really boost your application development and thus resulting in a solid solution. Horribly rash generalisation.
September 10, 201114 yr How about design an application from both sides and post it up so we have a better view on it.
September 10, 201114 yr Call me a luddite but let's take a step back here and examine why OOP is being heavily encouraged by the Guru's of the IT industry and less about picking holes in how it actually works beneath the glitter covered turd of hype. Whilst I'm all in favour of tidy code and the re-use of said the fact remains that many PHP and Javascript developers work alone. In that respect they could be considered skilled craftsmen/ persons, OOP by contrast and the modular approach to programming has obvious benefits for larger more complex applications that require collaberation. However as the practice becomes more widespread will this not eventually lead to a dumbing down of individual programmers as each becomes responsible for their little piece and nothing else? From a business point of view why hire a developer who knows it all and charges accordingly when you can get somebody to to fix/alter just a specific piece a lot cheaper?
September 10, 201114 yr Author Call me a luddite but let's take a step back here and examine why OOP is being heavily encouraged by the Guru's of the IT industry and less about picking holes in how it actually works beneath the glitter covered turd of hype. Whilst I'm all in favour of tidy code and the re-use of said the fact remains that many PHP and Javascript developers work alone. In that respect they could be considered skilled craftsmen/ persons, OOP by contrast and the modular approach to programming has obvious benefits for larger more complex applications that require collaberation. However as the practice becomes more widespread will this not eventually lead to a dumbing down of individual programmers as each becomes responsible for their little piece and nothing else? From a business point of view why hire a developer who knows it all and charges accordingly when you can get somebody to to fix/alter just a specific piece a lot cheaper? true, but beeing a freelance PHP developer with OOP skills I think can only boost your work because youc an reuse a lot of your work, scale and maintain better which ofc will make you a better programmer with happy clients. OOP skills for freelancers are almost a must because it is important to reuse every piece of good code you write.
September 10, 201114 yr The topic was intended to situations where you have a development project for a client and he wants a custom solution, for example a custom ecommerce or cms, I see no reason not to use OOP there. OOP is not for scripts, even tho PHP is a scripting language, PHP devs don't yet understand that OOP can really boost your application development and thus resulting in a solid solution. The ruby, python and .NET devs have embraced OOP so I really think that it is time for the PHP devs to see the big picture, not talk about simple scripts. You still dont quite get it do you.. The time you spend writing the php as OO would take you 15times longer than to just write it out quick, lets take echoing something simply for example, or the worlds simplest form or maybe a small program your going to use once (aka custom like you said), then for each time you apply the OOP to the next php script for it to actually work that would take the equivelant time as it would to just write the code out anyway, so practically you are spending 5times longer coding than it would to do it without the OO, Also, if its CUSTOM then it would in theory defeat the OOP as OOP is for reusable code, if the code was reused then it wouldnt be custom would it.... In terms of the ROR, PY & .NET, as far as i know they basically use precompiled librarys where the designers use them instead of writing out all the script, thats because someone made them librarys for EVERYONE to use on ROR etc, not just for everyone scripting with ROR for example to write there own librarys And you didnt specify you wasnt talking about small scripts, you was saying everything should be OOP, but if you insist on using OO for everything then go ahead and waste your time
September 10, 201114 yr Author saying custom means you are not using wordpress,drupal,joomla for a cms or magento,oscommerce, zen cart for ecommerce...your reply is just haotic, i said custom cms and you talk about echoing and small forms, well maybe your cms development consists of echoing vars from small forms, but whatever don't want to start a flaming war with some guys but let me give my point: A. I am not spending 5 times longer, because I can reuse some classes from other projects B. I can scale easy the project if the client wants to add more features in the future C. Once I am done I can reuse a lot of code which takes me to point A and actually speeding my development time The small forms your are talking about can become bigger forms, and I think we allready made a point that it is good to use OOP for your forms. "In terms of the ROR, PY & .NET, as far as i know they basically use precompiled librarys where the designers use them instead of writing out all the script, thats because someone made them librarys for EVERYONE to use on ROR etc, not just for everyone scripting with ROR for example to write there own librarys" Regarding this statement......what designers? please don't just make statements against using OOP just to make them because maybe you hate OOP because it is not a easy concept to grasp.
September 10, 201114 yr saying custom means you are not using wordpress,drupal,joomla for a cms or magento,oscommerce, zen cart for ecommerce...your reply is just haotic, i said custom cms and you talk about echoing and small forms, well maybe your cms development consists of echoing vars from small forms, but whatever don't want to start a flaming war with some guys but let me give my point: A. I am not spending 5 times longer, because I can reuse some classes from other projects B. I can scale easy the project if the client wants to add more features in the future C. Once I am done I can reuse a lot of code which takes me to point A and actually speeding my development time The small forms your are talking about can become bigger forms, and I think we allready made a point that it is good to use OOP for your forms. "In terms of the ROR, PY & .NET, as far as i know they basically use precompiled librarys where the designers use them instead of writing out all the script, thats because someone made them librarys for EVERYONE to use on ROR etc, not just for everyone scripting with ROR for example to write there own librarys" Regarding this statement......what designers? please don't just make statements against using OOP just to make them because maybe you hate OOP because it is not a easy concept to grasp. 1) i think you should then word what you say better and more precise 2) im not starting a war and neither are you, its just opinions 3) I didnt say that OOP isnt good for forms, i basically said if its a small form which would take 2 seconds to write then OOP doesnt help performance/efficiency 4) I apologise i meant developers not designers 5) I dont hate OOP, I didnt say i hate OOP, I never have hated OOP, I use OOP myself, I was saying that what you was saying originally was wrong basically saying use OOP for everything which you shouldnt
September 10, 201114 yr I think you still haven't grasped the aspects of OO Mythriel, its primary purpose isn't the reuse of code.. however you seem adamant by referencing this function, in this respect it serves no greater purpose to that of a function call in a standard procedural approach. OO comes to its own during or in applications that are data centric, an example of this would be a CRM within a company that dealt with many trades (professions) which required both shared data on each along with specific data on which similar functions would be required. The advantage of OO in such an example is through design, the ability to consider all types of trader as a trade through inheritance in this example, to allow for trade specific functions to be hidden from the remainder of the application and work for all instances of a trader. Thus the System can scale through the addition of more trade specific inherited classes as an example while the remainder of the system remains ill effected as in simple terms "I don't care what that class is doing, as far as I'm considered its a trade and I talk to it in x way, and if wants to talk to me, it has to do so in y way" Thus the above such code that would be produced Would Not be any use in another application unless the exact same function, design, variables etc where required, I would agree it is suited better to scale an application however the size by which you expect a 1 man development team to go wouldn't call for OO for this reason. Additionally If you are writing OO scripts you are clearly missing out two big steps if you consider it less time consuming, these being the most important: (Page 1 of object oriented design ) Object-Oriented analysis is concerned with developing an object-oriented model of the application domain. The objects in that model reflect the entities and operations associated with the problem to be solved. Object-Oriented design is concerned with the developing an object-orientated model of a software system to implement the identified requirements. The objects in an object-oriented design are related to the solution to the problem. There may be close relationships between some problem objects and some solution objects, but the designer inevitably has to add new objects and to transform problem objects to implement the solution. Object-Oriented programming is concerned with realising a software design using an object-oriented programming language. An object-oriented programming language provides constructs to define object classes and a run-time system to create objects from these classes. < Source Software Engineering 8, Author Ian Sommerville page 314 chapter 14 object-oriented desgin> These obviously being analysis and design, both being vital to an OO approach as you can see from the wording above, both entailing requirements documents, Logical data models, object identification (much harder than I suspect you realise on said "large projects") among countless other iterations to get correct. OO as such really is better suited to LARGE applications by hiding code in essence. I will give one last example of this point in that, you will not know how the ECHO statement in PHP "works" you will know its write up (use-case description in essence) and how to use it, but not how it achieves its function. Hence why us JAVA, C, C++ and .Net lot spend great time at UNI and college with countless lectures books, tutorials, courses and Degrees ensuring the basics are covered as design or lack of it is the biggest cause of failure in IT projects. Certainly dont see it as less time consuming for small projects for LARGE I would agree its the reverse, though remember with OO its all or nothing... certainly insent a case of chopping bits in to existing programs or new programs. Might i suggest some reading: Software Engineering - Ian Somverville UML Distilled (Third Edition) - Martin Fowler (must say short but sweet and worth a read for anyone.. considered one of the best) Edited September 10, 201114 yr by CSN-UK
September 11, 201114 yr Author I totally agree with you CSN-UK, I was just trying to make a point that it is good to use OOP even for some small scripts, but not saying that you need to use it all the time for trivial tasks.My initial point was towards using OOP in building medium to large scale web app with PHP. I read those books and I would also want to add PEAA- Martin Fowler to the list.
September 11, 201114 yr Now everyone has seamed to have thrashed various points out I wanted to add MVC (Modal View Controller) is not the only architecture one can use... if you deal with more requests per hour than the avg website gets in a year then SOA (Service Orientated Architecture) is worth researching
September 12, 201114 yr well, Im working in php including zend, phpunit and so on, full time for much more than 4 years, can I be called php developer ;d? OOP takes more time than procedural? BULL****! yes, you can write a SCRIPT much faster without oop BUT you will need to do that EVERY TIME, so in fact it is a monkey job, not to much effective because you will spent most of the time doing the same stuff again and again. Reusability? YES IT WORKS! We write code ONCE, and use it WITHOUT modifications everywhere! Why ppl invented design patterns? Exactly to do that! Well, usually I'm not working on simple projects. More than 500 thousands lines of code is a standard, in such a project there is no time to write custom things, if you need to do a custom thing write it in a way that it can be used later - use abstractions. Of course it take time to write a good code, because we write tests (unit tests, load tests, integration tests, etc...) but from the other hand we dont spend time on bug fixing because the amount of bugs is MINIMAL, it also means that we can give a guarantee to a customer especially if the customer is a big or well known company. I dont think PHP is the best technology. I rather think it sucks, but from the business point of view PHP is awesome because it gives you a sellable value in a short amount of time and effort. You can create something that works much faster than in Java. But it also depends on the project... Performance? BWAHAHAHAH! PHP and performance... ppff.... C'mon guys, this language wasn't designed to be the fastest on this planet. For example it is ~300 times slower than C in single character operations, like text processing. Did you work on a project that is being executed on a cluster? I did, and trust me, php is executed very rarely because it is too slow. This is also why OOP work here - the code doesnt have to be super fast. It is ok if a response generation will take around 1 second, in most cases it will be cached and served many hundreds or even thousands times per this one second. Well, PHP is just a tool, its not a way of life. It suits some project, other should be written in Java, and even C/C++, the point to be a good programmer is not to be a single language fan, but to know which tool is the best for solving a problem.
September 12, 201114 yr well, Im working in php including zend, phpunit and so on, full time for much more than 4 years, can I be called php developer ;d? OOP takes more time than procedural? BULL****! yes, you can write a SCRIPT much faster without oop BUT you will need to do that EVERY TIME, so in fact it is a monkey job, not to much effective because you will spent most of the time doing the same stuff again and again. Reusability? YES IT WORKS! We write code ONCE, and use it WITHOUT modifications everywhere! Why ppl invented design patterns? Exactly to do that! Well, usually I'm not working on simple projects. More than 500 thousands lines of code is a standard, in such a project there is no time to write custom things, if you need to do a custom thing write it in a way that it can be used later - use abstractions. Of course it take time to write a good code, because we write tests (unit tests, load tests, integration tests, etc...) but from the other hand we dont spend time on bug fixing because the amount of bugs is MINIMAL, it also means that we can give a guarantee to a customer especially if the customer is a big or well known company. I dont think PHP is the best technology. I rather think it sucks, but from the business point of view PHP is awesome because it gives you a sellable value in a short amount of time and effort. You can create something that works much faster than in Java. But it also depends on the project... Performance? BWAHAHAHAH! PHP and performance... ppff.... C'mon guys, this language wasn't designed to be the fastest on this planet. For example it is ~300 times slower than C in single character operations, like text processing. Did you work on a project that is being executed on a cluster? I did, and trust me, php is executed very rarely because it is too slow. This is also why OOP work here - the code doesnt have to be super fast. It is ok if a response generation will take around 1 second, in most cases it will be cached and served many hundreds or even thousands times per this one second. Well, PHP is just a tool, its not a way of life. It suits some project, other should be written in Java, and even C/C++, the point to be a good programmer is not to be a single language fan, but to know which tool is the best for solving a problem. thing is, your not a good web developer? infact your not even a web developer according to your website lol you're a ninja
September 12, 201114 yr lol you're a ninja yup, im invisible, wear black, and use shuriken instead of keyboard
September 13, 201114 yr Author I also work with Zend , use PHPUnit, use Design Patterns and also build advanced domain models in Zend, and I agree with cepa, PHP is a good tehnology if you use it right, but making this post short , cepa is right in what he said.
January 12, 201313 yr I also work with Zend , use PHPUnit, use Design Patterns and also build advanced domain models in Zend, and I agree with cepa, PHP is a good tehnology if you use it right, but making this post short , cepa is right in what he said. I agree with literally everything you've said in this thread. Most php code is awful amateur garbage, and I see lots of it in places like this. I've had a good look through these forums, and you can see why such crap code gets written on such a regular basis. The fact that so many people in here argued against OOP shows their real ignorance and lack of ability. It's the attitude that bothers me more than anything. PHP is one of the few languages where you have to really argue with people on a regular basis about the profound benefits of using things like unit testing and oop. Most other languages have communities well beyond this stage. It's also STILL perfectly normal to see the mysql_ functions used widely in places like this, and html/php/sql all stuck together in horrible spaghetti code fashion. What gets to me is that people barely point out these issues, and when they do, instead of being respected for giving valuable advice, this community of amateurs tends to respond by criticising the legitimate criticism. I just had a look through these forums and found a debate on which was better: dreamweaver or notepad++ (with nobody pointing out they are both terrible solutions), and then found a guy asking for advice on git who was told (and convinced) to use dropbox instead of git. You are right and the rest of the people in here arguing against you are wrong. At least take solace from the fact that you're not as lazy and negative as they are. Edited January 12, 201313 yr by palko
January 12, 201313 yr ^^ This. Sometimes developers who know what they're doing feel the need to maybe overcomplicate things a little. Always keep it simple, if a certain level of complexity has no place then it really does have no place. It depends on what you mean by compexity. For example, if I asked you why a systems engineer might use interfaces and abstract classes to design a system, you would probably say that was "complicated" and "overkill", when in reality it's essential in semi-complex systems to ensure the scalability of a system over the long term. What you are saying makes sense on a surface value only - at first glance "just do the simple thing" seems to make a lot of sense. The problem is that the reality of this in the PHP world tends to mean "hack it until it works and then job done", which ultimately leads to messy code that breaks easily, can't adapt to change and actually causes countless lost hours in maintenence. Using well designed OOP code backed up by unit tests will give you a much more stable system that, when well done, can adapt to change and can GUARANTEE that changes to one thing will never break changes to another. Most php code is horrible, and the "just get it working" mentality is largely to blame for this. Put it this way - I'm a lead developer in the company I work for, and if you worked for us and submitted code that produced the expected output on the screen but was poorly written under the surface, I would consider the code NOT complete and make you re-write it until it was better.
January 12, 201313 yr Really not a fan of your tone at all to be honest. You're already saying people on this forum lack ability. The fact you mention respect is also very ironic. I'm sure you some sort of codijg genious, but you've dug up a thread from Sept. 2011. Not that I posts here a great deal anymore, but I'll most definately be ignoring your posts in the future. Most of the people on this forum do lack coding ability. I know because I've had a good read through. I don't have a problem with people who are learning (I still consider myself a learner in a lot of ways). What I really don't like is when you get people who bring up legitimate criticism or good ideas who are then flamed by a load of people who simply don't really understand what they're saying. PHP has a well deserved reputation for terrible practices and awful code. After years of inheriting crap php code I have a much shorter tolerance for people who don't want to improve and make things better. If I write some code and you look at it and can show me a way to genuinely improve it, I'd love that. I'd respond really well to that. This thread though was a good example of why PHP has the reputation it does to me. The OP brought up some very strong points and was correct in everything he said, and yet he got battered down by a bunch of amateurs who don't know any better. This is why I'm planning to move on to a different language soon. I'm considering rails - not because rails is necessarily a better language, but just because the community is full of people who understand the virtues of things like unit testing. Unit testing has improved my code massively over the past year or two, yet whenever I start talking about it amongst php folk, I prepare myself for the same old flawed arguments about how "we don't have time for that" and how it's "overkill" or whatever. I just wish the guys in charge of php would take a bold step and rip out a bunch of the old crap like all the mysql_ functions - if I had my way, updating to the newest versions would just break old scripts, which would force maintainers of old scripts to either update their code or just not update to the latest versions of php. A lot of good work has been done by people like the Zend and Symfony guys, and many others. But even then, when you start talking about frameworks, within the php community you'll still get people who write crappy code yet attack people who use frameworks for being "mickey mouse" programmers - it's the other way round of course. I guess I'm just tired of years of dealing with people who don't want to push themselves forward in any way. The arguments in this very thread had me shaking my head constantly.
Create an account or sign in to comment