Главная » Просмотр файлов » Issott_Common Design Patterns for Symbian OS-The Foundations of Smartphone Software_0470516356

Issott_Common Design Patterns for Symbian OS-The Foundations of Smartphone Software_0470516356 (779879), страница 5

Файл №779879 Issott_Common Design Patterns for Symbian OS-The Foundations of Smartphone Software_0470516356 (Symbian Books) 5 страницаIssott_Common Design Patterns for Symbian OS-The Foundations of Smartphone Software_0470516356 (779879) страница 52018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

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

Usually you are concerned about a particular use case,whether it’s starting an application or responding to a key press fromthe end user, and wish to measure the time taken between thatuse case starting and ending. You can also start taking into accountthe amount of time your software was active during the use case.However, the main concern is to make your use case execute in asshort a time as possible. A use case is almost always constrainedby a bottleneck.

This bottleneck may well be the CPU but it couldjust as well be some other hardware constraint, such as reading fromsecondary storage or network bandwidth.Reducing execution time is good for the end user’s experience withthe device but you may also reduce power usage by simply doing lesswork, whether by sending fewer instructions to the CPU or throughreduced use of the network. On the other hand, you may have toincrease your RAM usage to achieve this, for instance by adding acache to your application or service.• Real-time responsivenessFor some types of software being fast is not the most importantobjective; instead they have to operate within strict deadlines.3 Whendeveloping such software you need to consider all of the execution2en.wikipedia.org/wiki/Flash memory .course, if you’re unlucky your software will need both to be fast and to meet timeconstraints!3 Of8INTRODUCTIONpaths through your software, even the exceptional cases, to ensurethat not only are they all time-bounded but that they complete beforethe specified deadline.One downside to optimizing for this force is that you may increasethe development cost and reduce the maintainability of your component by introducing an artificial separation between your real-timeand non-real-time operations.• ReliabilityThis is the ability of your software to successfully perform its requiredfunctions for a specified period of time.

The reliability of your softwarereflects the number of defects that your software contains and so is onemeasure of the quality of your application or service. The drawbacksof ensuring your software is reliable are mainly the increased effortand cost of development and testing.A major part of ensuring that your software is reliable on amobile device is designing in ways of handling sudden power lossgracefully. The expectation of an end user is that they will be ableto continue seamlessly from where they left off once they’ve restoredpower to the device in some way. As power can be lost at any timeand your software is probably given very little warning, this meansthe normal activity of your component must take this into account by,for instance, regularly saving data to disk.• SecuritySecure software protects itself and the stakeholders of a device fromharm and prevents security attacks from succeeding.

The key difference between security and reliability is that secure software musttake into account the actions of active malicious agents attemptingto cause damage. However, increased security, like reliability, canresult in increased effort and cost of development and testing. Anotherpossible disadvantage is reduced usability since, almost by definition,increasing security means reducing the number of valid actions that aclient can perform.1.5.3 Other ForcesThe forces mentioned in Section 1.5.2 are particularly important on amobile device but we shouldn’t forget some of the more standard forceson software designs:• Development effortSoftware development is the translation of the need of an end user ormarketing goal into a product.

You should aim to design your softwareto reduce the total effort required to achieve this. This is particularlyimportant at the architecture and design stages as the choices youmake early on in a project will have a big impact further down the lineSYMBIAN OS PATTERNS9when you are implementing, testing and maintaining your software.Nonetheless you do need to ensure you spend sufficient time at eachstage of development to get these benefits.• Testing costSoftware testing is the process used to assess the quality of your software.

It is important to remember that, for most practical applications,testing does not completely establish the correctness of a component;4rather, it gives you a level of confidence in how reliable your softwarewill be. With this in mind, it is important to design your software sothat testing is made as easy as possible to allow you to quickly andeasily establish the assurance you need to ship your software.• MaintainabilityThis is defined by [ISO 9126] to be ‘the ease with which a softwareproduct can be modified in order to correct defects, meet newrequirements, make future maintenance easier or cope with a changedenvironment’.

Before you invest too heavily in this, hence increasingyour development effort, you need to be sure that your product willbenefit from it. For instance, if you only wish to target UIQ devicesthen making your application UI highly portable isn’t necessary. Ofcourse that assumes you don’t change your mind later!• EncapsulationThis is the ability to provide the minimum necessary well-definedinterface to a software object in such a way that the internal workingsare hidden. A well-encapsulated object will appear to be a ’black box‘for other objects that interact with it without needing to know how itworks.

The goal is to build self-contained objects that can be pluggedinto and out of other objects cleanly and without side effects.Improving the encapsulation of your objects helps with reliability because objects do what you expect them to do. It also helpswith maintainability because you minimize the risk that extending orchanging the software breaks other parts of the application or service.It also reduces testing cost by allowing you to more easily isolate anobject for unit testing.

However, this is at the expense of reducedflexibility.1.5.4 Pattern Elements that Are Already in PlaceThe patterns in this book are specified in terms of Symbian OS anddescribe how to reuse any of the utility libraries or services provided aspart of the operating system so that you can get your solution up andrunning as quickly as possible.4Correctness is difficult to establish due to the extremely large number of possible inputstates and the correspondingly large number of execution paths through a piece of software.Hence 100% test coverage is virtually impossible to obtain.10INTRODUCTIONIn some cases, the solution presented in a pattern describes how to usean existing framework to help resolve your design problem.

This is to beexpected since patterns promote design reuse and, hence, in some cases,code is also reused. One example of this is the Active Objects pattern(see page 133) where Symbian OS provides a lot of machinery to get yougoing whilst giving you the flexibility to apply the pattern to your situation.1.6 Design Pattern TemplateEach pattern in this book is described using the following template:Pattern NameIntentA one-line description of the pattern to give you a rough idea of the aimof the design pattern.AKAStands for ’also known as’ and gives other common names for the pattern.ProblemContextA single sentence that describes the environment or situations in which theproblem occurs. This section provides a clear outline of the backgroundto the problem and the assumptions that this entails.SummaryBullet points summarize each of the main forces involved in the problemthat the pattern has to address.

This section gives an at-a-glance answerto the question ‘is this pattern going to be suitable for my particularproblem?’DescriptionHere, longer paragraphs expand on the bullet points in the summary.They answer questions such as ‘when and where might this patternapply?’, ‘is this a problem only when creating services or when building applications?’, ‘what makes this a particularly difficult problem?’and ‘might each particular type of Symbian OS developer (device creator, application developer, etc.) experience this problem or do theyjust need an understanding of the pattern?’ In most cases, a patternDESIGN PATTERN TEMPLATE11will be fully implementable by all types of developers.

In all cases, atleast portions of the pattern will implementable by any Symbian OSdeveloper.ExampleA real-world example of a problem based on Symbian OS that demonstrates the existence of the pattern.SolutionOne or two paragraphs summarizing the fundamental solution principleunderlying the pattern.StructureThis section gives a detailed specification of the structural aspects of thepattern showing the classes involved, their responsibilities and what theycollaborate with.DynamicsThis section describes the important scenarios that explain the run-timebehavior of the pattern using object-messaging sequence charts.ImplementationThis section gives practical guidelines for implementing the pattern.These are only a suggestion, not an immutable rule. You should adapt theimplementation to meet your needs, by adding different, extra, or moredetailed steps, or, sometimes, by re-ordering the steps.

Symbian OS C++code fragments are given to illustrate a possible implementation.ConsequencesThis section lists the typical positive and negative outcomes resultingfrom the use of the pattern.Example ResolvedThe example described in the Problem section of this pattern is resolvedin this section using the pattern. Often code samples are given to illustratethe key points along with a detailed discussion of how the example worksand explanations of how it has been designed.

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

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

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

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