Knowledge (XXG)

Separation of concerns

Source đź“ť

219:
aspects. We know that a program must be correct and we can study it from that viewpoint only; we also know that it should be efficient and we can study its efficiency on another day, so to speak. In another mood we may ask ourselves whether, and if so: why, the program is desirable. But nothing is gained—on the contrary!—by tackling these various aspects simultaneously. It is what I sometimes have called "the separation of concerns", which, even if not perfectly possible, is yet the only available technique for effective ordering of one's thoughts, that I know of. This is what I mean by "focusing one's attention upon some aspect": it does not mean ignoring the other aspects, it is just doing justice to the fact that from this aspect's point of view, the other is irrelevant. It is being one- and multiple-track minded simultaneously.
352:. Security and logging are often secondary concerns, whereas the primary concern is often on accomplishing business goals. However, when designing a program, its security must be built into the design from the beginning instead of being treated as a secondary concern. Applying security afterwards often results in an insufficient security model that leaves too many gaps for future attacks. This may be solved with aspect-oriented programming. For example, an aspect may be written to enforce that calls to a certain API are always logged, or that errors are always logged when an exception is thrown, regardless of whether the program's procedural code handles the exception or propagates it. 80:
independent development. Hiding the implementation details of modules behind an interface enables improving or modifying a single concern's section of code without having to know the details of other sections and without having to make corresponding changes to those other sections. Modules can also expose different versions of an interface, which increases the freedom to upgrade a complex system in piecemeal fashion without interim loss of functionality.
31: 312:(JS) are complementary languages used in the development of web pages and websites. HTML is mainly used for organization of webpage content, CSS is used for definition of content presentation style, and JS defines how the content interacts and behaves with the user. Historically, this was not the case: prior to the introduction of CSS, HTML performed both duties of defining semantics and style. 198:
information inside one room, such as how messy it is, is not available to the other rooms, except through the interface, which is the door. The example with circuits demonstrates that activity inside one module, which is a circuit with consumers of electricity attached, does not affect activity in a different module, so each module is not concerned with what happens in the other.
87:. As with most abstractions, separating concerns means adding additional code interfaces, generally creating more code to be executed. The extra code can result in higher computation costs in some cases, but in other cases also can lead to reuse of more optimized code. So despite the many benefits of well-separated concerns, there may be an associated execution penalty. 259:
of how to do it, if they are to be evaluated with different machine architectures. Sequences of small changes to a data object held in a store may be an inappropriate description of how to compute something when a highly parallel machine is being used with thousands of processors distributed throughout the machine and local rather than global storage facilities.
258:
The separation of concerns has other advantages as well. For example, program proving becomes much more feasible when details of sequencing and memory management are absent from the program. Furthermore, descriptions of what is to be computed should be free of such detailed step-by-step descriptions
79:
Separation of concerns results in more degrees of freedom for some aspect of the program's design, deployment, or usage. Common among these is increased freedom for simplification and maintenance of code. When concerns are well-separated, there are more opportunities for module upgrade, reuse, and
388:
separation of concerns is one of the four guiding principles. Adhering to this principle is one of the tools that helps reduce the combinatorial effects that, over time, get introduced in software that is being maintained. In normalized systems separation of concerns is actively supported by the
254:
Ideally, the programmer should be able to concentrate on the first of the three tasks (describing what is to be computed) without being distracted by the other two, more administrative, tasks. Clearly, administration is important, but by separating it from the main task we are likely to get more
197:
Common examples include separating a space into rooms, so that activity in one room does not affect people in other rooms, and keeping the stove on one circuit and the lights on another, so that overload by the stove does not turn the lights off. The example with rooms shows encapsulation, where
218:
Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one's subject matter in isolation for the sake of its own consistency, all the time knowing that one is occupying oneself only with one of the
323:
allows separate concerns to be addressed as separate software constructs, each on an equal footing with the others. Each concern provides its own class-structure into which the objects in common are organized, and contributes state and methods to the composite result where they cut across one
328:
allows the analysis and composition of concerns to be manipulated as a multi-dimensional "matrix" in which each concern provides a dimension in which different points of choice are enumerated, with the cells of the matrix occupied by the appropriate software artifacts.
285:. This allows protocol designers to focus on the concerns in one layer, and ignore the other layers. The Application Layer protocol SMTP, for example, is concerned about all the details of conducting an email session over a reliable transport service (usually 372:. At any given time, a researcher may be focusing on (1) what some aspect of intelligence needs to compute, (2) what algorithm it employs, or (3) how that algorithm is implemented in hardware. This separation of concerns is similar to the 194:. The goal is to more effectively understand, design, and manage complex interdependent systems, so that functions can be reused, optimized independently of other functions, and insulated from the potential failure of other functions. 324:
another. Correspondence rules describe how the classes and methods in the various concerns are related to each other at points where they interact, allowing composite behavior for a method to be derived from several concerns.
262:
Automating the administrative aspects means that the language implementor has to deal with them, but he/she has far more opportunity to make use of very different computation mechanisms with different machine
60:, a set of information that affects the code of a computer program. A concern can be as general as "the details of the hardware for an application", or as specific as "the name of which class to 289:), but not in the least concerned about how the transport service makes that service reliable. Similarly, TCP is not concerned about the routing of data packets, which is handled at the 76:. Layered designs in information systems are another embodiment of separation of concerns (e.g., presentation layer, business logic layer, data access layer, persistence layer). 929: 779: 731: 136: 789: 741: 688: 949: 622: 937: 617: 34:
Diagram illustrating the principle of separation of concerns, which says that an action entity can only contain a single type of tasks
859: 827: 715: 124: 69: 678: 968: 705: 657: 144: 128: 104: 84: 132: 286: 156: 112: 325: 320: 160: 632: 369: 337: 168: 116: 100: 61: 627: 56: 176: 172: 120: 152: 65: 365: 278: 900: 781:
Building Enterprise Applications with Windows Presentation Foundation and the Model View ViewModel Pattern
758: 305: 148: 809: 757:
Painter, Robert Richard (2006). "Software Plans: Multi-Dimensional Fine-Grained Separation of Concerns".
973: 373: 341: 385: 96: 763: 72:
information inside a section of code that has a well-defined interface. Encapsulation is a means of
647: 255:
reliable results and we can ease the programming problem by automating much of the administration.
140: 843: 805: 211: 191: 73: 946: 934: 819: 813: 855: 823: 785: 737: 711: 684: 361: 345: 182:
Separation of concerns is an important design principle in many other areas as well, such as
51: 39: 30: 953: 941: 642: 290: 183: 17: 962: 848: 652: 398: 344:
to be addressed as primary concerns. For example, most programs require some form of
349: 187: 876: 95:
The mechanisms for modular or object-oriented programming that are provided by a
164: 947:
Tutorial and Workshop on Aspect-Oriented Programming and Separation of Concerns
309: 282: 277:
Separation of concerns is crucial to the design of the Internet. In the
235:
The programmer is having to do several things at the same time, namely,
227:
was becoming an accepted idea. In 1989, Chris Reade wrote a book titled
281:, great efforts have been made to separate concerns into well-defined 68:
program. Modularity, and hence separation of concerns, is achieved by
637: 108: 99:
are mechanisms that allow developers to provide SoC. For example,
376:/implementation distinction in software and hardware engineering. 137:
separate presentation and the data-processing (model) from content
29: 301: 397:
Separation of concerns can be implemented and enforced via
680:
What Every Engineer Should Know About Software Engineering
54:
into distinct sections. Each section addresses a separate
214:
in his 1974 paper "On the role of scientific thought".
815:
Selected writings on Computing: A Personal Perspective
242:
organise the computation sequencing into small steps;
847: 245:organise memory management during the computation. 64:". A program that embodies SoC well is called a 252: 233: 216: 818:. New York, NY, US: Springer-Verlag. pp.  356:Levels of analysis in artificial intelligence 223:Fifteen years later, it was evident the term 8: 707:Managing Complexity in Software Engineering 854:. Boston, MA, US: Addison-Wesley Longman. 762: 50:) is a design principle for separating a 27:Design principle for computer programming 930:Multi-Dimensional Separation of Concerns 733:Microsoft Application Architecture Guide 368:, it is common to refer to David Marr's 326:Multi-dimensional separation of concerns 669: 231:that describes separation of concerns: 653:Orthogonality § Computer science 171:languages can separate concerns into 7: 623:Aspect-oriented software development 83:Separation of concerns is a form of 901:"Hyper/Net: MDSoC Support for .NET" 810:"On the role of scientific thought" 618:Abstraction principle (programming) 850:Elements of Functional Programming 229:Elements of Functional Programming 25: 239:describe what is to be computed; 784:. Microsoft Press. p. 18. 658:Single-responsibility principle 405:SoC via partial classes in Ruby 877:"Building Secure Applications" 1: 321:Subject-oriented programming 316:Subject-oriented programming 899:Tiago Dias (October 2006). 778:Garofalo, Raffaele (2011). 633:Coupling (computer science) 338:Aspect-oriented programming 333:Aspect-oriented programming 169:Aspect-oriented programming 159:can separate concerns into 143:can separate concerns into 119:can separate concerns into 101:object-oriented programming 990: 875:Jess Nielsen (June 2006). 677:Laplante, Phillip (2007). 628:Concern (computer science) 46:(sometimes abbreviated as 736:. Microsoft Press. 2009. 302:HyperText Markup Language 704:Mitchell, R. J. (1990). 539: 461: 413: 250:Reade continues to say, 393:SoC via partial classes 366:artificial intelligence 279:Internet Protocol Suite 273:Internet protocol stack 210:was probably coined by 141:Service-oriented design 969:Programming principles 342:cross-cutting concerns 306:Cascading Style Sheets 265: 248: 225:separation of concerns 221: 208:separation of concerns 149:Procedural programming 44:separation of concerns 35: 18:Separation of Concerns 297:HTML, CSS, JavaScript 33: 500:is not edible!" 123:, and architectural 97:programming language 648:Modular programming 952:2008-05-16 at the 940:2016-12-19 at the 806:Dijkstra, Edsger W 710:. IEE. p. 5. 386:normalized systems 380:Normalized systems 370:levels of analysis 212:Edsger W. Dijkstra 192:information design 151:languages such as 103:languages such as 74:information hiding 36: 791:978-0-7356-5092-3 743:978-0-7356-2710-9 690:978-0-8493-7228-5 362:cognitive science 16:(Redirected from 981: 918: 917: 915: 914: 905: 896: 890: 889: 887: 886: 881: 872: 866: 865: 853: 840: 834: 833: 802: 796: 795: 775: 769: 768: 766: 754: 748: 747: 728: 722: 721: 701: 695: 694: 674: 606: 603: 600: 597: 594: 591: 588: 585: 582: 579: 576: 573: 570: 567: 564: 561: 558: 555: 552: 549: 546: 543: 531: 528: 525: 522: 519: 516: 515::nutrition_value 513: 510: 507: 504: 501: 498: 495: 492: 489: 486: 483: 480: 477: 474: 471: 468: 465: 453: 450: 447: 444: 441: 438: 435: 432: 429: 426: 423: 420: 417: 52:computer program 40:computer science 21: 989: 988: 984: 983: 982: 980: 979: 978: 959: 958: 954:Wayback Machine 942:Wayback Machine 926: 921: 912: 910: 903: 898: 897: 893: 884: 882: 879: 874: 873: 869: 862: 842: 841: 837: 830: 804: 803: 799: 792: 777: 776: 772: 764:10.1.1.110.9227 756: 755: 751: 744: 730: 729: 725: 718: 703: 702: 698: 691: 676: 675: 671: 667: 662: 613: 608: 607: 604: 601: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 533: 532: 529: 526: 524:nutrition_value 523: 520: 517: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 481: 478: 475: 472: 469: 466: 463: 455: 454: 451: 448: 445: 442: 439: 436: 433: 430: 427: 424: 421: 418: 415: 410:bear_hunting.rb 407: 399:partial classes 395: 382: 358: 335: 318: 299: 275: 270: 204: 125:design patterns 93: 28: 23: 22: 15: 12: 11: 5: 987: 985: 977: 976: 971: 961: 960: 957: 956: 944: 932: 925: 924:External links 922: 920: 919: 891: 867: 860: 835: 828: 797: 790: 770: 749: 742: 723: 716: 696: 689: 668: 666: 663: 661: 660: 655: 650: 645: 643:Modular design 640: 635: 630: 625: 620: 614: 612: 609: 557:monitor_hunger 540: 538: 537: 536:bear_hunger.rb 462: 460: 459: 458:bear_eating.rb 414: 412: 411: 406: 403: 394: 391: 381: 378: 357: 354: 334: 331: 317: 314: 298: 295: 291:Internet Layer 274: 271: 269: 266: 263:architectures. 247: 246: 243: 240: 226: 203: 200: 184:urban planning 92: 91:Implementation 89: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 986: 975: 972: 970: 967: 966: 964: 955: 951: 948: 945: 943: 939: 936: 933: 931: 928: 927: 923: 909: 902: 895: 892: 878: 871: 868: 863: 861:0-201-12915-9 857: 852: 851: 845: 839: 836: 831: 829:0-387-90652-5 825: 821: 817: 816: 811: 807: 801: 798: 793: 787: 783: 782: 774: 771: 765: 760: 753: 750: 745: 739: 735: 734: 727: 724: 719: 717:0-86341-171-1 713: 709: 708: 700: 697: 692: 686: 683:. CRC Press. 682: 681: 673: 670: 664: 659: 656: 654: 651: 649: 646: 644: 641: 639: 636: 634: 631: 629: 626: 624: 621: 619: 616: 615: 610: 548:attr_accessor 535: 534: 457: 456: 409: 408: 404: 402: 400: 392: 390: 387: 379: 377: 375: 371: 367: 363: 355: 353: 351: 347: 343: 339: 332: 330: 327: 322: 315: 313: 311: 307: 303: 296: 294: 292: 288: 284: 280: 272: 267: 264: 260: 256: 251: 244: 241: 238: 237: 236: 232: 230: 224: 220: 215: 213: 209: 201: 199: 195: 193: 189: 185: 180: 178: 174: 170: 166: 162: 158: 154: 150: 146: 142: 138: 134: 130: 126: 122: 118: 114: 110: 106: 102: 98: 90: 88: 86: 81: 77: 75: 71: 70:encapsulating 67: 63: 59: 58: 53: 49: 45: 41: 32: 19: 974:Reductionism 911:. Retrieved 907: 894: 883:. Retrieved 870: 849: 844:Reade, Chris 838: 814: 800: 780: 773: 752: 732: 726: 706: 699: 679: 672: 396: 383: 359: 336: 319: 300: 276: 261: 257: 253: 249: 234: 228: 222: 217: 207: 205: 196: 188:architecture 181: 94: 82: 78: 55: 47: 43: 37: 512:respond_to? 308:(CSS), and 85:abstraction 62:instantiate 963:Categories 913:2007-09-25 885:2012-02-08 665:References 310:JavaScript 161:procedures 908:DSOA 2006 759:CiteSeerX 374:interface 206:The term 165:functions 950:Archived 938:Archived 846:(1989). 808:(1982). 611:See also 346:security 304:(HTML), 268:Examples 145:services 551::hunger 389:tools. 350:logging 340:allows 177:objects 173:aspects 121:objects 66:modular 57:concern 935:TAOSAD 858:  826:  788:  761:  740:  714:  687:  638:Holism 581:hunger 563:hunger 503:unless 488:" 443::food? 434:select 428:forest 283:layers 202:Origin 157:Pascal 115:, and 113:Delphi 904:(PDF) 880:(PDF) 820:60–66 542:class 485:raise 464:class 440:& 416:class 127:like 856:ISBN 824:ISBN 786:ISBN 738:ISBN 712:ISBN 685:ISBN 593:food 578:hunt 572:food 566:> 545:Bear 518:food 506:food 494:food 479:food 467:Bear 425:hunt 419:Bear 364:and 348:and 190:and 175:and 155:and 135:can 117:Java 605:end 602:end 599:end 587:eat 554:def 530:end 527:end 473:eat 470:def 452:end 449:end 422:def 384:In 360:In 287:TCP 163:or 133:MVP 131:or 129:MVC 109:C++ 48:SoC 38:In 965:: 906:. 822:. 812:. 584:-= 569:50 560:if 491:#{ 401:. 293:. 186:, 179:. 167:. 147:. 139:. 111:, 107:, 105:C# 42:, 916:. 888:. 864:. 832:. 794:. 767:. 746:. 720:. 693:. 596:) 590:( 575:= 521:. 509:. 497:} 482:) 476:( 446:) 437:( 431:. 153:C 20:)

Index

Separation of Concerns

computer science
computer program
concern
instantiate
modular
encapsulating
information hiding
abstraction
programming language
object-oriented programming
C#
C++
Delphi
Java
objects
design patterns
MVC
MVP
separate presentation and the data-processing (model) from content
Service-oriented design
services
Procedural programming
C
Pascal
procedures
functions
Aspect-oriented programming
aspects

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑