Implementation and Testing of Software Projects Alosh Bennett
Nov 22, 2014
Implementation and Testing of Software Projects Alosh Bennett
Scope of the talk
To introduce you to various techniques and technologies that will enable you build professional quality software.
But
I can only show you the way.
Software Design – What is a good design?
Things to consider while designing a system Software should be user friendly Software should be reliable Fast to respond Compatible with various operating systems etc Should be easy to maintain Should be easy to extend Should re-use and should be re-usable Should be secure
Build software that works and works well.
Software Design – How to design a good software? Signposts on the way to building good software
Design concepts that help build a good software Abstraction – Let the complicacies remain under the hood Modularity – Building blocks from which the software is made Data Hiding – Information on a need-to-know basis Testability – A chain is only as strong as its weakest link
Design Tools
Unified Modeling Language (UML)
•Industry standard
•General purpose modeling language
•Way to visualize a system's architectural blueprints
Entity Relationship diagrams
•Conceptual representation of data
•Database modeling method
Blueprint of the system
UML – Class Diagram
UML – Activity Diagram
ER Diagram example
Design Patterns
A design pattern is a general reusable solution to a commonly occurring problem in software design.
Not re-inventing the wheel
Coding – Choose the right Language
Learn more than one language
•Different languages have different capabilities
•Java for portability
•C for device programming
•Supports different programming models
•Java – OOPS
•Clojure – Functional programming
•Scala – Concurrency
•Python – Scripting
•Ruby – Dynamic programming
One size doesn't fit all
Programming Paradigms
Procedural Programming
•Program as sequence of steps to be carried out.
Object Oriented Programming
•Objects have behaviour and data
•Program as interaction of objects.
Functional Programming
•Modules like mathematical functions
•Program as a series of function calls
Speaking in style
Setting up the environment
A powerful development environment Contains the right tools Linux
•Vast tool support
•Command line
•Built by developers for developers Native Installation Virtual Machines
•Easy to install
•Safe
•Preconfigured Images
Virtual Machine running Ubuntu
IDE – Integrated Development Environment
DO NOT code using notepad OK for single file projects Cannot manage as the project grows in size IDE
•Much more than an editor
•Complete development environment Features
•Syntax highlighting
•Code Completion
•Access documentation
•Refactor code
•Build
•Test
•Deploy
Netbeans IDE
Netbeans IDE
Coding Guidelines
Coding Standards – Best practices to follow while coding
•IDE Support – Code coach
Handle Error cases Use existing libraries Code against standards Provide comments
Build and Deploy
Use build tools to compile and deploy your projects Apache ANT
•Used for building and deploying of Java Projects
•Has built-in tasks to compile, assemble, test, run
•Extremely flexible
•IDE integration – can run ANT from within the IDE
Source Control
Keeps track of changes and backup of source code Provide backup against accidental deletion Provide backup to revert back changes Means to collaborate Multiple people can work on the project simultaneously CVS – Concurrent Versions System
•SourceForge – Online CVS repository Git
•GitHub – Online Git repository
CVS from NetBeans
GitHub – Jquery Project
GitHub – Jquery History
Testing
Functional Testing – Test the software's features
•Decide on the features to be tested
•Come up with test cases
•Test around boundary conditions
Non-Functional Testing – Testing the technology
•Is the software compatible with other OS?
•How is the performance?
•Security – Can the system be hacked?
The new style of testing
Automated Testing Make use of testing frameworks
•Junit
•Industry standard
•Framework for defining test cases
•Lot of built-in features for supplying value and evaluating results
•Write less testing code and more test cases
•Available for other languages too Write test cases as you write the code Test cases slowly evolves to completion IDE Integration – Run the test cases automatically from the IDE
Software Implementation and Testing - Checklist
Modeling – UML diagrams Development Environment – Linux (Native/Virtual) IDE Code Coach Build Tool – ANT Online Source Control – GitHub/SourceForge JUnit Test cases
Resources UML Modeling tools
•Argo UML - http://argouml.tigris.org/
•Umbrello - http://uml.sourceforge.net/ Virtual Machines
•Virtual Box - http://www.virtualbox.org/ IDEs
•Netbeans - http://netbeans.org/
•Eclipse - http://www.eclipse.org/ Coding Standards
•Java - http://www.oracle.com/technetwork/java/codeconvtoc-136057.html Build Tools
•Apache ANT - http://ant.apache.org/ Source Control
•CVS - http://savannah.nongnu.org/projects/cvs
•Git - http://git-scm.com/ Online Source Control
•SourceForge - http://sourceforge.net/
•GitHub - https://github.com/
References
Thank You
http://en.wikipedia.org
http://www.mathcs.richmond.edu/~lbarnett/MCS_dept/junit/junit_intro.html
http://www.exforsys.com/tutorials/oops.html
http://www.tutorialspoint.com/uml/uml_class_diagram.htm
Slides available at
http://www.aloshbennett.in/weblog/topics/sessions/