码迷,mamicode.com
首页 > 其他好文 > 详细

a new way of thinking about a problem

时间:2016-09-01 14:44:02      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

PHP Advanced and Object-Oriented Programming
Larry Ullman
 
The first thing that you must understand about OOP is that it presents not just new syntax but a new way of thinking about a problem. By far the most common mistake beginning OOP programmers make is to inappropriately apply OOP theory. PHP will tell you when you make a syntactical mistake, but you’ll need to learn how to avoid the oretical mistakes as well. To explain...
All programming comes down to taking actions with data: a user enters data in an HTML form; the PHP code validates it, emails it, and stores it in a database; and so forth. These are simply verbs (actions) and nouns (data). With procedural programming, the focus is on the verbs: do this, then this, then this. In OOP, the focus is on the nouns: with what types of things will the application work? In both approaches, you need to identify both the nouns and the verbs required; the difference is in the focus of the application’s design.

a new way of thinking about a problem

标签:

原文地址:http://www.cnblogs.com/yuanjiangw/p/5829473.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!