Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design.

Similar presentations


Presentation on theme: "Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design."— Presentation transcript:

1 Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design

2 Mark Dixon, SoCCE SOFT 131Page 2 Jobs Computer weekly www.cwjobs.co.uk local

3 Mark Dixon, SoCCE SOFT 131Page 3 Session Aims & Objectives Aims –introduce you to software development life-cycle & fundamental user interface design concepts Objectives, by end of this week’s sessions, you should be able to: –Run through the software development cycle. Implement simple software design –Create (draw) user interface –Put instructions in: »correct event handler procedure for desired result »correct sequence for desired result Test this design –Identify and correct simple logical and syntax errors –Identify & correct simple user interface (usability) problems

4 Mark Dixon, SoCCE SOFT 131Page 4 Object naming conventions all objects have name property used to identify them in code (identifier) txtSurname.Caption = "Smith" 3 letter prefix to denote type, followed by short meaningful word/phrase: –frm: form(e.g. frmMain, frmAdd) –pic: picture box(e.g. picDisplay, picFace) –txt: text box(e.g. txtMonth, txtDrink) –lbl: label(e.g. lblName, lblAge) –btn: command button(e.g. btnClear, btnExit) makes it easy to read code

5 Mark Dixon, SoCCE SOFT 131Page 5 Exercise A consider the following code: Private Sub btnThing_Click() picMain.Cls lblResult.BackColor = vbRed lblResult.Caption = "Testing" End Sub –name all controls –name all properties –name all methods –name all events btnThing, picMain, lblResult BackColor, Caption Cls Click

6 Mark Dixon, SoCCE SOFT 131Page 6 Project Files & Version Control Create new folder for each project Save all project files into that folder –project file (.vbp) –form files (.frm) At regular intervals copy whole folder to create new version. –this is a very simple approach –there are software packages that do this for you

7 Mark Dixon, SoCCE SOFT 131Page 7 Software Development Cycle Software development follows this pattern: –analyse problem –design solution –implement (code) solution –test & debug solution (code) However, it is: –cyclic/iterative (not linear)

8 Mark Dixon, SoCCE SOFT 131Page 8 Example 1: Ball v1 - Analysis User Requirements –describe user's objectives no mention of technology Software Requirements –Functional list facilities to be provided (often numbered) –Non-functional list desired characteristics (often more subjective) SPECIFICATION User Requirements –keep play school children occupied Software Requirements –Functional: move cartoon character around the screen –Non-functional character should be interesting and colourful

9 Mark Dixon, SoCCE SOFT 131Page 9 Example 1: Ball v1 - Design User interface design: Functional design: Trigger (when)Actions (what) click event of Right buttonmove ball character right click event of Left buttonmove ball character left click event of Up buttonmove ball character up click event of Down buttonmove ball character down

10 Mark Dixon, SoCCE SOFT 131Page 10 Example 1: Ball v1 - Form Properties (setting at design-time): –initial value only –change using properties window name: used internally to identify object (programmer) caption: displayed on button (user) left: horizontal position

11 Mark Dixon, SoCCE SOFT 131Page 11 Example 1: Ball v1 - Code Option Explicit Private Sub btnRight_Click() picBallChar.Left = picBallChar.Left - 200 End Sub Properties (setting at run-time) –use code, assignment operator (=) –can change while program is running btnRight picBallChar BallChar

12 Mark Dixon, SoCCE SOFT 131Page 12 Testing & Debugging: Errors 3 error types : –syntax: computer unable to understand your instructions (program does not execute), e.g. variable not defined (probably most common) –run-time: program can't execute instruction and exits (future lecture) ********* –logical: program executes but does not not match specification (do what was intended), e.g. clicking on button does nothing, when you thought you attached code to it clicking on blue button changes colour to red (when it should change to blue)

13 Mark Dixon, SoCCE SOFT 131Page 13 Computer –just symbol matching –No intelligence Example 2: Hello Errors Sub Command1_Cluck LabelL.Caption = "Hello" End Sub L instead of 1: causes syntax error (variable not defined) u instead of i: causes logical error (Command1 button does nothing)

14 Mark Dixon, SoCCE SOFT 131Page 14 Exercise B: Errors The following is from exercise 1 (v1), –Spot the errors (you should find 6), and –decide whether they are syntax or logical Private Sub btnBlue_Cluck() lblResult.BackColor = vbRed End Sub Private Sub btnRed_lick() lblResult.BackColor vbRed End Sub Private Sub lb1Result_DblClick() lblResult.BackColour = vbWhite End Sub

15 Mark Dixon, SoCCE SOFT 131Page 15 Debugging: Testing Functional Decomposition –break it into logical chunks Incremental Development –type a bit –test it Testing –test all/most combinations Regression Testing –repeat all previous tests

16 Mark Dixon, SoCCE SOFT 131Page 16 Example 3: disks & files

17 Mark Dixon, SoCCE SOFT 131Page 17 Human-Computer Interaction ‘Human-Computer Interaction (HCI) is about designing computer systems that support people so that they can carry out their activities productively and safely.’ Preece et al, 1994 (p. 1) three main concerns: –usefulness: is software functionality of use to user –usability: is software easy to use –learnability: is software easy to learn software may be: –‘simple to use, but of no value to me’ –‘really helpful, but awkward to use’ –‘really helpful, if only I could figure out how’

18 Mark Dixon, SoCCE SOFT 131Page 18 HCI – why bother? ‘The Day the Phones Stopped’ ( Preece et al, 1994 p. 25)

19 Mark Dixon, SoCCE SOFT 131Page 19 HCI - Design Guidelines Some issues: –Consistency –Fast feedback –Manage errors –Reduce cognitive load –User variety –User testing with actual users –…

20 Mark Dixon, SoCCE SOFT 131Page 20 HCI - Direct Manipulation Direct Manipulation Interfaces (Shneiderman 1998, p. 205) –‘Continuous representation of the objects and actions [information] of interest with meaningful visual metaphors’ –‘Physical actions or presses of labelled buttons, instead of complex syntax’ –‘Rapid incremental reversible operations whose effect on the object of interest is visible immediately’

21 Mark Dixon, SoCCE SOFT 131Page 21 Example 4: Ball v2 - Design User interface design: Functional design: Trigger (when)Actions (what) click event of Right buttonmove ball character right click event of Left buttonmove ball character left click event of Up buttonmove ball character up click event of Down buttonmove ball character down click event of Centre buttonmove ball character to centre of form BallChar

22 Mark Dixon, SoCCE SOFT 131Page 22 Example 4: Ball v2 - Code Option Explicit Private Sub btnCentre_Click() picBallChar.Left = Me.ScaleWidth / 2 End Sub Private Sub btnRight_Click() picBallChar.Left = picBallChar.Left - 200 End Sub Properties (setting at run-time) –use code, assignment operator (=) –can change while program is running BallChar

23 Mark Dixon, SoCCE SOFT 131Page 23 Example 5: Holiday User Requirement –‘I want a cheap holiday, so I need to know times and prices of ferries and flights’ Can solve this by –visit company offices –phone –www, compare the following: Brittany Ferries EasyJet http://www.brittany-ferries.co.uk http://www.easyjet.co.uk

24 Mark Dixon, SoCCE SOFT 131Page 24 Example 6: Address Book


Download ppt "Mark Dixon, SoCCE SOFT 131Page 1 02 – Software Development Lifecycle, & User Interface Design."

Similar presentations


Ads by Google