Programų sistemų inžinerijos praktikos

Download Report

Transcript Programų sistemų inžinerijos praktikos

Programų sistemų inžinerijos
praktikos
Saulius Tautvaišas
Kas yra „Praktika“?
• Praktika yra principų, idėjų, metodų ir
priemonių rinkinys, į kurį reikia atkreipti
dėmesį planuojant ir kuriant programinę
įrangą.
• Jos apima techninius pasvarstymus ir
praktines žinias, kurias reikia žinoti, norint
sukurti aukštos kokybės programinę įrangą.
Praktikų esmė
• George Polya savo knygoje 1945 (apie
problemų sprendimą), apibrėžė pagrindines
programų sistemų inžinerijos praktikas:
1. Problemos supratimas (bendravimas ir analizė).
2. Sprendimo plano sudarymas (modeliavimas ir
projektavimas).
3. Plano vykdymas (kodo rašymas).
4. Rezultatų tikslumo įvertinimas (testavimas ir kokybės
užtikrinimas).
Pagrindiniai principai
• The reason it all exists: Provide value to the
customer and the user
• KISS—keep it simple, stupid!
• Maintain the product and project “vision”
• What you produce, others will consume
• Be open to the future
• Plan ahead for reuse
• Think! (before action)
Programinės įrangos gyvavimo ciklo
procesų praktikos
– Bendravimas (angl. Communication)
– Planavimas (angl. Planning)
– Modeliavimas (angl. Modeling)
– Kūrimas (angl. Construction)
– Pateikimas (angl. Deployment)
Bendravimo (angl. Communication)
praktika
1. Listen
2. Prepare before you communicate
3. Facilitate the communication, there should be a leader
4. Face-to-face is best
5. Take notes and document decisions
6. Collaborate with the customer
7. Stay focused, modularize your discussion
8. Draw pictures when things are unclear
9. Move on …
10.Negotiation works best when both parties win
Planavimo (angl. Planning) praktika
1.
2.
3.
4.
Understand the project scope
Involve the customer (and other stakeholders)
Recognize that planning is iterative
Estimate based on what you know
Planavimo (angl. Planning) praktika(2)
5. Consider risk
6. Be realistic
7. Adjust granularity as you plan
8. Define how quality will be achieved
9. Define how you’ll accommodate changes
10. Track what you’ve planned and make adjustment
Modeliavimo (angl. Modeling) praktika
• Reikalavimų analizės (angl. analysis) modelis atvaizduoja
užsakovo programinės įrangos reikalavimus trijose skirtingose
srityse: informacijos, funkcinio ir būsenų srityse.
• Projektavimo (angl. design) modelis atvaizduoja programinės
įrangos charakteristikas kurios padeda programuotojams kurti
programą efektyviau: architektūros, vartotojo sąsajos ir
komponentų lygio detales
Reikalavimų analizės principai
1.
2.
3.
4.
5.
Represent the information domain
Represent software functions
Represent software behavior
Partition these representations
Move from essence toward implementation
Projektavimo principai
1.
2.
3.
4.
5.
6.
7.
8.
9.
Design must be traceable to the analysis model
Always consider architecture
Focus on the design of data
Interfaces (both user and internal) must be designed
User interface design should be tuned to the needs of
end-user
Components should exhibit functional independence
Components should be loosely coupled
Design representation should be easily understood
The design model should be developed iteratively
Kūrimo (angl. Construction) praktika
Sudaryta iš:
• Programavimo principų
• Testavimo pincipų
Programavimo principai
• Pasiruošimo principas:
• Understand basic design principles and concepts.
• Pick a programming language that meets the needs of
the software to be built and the environment in which
it will operate.
• Select a programming environment that provides tools
that will make your work easier.
• Create a set of unit tests that will be applied once the
component you code is completed.
Programavimo principai(2)
• Kodavimo principas:
• Select data structures that will meet the needs of the design.
• Understand the software architecture and create interfaces
that are consistent with it.
• Keep conditional logic as simple as possible.
• Create nested loops in a way that makes them easily
testable.
• Select meaningful variable names and follow other local
coding standards.
• Write code that is self-documenting.
• Create a visual layout (e.g., indentation and blank lines) that
aids understanding.
Programavimo principai(3)
• Validavimo principas:
• Conduct a code walkthrough when appropriate.
• Perform unit tests and correct errors you’ve uncovered.
• Refactor the code.
Testavimo principai
– All tests should be traceable to requirements
– Tests should be planned
– The Pareto Principle applies to testing
– Testing begins “in the small” and moves toward
“in the large”
– Exhaustive testing is not possible
Pateikimo (angl. Deployment) praktika
– Manage customer expectations
– A complete delivery package should be assembled
and tested
– A support regime should be established
– Instructional materials must be provided to endusers
– Buggy software should be fixed first, delivered
later
Klausimai?