BIS08 Application Development - II


Published on

Course Material for MBA Course on Business Information Systems

Published in: Education, Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

BIS08 Application Development - II

  1. 1. Business Information Systems Application Development -II Object Oriented Techniques System Development Life Cycle Prithwis Mukerjee, Ph.D.
  2. 2. What shall we cover here <ul><li>Languages and Environments </li></ul><ul><ul><li>Computer Languages </li></ul></ul><ul><ul><li>Development Environments </li></ul></ul><ul><li>Activities </li></ul><ul><ul><li>What are the steps required to create an application </li></ul></ul><ul><li>World of Objects </li></ul><ul><ul><li>What and why ? </li></ul></ul><ul><li>Business application design </li></ul><ul><ul><li>Software development life cycle </li></ul></ul><ul><ul><li>Water fall method </li></ul></ul><ul><ul><li>Iterative Method </li></ul></ul><ul><ul><li>Rational Unified Process </li></ul></ul>
  3. 3. Data Modelling >> Object Orientation <ul><li>Data Modelling </li></ul><ul><ul><li>ENTITY : “something” about which we store information in a structured manner </li></ul></ul><ul><ul><ul><li>Multiple “instances” of an entity exist </li></ul></ul></ul><ul><ul><li>ATTRIBUTE (s) : a set of values defined for all instances of an entity </li></ul></ul><ul><ul><ul><li>Instances of the entity have different values for the attribute </li></ul></ul></ul><ul><ul><li>C-R-U-D operations are performed on instances through </li></ul></ul><ul><ul><ul><li>Insert, Select, Update Delete in SQL </li></ul></ul></ul><ul><li>Object Oriented techniques are based on the idea of .. </li></ul><ul><ul><li>CLASS (es) : a collection of “instances” of “something” that are similar in terms of.. </li></ul></ul><ul><ul><li>1. ATTRIBUTE (s) : a set of values defined for all instances of a class </li></ul></ul><ul><ul><ul><li>Instances of the class have different values of the attribute </li></ul></ul></ul><ul><ul><li>2. METHOD (s) : a set of actions that affect an instance of the class </li></ul></ul><ul><ul><ul><li>Change Attribute values </li></ul></ul></ul><ul><ul><ul><li>Create / Delete instance </li></ul></ul></ul>
  4. 4. Rigidity >> Flexibility <ul><li>Entity </li></ul><ul><ul><li>Must be reflected as TABLE in a relational database system </li></ul></ul><ul><ul><ul><li>Eg EMPLOYEE Table </li></ul></ul></ul><ul><ul><li>Instances are individual RECORDS in the TABLE </li></ul></ul><ul><ul><ul><li>One record for each employee </li></ul></ul></ul><ul><li>Attribute </li></ul><ul><ul><li>Is reflected as a COLUMN </li></ul></ul><ul><li>All activity is defined in terms of </li></ul><ul><ul><li>insert, select, update, delete </li></ul></ul><ul><li>Class </li></ul><ul><ul><li>No common, rigid structure </li></ul></ul><ul><ul><ul><li>TABLE may be used to define classes </li></ul></ul></ul><ul><ul><li>Instances of a class are called OBJECTS </li></ul></ul><ul><ul><ul><li>Eg prithwis is an object of class EMPLOYEE </li></ul></ul></ul><ul><li>Attribute </li></ul><ul><ul><ul><li>No common, rigid structure </li></ul></ul></ul><ul><ul><ul><li>prithwis . name , prithwis . age are attributes of prithwis </li></ul></ul></ul><ul><li>Methods are more intuitive </li></ul><ul><ul><li>recruit, promote, terminate could be methods for class employee </li></ul></ul>
  5. 5. Examples of Classes <ul><li>Physical Objects </li></ul><ul><ul><li>AUTOMOBILE </li></ul></ul><ul><ul><ul><li>Instances : Civic, Santro, Qualis, </li></ul></ul></ul><ul><ul><ul><li>Attributes : Price, Horsepower, Weight </li></ul></ul></ul><ul><ul><li>Or alternatively , SANTRO </li></ul></ul><ul><ul><ul><li>Instances : my Santro, your Santro, his Santro ! </li></ul></ul></ul><ul><ul><ul><li>Attributes : Owner, Registration Number, Colour </li></ul></ul></ul><ul><li>Human entities </li></ul><ul><ul><li>PERSON </li></ul></ul><ul><ul><ul><li>Instances : Ram, Shyam, Madhu </li></ul></ul></ul><ul><ul><ul><li>Attributes : Name, Gender, Age, ... </li></ul></ul></ul><ul><ul><li>Or alternatively , STUDENT </li></ul></ul><ul><ul><ul><li>Instances : Ram, Shyam, Madhu </li></ul></ul></ul><ul><ul><ul><li>Attributes : Roll Number, Course, Grade ... </li></ul></ul></ul><ul><ul><li>Or alternatively , EMPLOYEE </li></ul></ul><ul><ul><ul><li>Attributes : Salary, Department ... </li></ul></ul></ul>INHERITANCE is the phenomenon by which one CLASS inherits ATTRIBUTES from another classes
  6. 6. More Classes ... <ul><li>Collections of data </li></ul><ul><ul><li>ORDERS </li></ul></ul><ul><ul><ul><li>Instances : Order from ITC, Tata Steel ... </li></ul></ul></ul><ul><ul><ul><li>Attributes : Value, Quantity, Delivery Date ... </li></ul></ul></ul><ul><ul><li>BANKACCOUNT </li></ul></ul><ul><ul><ul><li>Instances : Account of Ram, Shyam, Madhu </li></ul></ul></ul><ul><ul><ul><li>Attributes : Name, Number, PAN, balance </li></ul></ul></ul><ul><ul><li>INVENTORY </li></ul></ul><ul><ul><ul><li>Instances : Soap, Detergents, Biscuits .. </li></ul></ul></ul><ul><ul><ul><li>Attribute : SKU, units, location, .... </li></ul></ul></ul><ul><li>Elements of a Systems Environment !! </li></ul><ul><ul><li>WINDOWS </li></ul></ul><ul><ul><ul><li>Instances : OrderCreation, OrderModification </li></ul></ul></ul><ul><ul><ul><li>Attributes : Size, Title, Scrollable or Not ... </li></ul></ul></ul>
  7. 7. Methods + Attributes = Classes <ul><li>Recollect </li></ul><ul><ul><li>Algorithms + Data Structures = Programs </li></ul></ul><ul><ul><li>Database + Application = Systems </li></ul></ul><ul><li>Classes consist of </li></ul><ul><ul><li>Attributes </li></ul></ul><ul><ul><ul><li>Pieces of data that distinctly indentify OBJECTS ( instances ) of CLASS </li></ul></ul></ul><ul><ul><li>Methods or Functions </li></ul></ul><ul><ul><ul><li>Instructions common to a CLASS that have an impact on Attributes of an OBJECT </li></ul></ul></ul><ul><ul><ul><li>Coded in language like C++ </li></ul></ul></ul><ul><li>Class STUDENT </li></ul><ul><ul><li>Attribute </li></ul></ul><ul><ul><ul><li>Name </li></ul></ul></ul><ul><ul><ul><li>Roll Number </li></ul></ul></ul><ul><ul><ul><li>Standard </li></ul></ul></ul><ul><ul><li>Method </li></ul></ul><ul><ul><ul><li>ENROLL </li></ul></ul></ul><ul><ul><ul><ul><li>Create new OBJECT with Name (prithwis) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Assign Roll Number </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Assign Standard = 1 </li></ul></ul></ul></ul><ul><ul><ul><li>PROMOTE </li></ul></ul></ul><ul><ul><ul><ul><li>Change Standard from Current Value to Current Value + 1 </li></ul></ul></ul></ul>
  8. 8. Each Class has own Attributes / Methods <ul><li>Class STUDENT </li></ul><ul><ul><li>Attributes : Name, Roll Number, Standard </li></ul></ul><ul><ul><li>Methods : Enroll, Promote, Graduate </li></ul></ul><ul><li>Class EMPLOYEE </li></ul><ul><ul><li>Attributes : Name, Emp Number, Designation, Salary </li></ul></ul><ul><ul><li>Methods : Hire, Promote, RaiseSalary, Fire </li></ul></ul><ul><li>Method </li></ul><ul><ul><li>A set of instructions in a language like C++ or Java that cause certain changes to happen to the attributes </li></ul></ul><ul><li>The same METHOD could mean different things when it applies to different CLASSes </li></ul><ul><ul><li>PROMOTE : STUDENT – change value of STANDARD attribute </li></ul></ul><ul><ul><li>PROMOTE : EMPLOYEE – change value of DESIGNATION and SALARY </li></ul></ul>POLYMORPHOSIM is the phenomenon by which the same METHOD could mean different things in different CLASSes
  9. 9. Object Oriented Techniques <ul><li>Deal with CLASSes which are defined as a bundle of </li></ul><ul><ul><li>Attributes : That is DATA </li></ul></ul><ul><ul><li>Methods : That is a way of changing the DATA in a meaningful way </li></ul></ul><ul><li>Have OBJECTs that are instances of a CLASS with </li></ul><ul><ul><li>Specific values ATTRIBUTE that are </li></ul></ul><ul><ul><li>Modified by “invoking” METHODs appropriate for this class </li></ul></ul><ul><li>Ensure integrity of data by </li></ul><ul><ul><li>Allowing change to happen in the values of attributes ONLY through an execution of a METHOD </li></ul></ul><ul><ul><ul><li>Consider Class EMPLOYEE </li></ul></ul></ul><ul><ul><ul><li>Salary cannot be changed by SIMPLE SQL update to any arbitrary value </li></ul></ul></ul><ul><ul><ul><li>Salary must change through METHOD “promote” which will ensure that salary change is as per company defined rules </li></ul></ul></ul><ul><ul><li>Encapsulation of Data and Logic in a single artefact </li></ul></ul>
  10. 10. OO Application Development <ul><li>Model user requirement with an appropriate number of </li></ul><ul><ul><li>CLASSes which are defined in terms of </li></ul></ul><ul><ul><ul><li>ATTRIBUTES </li></ul></ul></ul><ul><ul><ul><li>METHODS </li></ul></ul></ul><ul><ul><li>A Method in One class can invoke a Method in another class </li></ul></ul><ul><ul><ul><li>Method ORDER.fullfillORDER can invoke INVENTORY.reduceINVENTORY </li></ul></ul></ul><ul><li>Define CLASSes along with ATTRIBUTES and METHODS using </li></ul><ul><ul><li>A “pure” object oriented language like C++ or Java </li></ul></ul><ul><ul><li>A “hybrid” but easier-to-use alternative could be ... </li></ul></ul><ul><ul><ul><li>Visual Basic </li></ul></ul></ul><ul><ul><ul><li>ZOHO !! </li></ul></ul></ul>A large and complex application that manages the internals of a big company can have hundreds of classes, each with its own attributes and methods. Managing all this is not easy !! We need to define a process for doing all this ...
  11. 11. OO Application Development <ul><li>Creates a model of a real world solution </li></ul><ul><ul><li>Using an object oriented language like C++ or Java </li></ul></ul><ul><ul><li>In terms of a number of CLASSes </li></ul></ul><ul><li>A CLASS is an artefact that allows </li></ul><ul><ul><li>Encapsulation or bundling definition of </li></ul></ul><ul><ul><ul><li>Data in ATTRIBUTES </li></ul></ul></ul><ul><ul><ul><li>Logic in Methods </li></ul></ul></ul><ul><ul><li>Inheritance </li></ul></ul><ul><ul><ul><li>Allows instances of one class to acquire attributes and methods from another </li></ul></ul></ul><ul><ul><li>Polymorphism </li></ul></ul><ul><ul><ul><li>Allows the same method to mean diferent things in different classes </li></ul></ul></ul><ul><ul><li>Instances or OBJECTs that are specified by values of the attributes </li></ul></ul>
  12. 12. A potential violation ? <ul><li>Encapsulation is the process of bundling </li></ul><ul><ul><li>Data </li></ul></ul><ul><ul><li>Attributes </li></ul></ul><ul><li>Are we violating the principles of keeping data and logic separate ? </li></ul><ul><ul><li>In a sense we are ... </li></ul></ul><ul><ul><li>But not if we introduce the concept of ... </li></ul></ul><ul><li>Persistence </li></ul><ul><ul><li>When an object of a class outlives the application or method that manipulates it </li></ul></ul><ul><li>Consider the Similarity </li></ul><ul><ul><li>ENTITY in Data Model </li></ul></ul><ul><ul><li>CLASS in OO Application </li></ul></ul><ul><li>Consider the Difference </li></ul><ul><ul><li>ENTITY is represented by a TABLE in an RDBMS </li></ul></ul><ul><ul><li>TABLE exists in computer even when computer switched off </li></ul></ul><ul><ul><li>OBJECTS along with data are lost when computer shuts down </li></ul></ul>
  13. 13. Persistence <ul><li>CLASS </li></ul><ul><ul><li>A set of instructions that define ATTRIBUTES, METHODS in an OO Language </li></ul></ul><ul><ul><li>Persists in computer even when it is switched off </li></ul></ul><ul><li>OBJECTS </li></ul><ul><ul><li>Created, or “instantiated” with appropriate values of ATTRIBUTE </li></ul></ul><ul><ul><li>Does not persist when computer is shut off. All Data is lost. </li></ul></ul><ul><li>ENTITY </li></ul><ul><ul><li>A TABLE in an RDBMS defined in terms of COLUMNS </li></ul></ul><ul><ul><li>Persists in computer even when it is switched off </li></ul></ul><ul><li>RECORDS </li></ul><ul><ul><li>Created and manipulated with appropriate SQL statements </li></ul></ul><ul><ul><ul><li>Either directly </li></ul></ul></ul><ul><ul><ul><li>Or through a method </li></ul></ul></ul><ul><ul><li>PERSISTS in the computer even when it is shut off. No data is lost </li></ul></ul>
  14. 14. Making OBJECTs persist <ul><li>Application Server </li></ul><ul><ul><li>Machine Starts </li></ul></ul><ul><ul><li>Application is created </li></ul></ul><ul><ul><ul><li>Class, Attributes Defined </li></ul></ul></ul><ul><ul><ul><li>Application Saved </li></ul></ul></ul><ul><ul><li>Application is executed </li></ul></ul><ul><ul><ul><li>Object1 created with data </li></ul></ul></ul><ul><ul><ul><li>Object1 made persistent </li></ul></ul></ul><ul><ul><ul><li>Application Stops </li></ul></ul></ul><ul><ul><ul><li>Object1 destroyed with data </li></ul></ul></ul><ul><ul><li>Machine Stops </li></ul></ul><ul><ul><ul><li>Application Saved </li></ul></ul></ul><ul><ul><ul><li>Class, Attribute Definition Saved </li></ul></ul></ul><ul><ul><ul><li>Data with Object1 LOST </li></ul></ul></ul><ul><li>Database Server </li></ul><ul><ul><li>Machine Starts </li></ul></ul><ul><ul><li>RDBMS starts </li></ul></ul><ul><ul><ul><li>Waits for Application request </li></ul></ul></ul><ul><ul><ul><li>... </li></ul></ul></ul><ul><ul><ul><li>Recieves Object1 </li></ul></ul></ul><ul><ul><ul><li>Persists Object1 in TABLE / RECORD </li></ul></ul></ul><ul><ul><ul><li>Waits for next request </li></ul></ul></ul><ul><ul><ul><li>.... </li></ul></ul></ul><ul><ul><ul><li>RDBMS stopped </li></ul></ul></ul><ul><ul><li>Machine Stops </li></ul></ul><ul><ul><ul><li>Persistent Copy of Object1 stored in Table </li></ul></ul></ul>
  15. 15. The Next Day <ul><li>Application Server </li></ul><ul><ul><li>Machine Starts </li></ul></ul><ul><ul><ul><li>Application retrieved </li></ul></ul></ul><ul><ul><li>Application Starts </li></ul></ul><ul><ul><ul><li>Object1 created with blank data </li></ul></ul></ul><ul><ul><ul><li>Data of Object1 recovered from Persistent copy </li></ul></ul></ul><ul><ul><ul><li>Data for Object1 modified by methods </li></ul></ul></ul><ul><ul><ul><li>Object1 made persistent </li></ul></ul></ul><ul><ul><ul><li>Application Stops </li></ul></ul></ul><ul><ul><ul><li>Object1 destroyed with data </li></ul></ul></ul><ul><ul><li>Machine Stops </li></ul></ul><ul><li>Database Server </li></ul><ul><ul><li>Machine Starts </li></ul></ul><ul><ul><li>RDBMS Starts </li></ul></ul><ul><ul><ul><li>Waits for Application Request </li></ul></ul></ul><ul><ul><ul><li>... </li></ul></ul></ul><ul><ul><ul><li>Sends Persistent copy of Object1 </li></ul></ul></ul><ul><ul><ul><li>... </li></ul></ul></ul><ul><ul><ul><li>.. </li></ul></ul></ul><ul><ul><ul><li>Persists modified copy of Object1 </li></ul></ul></ul><ul><ul><ul><li>.. </li></ul></ul></ul><ul><ul><ul><li>RDBMS stops </li></ul></ul></ul><ul><ul><li>Machine Stops </li></ul></ul><ul><ul><ul><li>Modified copy of Object1 saved </li></ul></ul></ul>
  16. 16. Three Tier Architecture Application in Execution Application Not Executing Relational Database Non Relational Database OR transient objects in application persistent objects in database Commercial, “business” applications RARELY use NON RELATIONAL database CLASS definition O2 O3 O4 O1 CLASS definition User Interface
  17. 17. System Development Life Cycle Functional Specification Program Review Checklist Complexity Determination / Estimate Technical Specification Test Support Unit Test Plan Program Source Code Code Bundle / Demo Unit Test Results Support (optional) Pre-Production Support Technical Review  Client Review  Client Review Programmer Driven USER Driven Functional Design Estimate Technical Design Deliver Test Support Develop Methodology Component  Communication & Coordination (all teams)  Technical Design Walkthrough  Code Review  Client Sign Off  Legend Task With Deliverable Task Without Deliverable Optional Service Area Process Checkpoint
  18. 18. The WaterFall Method – A simplified view Analysis Design Coding Test / Deploy Users define what they want from the system Programmers re-define what they believe the users want in a more structured manner Actual program is built using an appropriate computer language like C, Java, VisualBasic Application is tested and then deployed in the end users machine
  19. 19. The WaterFall Method – Deliverables Analysis Design Coding Test / Deploy Requirements Analysis Document written in simple English language Systems Specifications written in terms of e.g. TABLES, COLUMNS, METHODS, FUNCTIONS Programs written in an appropriate language and tested individually. Unit Test Report for each program All programs tested together to ensure compatibility and consistency Integration Test Report
  20. 20. Waterfall Process Assumptions <ul><li>Requirements are known up front before design </li></ul><ul><ul><li>In reality, users do not know what they want </li></ul></ul><ul><ul><li>They certainly cannot visualise what the final thing will look like </li></ul></ul><ul><li>Requirements rarely change </li></ul><ul><ul><li>They always will, however much you hate it </li></ul></ul><ul><li>Design can be conducted in a purely abstract space, or trial rarely leads to error </li></ul><ul><li>The technology will all fit nicely into place when the time comes (the apocalypse) </li></ul>
  21. 21. Waterfall Process Limitations <ul><li>Big Bang Delivery Theory </li></ul><ul><li>The proof of the concept is relegated to the very end of a long singular cycle. Before final integration, only documents have been produced. </li></ul><ul><li>Late deployment hides many lurking risks: </li></ul><ul><ul><li>technological (well, I thought they would work together...) </li></ul></ul><ul><ul><li>conceptual (well, I thought that's what they wanted...) </li></ul></ul><ul><ul><li>personnel (took so long, half the team left) </li></ul></ul><ul><ul><li>User doesn't get to see anything real until the very end, and they always hate it. </li></ul></ul><ul><ul><li>System Testing doesn't get involved until later in the process. </li></ul></ul>
  22. 22. What did the customer really want ?
  23. 23. An Iterative Development Process... <ul><li>Recognizes the reality of changing requirements </li></ul><ul><ul><li>Caspers Jones’s research on 8000 projects </li></ul></ul><ul><ul><ul><li>40% of final requirements arrived after the analysis phase, after development had already begun </li></ul></ul></ul><ul><li>Promotes early risk mitigation, by breaking down the system into mini-projects and focusing on the riskier elements first </li></ul><ul><ul><li>Allows you to “plan a little, design a little, and code a little” </li></ul></ul><ul><li>Encourages all participants, including testers, integrators to be involved earlier on </li></ul><ul><ul><li>Allows the process itself to modulate with each iteration, allowing you to correct errors sooner and put into practice lessons learned in the prior iteration </li></ul></ul><ul><li>Focuses on component architectures, not final big bang deployments </li></ul>
  24. 24. An Incremental Development Process... <ul><li>Allows for software to evolve, not be produced in one huge effort </li></ul><ul><ul><li>Allows software to improve, by giving enough time to the evolutionary process itself </li></ul></ul><ul><li>Forces attention on stability, for only a stable foundation can support multiple additions </li></ul><ul><ul><li>Allows the system (a small subset of it) to actually run much sooner than with other processes </li></ul></ul><ul><li>Allows interim progress to continue through the stubbing of functionality </li></ul><ul><li>Allows for the management of risk, by exposing problems earlier on in the development process </li></ul>
  25. 25. Goals and Features of Each Iteration <ul><li>The primary goal of each iteration is to slowly chip away at the risk facing the project, namely: </li></ul><ul><ul><li>performance risks </li></ul></ul><ul><ul><li>integration risks (different vendors, tools, etc.) </li></ul></ul><ul><ul><li>conceptual risks (ferret out analysis and design flaws) </li></ul></ul><ul><li>Perform a “mini-waterfall” project that ends with a delivery of something tangible in code, available for scrutiny by the interested parties, which produces validation or correctives </li></ul><ul><ul><li>The result of a single iteration is an increment--an incremental improvement of the system, yielding an evolutionary approach </li></ul></ul>