cisc 3140 (cis 20.2) design & implementation of...

34
CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF SOFTWARE APPLICATION II Instructor : M. Meyer Email : [email protected] Course Page: http://www.sci.brooklyn.cuny.edu/~meyer/CISC3140

Upload: others

Post on 05-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CISC 3140 (CIS 20.2)

DESIGN & IMPLEMENTATION OF

SOFTWARE APPLICATION II

Instructor : M. Meyer

Email : [email protected]

Course Page:

http://www.sci.brooklyn.cuny.edu/~meyer/CISC3140

Page 2: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CONTENTS

Introduction to Course

Course Topics

Course Structure/Overview

Foundations of Software Engineering

CIS

C3

140

- Meyer - L

ectu

re 1

Page 3: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

DESIGN & IMPLEMENTATION OF SOFTWARE

APPLICATION II (GENERAL DESCRIPTION)

In CIS 3120 (20.1) you began working on "software

applications" rather than mere programs. Hopefully,

using the programming skills you had already

acquired to move forward into the basic topics of

interface design, graphics and networking.

In this class CIS 3140 we will continue to examine the

creation of large and complex software applications.

We will focus on designing, building and testing a

database-backed "intelligent" web-based systems. Our

emphasis will be on software development concepts,

tools and technologies, database systems, and

"intelligent" systems.

NOTE: CISC 3140 should be taken after CIS 3120.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 4: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE BACKGROUND

Course designed by departmental committee.

Which means I have NO leeway in changing the basic

content of the lectures or labs.

Much of our materials are provided courtesy of:

Prof. Elizabeth Sklar (Associate Professor and

Director of Multimedia Computing Program.

Adjunct Instructor Jeffery Raphael

I do write my own lectures and will ADD

information to lectures and labs where

appropriate.

I also encourage you to feel free to comment on

real-world practices that you have encountered.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 5: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

WHO AM I?

Instructor Matthew K. Meyer CISC 3140 Multimedia Programming

CISC 3600 Game Programming

Also taught courses in Programming, Graphics, Security

6 years industry experience Systems Administration (A+, Network+ MCSE), Software

Development, Systems Integration, Web Development, IT Headhunting.

I still consult on the side (Google Apps)

MA Brooklyn College, PhD CUNY GC (2012)

Research Areas Semantic Web (Web 3.0, Intelligent Web Systems)

XML database systems

XML query efficiency

CS Education

CIS

C3

140

- Meyer - L

ectu

re 1

Page 6: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE WEBSITE & RULES

Course Website:

http://www.sci.brooklyn.cuny.edu/~meyer/CISC3140

Please go there and read!

Course Rules:

In addition to all UN, US, NY, and Brooklyn College rules we have two specific course rules:

1. Respect will be shown.

2. Get your money's worth!

Pet Peeve -> Cell-phones

If you don't understand, STOP ME!

CIS

C3

140

- Meyer - L

ectu

re 1

Page 7: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE TOPICS

We will cover the following topics in 4 units:

I. Software Development - foundations of software

engineering, design patterns, process models,

software testing

II. Database Systems - information models, mySQL, php

III. Tools and Technologies - inter-operability, xml/json,

uml, configuration management, content

management

IV. Intelligent Systems - intelligent interface agents,

decision making, knowledge representation

CIS

C3

140

- Meyer - L

ectu

re 1

Page 8: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

GENERAL SUGGESTIONS

Avoid missing ANY classes!

Arrive on time.

Have something to eat and drink before you come

to class.

Find a partner(s) in the class today:

Projects will be team projects.

Sharing notes and exam study partners.

Plan on at least 2-3 hours a week, outside of the

class to work on class projects & labs.

READ the course website syllabus, at least once.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 9: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE STRUCTURE

4 Units

Each unit has

1 – 3 lectures

1 – 3 labs

The labs will be hands-on sessions

Grading Policy

Assignments and projects (40%)

Attendance & Participation (10%)

Midterm (20%)

Final (30%) (date TBA)

CIS

C3

140

- Meyer - L

ectu

re 1

Page 10: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

ONLINE RESOURCE

There is no textbook for this class: Software Development technology is changing rapidly.

Books are expensive (web is amazing FREE resource).

Lectures will be posted on the course web page after each lecture.

Labs will distributed in class and be posted after the class.

Links to online resources will also be posted on the class website and in lectures and labs where appropriate.

For people who want books, much of what we discuss can be found in a wide variety of books that are published by O’Reilly Publishing (http://www.oreilly.com), and appropriate publications will be linked on the class web page

CIS

C3

140

- Meyer - L

ectu

re 1

Page 11: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE OVERVIEW I

This is a programming course!

It is assumed that you are familiar with:

1. Imperative (Structured Programming)

Sequence, Selection, Repetition

2. Procedural Programming

3. Object Oriented Programming

4. Data Structures

5. Basic Search and Sort Techniques

At this stage in your career, you really can, teach

yourself a new programming language in a matter of

weeks (IF it belongs to paradigms that you are

already familiar with).

We will work predominantly with PHP in this class.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 12: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE OVERVIEW II

CIS

C3

140

- Meyer - L

ectu

re 1

Throughout the

course, we will be

discussing the

concepts, technologies

and design principles

that underlie web-

based systems with

the following type of

structure ->

Note each layer is an

abstract delineation.

Page 13: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

COURSE OVERVIEW II (CONT)

In the previous slide each of those layers could be:

1. Part of one application that resides on one

machine.

Single Player Games

2. Part of multiple applications on one machine.

L.A.M.P.

Single most common database enabled web system

3. Part of multiple applications on multiple

machines.

Client Server Model

GRID Computing (Google Apps Datastore)

CIS

C3

140

- Meyer - L

ectu

re 1

Page 14: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

WE WILL BE USING LAMP

LAMP is an acronym for an integrated stack of

free, open source software.

Derives name from the first letters of Linux

(operating system), Apache HTTP Server,

MySQL (database software) and

Perl/PHP/Python.

We will be using a LAMP setup to develop

software applications in this class.

You will have access to a machine (Linux OS)

with a Web Server (Apache) on it that is also

running a database (MySQL) and that support

scripting (PHP).

CIS

C3

140

- Meyer - L

ectu

re 1

Page 15: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

YOU DON'T NEED TO DO THIS!!!

CIS

C3

140

- Meyer - L

ectu

re 1

A LAMP distro is an incredibly easy thing to setup at home: Install a LAMP server on

Ubuntu Linux

Install a LAMP server on Debian GNU/Linux

Install a LAMP server on SUSE Linux

XAMPP for Windows

MAMP for MAC

AGAIN you will have access to a LAMP distro online.

You don't need to setup your own LAMP distro.

Page 16: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CASE STUDIES

1. Web sites that focus on delivery of goods or products (bringing stuff to people)

Amazon.com — a “click and mortar” company that didn’t exist before the internet. It delivers products and also provides a means for re-sellers (other companies) to sell products through amazon’s gateway.

Macys.com — a traditional “bricks and mortar” company that existed long before there was internet; but now they have a web site and support online purchases in addition to physical stores.

2. Web sites that focus on delivery of services (bringing information to people)

Yahoo.com — delivers a wide range of services, from email to games to a search engine to news feeds

Google.com — primarily a search engine, but also now supports email, web hosting a very popular mapping application, and GOOGLE APPS (perhaps the death of Office).

CIS

C3

140

- Meyer - L

ectu

re 1

Page 17: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CASE STUDIES CONTINUED…

3. Web sites that support social networking

(bringing people together)

Facebook.com — hosts profiles, provides 'live' space

for chat, space for asynchronous collaborative

blogging, takes private information and sells it for

profit.

eharmony.com — dating site

4. Web sites that contain intelligent components

Hopstop.com — provides personalized directions to

places in NYC via public transportation

Netflix.com — provides preference-based matching

of customers to potential goods and services

CIS

C3

140

- Meyer - L

ectu

re 1

Page 18: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CLASS EXAMPLES

Throughout the course, we will be introducing a number of different tools and technologies.

It will be helpful to have a few running examples that we can refer too to illustrate concepts and ideas. We will use these examples as a kind of glue to hold everything together.

One example we will use is this:

1. Suppose we want to develop a web site (or APP) called bigNightOut.com

2. The idea is to have a place where users can go and plan an evening out on the town.

3. At the very least there should be information about where to go for dinner and a movie.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 19: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CLASS EXAMPLES II

4. Our site will have components like: – restaurant

we might want to know: restaurant review

location and directions

category of food

real-time information like how busy is it right now

– movie

we might want to know: what is playing where and when

the price of a ticket

the length of the movie

access to view a trailer

reviews

real-time information like are there any tickets left for the next showing

– companions

we might want to find someone to go out with: do any friends want to come along?

is there anyone we do not want to invite?

maybe you want a blind date

real-time information like where are your friends right now

CIS

C3

140

- Meyer - L

ectu

re 1

Page 20: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CLASS EXAMPLES III

We will discuss the technologies that could be

used to create a site like bigNightOut.com

We will (in groups) design the bigNightOut.com

site (and other sites) and review each other’s

designs.

We will build then build the bigNightOut.com

site (and other sites) and test it!

When you are done, I highly suggest, that you

create a portfolio page of your site.

Increasingly companies are wanting to see the

finished products of programmers before they are

hired: Why the new guy can't code.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 21: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

TO DO

1. Complete the pre-semester survey and return it

to me.

2. Acquire a Flash Drive for use in the course if

you don't already have one.

3. Complete Homework #1 (in which you will):

1. READ "No Silver Bullet" by Prof Frederick P.

Brooks. Available on the course website AND

2. WRITE a one page, double spaced, 12 point format,

Arial Font summary of "No Silver Bullet" by Prof

Frederick P. Brooks making sure to put your name,

the class, the date and the title of your paper at the

top of your paper.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 22: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

I KNOW WHAT YOU'RE THINKING

Your thinking, "Did he really just give a homework assignment on the first day?!"

Your thinking, "What kind of monster would do such a thing?!"

Here's the deal: 1. Sadly, statistically speaking, at least one of you is not

going to pass this course.

2. I would like to find out who that person(s) is BEFORE the drop deadline passes (to save that person money).

3. Experience has shown me that the set of "the people who can't be bothered to write a simple paper during the first week of class" always comprise a proper superset of "the people who aren't going to pass this class".

4. Your first homework assignment is only worth 1 point (Attendance & Participation) but it's completion (or the lack thereof) is useful information to me (and the article is useful information to you).

CIS

C3

140

- Meyer - L

ectu

re 1

Page 23: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CIS

C3

140

- Meyer - L

ectu

re 1

Take 5

Page 24: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

SOFTWARE ENGINEERING

CIS

C3

140

- Meyer - L

ectu

re 1

Page 25: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

SOFTWARE ENGINEERING

Common Definition: Designing, implementing,

and modifying software in order to improve

quality, affordability, maintainability, and ease

of construction.

Stephen Schach Definition: “Software

engineering is a discipline whose aim is the

production of fault-free software, delivered on

time and within budget, that satisfies the user’s

needs.”

In a Nutshell: Building software in a cost-

effective and efficient manner

CIS

C3

140

- Meyer - L

ectu

re 1

Page 26: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

PROGRAMS != SOFTWARE PRODUCTS

We start our career in computer science learning

to write "programs".

A program is a simple application developed by

an individual for that individual (i.e. any

programs you’ve written for CIS 1.5)

A software product on the other hand has

multiple users and by definition is intended to be

used by many others.

Consequently we would like our software to be

well tested, documented, user-friendly and maybe

even include a manual (even though nobody will

read it).

CIS

C3

140

- Meyer - L

ectu

re 1

Page 27: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

SOFTWARE PRODUCTS

IN THE REAL WORLD

Your previous courses taught you these mechanics of program writing:

1. You will always be given clear/clean understandable specifications.

2. You will always know that it is possible to write the specified program in the time allotted.

In the real world:

1. Specifications are often unrealistic (if not impossible).

2. The timeframe for creating a software product is often not realistic?

Consequently in the real world:

Software is often delivered late, over budget and broken.

The real world is wildly unpredictable and software is fundamentally brittle; yet software often lasts longer than employees or hardware; consequently software sometimes ends up being used in very different ways than how it was originally designed to be used.

The field of software engineering was established in order to produce proven methodologies to help overcome these real-world issues.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 28: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

SOFTWARE ENGINEERING

Software engineering includes the following:

requirements analysis

human factors

functional specification

software architecture

design methods

programming for reliability

programming for maintainability

team programming methods

testing methods

configuration management

CIS

C3

140

- Meyer - L

ectu

re 1

Page 29: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

DOES SOFTWARE ENGINEERING HAVE TO

BE COMPLEX?

Yes!

Computer Software is more complex than

computer hardware (which has seen exponential

growth in speed, performance, and cost reduction).

Computer Software is one of the most complex and

difficult things that human beings create.

Non-redundant components.

Large number of states.

Problems difficult to reduce simplify (very difficult to

geometrically express).

Problems always changing (new features).

CIS

C3

140

- Meyer - L

ectu

re 1

Page 30: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

SOME TOOLS AND TECHNIQUES DO HELP

High-Level Languages

Complex Data Structures

Abstract Data Structures (Classes)

Multi-Tasking

Standards

Operating System Standards

Internet Standards

Interface Standards

Formalized Design Methodologies & Paradigms

Paradigm = Structured Approach to Solving a

Problem

CIS

C3

140

- Meyer - L

ectu

re 1

Page 31: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

DESIGN METHODOLOGIES. NECESSARY?

YES!

"Program difficulty increases exponentially with

program size. Why? Because of human

psychology. The human mind can only deal with

a limited number details at any time. When the

number of details in a problem increases linearly,

it becomes exponentially more difficult to

handle." (Mall, 2004)

From here on out, for the rest of your career,

NEVER just sit down and start coding.

PLAN first, and preferably plan within a "design

methodology"; within a "design paradigm".

CIS

C3

140

- Meyer - L

ectu

re 1

Page 32: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

NOTE ON PERSONAL WEB SITE VS NON-PERSONAL WEB SITE

It is assumed at this point that you have done

some web development and are proficient in

XHTML (or HTML 4.0) and JavaScript.

Please don't confuse simple relatively static

personal websites with professional websites:

• Personal home page is website about an individual or

small group with little to no scripting and/or

application or database integration.

• Professional website, is a large multi page (often

dynamically created) website, like a news site, search

engine, social networking site or web portal.

CIS

C3

140

- Meyer - L

ectu

re 1

Page 33: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

CIS

C3

140

- Meyer - L

ectu

re 1

• Mall, R. (2004). Fundamentals of software engineering. New Delhi:

Prentice-Hall of India Private Limited.

References

Page 34: CISC 3140 (CIS 20.2) DESIGN & IMPLEMENTATION OF …meyer/CISC3140/lectures/lecture1.pdfdatabase-backed "intelligent" web-based systems. Our ... Get your money's worth! ... I would

HANG ON, WE'RE GOING TO WATCH A

MOVIE

No Silver Bullet--Essence and Accidents of

Software Engineering, by Frederick P. Brooks.

(paper you're going to write report on) Originally published in 1986 in Information Processing 86. Reprinted in

Computer, 20, 4 (April 1987) 10-19. Also reprinted in The Mythical Man-

Month, Anniversary Edition (1995). (downloaded from

http://osprey.unisa.ac.za/download_2003/INF425-N/a2.pdf)

Professor Frederick P. Brooks (Website)

Brooks lecture (Movie)

CIS

C3

140

- Meyer - L

ectu

re 1