סיכום הנדסת תוכנה AnnaLotker

Embed Size (px)

Citation preview

  • 7/23/2019 AnnaLotker

    1/39

    (... , ,)

    20/10/13

    .

    .

    :

    .

    a. -.

    '.

    .

    ..b.' . - -1

    PHP. .

    .

    ..

    .2 ,

    ,.

    .

    Enterprise vs. mass market.

    '.

    .

    (: )

    .3 .

    .,.4

    ., ,,: .5

    / .6 .,

    ,.7 .

    .

    . . ,

    .

    -Life cycle models

    .

  • 7/23/2019 AnnaLotker

    2/39

    .waterfall model

    .

    ...

    .

    . ,-

    . , ,.

    Unit testing . .

    , .-.

    ( ) .

    . , ,.

    .-UI. .

    , 3:

    ? .

    . . ,, :

    .

    .,

    . -

    V- model

    Req.-> high level design - > detailed design - > code -> unit test -> integration test -> acc. Test

    ,V .

    Req. Unit test

    High level design Integration test

    Detailed design Acc. Test

    Code

    .,

    .

    The design of design , . .

    System/360 "."

    OS/360

    -61IBM .

    . .

    .

    -waterfall model :

    -

    -

    -

    - .

    . , , -

  • 7/23/2019 AnnaLotker

    3/39

    " .

    .( ' ) .

    .

    . .

    .

    :

    . .,

    . .2

    , , .3 .

    -71 .-2131

    .

    .

    :

    3

    . . .

    . . ".2

    . . .

    .3 ."

    .

    .

    . .

    .

    .

    .

    ."

    . .

    20/10/13

    UML.-UML

    :

    . -

    . /

    .

    .

  • 7/23/2019 AnnaLotker

    4/39

    .to do list .

    :

    (.)use case-

    . -

    Class Diagram

    (.use case )

    . , .

    - . ,

    members.-operations((Attributes

    :vis Name:type=default -Attribute

    :Visibility

    + public

    -private

    # protected

    . Class Diagram

    .

    :

    Association , . .

    Composition, Aggregation-

    ., , :. ,

    Aggregation,.( -)

    Composition .Dependency--Aggregation.()

    :

    .

    . ,

    .

    - .

    - : '

    ! .

    :

    .1

    .2 .

    . .

    .3

  • 7/23/2019 AnnaLotker

    5/39

    327/10/13

    . .

    . .

    .

    . . :

    .

    .2

    .3

    .4

    , .5 "

    . .

    ,,

    - :

    :

    ,

    ,

    :

    .

    . , -

    . . .

    .

    .

    " ."

    .

    :

    . 2

    ) :3 , ),(

    (

    . :3

    " .

    ?

  • 7/23/2019 AnnaLotker

    6/39

    .2 .

    .3

    , ,.',,

    . ,

    .

    . .'

    .EVO

    . .-

    :

    .deliver . -

    .

    - , . -

    . ,

    . .

    . .( =)

    If you dont know what youre doing, dont do it on a large scale, T. Gilb

    , . ,

    .

    . ""

    ?

    .

    . .2

    .

    . .3

    .

    .4

    .5

    . ,, .6

    .7-

    6

    .

    :

    , .

    .

  • 7/23/2019 AnnaLotker

    7/39

    ?

    , .

    .- ,

    .

    .

    :

    .

    .

    . .

    .,

  • 7/23/2019 AnnaLotker

    8/39

    Interaction Diagrams: 2

    .Collaboration Diagrams

    2.Sequence Diagrams

    ,

    . .

    Collaboration Diagrams

    ) . ,(

    -Use Case .',.-Use Case

    .

    .

    "."

    *[cond.] method(param) .

    ..

    Sequence Diagrams

    ."()".

    (. )-

    .-

    .

    .

    "X= "destroyed-

    403/11/13

    "":

    ' .

    35 .

    :

    .Unified process

    2.UML

    3.Rational Rose toolset

    3 .IBM.-

    ,) . ?

    (.

    , ? , ,

    , .

    .

  • 7/23/2019 AnnaLotker

    9/39

    :

    -4 -

    --Use cases-UML . ,

    -

    ., ,-

    , .

    :

    .

    : 3. .

    ., , .

    -Use cases. .

    .,,, .2

    " . .

    .-3,".

    .3

    ..

    . . ,

    : 2

    Uses Cases . .

    Proto type.

    UML-. , . . ( )

    .

    .-UML ,

    ,.-Use Cases

    .

    .-Use Cases .

    Use Cases , . .

    . .

    , , . , .

    .

    .

    . ?

    .

  • 7/23/2019 AnnaLotker

    10/39

    .-workflow

    . .

    . .

    ,.

    . . .

    .

    .

    ..

    .

    . -

    . ,

    . ,-,.

    (.,WEB), ,

    . ,

    :

    .

    403/11/13

    510/11/13

    Agile. .,-211-2-'

    . ,

    .

    :4.)"" ).

    . .

    " .

    .

    . ?

    .2 , . .

    . , ,

  • 7/23/2019 AnnaLotker

    11/39

    ,"- . ,

    .,"

    .3 .

    . .

    .4 .

    . .

    "" . :Freeze

    the world. .

    . '.:Feature creep

    . '

    ' .

    . .

    .

    :

    . (.) :-

    ./ :-

    .:-

    . , :-

    .

    . ,

    . ? .

    .,"" ?'

    . .

    . ,

    ' , .

    ? ?.

    , .

    .'' .

    :

    .". -'

    -' .,

    ,. .

    .

    -' .,.

  • 7/23/2019 AnnaLotker

    12/39

    '

    . . ,

    . , ,

    .

    -' . ,

    , '. , .

    ' , .

    . .'

    . /'

    . .'

    .

    '

    .

    ' . .

    ,'

    . .-

    . .

    .' , '

    . .

    , .

    '

    (.) .

    .

    . .code review'

    . .

    . , ,

    User story-Use case. .

    .Test scenarios .

    ,

    .

    .

    . . .

    .-release

    - ., ..

    .project velocity ,

    . ,-release plan

    .

    :. .

    .

  • 7/23/2019 AnnaLotker

    13/39

    :

    "." .-Stand Up meeting .

    . ,

    . ,',

    . , .

    "" ,..

    .

    . , ,

    .

    .

    .

    ." .8 ? .

    .

    ?

    . :.

    DrivenFormal?Prototype?DeliverDevModule

    Req. planRep. doc.

    Des. Doc.

    VbanglinearWaterfall

    Minimize the

    Risk

    ?VBangIterativeSpiral

    Value for the

    costumer

    -N/AIncrementalIterativeEVO

    RiskUMLVBangIterativeUP

    Value for the

    costumer

    -N/AIncrementaliterativeAgile

    , :' ?

    '

    All or nothing CORE

    ,

    ' .

  • 7/23/2019 AnnaLotker

    14/39

    5-10/11/13

    ?

    . .

    .2

    .3

    .-State charts

    . - .

    Class courses {

    enum regist; /*open,close,follow*/

    enum state; /*future, active,finished*/

    enum task; /*none,ex1, ex2*/

    .,,

    :

    .: - ,:. -

    CLEAR .

    . -:.2

    . - .

    .

    617/11/13

    .

    .-waterfall -

    waterfall. -75

    .

    . E-typesystem.-E Embedded, ,

    , , .

    .

    ./8

    ). :(

    . , .

    .

  • 7/23/2019 AnnaLotker

    15/39

    , , .2

    .,.

    .3 .

    .

    .4 .

    . - . ..5

    . , ""

    .

    . ..6

    . .7

    .

    . .8

    .

    . .

    ,( , )

    :

    . - , .

    , .-

    .

    - .

    ,. :. ,

    "."

    .release.

    releases:-2.

    o . ,

    .,, ,

    . .

    o, ,, .

    . . ".

    ?

    , . , . -delivery

    .release, ,

    . ,,

    . :.-1,

    '.' .

    :

  • 7/23/2019 AnnaLotker

    16/39

    , .release.

    .

    . -release

    upgrade . , .

    . .-

    . .2

    :

    (.). -

    11 ..

    , . -

    . .

    .

    , . .

    .

    .

    -3211-linux

    Merge window .-release

    .-release .

    .-releases .

    .

    . "

    , . .

    . .

    Release.

    .

    , ) - .

    .81-71 (.

    , .

    ?. ,.

    .

    , . ,

    .

    .

    .

  • 7/23/2019 AnnaLotker

    17/39

    Continuous Deployment

    ."", , :

    . ,

    . .versions releases

    deployment .

    Facebook

    .QA . .

    . .

    . Gate keeper. .

    , .

    A-B .

    .

    , .

    .

    .

    :

    .

    . .

    .

    . .

    .

    2 ..E-max

    . -C

    , . services

    .

    .

    .

    : ".

    ". . '

    .

    .

    '6-17/11/13

    SCRUM.' .

  • 7/23/2019 AnnaLotker

    18/39

    : User .

    stories.

    ,,: 4.,

    .

    .

    , . -. .

    :

    Product owner,.

    Scrum master

    Team member

    Product backlog

    Spting backlog

    . -task board

    Sprint planning-

    Daily scrum.

    .

    Product owner . . ,

    . .

    .User stories.-backlog .

    . .,

    Scrum master . .

    . ,

    .

    . .

    Team- , " .

    .

    . . ,,

    . .'

    , .

    .

    Product backlog'. .

    Sprint backlog- .Tasks-.

    . -product owner.Tasks

    Task Board- ,Sprint backlog.

    .

  • 7/23/2019 AnnaLotker

    19/39

    Burndown Chart-". .

    .

    . .

    .

    . .

    :

    :-2.

    . .

    . .

    .-scrum manager .2 ."

    . . .

    ."

    ". ""?". .

    , . .

    ? .,

    .

    Sprint review.. .-product owner

    .

    Sprint Rstrospective-Scrub master .

    .

    :

    . -

    - .

    .. -

    .

    '724//3

    . .OOP

    ,-FLOW , Design

    . -top level design

    ., , .., .

    . ,,

    . .

    . .

    .

    , ,. .

    .

  • 7/23/2019 AnnaLotker

    20/39

    :

    . , . .

    . .2

    .3

    .4 ,:

    ,frame works.5

    :

    ,.-61. .

    ,

    ,-71,61. ,

    .-KWIC . .

    .3 .,

    , . 3

    (. ).

    . UML,

    . : .4

    .4Pipe- line, flow ", ,

    . ,( )

    41 .

    .

    41, ,

    . . ., . ,

    .

    . ,

    .

    .

    . , . ,

    . .

    .

    .,

    ?

    ,-

    -

    ( .)-

    ()-

  • 7/23/2019 AnnaLotker

    21/39

    -

    Understandability-

    Flexibility-

    maintainability

    : Coupling . .,

    .

    .

    Cohesion . ..

    Cohesion- :

    Incidental cohesion- , !.

    .

    Logical cohesion ., .

    . , , ' , -device,(ioctl

    (.

    Temporal cohesion (init, config).

    Procedural/Sequential cohesion .

    (.(flow .

    Communicational cohesion .

    Functional cohesion .//

    .

    Type/Data/Information cohesionADT(Abstract Data Type.)

    Coupling:

    Common coupling .

    Control coupling , . .

    Stamp coupling , .

    .

    Data coupling .

    ,coupling .

    !:Dont talk to strangers

    . :myDept(),getHead(), getSec(),getPhone().

    . .

    . ,():myDept(),contactHead ?

    .

    . " ".

    .

  • 7/23/2019 AnnaLotker

    22/39

    724//3

    .

    :'. :

    . .

    User case:User-> Simulator .

    .

    .

    !

    9)821213 )

    .

    , . . ,

    ,

    .

    . ,6

    .-switch/case,-Quick Sort

    . .

    ., .

    P-Q,TRUEFALSE.P,TRUEQ

    TRUE.:

    Pre: {(x>=0) and (y>0)}

    Post: {(r

  • 7/23/2019 AnnaLotker

    23/39

    . ,

    .

    .

    Feature , public.

    Is ,-feature./=!=.

    . ..1

    .-do ,.-

    Require -Ensure,-Pre condition ..-Post condition

    Invariant, .

    . . . " "

    .2 , ...

    .

    .2

    -.-Post conditionPre condition -

    .-Super

    . . ,

    -Post , .

    . .Pre conditions

    ? -

    Pre condition .

    .

    .-Post conditions

    .-Production -Testing :

    .

    , .

    : .-C

    Assert/except. , ,

    .""

    Defensive prog.. asserts .

    " ".

  • 7/23/2019 AnnaLotker

    24/39

    Substitution .SSubtypeT, ST

    ). .is aISA.( ,

    ,TSubtypeS. .LSP

    .S T

    ::

    -return-subtype-super type.

    . -subtype.

    , .

    .

    Subtypes -,

    .

    .

    History -S,T , .-subtype .

    ,-subtype .

    , .((-T

    Test

    T T S

    .T . ,ST

    .. .

    ? . .-subtype

    .

    )18/2/3 )8

    . .List of constitution

    Pre- condition{x>=0}

    r=sqrt(x)

    Post- condition{r^2=x}

    {x>0}

    l=log(x)

    {e^l=x}

  • 7/23/2019 AnnaLotker

    25/39

    {s>>0}

    bank_deposit(s)

    {balace=old+s}

    {s>0 and s

  • 7/23/2019 AnnaLotker

    26/39

    Class AutoController{

    setRef(t){

    IOwrite(reg,t)

    }

    getTemp(){}

    adjustTemp(){/*empty*/}

    }

    :

    . :-AdjustTemp Adjust .1

    .

    . -Adjust .

    .init? init , -device.

    init . device,

    . ,-reference

    ,, . adjust

    . -

    11)21213 )9

    . testing

    , /

    . .

    .

    ?test

    :=: ) (.-spec-""

    , ,. " .

    .". , ,,

    .

    :.2 =

    Black box . . -spec

    . ..

    . .,

    : '

    .(:fft(v1,v2,n.

    ,:n=0.

  • 7/23/2019 AnnaLotker

    27/39

    -4

    . ,

    ,.

    .

    White box-spec,..control-data.

    Data flow .:

    definition(x:=) ..

    use(:=f(x))- ,Expression.

    data flow , .use-definition

    use (. , )

    test cases .

    .

    Control flow. ..

    .Statement coverage- . . .

    . .

    . -if

    2.Branch coverage- -branch:-if-else

    -statement coverage .-case .-branch coverage

    2.

    3.Path coverage- .

    :,

    . . . ,,.regression testing

    .

    test cast . . .2

    .

    Test cases

    . .

    ), .,inspection

    , -static analysis

    .(. . ,

    . .

    :inspection

    .peer review. , ,

    . .

    2.walk through , .

    .. ,

  • 7/23/2019 AnnaLotker

    28/39

    .

    ." ".

    3.formal inspection[Fagan inspection] .'.

    :.

    Moderator. .

    Reader . , . :-author. . .

    Inspectors. .

    .

    Recorder. .

    .

    .

    :

    .

    .-specificationInspection-design.

    Capers Jones

    . .

    delivery ,

    . ,

    , ,

    ,inspection. ,

    .

    . .

    .defect.cost per defect.

    .

    . ." "

    .-defect,

    . . ,

    , .defect per function cost

    ) .( ..-defect potential

    . :

    -formed inspection . .

    . 211

    . .

    Inspection .-defect .

    . -defect

    ,formed inspection

    . .

    .

  • 7/23/2019 AnnaLotker

    29/39

    . .-defects

    . .-defect

    . .

    11)21213 )9

    Bool getDetails(string &name, string id)

    //read full name & id, and verify that:

    //1) All names start with capital

    //2) ID is valid

    .test cased

    , ,

    . :

    RationalResultIDName

    T012345678Moshe

    Fmoshe

    .. F1Moshe

    ..

    F01234567890Moshe

    Id F999999999"Moshe

    F moshe

    F12345678123

    FM123, 0Moshe

    F

    .. FMoshe

    + T08Moshe Levi

    Moshe levi

    + Mosh Levi!

    Moshe 123

    .. Moshe12345678

    .. 0 1234567 8Moshe

    .. 0-1234567-8Moshe

    Null null

    .:Tim ORiley ,:

    ., .

    Verify , .

    . -,

    , .

    name-ID .

  • 7/23/2019 AnnaLotker

    30/39

    RatResIDName

    tabFlegalMoshe \t levy

    FlegalMoshe _ _ Levy

    1)921213 )18

    .

    .

    -maintenance

    -Corrective maintenance: "+security.

    -Adaptive maintenance: .- " "-

    .-?-] .maintenance-delivery

    .

    . [

    :

    .Concept Localization control flow..

    . "

    2.Impact Analysisdata flow, def-use.

    :

    -Code comprehension .

    .

    -Reverse Engineering- -impacr-security.

    analysis.

    . .,Code comprehension

    Code complexity

    .

    ?

    -LOC=Lines Of Code

    -

    -

    -

    -goto .:if, switch, for, goto -

    . ""

  • 7/23/2019 AnnaLotker

    31/39

    .-

    .,:-

    -LOC-phys.,NBNC,stmt

    -MCC-McCabes Cyclomatic Comp.. (for,if,)+1..

    -MCC.- . 1

    -Structure complexity .

    Cin- MCC,fan-in ,fan-out .

    2)2/2/3 )1

    :3

    . -

    - - , .

    13)8528214 )11

    , .

    . .-

    .

    . .

    ,-75 (.(mm

    . .Man month

    , -man month

    = . .

    ..

    ,

    .

    .

    .

    . ,

    .

    Size

    .

    . -statement.Lines of code

    ). " , .

    , (.-requirements

  • 7/23/2019 AnnaLotker

    32/39

    ,,state cases

    .

    .JAVA . . ,

    . Function Points

    . .-information system-71-IBM.black box

    .databasemain frame ,

    . .

    -71 .

    . fp .

    , ,4-7 .fp

    . ..

    ( ).

    .51

    . .

    -71.COCOMO2 .COCOMO .

    ,

    .

    .high risk ,

    . early design .-post architecture

    .

    ?

    .4

    2

    .20%-

    .

    , . .-KLoC .-COCOMO2

    .

    . :

    .

    .,

    .

    -

  • 7/23/2019 AnnaLotker

    33/39

    . -6

    .

    ...-

    . ,,- .

    Scaling factors .

    . .,

    -unify project-use case?? )?

    (., , ,

    . . use cases

    . ?

    .-use cases

    . US=-use cases.

    TECH= .. ,.

    ' .

    , " . '

    . .User stories.

    .

    , .

    . .

    ., ,

    . .

    , ,

    .

    ,4181 ! ,.

    ,

    . .

    . . ,

    '- .

    . ' '

    '.'

    () .

  • 7/23/2019 AnnaLotker

    34/39

    '

    .

    F

    13)8528214 )11

    Revision control

    .

    . -71

    (.(add ()repository

    (.(working copy

    .edit(check in, commit.)-working copy

    - . ,

    working copy. ,-desktop.

    :

    . check out. .

    . check in .

    .

    . ",

    .

    . commit .merge .2

    commit .

    .

    .

    -commit .

    . .

  • 7/23/2019 AnnaLotker

    35/39

    ,diff. .

    diff . .

    .Subversion CVS

    Distributive V.C.

    . . .

    , .

    .Push ,Pull

    Flow

    .pull-

    2.update

    3.edit

    4.-Update+pull

    -

    -push+commit

    change set-patchPush *

    14)128214 )1

    Watts Humphrey-IBM. -IBM CMM,PSP,TSP .

    . .

    . . .

    :

    , . -

    .

    .-

  • 7/23/2019 AnnaLotker

    36/39

    -

    ..

    .-

    . -

    PSP, .'/

    TSP-CMM.

    CMM.

    . /

    .', .

    .

    CMM

    . " .71

    ,. ?. .

    . ?

    .-CMM

    .-2111 -71 .

    .,

    "(" : )5

    . . , ..

    . .

    . . .2

    , .

    .-regression testing test,-QA

    ... .3

    . . , .

    :

    .4 .-5

    , . .,

    . . ,.5

    .

    :

    .

    "" "H , . /

    .

    .

    .

    .

    . .

  • 7/23/2019 AnnaLotker

    37/39

    .

    . . ...

    .

    PSP

    .

    . ',,.

    .

    SPS1

    .

    . .

    . .(")"

    , . .

    .

    ...

    PSP.

    ,

    .

    . .

    . . .

    .

    . .

    .? ., .

    .

    .,

    ? . ,PROxy

    . . ,

    .

    ., .

  • 7/23/2019 AnnaLotker

    38/39

    .:

    . .

    , .

    ..

    . ,

    ., ? ,

    .

    .

    , .

    .,

    PSP2

    .code reviews-Design reviews.

    .

    PSP3

    .- WATERFALL ,

    .

    .'.

    TSP

    , . -PSP .'

    .

    .,

    . , .

    ?

    , .

    EVO ,-functional

    requirements. , .

    ,.Capacity .

    . "

    :

    . ,

    , .2

    : ..3

    , -

    -

  • 7/23/2019 AnnaLotker

    39/39

    - .

    ,. . .

    . .

    , .

    14)128214 )1

    :

    -FAA AAS ".3..

    . . .

    design,5 . .IBM

    .

    -