Advanced Software
Engineering -
Assets and DevelopmentDRAFT – NOT FINAL VERSION
1
Version 1.0
Advanced Software Engineering
- Assets view - What you create and who use it
Assets, views and the landscape of software engineering
Game Development - A special area of software engineering
Embedded Device – A special area of software engineering
Mobile Apps – A special area of software engineering
2
Assets, views and the landscape of software
engineering
What is an asset?
What assets are produced in the landscape of software engineering?
Does other assets exists?
What roles/user does exists?
What view does this roles/user have?
What are view related problems a software engineers have to beware of?
3
Landscape of Software engineering
4
Landscape of Software engineering
Design Patterns
Across applications, abstractions are commonly presented as design patterns denoting either abstract or concrete objects or interactions. Design patterns are concepts which can be reused as a concept or implemented in adaptable source-codes or components (see Gamma, 1995 for example)
Component-based Software Engineering
A software systems will be created by a mix of components meeting the standards of the component model. Typically, the software units used here are components (Szyperski, 2002a).
Application Frameworks
These consist of concrete and abstract class sets which can be expanded or adapted to build application systems. In application frameworks usually application parts can be used. An example for reuse of application parts is the Microsoft Office application. Often, application parts of Microsoft Word or Microsoft PowerPoint are reused between these two applications in the same version of Office as well as between different versions of Office. Therefore, a specific framework is used that is provided to software engineers using the Microsoft Component Object Model (COM) technology (Microsoft, 2012a).
5
Landscape of Software engineering
Legacy System Wrapping
A system that can be included in a wrapper and is defined by the associated use of an interface over which access takes place. This type of reuse often uses components, application parts or services. Especially if a wrapper or legacy system creates a connection to another technology and is used in the system providing the wrapper. An example is the use of Java byte code in a .NET application using the IKVM wrapping system (Frijters, 2011).
Service-Oriented Systems
These comprise systems developed by linking shared services that can be supplied by external sources. Typically, services are the used software units for reuse in this area (Singh and Huhns, 2005; Wang and Fung, 2004).
Software Product Lines
A type of application which is generalised by using a common architecture so that it can be adapted to different customers. Usually, whole applications are used in such approaches (see Fayad and Johnson, 2000)
6
Landscape of Software engineering
Commercial of the shelf (COTS) integration
These systems are developed through the integration of existing application systems. Typically, the software units used here are components (Sommerville, 2011) that are provided by COTS selling companies (e.g., Componentsource, 2012). An example for COTS is the WebCAD web service provided by Componentsource (2012) which includes numerical procedures to either construct a function of one or two variables from a set of points (i.e., interpolate), or solve an equation of one variable.
Configurable Vertical Applications
A generic system designed to make it adaptable to the specific needs of the customer. Compared to the application product lines, the software units here are reused by configuration and not by adaptation of the software units. The typical software units are also whole application systems.
Programming Libraries
Consists of class and function libraries that implement functionality for reuse. Typically, the software units used here as components are used as libraries today. An example is the topic of Dynamic Linked Libraries (DLL). Often, these libraries include a set of classes that may be not related to each other or to the same business domain. This is the difference to components used in component-based development (see Szyperski, 2002a)
7
Landscape of Software engineering
Program Generators
A generator system storing knowledge about a particular type of application purchase system or system fragment created for this application. Czarnecki and Eisenecker (2000) Discuss such Program Generator technology called Generative Programming.
Aspect-Oriented Software Development
In this process, shared components are ‗woven‘ into the composing program in different places. In this type of reuse development, smaller software units (e.g., source-code, classes, components or services) are usually used (see Rashid and Akşit, 2006).
Model-Driven Development (or Model-Driven Software Development; MDSD)
Development discipline using domain models and implementation independent models to represent software or software units. By transforming models, software units or systems can be created (see MDSD; PetraschandMeimberg,2006).
ERP System
System for organisational use. These include business functionality and rules.
Architectural Patterns
Software architecture used to create software. An architectural example is the use of a plug-in infrastructure (e.g., Microsoft Extensible Framework; cf. Microsoft, 2012b
8
Assets of Software engineering
Landscape
9
Asset Technology area examples
10
Views at your assets (Examples)
Your Asset Reuser (Dev) Customer Application/User
Application Parts
Classes
Components
Interfaces
Models
Services
Source-Code
Often assets have a € sign!!!!!!!!!!!!!! 11
Are there more assets, think about?
Tasks:
1. Ask the supervisor for groups
2. Think about reusable assets in
software engineering
Time: 15 Minutes
12
The knowledge problem reuse
Reuse need experience
About software unit behaviour
Internals of a software unit
Interfaces….
Requirements…
Fact is knowledge has to be learned
The problem is
Young professionals want to do reuse, but they have not enough experience
Experts may handle new technologies, but the have not enough knowledge 13
Advanced Software Engineering
Embedded Devices? What are embedded devices?
Are embedded devices software products?
What are characteristics/requirements for embedded device programming?
What are platforms, engines, SDK in the area of embedded device
programming?
What are typical challenges for software engineers?
Interactive Live Demo „Arduino―
14
What are embedded devices/systems?
Embedded device or system : is a system whose principal function is not computational, but which is controlled by a computer embedded within it.
An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions, often with real-time computing constraints. It is usually embedded as part of a complete device including hardware and mechanical parts. In contrast, a general-purpose computer, such as a personal computer, can do many different tasks depending on programming. Embedded systems control many of the common devices in use today. - Wikipedia
Examples
Air conditioner, ATM machine, Battery charger, Digital camera, DVD Player, Fax machine, PDA, Printer, Router, Scanner
…..
15
What are embedded devices/systems?
An embedded system is a product that has one or more computers embedded
within it, which exercise primarily a control function.
The embedded computer is usually a microcontroller: a microprocessor
adapted for embedded control applications.
Microcontrollers are designed according to accepted electronic and computer
principles, and are fundamentally made up of microprocessor core, memory
and peripherals.
Microchip offers a wide range of microcontrollers, divided into a number of
different families. Each family has identical central architecture and
instruction set. However, common features also appear across all their
microcontrollers.
16
What are characteristics/requirements
for embedded device programming?
Characteristics
Special-purpose Typically, is designed to execute a single program, repeatedly It used to be single-purpose Now, multi-functioned, but single-purpose Tactic and Strategy
Tightly constrained Low cost Simple systems Fewer components based Performs functions fast enough Minimum power
Reactive and real-time Reactive: Continually reacts to external events Real-time: Must compute certain results in real-time
Hardware and software co-exist The software written for embedded systems is often called firmware Is stored in read-only memory or Flash memory chips rather than a disk drive
Typical Requirements
Low resources
Real time behaviour
User interfaces: Embedded systems range from no user interface at all — dedicated only to one task — to full user interfaces similar to desktop operating systems in devices such as PDAs.
17
Example of embedded device platform
and SDK
Example Arduino
WEB
18
Example of embedded device platform
and SDK
Example Arduino SDK
IDE
Own SDK / libraries
Often libraries are related to a specific hardware component
Simple C Code
You can write your own libraries in C
Special functions
Setup()
Loop()
…
19
Summary
An embedded system is a product that has one or more computers embedded
within it, which exercise primarily a control function.
The embedded computer is usually a microcontroller: a microprocessor
adapted for embedded control applications.
Microcontrollers are designed according to accepted electronic and computer
principles, and are fundamentally made up of microprocessor core, memory
and peripherals.
Microchip offers a wide range of microcontrollers, divided into a number of
different families. Each family has identical central architecture and
instruction set. However, common features also appear across all their
microcontrollers.
20
What are typical challenges for software
engineers?
Limited resource
Limitations on data types
Limitations on CPU cycles
Limitations on I-Os
Limitations on architecture base don hardware
Restriction for maintenance/continues integration based on hardware
Restriction of deployment types (based on manufacturer rules)
21
Live Example
Arduino Robot and Fundamentals
A good description
can be found at Link
22
Advanced Software Engineering
- Mobile apps
What are mobile apps?
Are mobile apps software products?
What are characteristics/requirements for mobile apps programming?
What are platforms, engines, SDK in the area of mobile apps programming?
What are typical challenges for software engineers?
Interactive Live Demo „Java and Android―
23
What are mobile apps?
Look into Google Play
24
What are characteristics/requirements
for mobile apps programming?
Medium hardware requirements
Memory
System specific OS
Touch / Voice input
…..
Software requirements
Open or closed DIE support
Limited App Memory
Cross Platform scope (new trend)
….
25
What are platforms, engines, SDK in the area
of mobile apps programming?
Web and smart phones
iPhone: tools, languages, deployment
Android: tools, languages, deployment
Windows Phone: tools, languages, deployment
BlackBerry: tools, languages. deployment
26
Web and smart phones
Technologies
WML
primitive forms of XHTML
XHTML
Flash
ASP/ASP.NET / Java ServerFaces
Java FX/ Silverligth
Today HTML5
C, Java, C++
27
Mobile Web: challenges
Ad hoc design of web sites (m-sites) or apps
Different layout, different content, different idea
It's just a new project
Reusability is a great thing, if applied at the right level
Don't succumb to the siren call that m-sites are the standard ASP.NET sites just
with a different CSS/Layout
Architect your site to expose reusable/query able logic
Add a mobile service layer that serves right data to presentation
28
Mobile Web: challenges
Mobile sites are generally simpler than classic sites
Logical/functional subset; nets physical subset
In theory, mobile sites can provide you a huge audience
Millions of devices can browse the web
Nearly each device in its own way • Huge fragmentation (of capabilities)
Know your users
Selling ringtones? Your target is the device; maximize audience
Selling services? Your target is (smart) consumer; focus on apps
29
Mobile Web: challenges
• Fragmentation is huge
• Don't trust the device
Manufacturers want to make each device kind of unique
For years, they just customized the embedded browser
Net effect is that too many devices have a different set of capabilities
• Querying for capabilities
Test capabilities in JavaScript via DOM and browser OM
Acceptable results in desktop Web; not in mobile Web because of the different
impact/size of fragmentation
30
Smartphone's / Tablets
Mobile computing: smart phones
Smartphone's run their own OS platform
Mobile OS is like a continent
Differences at various levels
Continents partition Earth: mobile OSs partition mobile space
A few platforms you might want to address
iPhone/iPad
Android
BlackBerry
Windows Phone 7
Maybe Nokia OT
31
Mobile Web vs. Native Apps
Follow-up session («Mobile Dilemma»)
Decision boils down to your mobile strategy
Generally preferable to start with a m-site (large audience, lower development
costs)
Advertise your m-site; redirect automatically to m-site
Upgrade to m-site subscriptions
Upgrade to smart-apps. For which platforms?
Native apps may be cooler, but expensive
Some middle ground being researched...
32
IOS Tools
You need a Mac; the cheapest Macbook is fine
Mac is necessary to compile the code as it relies on libraries that simply don‘t exist
in Windows
Technically, Can run OSX on a Win box; except that it is illegal
Join the iOS developer program ($99/year)
Free registration doesn‘t not allow to test on real devices
In 2010, US declared jailbreaking lawful
Get and install Xcode from Mac store
Get and install the iOS SDK
Get familiar with Objective C
33
iPhone App Basics
Starter method (main.m)
Single window object is created by you in main or loaded from a XIB file
XIB files are where the UI behind the iPhone application is saved/packaged (i.e., form designer files in .NET)
Single window contains views and/or controls
One window, possibly multiple views
Views are rectangular areas on top a window
Display content (controls, animation, text, drawing
Handle events (touch)
Various specialized views: table, Web, alert, navigation
View behaviour handled by controller classes
34
iPhone App Basics
35
iPhone App Basics
36
Concepts you must get used to ...
An app-delegate controls the behaviour of the application from start to end
Receives notifications when the app reaches certain states such as ―finished launching‖ or ―will terminate‖ or ―memory warning‖
A view-controller class governs the behaviour of a view
Handles touch events, initialization
An outlet is an ―object reference‖ through which the controller acts with an object (i.e., button) in the view
Similar to Button1 members in VS, must be created explicitly
Need outlets to be able to set a label after a button click
An action is an action to be performed on an object
First add outlets and actions to XIB
Next connect them to actual objects so that action ―btnClicked‖ is associated with an event on Button1 and outlet ―Button1‖ is associated with a given button...
Finally, write the code for btnClicked in the view controller class
37
i0S: MonoTouch
• Use .NET for building iOS applications
Check out Xamarin.com ($399 license for individuals)
A Mac computer is still required
Need: iPhone SDK, Mono, MonoTouch SDK
Use MonoDevelop to develop code
Use Interface Builder including Cocoa Touch thus having access to all the standard iPhone controls
Limitations on generics and dynamic code (DLR)
You get a native iPhone application that can be published as any other iPhone application
Wrappers for iPhone native API (accelerometer, GPS, ...)
38
iOS: MonoTouch
Compile standard .NET 4 code using the MonoTouch core assemblies
Reuse is possible via a new compile step for the MonoTouch profile
Non Ul-code
Code can potentially be shared between .NET, Android, and iPhone/iPad
Currently, C# only
With some work, it is possible to write iPhone code in Windows under Visual
Studio and use the same project to compile on Mac
39
Deployment
• Applications must be published to the AppStore
Internal distribution is possible only with an Enterprise developer account
Application code must be signed against a distribution certificate (to identify
the publisher) and a distribution provisioning profile
For companies, only the Team Agent can get the certificate
Get the AppStore distribution provisioning profile from the portal
Compile against that with your distribution certificate and submit
40
Testing on devices
Get a Development Certificate to sign your code
Create a Certificate Signing Request using the Keychain Access application on your
Mac
Log on to the portal and upload the CSR • This needs be done once (per developer)
Install the certificate in the Mac keychain
Get a provisioning profile (Pprof) for each device
Register a device manually through the portal or connect them to Xcode and let it
do what's required (only a few devices)
If you do it manually, you need the device UDID
Can get UDID via Xcode, iTunes, or the device itself (settings)
UDID != IMEI or serial number
41
Getting the Pprof
Xcode
Once the certificate is installed, you simply build the app and tell Xcode you want to test on the attached device
Xcode gets the Pprof automatically (if the device is registered)
In alternative, do it manually through the portal and download the Pprof to the device
Ad hoc provision profiles
To test on non-registered devices (up to 100) create an ad-hoc provision profile manually on the portal
Indicate UDID and App ID and download the Pprof as a file
Compile the app against this Pprof and send both profile and app to the tester
Tester doesn't even need to have a Mac and install via iTunes
42
Android
Pay a fee only to publish to the Market (one-time $25)
Get and install the Java SDK
Get and install the Android SDK
Eclipse or IntelliJ Community Edition as the IDE
Get familiar with Java
Alternative: C Code
Faster
Existing integration into Microsoft development tools (e.g. Visual Studio)
43
Android App Basics
Android App Basics
Starter class
Create main view
View based on XML file(s)
Event handling
Manual binding of handlers to controls
Manual definition of control references (outlets)
Easy match with C#/VB
44
Basic class and project things
Emulators required in the first step
IDE i.e. Eclipse
Manifest file required
45
Ressources in Manifest Files
<action>
<activity>
<activity-alias>
<application>
<category>
<data>
<grant-uri-permission>
<instrumentation>
<intent-filter>
<manifest>
<meta-data>
<permission>
<permission-group>
<permission-tree>
<provider>
<receiver>
<service>
<supports-screens>
<uses-configuration>
<uses-feature>
<uses-library>
<uses-permission>
<uses-sdk>
46
Deployment
Enable your device to accept entrusted resources
Just compile and distribute the APK executable
Everything is at your own risk
47
Live Demo
Android App Development
48
Problems for software engineers
Platform specific things
IOS
Android
Windows 8/RT
Cross platform
High restrictions
Costs
i.e. Programming IOS App requires a macbook
49
Advanced Software Engineering
Game development What kind of games do exists?
Are games software products?
What are characteristics/requirements for game development?
What are platforms, engines, SDK in the area of development?
What are typical challenges for software engineers?
Training „Game development with Unity3D and software engineering
methods―
50
What kind of games do exists?
Look into Steam
51
Are games software products?
YES, games are software products as any other program
Games have a different structure than any other software
Start up
Introductory Movie
Front End
Game Options
Sound Options
Video Options
YES, games are software
Loading Screen
Main Game
introduction
Gameplay
game modes
Pause Options
End Game Movie
Credits
Shut down
52
An example process
What are the differences to other processes?
53
What are characteristics/requirements for
game development?
Roles
Game Artist
Game Designer
Game Producer
Game Programmer
Customer
Game Categories (Common level)
Hardcore Games
Casual Games
Serious Games
Game Types
Adventures - High requirements on fun and special graphic
Sport - High requirements on business logic and behaviour
Simulations - High requirements on business logic
MMO – High requirements on business logic and network
RPG – High requirements on easy2use and graphical variety
Indie – High requirements on fun low requirements on graphic
Strategy - High requirements on AI and graphical variety
Action – High requirements on real-time, network and graphic
….54
What are characteristics/requirements for
game development?
Game programming disciplines
Game play programming
AI programming
Tools programming
Graphics programming
55
What are platforms, engines, SDK in the area
of development?
The difference between APIs and SDKs .
API (Application Programming Interface) :
Software interfaces that OS, libraries, and services provide
You can take advantage of their particular features.
XNA , DirectX and OpenGL
SDK (Software Development Kit) : Collection Of libraries , APIs and tools .
56
What are platforms, engines, SDK in the area
of development?
Game Engines
In-house Game Engines.
Scimitar (Assassin's Creed)
Two types of Game Engines :
Full tool chain (UnrealEngine 3 ,Unity )
Middleware & Integrated libraries (SDL, OGRE3D)
57
What are platforms, engines, SDK in the area
of development?
Programming Tools examples
Unity
UDK
58
Unity 3D Basics
Unity 3D Basics
59
Agenda
Unity 3D Concepts and Vocabulary
Interface
Terrains
Lights
Textures
Cameras
Physics
Effects
Skyboxes
Audio
60
Unity 3D Concepts
Assets - building blocks of all Unity projects - graphics (textures),
models, sound files. The files you use to create the scenario are
stored in a folder called Assets
Scenes - scenes are individual levels, areas of game content.
Scenes can be loaded on demand.
Game Objects - assets used in the scene become GameObjects
(script name) All GameObjects have at least one component - the
Transform component.
Components - come in various forms. Attach components to and
object to add parts of the game engine to the component e.g. a
physics component, or a script component
61
Unity 3D Concepts
Scripts - components used to add, extend or modify behaviour of
game objects. Unity uses a Behaviour class to
facilitate the use of custom behaviours.
Prefabs - prefabricated game objects with stored associated
components and configuration. Prefabs allow functional game
objects to be reused in scenes (spawned) or imported into other
projects as external assets. ‗The First Person Controller‘ is an
example of a Prefab
62
63
Interface
Scene [1]—where the game is constructed
Hierarchy [2]—a list of GameObjects in the scene
Inspector [3]—settings for currently selected asset/object
Game [4]—the preview window, active only in play mode
Project [5]—a list of your project's assets, acts as a library
64
Unity 3D Terrain Editor
Create terrain by selecting brush type, brush size and opacity and
then sculpting topology
Set maximum height and smooth corners
Textures loaded to paint texture onto terrain
First texture acts as background to subsequent
Paint on trees and other smaller items e.g. grass.
65
Unity 3D Terrain Editor
66
67
68
69
Unity 3D Lights and Cameras
Lights
Directional
Point
Spot
Lights can be parented to other game objects
Cameras
One default camera
First Person Controller includes camera
Camera acts as an Audio Listener in the scene
Remove default camera to only have one Audio Listener
Cameras can be parented to other game objects
70
Unity 3D Textures
Materials form the basic starting point for textures
Textures should be in the following format to enable ‗tiling‘.
Square and the power of two
128 x 128, 256 x 256, 512 x 512, 1024 x 1024
Shaders control the rendering characteristics of textured surface
71
Physics and Collision Detection
Physics component
Mass
Gravity
Velelocity
Friction
Physics component added to game object.
Collision detection provided for most objects - can be customized with sphere colliders and mesh colliders
Mesh colliders most computationally expensive
Also level of detail LOD is handled by game engine
72
Sky Boxes and Effects
Skybox - cubemap - six textures placed inside a cube
Rendered seamlessly to appear as surrounding sky and horizon
Not an object position a player can visit
Only visible in the Game View panel
Water effects created by an animated material applied to a
surface
73
Audio Effects
Audio requires an Audio Source and an Audio Listener in the scene
Stereo sound treated as ambient constant volume and continuously
playing in the scene (looped enabled)
Mono sound treated as spatial - gets louder or softer depending on
player‘s position relative to the audio source position
Supported formats .wav, .mp3, .aiff, .ogg
74
Unity 3D
- Live demo
75