Java知识分享网 - 轻松学习从此开始!    







Java1234 VIP课程


当前位置: 主页 > Java文档 > Java基础相关 >

Object-Oriented Thought Process 3th PDF 下载

时间:2020-09-15 10:56来源: 作者:小锋  侵权举报
Object-Oriented Thought Process 3th PDF 下载
Object-Oriented Thought Process 3th  PDF 下载


Although many people find this bit of information surprising, object-oriented (OO)
software development has been around since the early 1960s. Objects are now used
throughout the software development industry. It is no secret that the software industry
can be slow-moving at times. It is also true that, when systems are working fine, there has
to be a compelling reason to replace them.This has somewhat slowed the propagation of
OO systems.There are many non-OO legacy systems (that is, older systems that are already
in place) that are doing the job—so why risk potential disaster by changing them? In
most cases you should not change them, at least not simply for the sake of change.There
is nothing inherently wrong with systems written in non–OO code. However, brand-new
development definitely warrants the consideration of using OO technologies.
Although there has been a steady and significant growth in OO development in the
past 15 years, the continued reliance on the Internet has helped catapult it even further
into the mainstream.The emergence of day-to-day business transactions on the Internet
has opened a brand-new arena, where much of the software development is new and
mostly unencumbered by legacy concerns. Even when there are legacy concerns, there is
a trend to wrap the legacy systems in object wrappers.
Object Wrappers
Object wrappers are object-oriented code that includes other code inside. For example, you
can take a structured module and wrap it inside an object to make it look like an object. You
can also use object wrappers to wrap functionality such as security features, non-portable
hardware features, and so on.
Today, one of the most interesting areas of software development is the marriage of legacy
and Internet based systems. In many cases, a web-based front-end ultimately connects to
data that resides on a Mainframe. Developers who can combine the skills of mainframe
and web development are in demand.
6 Chapter 1 Introduction to Object-Oriented Concepts
Inputs Outputs
Figure 1.1 Black boxes.
Objects have certainly made their way into our personal and professional information
systems (IS) lives—and they cannot be ignored.You probably experience objects in your
daily like without even knowing it.These experiences can take place in your car, talking
on your cell phone, using your digital TV, and many other situations.
With the success of Java, Microsoft’s .NET technologies and many others, objects are
becoming a major part of the technology equation.With the explosion of the Internet,
and countless local networks, the electronic highway has in essence become an object￾based highway (in the case of wireless, object-based signals).As businesses gravitate toward
the Web, they are gravitating toward objects because the technologies used for electronic
commerce are mostly OO in nature.
This chapter is an overview of the fundamental OO concepts.The concepts covered
here touch on most, if not all, of the topics covered in subsequent chapters, which explore
these issues in much greater detail.
Procedural Versus OO Programming
Before we delve deeper into the advantages of OO development, let’s consider a more
fundamental question:What exactly is an object? This is both a complex and a simple
question. It is complex because learning any method of software development is not triv￾ial. It is simple because people already think in terms of objects.
For example, when you look at a person, you see the person as an object.And an ob￾ject is defined by two terms: attributes and behaviors.A person has attributes, such as eye
color, age, height, and so on.A person also has behaviors, such as walking, talking, breath￾ing, and so on. In its basic definition, an object is an entity that contains both data and be￾havior.The word both is the key difference between OO programming and other
programming methodologies. In procedural programming, for example, code is placed
into totally distinct functions or procedures. Ideally, as shown in Figure 1.1, these proce￾dures then become “black boxes,” where inputs go in and outputs come out. Data is
placed into separate structures and is manipulated by these functions or procedures.
Difference Between OO and Procedural
In OO design, the attributes and behaviors are contained within a single object, whereas in
procedural, or structured design, the attributes and behaviors are normally separated.
Procedural Versus OO Programming 7
As OO design grew in popularity, one of the realities that slowed its acceptance was the
fact that there were a lot of non-OO systems in place that worked perfectly fine.Thus, it
did not make any business sense to simply change the systems for the sake of change.Anyone who is familiar with any computer system knows that any change can spell disaster—
even if the change is perceived to be slight.
This situation came into play with the lack of acceptance of OO databases.At one
point in the acceptance of OO development it seemed somewhat likely that OO databases would replace relational databases. However, this never happened. Businesses had a
lot of money invested in relational databases, and there was one overriding factor—they
worked.When all of the costs and risks of converting systems from relational to OO databases became apparent, there was no compelling reason to switch.
In fact, the business forces have now found a happy middle ground. Much of the software development practices today have flavors of several development methodologies such
as OO and structured.
As illustrated in Figure 1.2, in structured programming the data is often separated from
the procedures, and sometimes the data is global, so it is easy to modify data that is outside
the scope of your code.This means that access to data is uncontrolled and unpredictable
(that is, multiple functions may have access to the global data). Second, because you have
no control over who has access to the data, testing and debugging are much more difficult. Objects address these problems by combining data and behavior into a nice, complete




回复 666