Re: MVC: code in views

From: Date: Tue, 05 Jan 2016 19:34:35 +0000
Subject: Re: MVC: code in views
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-325335@lists.php.net to get a copy of this message
On Tue, 2016-01-05 at 12:31 -0500, Tedd Sperling wrote: > Ash asked: > > > Have you any thoughts on automated code quality tools for PHP like Code > > Sniffer? I'm using this at the moment, but it tends to like to complain > > when it encounters PHP files that are not pure PHP (i.e. views). Part of > > this is due to the rules I run, but I'm loathe to remove those rules > > just for the sake of a small part of an application. > > > I don’t use CodeSniffer, but that’s not a slam against it - I’m just ignorant as to what > it does. In cursory review, it looks like an IDE plugin. > > I do use IDE’s for developing code in several different OS’s and most provide some sort of > code intelligence to help developers. I’m not against that for one simply cannot develop sound > code for Apple (Swift), Android (Java-Android), or JAVA proper without a good IDE. > > However, I still haven’t found a good IDE for PHP. Sure Zend is around, but it has never > caught on with me. I like Netbeans for PHP and it works OK. I recently discovered ICEcoder and > I’ll introduce it to my students this semester because it’s simple, free, easy to use, and kind > of unique. As for how good ICEcoder is? I don’t know at the moment, I’m just trying it out — > looks promising for all web languages (see https://icecoder.net). > > Side-note: If you really want to find out if something is easy to use, turn it over to students > -- they will point out any problems. Kind of like users and other beta-testers. > > With all of that said, automated anything brings the most common denominator to the forefront, > which is not usually the best solution for specialized problems and true innovation. > > Be careful of things that help you, because they also bring their limitations — limitations > that may slant your development practice or view. For example, you mentioned Dreamweaver — the > WYSIWYG is horrible for developers understanding what is going on in the background. However, if you > don’t use the WYSIWYG option, then DW makes a good development mechanism for managing files and is > an OK IDE (sort-of). > > Another example in my view of things to look out for are Platforms, if you accept someone > else’s way of doing something, then you may gain work efficiency at common tasks, but at the > expense of your own innovation — your way of doing things — your uniqueness. Life lesson: > Understand what you bring to the table. > > While we all stand on the shoulders of others, innovation is what gets us down the road. New > ways of doing stuff is where fortunes are made. In short, I always shoot for the long ball. If I > don’t have a chance of hitting a home run, then I pick up my bat and look elsewhere for focusing > my talent. My motto — find a problem and solve it. > > That's one of the reason why I teach — therein lies the possibility I can influence real > talent to do things greater than I can. I have always had the ability to recognize talent, like I > see in you Ash. I am sure you’ll make the right decision for you. > > Cheers, > > tedd > > _______________ > tedd sperling > tedd.sperling@gmail.com CodeSniffer is more of a code quality tool, but it can be run as a plugin from within popular IDEs. I agree with over-relying on automation. This is only to highlight the big problems and give a general guideline when someone in a team is not keeping consistent with the team standards. I use Netbeans myself, because it gives me a standard (mostly) IDE that works on Linux and Windows. I did write a short article on it (shameless plug) a little while ago http://www.ashleysheridan.co.uk/blog/CodeSniffer+%E2%80%93+The+PHP +Coding+Standards+Tool that covers more of what it does and how to use it. Thanks, Ash http://www.ashleysheridan.co.uk

« previous php.general (#325335) next »