Top-down and bottom-up design - Wikipedia, the free encyclopedia

来源:百度文库 编辑:神马文学网 时间:2024/07/02 17:46:49
Top-down and bottom-up design
From Wikipedia, the free encyclopedia
Jump to:navigation,search
“Top-down” redirects here. For other uses, seeTop-down (disambiguation).
Top-down and bottom-up are strategies ofinformation processing and knowledge ordering, mostly involving software, and by extension other humanistic and scientificsystem theories (seesystemics).
In a top-down approach an overview of the system is firstformulated, specifying but not detailing any first-level subsystems.Each subsystem is then refined in yet greater detail, sometimes in manyadditional subsystem levels, until the entire specification is reducedto base elements. A top-down model is often specified with theassistance of "black boxes" that make it easier to manipulate. However,black boxes may fail to elucidate elementary mechanisms or be detailedenough to realistically validate the model.
In a bottom-up approach the individual base elements of thesystem are first specified in great detail. These elements are thenlinked together to form larger subsystems, which then in turn arelinked, sometimes in many levels, until a complete top-level system isformed. This strategy often resembles a "seed" model, whereby thebeginnings are small, but eventually grow in complexity andcompleteness. However, "organic strategies", may result in a tangle ofelements and subsystems, developed in isolation, and subject to localoptimization as opposed to meeting a global purpose.
Contents
[hide]
1 Computer science1.1 Software development
1.2 Programming
1.3 Parsing
2 Nanotechnology
3 Neuroscience and psychology
4 Architectural
5 Ecological5.1 References
6 External links
[edit] Computer science
[edit] Software development
Part of this section is from thePerl Design Patterns Book.
In thesoftware development process, the top-down and bottom-up approaches play a key role.
Top-down approaches emphasise planning and a complete understandingof the system. It is inherent that no coding can begin until asufficient level of detail has been reached in the design of at leastsome part of the system. This, however, delays testing of the ultimatefunctional units of a system until significant design is complete.Bottom-up emphasizes coding and early testing, which can begin as soonas the first module has been specified. This approach, however, runsthe risk that modules may be coded without having a clear idea of howthey link to other parts of the system, and that such linking may notbe as easy as first thought. Re-usability of code is one of the mainbenefits of the bottom-up approach.[citation needed]
Top-down design was promoted in the 1970s byIBM researcherHarlan Mills andNiklaus Wirth. Mills developedstructured programming concepts for practical use and tested them in a 1969 project to automate theNew York Timesmorgue index. The engineering and management success of this projectled to the spread of the top-down approach through IBM and the rest ofthe computer industry. Niklaus Wirth, among other achievements thedeveloper ofPascal programming language, wrote the influential paper Program Development by Stepwise Refinement. Top-down methods were favored insoftware engineering until the rise ofobject-oriented programming in the late 1980s.
Modern software design approaches usually combine both top-down andbottom-up approaches. Although an understanding of the complete systemis usually considered necessary for good design, leading theoreticallyto a top-down approach, most software projects attempt to make use ofexisting code to some degree. Pre-existing modules give designs abottom-up flavour. Some design approaches also use an approach where apartially-functional system is designed and coded to completion, andthis system is then expanded to fulfill all the requirements for theproject.
[edit] Programming
Top-down programming is a programming style, the mainstay oftraditional procedural languages, in which design begins by specifyingcomplex pieces and then dividing them into successively smaller pieces.Eventually, the components are specific enough to be coded and theprogram is written. This is the exact opposite of the bottom-upprogramming approach which is common in object-oriented languages suchas C++ or Java.
The technique for writing a program using top-down methods is towrite a main procedure that names all the major functions it will need.Later, the programming team looks at the requirements of each of thosefunctions and the process is repeated. These compartmentalizedsub-routines eventually will perform actions so simple they can beeasily and concisely coded. When all the various sub-routines have beencoded the program is done.
By defining how the application comes together at a high level,lower level work can be self-contained. By defining how the lower levelobjects are expected to integrate into a higher level object,interfaces become clearly defined.
Advantages of top-down programming:
Separating the low level work from the higher level objects leads to a modular design.
Modular design means development can be self contained.
Having "skeleton" code illustrates clearly how low level modules integrate.
Code is easier to follow, since it is written methodically and with purpose.
Disadvantages of top-down programming:
No functionality will exist until development of low level objects is complete.
[edit] Parsing
Parsingis the process of analyzing an input sequence (such as that read from afile or a keyboard) in order to determine its grammatical structure.This method is used in the analysis of bothnatural languages andcomputer languages, as in acompiler.
Bottom-up parsing is a strategy for analyzing unknown datarelationships that attempts to identify the most fundamental unitsfirst, and then to infer higher-order structures from them. Top-downparsers, on the other hand, hypothesize generalparse tree structures and then consider whether the known fundamental structures are compatible with the hypothesis. SeeTop-down parsing andBottom-up parsing.
[edit] Nanotechnology
Main article:Nanotechnology
Top-down and bottom-up are used as two approaches for assembling nanoscale materials and devices. Bottom-up approaches seek to have smaller (usuallymolecular)components arrange themselves into more complex assemblies, whiletop-down approaches seek to create nanoscale devices by using larger,externally-controlled ones to direct their assembly.
The top-down approach often uses the traditional workshop ormicrofabrication methods where externally-controlled tools are used tocut, mill and shape materials into the desired shape and order.Bottom-up approaches, in contrast, use thechemicalproperites of single molecules to cause single-molecule components toautomatically arrange themselves into some useful conformation. Theseapproaches utilize the concepts ofmolecular self-assembly and/ormolecular recognition. See alsoSupramolecular chemistry.
Such bottom-up approaches should, broadly speaking, be able toproduce devices in parallel and much cheaper than top-down methods, butcould potentially be overwhelmed as the size and complexity of thedesired assembly increases.
[edit] Neuroscience and psychology
This vocabulary is also employed inneuroscience andpsychology. The study of visualattentionprovides an example. If your attention is drawn to a flower in a field,it may be simply that the flower is more visually salient than thesurrounding field. The information which caused you to attend to theflower came to you in a bottom-up fashion -- your attention wasnot contingent upon knowledge of the flower; the outside stimulus wassufficient on its own. Contrast this situation with one in which youare looking for a flower. You have a representation of what you arelooking for. When you see the object you are looking for, it issalient. This is an example of the use of top-down information.
[edit] Architectural
Often, theÉcole des Beaux-Artsschool of design is said to have primarily promoted top-down-designbecause it taught that an architectural design should begin with aparti, a basic plan drawing of the overall project. By contrast, theBauhausfocused on bottom-up-design. This method manifested itself in the studyof translating small-scale organizational systems to a larger, morearchitectural scale (as with the woodpanel carving and furnituredesign).
[edit] Ecological
Inecology, top down control referes to when a top predator controls the structure/population dynamics of theecosystem. The classic example is of kelp forest ecosystems. In such ecosystems, sea otters are akeystonepredator. They prey on urchins which in turn eat kelp. When otters areremoved, urchin populations grow and reduce the kelp forest creatingurchin barrens. In other words, such ecosystems are not controlled byproductivity of the kelp but rather a top predator.
Bottom up control in ecosystems refers to ecosystems in which thenutrient supply and productivity and type of primary producers (plantsand phytoplankton) control the ecosystem structure. An example would behow plankton populations are controlled by the availability ofnutrients. Plankton populations tend to be higher and more complex inareas where upwelling brings nutrients to the surface.
There are many different examples of these concepts. It is notuncommon for populations to be influenced by both types of control.
[edit] References
J. A. Estes, M. T. Tinker, T. M. Williams, D. F. Doak "Killer WhalePredation on Sea Otters Linking Oceanic and Nearshore Ecosystems",Science 16 October 1998: Vol. 282. no. 5388, pp. 473 - 476
Malone, T. C., D. J. Conley, T. R. Fisher, P. M. Glibert, L.W.Harding & K.G. Sellner, 1996. Scales of nutrient-limitedphytoplankton productivity in Chesapeake Bay. Estuaries 19: 371–385.
[edit] External links
Program Development by Stepwise Refinement- Communications of the ACM, Vol. 14, No. 4, April (1971)
Changing Your Mind: On the Contributions of Top-Down and Bottom-Up Guidance in Visual Search for Feature Singletons, Journal of Experimental Psychology: Human Perception and Performance, Vol. 29, No. 2, 483–502,2003 Inc.