Home  >  Article  >  Backend Development  >  .net framework 4.0 40 signs that you are still a PHP newbie

.net framework 4.0 40 signs that you are still a PHP newbie

WBOY
WBOYOriginal
2016-07-29 08:38:52992browse

I would like to include this article in my "Programming Mistakes" series. Although I have been exposed to software engineering, enterprise software architecture and database design in regular university courses, I still feel the "guilt" of the following facts from time to time. Of course, these are all my subjective feelings and are oriented towards Eclipse:
You are a PHP newbie if you:
1. Don’t know how to properly comment your code using tools like phpDoc
2. Turn a blind eye to good integrated development environments like Zend Studio or Eclipse PDT
3. Never Have used any form of version control system, such as Subclipse
4. Do not adopt certain coding and naming standards, as well as common conventions, and cannot implement them in the project development cycle
5. Do not use a unified development method
6. Do not convert (or ) nor validate certain inputs or SQL query strings (Translation: refer to PHP related functions)
7. Do not plan your program thoroughly before coding
8. Do not use test-driven development
9. Do not code and test with errors enabled (Annotation: refer to the PHP function error_reporting)
10. Turn a blind eye to the benefits of the debugger
11. Not refactor your code
12. Not use an MVC-like pattern to separate different levels of the program
13. Don’t know these concepts: KISS , DRY, MVC, OOP, REST
14. Instead of returning, directly output (echo/print) content in your function or class
15. Turn a blind eye to the advantages of unit testing or general testing
16. Always return hard coding HTML, but does not return pure data, strings, or objects
17. Always hardcode "message" and "configuration parameters"
18. Do not optimize SQL query statements
19. Do not use __autoload (translation annotation) : Refer to the relevant description in the PHP manual)
20. Intelligent error handling is not allowed (Translation: refer to PEAR's ErrorStack)
21. Use $_GET instead of $_POST to do destructive transfer operations
22. Don't know how to use regular expressions
23. Never heard of SQL injection or cross-site scripting
24. Simple configuration is not allowed, and the constructor of the class is not allowed to accept parameter transfer and then execute the set/get method, or constant definition at runtime
25. Don’t understand Advantages and Disadvantages of Object-Oriented Programming (OOP)
26. Abusing OOP regardless of the size of the situation
27. Thinking that achieving reusable software must equal/need to make your code follow OOP
28. Not utilizing smart defaults
29. There is no single configuration file
30. I don’t want to expose the file source code, but use the .inc suffix instead of .php
31. Don’t use the database abstraction layer
32. Can’t maintain the DRY style, that is, don’t repeat yourself, if you always You are copying and pasting something, which shows that your design is poor
33. There is no implementation of a function/class/method that only does one thing, nor can they be combined and used
34. Failed to try the strengths of OOP, such as abstract classes, Interfaces, polymorphism, inheritance, access control modifiers (Annotation: such as public, private, protected)
35. Do not use existing design patterns to optimize your program architecture design
36. Do not allow your users to operate when you have many files or Define the basic directory in the case of a directory
37. Pollute the namespace, such as naming your library functions with common strings
38. Do not use table prefixes when using database tables
39. Do not use a unified template engine
40. Don’t follow The existing PHP development framework is too lazy to explore; in fact, advanced development concepts and wonderful code are contained in it.
Translation Note: There is also a translated version of "40 Bad Habits of PHP Programmers" by Ma Yongzhan, which is concise and equipped with translator's notes.

The above introduces .net framework 4.0 40 signs that you are still a newbie in PHP, including the content of .net framework 4.0. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn