Monday, October 25, 2010

Besides the object-oriented


If you are using or considering using object-oriented programming (OOP) techniques, then you should at least find out what the meaning of OOP in the end with, why use OOP techniques. Now I make some you should know about the technical terms, and talk about these concepts in terms of the solution you have in significance.
Why Use OOP?
The concept of software solutions for the object with great benefits, good design and reasonable in the circumstances in particular. You can just write the code once again in the future reuse, and in the case of non-OOP you will probably want the application again and again in the preparation of the internal parts of the same function code. So, since object-oriented programming to reduce the total amount of code to speed up the progress of the development of the software while reducing the amount of error.
The code used to create the object may also be used for multiple applications. For example, your team can prepare a set of standard classes to calculate your available resources, then use that code objects in Suo You need Tonglei solution to create objects, such as customer order interface, the stock value of reporting and notification of sales force Faji and so on.
Another advantage of OOP is code structure. Such as object-oriented inheritance concept like variables and functions through simplified and convenient way of software development process. OOP can be more easily divided between the encoding task in the team. Meanwhile, due to adopt OOP, identify sub-class code of attachment has become more simple (such as inheritance object code). In addition, software testing and debugging can be greatly simplified.
OOP, however, there are some inherent disadvantages. If a class is modified, all dependent on the class code must be re-tested and may need to be modified to support the kind of change. Also, if the document has not been carefully maintained, it is difficult to determine which code to use the parent class (inherited code). If discovered late in the development of software errors, then it may affect the application of a significant portion of the code.
Object-oriented programming with traditional development thinking in the programming is different from traditional development requires developers to change with the inertia in the way of thinking. OOP an experienced development team, the adoption of the benefits of OOP is obvious. If you are considering turning OOP, then you must ensure that already have experienced a major developers can be responsible for checking the software defects and architecture.
Here we take a look at OOP technology in the end can do for you; learn about the concepts and terminology.
Object definition object is to build object-oriented programming relies on the basic unit. With a more professional terms, the so-called object is a code example, this code performs a specific function, or package with self-contained nature. This package code is often called a class, object class or module, or in different programming languages in the application of other names. Over the meaning of these terms in slightly different, but they are a collection of code.
As I mentioned previously, the object itself is a class or other data structure instance. This means that existing physical code played a role in creating the template object. Perform specific functions, need to write code only once been quoted many times. Each object has its own identity, that is so different from each object object name.
The object is not the actual copy of the class. Each object has its own name space, in which to save their own namespace identifiers and variables, but the implementation of the function object to invoke the original code. "Package" of the object has its own function, this function is called "method", and object variables are referred to as property. When the object properties within the defined time, they usually can not be extended to other instances. Suppose I have an existing class called vegetable (vegetable), while also creating two object instance carrot (carrot) and celery (celery), then I set the value to the carrot will not affect the value of celery inside. vegetable own internal variables will never be defined as vegetable category is only a template.
In certain situations, some functions do not affect the class of objects created by the class. Class attribute refers to is designed to preserve the value of used objects. Class method is used to define and track the class attribute.
Some of the programming language allows users to call the class of functions rather than creating the instance. If the function is assigned to an identifier (or handle), and in some cases they can be viewed as an object with its own rights. However, in most cases, the function is the method used to achieve a certain result.
Now that you understand the meaning of the object, then I have to talk about how objects are used.
Use the object in the main program, the definition of the object class structure by way of an instance of an object. Object has all methods can be used to create the desired results, while attributes can be referenced and operation. When the object is no longer necessary under the circumstances, the main program can destroy the object.
Object class has a powerful feature, which is that they can inherit other classes. This means that if we prepared a potato (potato) class, then it can be inherited vegetable category and prevent us from rewriting existing functions. Vegetable classes available for all functions can be used potato class. Thus, vegetable and can inherit food (food) category, and so on.
Some OOP programming language also has a dynamic binding (dynamic binding) concepts. The technology has also been called multiple inheritance. For example, potato class can inherit vegetable and starch (starch) class. However, this may cause problems, such as two classes have the same name some of the property. In particular, when dealing with the concept of multiple inheritance the way language is different, some of the language completely disable the concept.
After inheriting a class, we can override methods to obtain the desired result. For example, my vegetable category may have a function named prepare, the way the main guide you how to prepare food. However, in the instance of the type of potato, when I hope that one contains a special definition of the potatoes, so I created a function, its name and vegetable dishes prepared in the same function name function but modification of the original act. If I do not overload prepare method, used in the vegetable class function. This is called polymorphism (polymorphism).
Polymorphism of the other methods related to the type of object coherence. This helps ensure that the reference function has the following relationship: vegetable if I can instantiate the object, then I should be able to instantiate objects potato. This is because the potato is a vegetable. Subclasses. However, because the vegetable is not the potato sub-class, so in turn the instantiation is not allowed. If I instantiate the potato object, then I do not need to instantiate objects of the vegetable.
How to define a variety of perspectives polymorphism, and its end use is the same. Anyway, this is an important OOP concepts. Technology combined with inheritance, apparently Why OOP development function with such a powerful reason for self-evident.
Summary
This article is not intended to explain the depth of object-oriented programming techniques, I introduced the key words and terms only just a little leak current. If you are new to OOP or the first time read about the concept, I hope you now understand OOP technology into the mainstream of modern software development reasons.





Recommended links:



"Open Source Communities In China" Held In Sharon



FrontPage Create Thumbnails And Images With Overlapping Effects



What conditions should be maliciously Registered domain name?



DAT To 3GP



DVR-MS to MPG



JSP experience of learning about the steps and TIMING



Comment Download Managers



how to convert jvc everio tod Files to mov mp4



Good Investment Tools



11n Vs. 150M And 300M Internal Battle Cost The King



MII further notice irregularities SP will be ordered to stop



Who are you looking for a Salesman?



RM to AVI



Top E-Mail List Management



Simple Text Or Document Editors



No comments:

Post a Comment