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?
Build software that works and works well.  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

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 
Unifie o eling ng ge (U )

Blueprint of the system

‡In ‡

str st n to is

r o eling l ng s ste 's r s t et o ge ite t r l l e rints

‡Gener l

r ose lize i gr 

Entit Rel tions i ‡ on e t ‡D t se

l re resent tion of o eling

UML ± Class Diagram

UML ± Activity Diagram

ER Diagram example

Design Patterns

Not re-inventing the wheel

A design pattern is a general reusable solution to a commonly occurring problem in software design.

Coding ± Choose the right Language
One size doesn't fit all  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

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 si e  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

uidelines 

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  it ‡ itHub ± Online it 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 

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/

Thank You