Title: BEST PRACTICES
1BEST PRACTICES
- Developing Software Solutions
2Introduction
3Principles and Best Practices
- Strive to design and build successful
high-quality solutions - Various techniques or methods have proven to lead
to success best practices - Useful in field of software development and
others - Basic general rules principles
- Guides behaviour of software developers
- Guidelines principles best practices
- Software developer should be aware and apply
4The Beginning
- Concept computer program
- Application
- Programming constructs and concepts
- Programming is a craft
5The Architecture of an Application
- Software development not simply writing small
programs - Payroll application
- Computes employee salaries
- Determines taxes payable
- Prints payslips
- Requires set of organised data database
- User interface - that part of the program with
which user interacts - Menu system set of forms
- Set of Web pages accessible via Web browser
6The Architecture of an Application
- Various elements working together called system
- Different businesses
- Different business
- Different needs
- Application vary in structural design
(architecture)
7Single-user database application
- Application, its user interface and database
exist on single computer - Database engine lies between the application and
the database - Adv of placing database engine between
application and database - Offers programmer independence from particular
database being accessed - Same programming techniques used to access
database regardless of database type - Application updates?
8Single-user database application
9Multi-user database application
- Data placed on central computer to be accessed
remotely over a network by other computers - Only 1 DBMS required (1 database server)
- Disadvantages
- More concurrent users, heavier load reduce
performance of database server (processing power
shared) - Security restrict access of unauthorized users
(log on authenticating) - Application updates?
10Multi-user database application
Users Computer
Users Computer
Order Processing Application
Order Processing Application
Network
Database Server
Order Database
Database Engine
11Internet database application
- Web interface (A) - Web browser provides basic
interface via Internet - Rich interface (B) for more complex tasks (main
user interface portion created using i.e. VB.Net) - Main core of application placed on application
server - Application invokes services of database server
- Deployment admin tasks simpler most
application logic on centralized server -
12Internet database application
13Internet database application
- Disadvantages
- Too many users poor performance
- Security threat of exposure to unauthorized
users inside outside company (firewall)
14Important Issues for Consideration
- Your program is often a small component of a much
Bigger Picture - Ensure that interface of each created element is
easy to use (simplicity of code for components
function, classes etc.) - Anticipate how application will evolve in future
design accordingly (single user vs multiple
user application?) - Build application with flexibility in mind
15Important Issues for Consideration
- Protection of data or parts of application from
unauthorized access. - Build applications to simplify deployment,
administration and maintenance.
Always keep thinking ahead.
16Object-Oriented Programming
- Allows for the creation, use and maintenance of
reusable software by splitting a program up into
units that combine data and instructions - (packaging related data and behavior together
encapsulation). - Units called objects
17An Object
- Possesses a state that is encapsulated within
the object. - Exhibits behavior in that it respond to external
events. - Possesses an identity in that there may be more
than one object of a given type.
18Objects can represent
- Physical things (customers and products)
- Conceptual things (orders and loans)
- Organizational things (companies and departments)
- Objects in the real world translate into
objects in the software system. - Other examples of objects windows and
buttons
19An object has
- Attributes data items that define it
- (Product object with product ID attribute)
- Methods defines an associated action and is
used to inspect or modify an objects state (also
called operations) - Messages used for interaction and collaboration
between objects.
20Classes
- Formal definitions that provide basis for all
objects - Blueprint or template for the creation of an
object - Defines all the behaviors and attributes of the
class.
21Example of a class
- Class can define everything about a real-world
object such as a motor vehicle - The defined attributes wheels, engine, doors
and others - The defined methods stop and go
22Object continued
- Also called instance
- Is the implementation of the class at run-time
- Each object has an interface the set of
publicly exposed methods and properties used to
manipulate the object. - Interface provides a means of executing internal
code without exposing implementation detail to
user of the object
23Object continued
- Inner workings of object hidden from the user,
but interface exposed to outside. - Data abstraction unnecessary level of detail is
hidden. - Only need information about public interface to
use object - Internal representation of objects data and
operations is irrelevant and invisible to the
user of an object.
24Class representation
Class name
Class attributes
Class operations
25Instance of Class
TRUCK
registration CWZ251 Speed 60 Fuel 2.2
litres Temperature cool
Object holds actual values
26Objects
- Work with objects in Visual Basic .NET, C, JAVA
- Controls,
- Forms
- Data access objects
- Create own objects, by defining additional
- Properties and
- Methods
- Objects prefabricated building blocks
- Write a piece of code once and
- Reuse it again and again
27Object Oriented System Characteristics
- System will have
- Relatively little global data
- A structure comprising of a network of objects
- Objects will be
- Self-sufficient - Independent -Clearly defined
interfaces - Data will
- only be able to be manipulated using publicly
defined methods. - Be hidden inside the object
- Inaccessible to parts of the system that do not
need to see it. - These features promotes ease of carefully testing
each object in isolation
28Component
- Compiled piece of code that is based on the
aggregation of many classes a compiled entity - create a set of classes that define the data
access logic for the application. - Compile classes into single component
- Create an instance of the class (defined within
the component) by first installing the component
containing the class - Example electronics switches, instruments and
starter motors - Once built
- Reused
29Object Oriented Concepts
Object Software unit packaging together data and methods to manipulate that data
Class Template for creating objects
Attribute Data item defined as part of a class or object
Operation Procedure or function defined a part of a class or object using this term refers to the procedures public interface with the rest of the software.
30Object Oriented Concepts
Method Procedure of function defined as part of a class or object using this term refers to the procedures implementation
Message Request sent to an object to execute one of its methods.
Encapsulation Packaging data and operations into an object
Data hiding Making the internal details of an object inaccessible to other objects.
31Object Oriented Concepts
Inheritance Mechanism that allows a new class to be defined as a specialization of another. The specialized class automatically inherits the features of the class it is created from, and can add additional features or change or suppress inherited features.
Polymorphism Mechanism that allows a single message to be interpreted differently by different object. The ability to hide different implementations behind a common interface.
32The Applications role in the IS
33The Applications role in the IS
- Always ensure that any application integrates
with the IS and supports its goals fully. - Goal of an IS for all its components to
- Collect
- Transform
- Store
- Provide accurate, timely and useful information
34A Process Must be Followed
- Application design depends on specific
requirements - problems to be solved
- process to be automated
- people (users)
- Framework needed for developing maintaining
software - successive phases followed in orderly way.
- SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)
35SDLC
- Feasibility study
- Requirements elicitation
- Analysis
- Architectural design
- Detailed design
- Coding (implementation)
- Unit and integration testing
- Operation and maintenance
36The effective / productive programmer
- Early adopter / fast adapter
- Inquisitive
- Critical Thinker
- Realistic
- Jack of all trades
37Exercising your curiosity
- Build your awareness of the development process
- Experiment
- Read about problem solving
- Analyse and plan before you act
- Learn about successful projects
- Read!
- Read other books and periodicals
- Affiliate with other professionals
- Make a commitment to professional development
38Attitude
- Be willing to work hard
- Care about what you do
- Aim to get things right the first time
- Concern yourself with aesthetics
- Think about your work
- Be disciplined
- Develop good habits
39Attitude
- Be aware of the bigger picture
- Take responsibility for everything you do.
- Dont tolerate or ignore software rot
- Welcome change, and also be aware of it
- Listen to the ideas of other people
- Produce quality software
40Attitude
- Be intellectually honest
- Refuse to pretend you are an expert when you are
not - Readily admitting your mistakes
- Try to understand a compiler warning rather than
suppressing the message. - Clearly understand your program not compiling
it to see if it works. - Provide realistic status reports
- Provide realistic schedule estimates and holding
your ground when management asks you to adjust
them.
41Attitude
- Listen to your inner voice
- Improve your communication skills
- Know what you want to say
- Know your audience
- Choose your moment
- Choose a style
- Make it look good
- Involve your audience
- Be a listener
- Get back to people
42Strive to be a superior developer
- The characteristics of a superior developer
- have very little to do with talent
- and everything to do with devotion to
- personal development
43Solving Problems
- Some constraints are simply our own preconceived
ones. - Is there an easier way?
- Are you trying to solve the right problem?
- Why is this thing a problem?
- What is it that is making it so hard to solve?
- Does it have to be done this way?
- Does it have to be done at all?
44Building Quality Systems
- Defect rate one chip in 10 000
- strive towards truly perfect solutions
- devote to quality throughout design development
design quality into your application - Fitness for purpose ultimate measure of quality
meet the basic requirement first
45Quality systems
- Factors of interest to client
- System needs to be
- Delivered on time
- Reasonably priced
- User-friendly
- Reliable
- Factors of interest to developer
- Good program design
- Efficient use of resources
- Well-structured database
- maintainability
46Measuring software quality
- Correctness
- Accuracy
- Usability
- Efficiency
- Performance
- Availability
- Reliability
- Robustness
- Scalability
- Adaptability
- Securability
Completeness
Consistency
Robustness
Budgen (2003)
McConnel (2004)
47Additional quality factors
- Maintainability
- Manageability
- Flexibility
- Portability
- Reusability
- Testability
- Readability
- Understandability
48Quality
- Maximizing one quality characteristic might
compromise another - Find an optimal solution from a set of competing
quality objectives. - Get it right the first time
- quality assurance
- Fact Improving quality
- Reduces development costs
- Shortens development time
- Increases productivity
49Primary goal of software development
- To deliver high-quality, maintainable software
projects on time and within budget - Secondary goals
- Meeting and satisfying the intended users
requirements - Containing development costs
- Avoiding the failure of the software development
project
50Statistics Software projects failure
- 80 fail due to
- Over budget
- Late
- Missing functionality
- Combination of all three above
- 30 poorly executed
- Thus project cancelled before completion
51Conclusion