Главная » Просмотр файлов » Software Engineering Body of Knowledge (v3) (2014)

Software Engineering Body of Knowledge (v3) (2014) (811503), страница 18

Файл №811503 Software Engineering Body of Knowledge (v3) (2014) (Software Engineering Body of Knowledge (v3) (2014).pdf) 18 страницаSoftware Engineering Body of Knowledge (v3) (2014) (811503) страница 182020-08-25СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 18)

Otheradvantages of incremental integration includeeasier error location, improved progress monitoring, more fully tested units, and so forth.4. Construction Technologies4.1. API Design and Use[3*]An application programming interface (API) is theset of signatures that are exported and available tothe users of a library or a framework to write theirapplications. Besides signatures, an API shouldalways include statements about the program’seffects and/or behaviors (i.e., its semantics).API design should try to make the API easyto learn and memorize, lead to readable code, behard to misuse, be easy to extend, be complete,and maintain backward compatibility. As theAPIs usually outlast their implementations fora widely used library or framework, it is desiredthat the API be straightforward and kept stable tofacilitate the development and maintenance of theclient applications.API use involves the processes of selecting, learning, testing, integrating, and possiblyextending APIs provided by a library or framework (see section 3.6, Construction with Reuse).4.2. Object-Oriented Runtime Issues[1*]Object-oriented languages support a series ofruntime mechanisms including polymorphismand reflection.

These runtime mechanismsincrease the flexibility and adaptability of objectoriented programs. Polymorphism is the abilityof a language to support general operations without knowing until runtime what kind of concreteobjects the software will include. Because theprogram does not know the exact types of theobjects in advance, the exact behaviour is determined at runtime (called dynamic binding).Reflection is the ability of a program to observeand modify its own structure and behavior at runtime. Reflection allows inspection of classes,interfaces, fields, and methods at runtime without knowing their names at compile time. It alsoallows instantiation at runtime of new objects andinvocation of methods using parameterized classand method names.4.3. Parameterization and Generics[4*]Parameterized types, also known as generics(Ada, Eiffel) and templates (C++), enable thedefinition of a type or class without specifying allthe other types it uses. The unspecified types aresupplied as parameters at the point of use.

Parameterized types provide a third way (in addition toclass inheritance and object composition) to compose behaviors in object-oriented software.4.4. Assertions, Design by Contract, and DefensiveProgramming[1*]An assertion is an executable predicate that’splaced in a program—usually a routine or macro—that allows runtime checks of the program. Assertions are especially useful in high-reliability programs. They enable programmers to more quicklyflush out mismatched interface assumptions, errorsthat creep in when code is modified, and so on.Assertions are normally compiled into the code atdevelopment time and are later compiled out of thecode so that they don’t degrade the performance.Software Construction  3-9Design by contract is a development approachin which preconditions and postconditions areincluded for each routine. When preconditionsand postconditions are used, each routine orclass is said to form a contract with the rest ofthe program.

Furthermore, a contract provides aprecise specification of the semantics of a routine,and thus helps the understanding of its behavior.Design by contract is thought to improve thequality of software construction.Defensive programming means to protect aroutine from being broken by invalid inputs.Common ways to handle invalid inputs includechecking the values of all the input parametersand deciding how to handle bad inputs. Assertions are often used in defensive programming tocheck input values.4.5. Error Handling, Exception Handling, andFault Tolerance[1*]The way that errors are handled affects software’sability to meet requirements related to correctness, robustness, and other nonfunctional attributes.

Assertions are sometimes used to checkfor errors. Other error handling techniques—suchas returning a neutral value, substituting the nextpiece of valid data, logging a warning message,returning an error code, or shutting down the software—are also used.Exceptions are used to detect and processerrors or exceptional events. The basic structureof an exception is that a routine uses throw tothrow a detected exception and an exception handling block will catch the exception in a try-catchblock. The try-catch block may process the erroneous condition in the routine or it may returncontrol to the calling routine.

Exception handlingpolicies should be carefully designed following common principles such as including in theexception message all information that led to theexception, avoiding empty catch blocks, knowingthe exceptions the library code throws, perhapsbuilding a centralized exception reporter, andstandardizing the program’s use of exceptions.Fault tolerance is a collection of techniquesthat increase software reliability by detectingerrors and then recovering from them if possibleor containing their effects if recovery is not possible. The most common fault tolerance strategiesinclude backing up and retrying, using auxiliarycode, using voting algorithms, and replacing anerroneous value with a phony value that will havea benign effect.4.6. Executable Models[5*]Executable models abstract away the details ofspecific programming languages and decisionsabout the organization of the software.

Differentfrom traditional software models, a specificationbuilt in an executable modeling language likexUML (executable UML) can be deployed invarious software environments without change.An executable-model compiler (transformer) canturn an executable model into an implementationusing a set of decisions about the target hardwareand software environment.

Thus, constructingexecutable models can be regarded as a way ofconstructing executable software.Executable models are one foundation supporting the Model-Driven Architecture (MDA) initiative of the Object Management Group (OMG). Anexecutable model is a way to completely specifya Platform Independent Model (PIM); a PIM isa model of a solution to a problem that does notrely on any implementation technologies. Thena Platform Specific Model (PSM), which is amodel that contains the details of the implementation, can be produced by weaving together thePIM and the platform on which it relies.4.7. State-Based and Table-Driven ConstructionTechniques[1*]State-based programming, or automata-basedprogramming, is a programming technologyusing finite state machines to describe programbehaviours. The transition graphs of a statemachine are used in all stages of software development (specification, implementation, debugging, and documentation).

The main idea is toconstruct computer programs the same way theautomation of technological processes is done.State-based programming is usually combined3-10  SWEBOK® Guide V3.0with object-oriented programming, forming anew composite approach called state-based,object-oriented programming.A table-driven method is a schema that usestables to look up information rather than usinglogic statements (such as if and case). Used inappropriate circumstances, table-driven codeis simpler than complicated logic and easier tomodify. When using table-driven methods, theprogrammer addresses two issues: what information to store in the table or tables, and how to efficiently access information in the table.4.8. Runtime Configuration andInternationalization[1*]To achieve more flexibility, a program is oftenconstructed to support late binding time of its variables.

Runtime configuration is a technique thatbinds variable values and program settings whenthe program is running, usually by updating andreading configuration files in a just-in-time mode.Internationalization is the technical activity of preparing a program, usually interactivesoftware, to support multiple locales.

The corresponding activity, localization, is the activity ofmodifying a program to support a specific locallanguage. Interactive software may contain dozens or hundreds of prompts, status displays, helpmessages, error messages, and so on. The designand construction processes should accommodatestring and character-set issues including whichcharacter set is to be used, what kinds of stringsare used, how to maintain the strings withoutchanging the code, and translating the strings intodifferent languages with minimal impact on theprocessing code and the user interface.4.9. Grammar-Based Input Processing[1*] [6*]Grammar-based input processing involves syntaxanalysis, or parsing, of the input token stream. Itinvolves the creation of a data structure (called aparse tree or syntax tree) representing the inputdata.

The inorder traversal of the parse tree usually gives the expression just parsed. The parserchecks the symbol table for the presence ofprogrammer-defined variables that populate thetree. After building the parse tree, the programuses it as input to the computational processes.4.10. Concurrency Primitives[7*]A synchronization primitive is a programmingabstraction provided by a programming languageor the operating system that facilitates concurrency and synchronization. Well-known concurrency primitives include semaphores, monitors,and mutexes.A semaphore is a protected variable or abstractdata type that provides a simple but useful abstraction for controlling access to a common resourceby multiple processes or threads in a concurrentprogramming environment.A monitor is an abstract data type that presentsa set of programmer-defined operations that areexecuted with mutual exclusion.

Характеристики

Тип файла
PDF-файл
Размер
6,58 Mb
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6305
Авторов
на СтудИзбе
313
Средний доход
с одного платного файла
Обучение Подробнее