the evolution of programming - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

the evolution of programming

Description:

the evolution of programming – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 49
Provided by: DaveH53
Category:

less

Transcript and Presenter's Notes

Title: the evolution of programming


1
chapter12
section IV Development
for the Small Enterprise
Systems Analysis and Design
the evolution of programming program development
step-by-step macros, scripts, and command
files project deliverable the prototype review
session the cornucopia case portfolio project
2
Chapter Objectives
  • When you complete this chapter you will be able
    to
  • Transform a prototype into an operational product
  • Use 4GL coding tools in program development
  • Develop graphical user interface dialogs (GUIDs)
  • Blend 4GL-generated code with analyst-programmer
    code segments
  • Develop effective file sharing between
    applications

Systems Analysis and Design for the Small
Enterprise
Chapter 12
2
3
The Evolution of Programming
Over time programming languages have evolved,
replicated, and mutated into many forms. Most
relevant for the small-enterprise project are the
4GL languages associated with todays application
software. In short, 4GL languages provide a way
to customize application software to fit the
information needs of a specific enterprise.
Systems Analysis and Design for the Small
Enterprise
3
Chapter 12
4
Figure 12-1 Programming Language Timeline
1950 1960 1970
1980 1990
2000
4GL application languages
Web application languages
Microsoft .Net application development environment
Systems Analysis and Design for the Small
Enterprise
4
Chapter 12
5
The Evolution of Programming
In response to the analysts selections and
entries on a series of forms, the Switchboard
Manager tool generated PRCs switchboard form
and all of the necessary Visual Basic code. The
next seven slides illustrate the switchboard form
and the Visual Basic code.
Systems Analysis and Design for the Small
Enterprise
5
Chapter 12
6
Figure 12-2 PRC Switchboard
Systems Analysis and Design for the Small
Enterprise
6
Chapter 12
7
Figure 12-3 PRC Switchboard Event Procedures
2. This event procedure updates the form caption
and then calls another subprocedure to fill in
the list of switchboard options.
3. This On Click event executes the subprocedure
associated with the first button on the
switchboard.
1. This event procedure minimizes the database
window and initializes the switchboard form.
Systems Analysis and Design for the Small
Enterprise
7
Chapter 12
8
Figure 12-4 PRC Switchboard Visual Basic Code
Window
1. When the switchboard form opens, the
Form_Current( ) subroutine executes automatically.
2. This instruction calls the FillOptions
subprocedure.
3. The FillOptions( ) subroutine fills in the
options for the switchboard page.
Enlarge
Systems Analysis and Design for the Small
Enterprise
8
Chapter 12
9
Figure 12-5 PRC Switchboard Structure Chart
Systems Analysis and Design for the Small
Enterprise
9
Chapter 12
10
Figure 12-6 PRC Switchboard Subprocedure
Flowchart
Systems Analysis and Design for the Small
Enterprise
10
Chapter 12
11
Figure 12-7 PRC Switchboard Subprocedure Code
(1/2)
Private Sub FillOptions( ) ' Fill in the options
for this switchboard page. ' The number of
buttons on the form. Const conNumButtons 8
Dim con As Object Dim rs As Object Dim
stSql As String Dim intOption As Integer '
Set the focus to the first button on the form, '
and then hide all of the buttons on the form
but the first. You can't hide the field with
the focus. Me!Option1.SetFocus For
intOption 2 To conNumButtons
Me("Option" intOption).Visible False
Me("OptionLabel" intOption).Visible False
Next intOption ' Open the table of Switchboard
Items, and find ' the first item for this
Switchboard Page. Set con
Application.CurrentProject.Connection stSql
"SELECT FROM Switchboard Items" stSql
stSql " WHERE ItemNumber gt 0 AND
SwitchboardID" Me!SwitchboardID stSql
stSql " ORDER BY ItemNumber" Set rs
CreateObject("ADODB.Recordset") rs.Open
stSql, con, 1 ' 1 adOpenKeyset
1. Data declarations
2. Loop for each button
Build SQL
Systems Analysis and Design for the Small
Enterprise
Chapter 12
11
12
Figure 12-7 PRC Switchboard Subprocedure Code
(2/2)
4. No options?
' If there are no options for this Switchboard
Page, ' display a message. Otherwise, fill the
page with the items. If (rs.EOF) Then
Me!OptionLabel1.Caption "There are no items
for this switchboard page" Else While
(Not (rs.EOF)) Me("Option"
rs!ItemNumber).Visible True
Me("OptionLabel" rs!ItemNumber).Visible
True Me("OptionLabel"
rs!ItemNumber).Caption rs!ItemText
rs.MoveNext Wend End If ' Close
the recordset and the database. rs.Close
Set rs Nothing Set con Nothing   End
Sub
5. While there are more options
Systems Analysis and Design for the Small
Enterprise
Chapter 12
12
13
Figure 12-8 PRC Table Relationships
SurQuest
Question
Client
Survey
SampVoter
VoterResp
SurVoters
Systems Analysis and Design for the Small
Enterprise
Chapter 12
13
14
Figure 12-9 PRC Survey Summary Form
Systems Analysis and Design for the Small
Enterprise
14
Chapter 12
15
Figure 12-10 PRC Survey Summary Objects
Microsoft Visual Basic PRC (Object Browser)
Project - PRC
Classes
Members of Form_SurveySummaryMain
Systems Analysis and Design for the Small
Enterprise
15
Chapter 12
16
HTML and Java Programming
TECHNOTE 12-1
  • Hypertext Markup Language (HTML) is a very simple
    language, defining the basic layout of a Web page
    by using tags, or codes, attached to text. HTML
    is transmitted to and processed by the browser
    software installed on an Internet visitors
    computer.
  • Java is a sophisticated, object-oriented
    programming language that is equally
    transportable and executable by Internet browser
    software.

Systems Analysis and Design for the Small
Enterprise
Chapter 12
16
17
Program Development Step-by-Step
In keeping with the prototyping strategy
previously discussed, the next step in the
development process is to transform the prototype
into the final product. This task requires both
automatic code building and hand-coding tools.
Systems Analysis and Design for the Small
Enterprise
17
Chapter 12
18
Figure 12-11 Code Builders versus Hand Coding
Systems Analysis and Design for the Small
Enterprise
18
Chapter 12
19
Figure 12-13 PRC Survey Summary GUID
Systems Analysis and Design for the Small
Enterprise
19
Chapter 12
20
Figure 12-14 PRC Survey Questions Form and Code
Private Sub cmdNextSurvey_Click( ) On Error GoTo
Err_cmdNextSurvey_Click( )
DoCmd.GoToRecord, , acNext Exit_cmdNextSurvey_Clic
k Exit Sub Err-cmdNextSurvey_Click
MsgBox Err.Description Resume
Exit_cmdNextSurvey_Click( ) End Sub
Systems Analysis and Design for the Small
Enterprise
20
Chapter 12
21
System Recycling
Thinking
Critically
  • If one of your clients competitors asked you to
    build a similar information system for their
    enterprise, should you simply rework the original
    system?
  • Would your answer differ if the request were not
    from a clients competitor?
  • Who owns the solution designed and developed for
    the original client?

Systems Analysis and Design for the Small
Enterprise
Chapter 12
21
22
Macros, Scripts, and Command Files
The typical small-enterprise information system
relies on several 4GL products. Database
processing is at the heart of the system, but
word processing and spreadsheet application
software may play a significant role in one or
more of the subsystems. The macro languages
associated with word processor and spreadsheet
software are as sophisticated as many programming
languages they must adhere to a strict syntax
and they include powerful control structures and
functions.
Systems Analysis and Design for the Small
Enterprise
22
Chapter 12
23
Figure 12-15 PRC Survey Response Spreadsheet
These cells are shaded as a result of a
spreadsheet macro named ForEachNextOver50( ).
Systems Analysis and Design for the Small
Enterprise
23
Chapter 12
24
Figure 12-16 PRC Survey Response Macro
Enlarge
Systems Analysis and Design for the Small
Enterprise
24
Chapter 12
25
Applications Development without Programming
TECHNOTE 12-2
A computer information system is broader in scope
and function than a customized application. An
informal SDLC methodology may be helpful to the
custom application developer. While many custom
application building tools exist, developing an
information system still requires programming
skills.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
25
26
Project Deliverable The Prototype Review Session
Written Material 1. System design update
Revised DFD, ERD, and USD System
flowchart, menus, and GUID Macros,
queries, and subprocedure code specifications
2. USD and/or menu tree with prototyped segments
highlighted 3. Sample of prototyped user
interfaces 4. Project budget and status
updates Oral Presentation and Demonstration
1. Describe prototyping methodology 2.
Visuals for items 2 and 3 above 3. Hands-on
demonstration 4. Questions-and-answer period
Reference Figure 12-17 Prototype Review Report
Content
Systems Analysis and Design for the Small
Enterprise
26
Chapter 12
27
The Cornucopia Case
THE CORNUCOPIA CASE
  • The analysts decide to use Microsoft Access and
    its Office suite compliments, Word and Excel, to
    implement the design.
  • The slides that follow present a detailed,
    annotated system flowchart and many descriptions
    of the logic behind the implementing queries,
    event procedures, and macros.
  • The completed project required very little
    analyst-supplied programming code.

Systems Analysis and Design for the Small
Enterprise
Chapter 12
27
28
Figure 12-18 Cornucopia Prototype Review
SessionSlide Show
Systems Analysis and Design for the Small
Enterprise
Chapter 12
28
29
Figure 12-19 Cornucopia System Flowchart
Systems Analysis and Design for the Small
Enterprise
Chapter 12
29
30
Figure 12-20 Cornucopia System Flowchart
Annotations
Items 1-7 CD Sales Form Items 8-10 Select
Sales Trend Options Item 11 Select
Correspondence Option Item 12 Select Internet
Option Item 13 CD Update Form Items 14-16 CD
AutoOrder Form Items 17-20 CD Order Form Items
21-23 CD Shipment Form
The next slide provides details of Items 14-16
Systems Analysis and Design for the Small
Enterprise
Chapter 12
30
31
Figure 12-20 Cornucopia System Flowchart
AnnotationsAutoOrder Form
Items 14-16 CD AutoOrder Form 14. When this
form opens, the Create AutoOrders macro
executes, which opens the Make AutoOrder Temp
query. This query adds an order to the AutoOrder
Temp table for every CD Master table record in
which UnitsInStock UnitsOnOrder is less than
ReorderLevel. 15. The event procedure associated
with clicking the Confiirm button opens the
Update CD UnitsOnOrder from AutoOrder query.
This query adjusts the UnitsOnOrder value on the
CD Master table. 16. The event procedure
associated with clicking the Close button opens
the Append Order Detail query. This query adds
the confirmed orders to the Order Detail table.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
31
32
Figure 12-21 Cornucopia Event Procedures
This event procedure was automatically created by
the button Wizard tool. The analyst added the
bold faced code.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
32
33
Figure 12-22 Cornucopia Close Sales Form Macro
Close Sales Form Macro
System Flowchart
4
Sales
System Flowchart Annotation
4. The Close command buttons click event
invokes the Close Sales Form macro. This macro
opens three queries and then closes the form. The
No TransDetail Query marks CD Transaction table
records that have no corresponding detail
records. Update Inventory w Sales and Update
Inventory w Returns adjust the UnitsInStock
value on the CD Master table.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
33
34
Figure 12-23 Cornucopia Macro Instructions
Macros 1-9 are associated with CD Sales Form
events. Macros 2-6 are used in the Add mode.
Macros 7-8 are used in the View/Delete mode.
Macro 9, the Close Sales Form macro (illustrated
on the next slide), is used in both
modes. Macros 10-14 are associated with CD order
and shipment forms. Macros 15-19 are associated
with their named subsystems. Macros 20-21 are
associated with Internet forms. Macros 20-23 are
invoked from numerous forms.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
34
35
Figure 12-23 Cornucopia Macro InstructionsClose
Sales Form Macro
Action Argument Value Open Query Query
Name NoTransDetail Update (View QBE button
below) Open Query Query Name Update Inventory w
Sales Open Query Query Name Update Inventory w
Returns Close Object Type Form Object
Name CD Transaction
Reference Figure 12-25 Cornucopia SQL
Statements UPDATE DISTINCTROW CD Transaction
LEFT JOIN CD Transaction Detail ON CD
Transaction.TransactionID CDTransaction
Deatil.TransactionID SET CD transaction.DetailR
ecords No WHERE (((CD TransactionDetailrecords
) Yes) AND ((CD transaction Detail.Transaction
ID) Is Null))
View QBE
Systems Analysis and Design for the Small
Enterprise
Chapter 12
35
36
Figure 12-24 Cornucopia Delete Trans Update
Query
CD Transaction
CD Transaction Detail
Update DeleteDate in CD Transaction to Now( )
Update InventoryPosted in CD Transaction Detail
to No
Where the TransactionID values match
Update DeleteDate in CD Transaction Detail to
Now( )
Update Quantity in CD Transaction Detail to
Quantity 1
Systems Analysis and Design for the Small
Enterprise
Chapter 12
36
37
Figure 12-25 Cornucopia Query SQL Statements
Queries 1-6 are associated with CD Sales Form
events. Queries 7-12 are associated with CD
order form events. Queries 13-14 are associated
with CD shipment form events. Queries 15-16 are
associated with sales trend form events. Query
17 is associated with an Internet option form
event.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
37
38
Figure 12-26 Cornucopia CD Shipment Form
Systems Analysis and Design for the Small
Enterprise
Chapter 12
38
39
Figure 12-27 Cornucopia Sales/Profit Event
Procedure
This subprocedure is invoked when the user
selects the SalesTrends and Sales/Profit
Spreadsheet options from the switchboard.
These DoCmd statements empty the old sales
summary file and refill it with data extracted
from the current sales transaction files.
This statement exports the sales summary data to
the Sale/Profit spreadsheet file.
This statement launches Excel and opens the
Sale/Profit spreadsheet.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
39
40
Figure 12-28 Cornucopia Sales/Profit
Spreadsheet Formulas
Systems Analysis and Design for the Small
Enterprise
Chapter 12
40
41
Figure 12-29 Cornucopia Sales Summary by Day
Report Procedures
Record Source .. SalesTrans Temp Filter .
TransactionDate gt Date ( ) - Enter days to
summarize
Note Date ( ) is todays date and Enter days
to summarize is a parameter query prompt.
Thus, if todays date is 3/31/04 and the user
enters 15 in response to the prompt, the report
will summarize sales for March 17 through March
31.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
41
42
Figure 12-30 Cornucopia Mail-Merge Field Codes
The TIME function supplies the date. The
MERGFIELD function provides specific data from
the Customer Master table.
The IF function inserts the first quoted phrase
only if the customer is Active. Inactive
customers receive a letter with the second phrase.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
42
43
Figure 12-31 Cornucopia Mail-Merge Letter
Rocky is an Active customer, so he gets a
letter with the first phrase.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
43
44
Figure 12-32 Cornucopia Status Report Week 11
Note the significant difference between estimated
and actual labor hours for Week 10.
Systems Analysis and Design for the Small
Enterprise
Chapter 12
44
45
Figure 12-33 Cornucopia State-Transition
Diagramwith Visible Analyst
Enlarge
Systems Analysis and Design for the Small
Enterprise
Chapter 12
45
46
Portfolio Project
Portfolio
project
  • Team Assignment 12 4GL Programming
  • Describe your implementing software
  • Summarize your use of customizing features of
    your implementing software (event procedures,
    macros, SQL, etc.). Include at least one
    subsystem example.
  • Describe the ways in which you integrate
    different implementing software (OLE, import,
    export, etc.).
  • Annotate your detailed system flowchart with
    descriptions of the processing performed within
    each subsystem.

Systems Analysis and Design for the Small
Enterprise
Chapter 12
46
47
Portfolio Project
Portfolio
project
  • Project Deliverable Prototype Review Session
  • Submit a report containing the following items
  • Cover letter
  • USD and menu tree with prototyped segments
    highlighted
  • Summary of any major design changes since the
    design review report, including revised DFD and
    ERD
  • Prototype GUID screen images, reports, and Web
    pages
  • Project status report
  • Project budget
  • Prepare a slide show and the appropriate handouts
    to support a 15-20 minute oral presentation
    covering items b-f.

Systems Analysis and Design for the Small
Enterprise
Chapter 12
47
48
Chapter Summary
  • Transforming a prototype into an operational
    product requires a mixture of skills, including
  • Use of 4GL development tools, such as macros,
    queries, and scripts
  • Knowledge of programming fundamentals, including
    object-like application building languages

Systems Analysis and Design for the Small
Enterprise
Chapter 12
48
49
Figure 12-4 PRC Switchboard Visual Basic Code
Window (enlarged)
1. When the switchboard form opens, the
Form_Current( ) subroutine executes automatically.
2. This instruction calls the FillOptions
subproceudre
3. The FillOptions( ) subroutine fills in the
options for the switchboard page.
Return
Systems Analysis and Design for the Small
Enterprise
49
Chapter 12
50
Figure 12-16 PRC Survey Response MacroVisual
Basic Code
Sub ForEachNextOver50( ) ForEachNextOver50
macro written 3/1/2003 For Each PercentCell in
Range(B16 F16) If PercentCell.Value gt 50
Then With PercentCell.Interior
.ColorIndex 42
.Pattern xlSolid End With
PercentCell.Font.Bold True End If Next End
Sub
This macro is an enhanced version of a much
simpler macro the analyst created using the macro
recorder tool. This example illustrates the use
of both an automatic code building tool (the
macro recorder) and hand-coding skills.
Return
Systems Analysis and Design for the Small
Enterprise
50
Chapter 12
51
Figure 12-23 Cornucopia Macro InstructionsNoTran
sDetail Update QBE
Return
Systems Analysis and Design for the Small
Enterprise
Chapter 12
51
52
Figure 12-33 Cornucopia State-Transition Diagram
with Visible Analyst (enlarged)
Return
Systems Analysis and Design for the Small
Enterprise
52
Write a Comment
User Comments (0)
About PowerShow.com