PHP程序员的陋习总结(转载)
来源:互联网 发布:javascript基础知识 编辑:程序博客网 时间:2024/04/30 16:31
1. don't comment your code properly with something like phpDoc
2. don't see the need and/or benefits of a good programming IDE like Zend Studio or Eclipse PDT
3. have never used some form of version control like Subclipse
4. don't adopt some coding & naming standards and general conventions and stick to to them at least throughout the project
5. don't use a consistent methodology
6. don't escape and/or validate properly input or sql queries
7. don't plan your application thoroughly before starting to code
8. don't use test-driven development
9. don't program & test with error reporting on
10. don't see the benefits of a debugger
11. don't refactor your code
12. don't keep the different layers seperated using something like MVC
13. don't know what these stand for: KISS, DRY, MVC, OOP, REST
14. don't return content but echo or print it from your functions or classes
15. have never seen the advantage of unit tests or testing in general
16. return HTML, not data, strings, or objects.
17. hard code messages and configuration parameters
18. don't optimize your sql queries
19. don't use __autoload
20. don't allow intelligent error handling
21. use $_GET instead of $_POST for any destructive actions
22. don't know how to use regular expressions
23. you've never heard of sql injection or cross-site scripting
24. don't allow simple configuration, can be parameters passed to a class’s constructor, set/get methods called later, or constants defined at a runtime.
25. don't understand the benefits and limitations of Object Oriented Programming
26. misuse OOP / everything you write , no matter how small is OOP
27. you think reusable software equals/requires your code to be OOP
28. don't choose intelligent defaults
29. don't have one single configuration file
30. don't want the file contents to be seen, but give it a .inc extension instead of .php
31. don't use a database abstraction layer
32. don't keep it DRY, Don't repeat yourself. If you have to copy and paste or duplicate something your design may be off.
33. don't make a function/class/method do just one thing and don't make them interact.
34. don't try to take advantage of OOP specific features like abstract/interface classes, inheritage polymorphism & access modifiers.
35. don't optimize your application design with established design patterns
36. don't allow your user to define a base directory if you have multiple files and/or directories
37. pollute the global namespace, one option is to prefix the functions in your library with a common string
38. don't allow a table prefix when using database tables
39. use a separate template engine
40. don't take a look at established php frameworks for inspiration, most of them have advanced web dev concepts and good code
- PHP程序员的陋习总结(转载)
- PHP程序员的40点陋习
- PHP程序员的40点陋习(转)
- PHP程序员的40点陋习
- PHP程序员的40点陋习
- 转PHP程序员的40点陋习 完全版
- PHP程序员常见的陋习,你中几个?
- Java六种异常处理的陋习(转载)
- Java程序员的各种陋习
- [转载]java异常处理的陋习展播
- java异常处理的陋习(转载)
- 六种异常处理的陋习 ---- 一篇不错的讲解Java异常的文章(转载)
- 一篇不错的讲解Java异常的文章(转载)-- 六种异常处理的陋习
- 转载:一个程序员的总结
- PHP程序员应该使用的10个组件(转载)
- PHP程序员的技术成长规划(转载)
- java异常(异常处理的陋习)
- 【转载】PHP程序员面临的成长瓶颈
- VBB 3.8.4 XSS
- svnmanager 中中文路径乱码问题解决
- svn 服务器镜像方式同步备份
- 你还想继续在社会上混吗?如果想,请记好这20句话,在你最迷茫、最无助的时候,它会指引、照耀你前进的道路
- Perl 正则表达式 模式匹配
- PHP程序员的陋习总结(转载)
- AL32UTF8的varchar2,AL16UTF16的nclob
- CEGUI安装、编译、运行总结
- Ext 核心 API -- Ext.getCmp
- 关于ErrorCode
- C# Delegate(委托)与多线程
- 一种基于多字节编码的字符集GB2312
- PKU 2676 Sudoku
- UNICODE编码