Hands-on Day! (C++ Functions and Classes)

Optional but counts as 15% for final grade!

Due Friday Night!

High Quality Work!

Self-Motivation!

Despite the chaos:

2/7

2/21

2/28

3/26

5/21

Team Selection

Client Presentations

Project Proposal

Revised Project Proposal

Final Project Documentation

No class

No class

No class

Project Presentations

5/03

No class

Implementation / Testing / Deployment

59 Days

Schedule a meeting!

class Circle:
    
    instance = None
        
    @staticmethod
    def getInstance():
        
        if Circle.instance == None:
            Circle.instance = Circle()
            
        return Circle.instance
        
public final class Circle {

    private static final Circle INSTANCE = 
      new Circle();

    public static Circle getInstance() {
        return INSTANCE;
    }
}
public final class Circle {

    private static final Circle INSTANCE = null;

    public static Circle getInstance() {
    
    	if (!INSTANCE) {
        	INSTANCE = new Circle();
        }
    
        return INSTANCE;
    }
}

runs at Application Start

runs on demand

Circle.getInstance();

Lazy Loading!

class Singleton
{
   public:
       static Singleton* getInstance( ) {
       
            return instance;
       
       };
       ~Singleton( );
   private:
       Singleton( );
       static Singleton* instance;
};

No Lazy Loading

C++ Bonus

class Singleton
{
   public:
       static Singleton* getInstance( ) {
       
           static Singleton* instance;
           return instance;
       
       };
       ~Singleton( );
   private:
       Singleton( );
       
};

Lazy Loading!

Buy vs. Build

$10,000

$10,000

$10,000

$10,000

$500

$500

Buy vs. Build

No Code Access!

Who fixes bugs?

And, how fast?

What about interfaces between our code and the bought component?

Migration and Support Team!

A system generates weather maps using data collected from unattended weather stations.  Each weather station collects meteorological data and produces summaries of the data.  On request, it sends the summary information to an area computer.  The area computer uses a database of digitized maps to generate a set of local weather maps.

Noun Identification

Prof. Kenneth Fletcher

A system generates weather maps using data collected from unattended weather stations.  Each weather station collects meteorological data and produces summaries of the data.  On request, it sends the summary information to an area computer.  The area computer uses a database of digitized maps to generate a set of local weather maps.

Noun Identification

Prof. Kenneth Fletcher

DevOps

Developers

IT Operations

Developer

IT Operations

has to wait until code is

in production to really be done!

Developer

Environment

Production

Environment

fixed some bugs

completely new problems

usually more complex

Software Developer

SysAdmins / IT Ops

should know a little bit of both!

Software Developer

SysAdmins / IT Ops

should know a little bit of both!

More later in CS410..

Ops

Deployment

Delivery to Client or Customer

Make Software Accessible

Webserver

Dedicated Servers are expensive...

Containers

Virtual Machines

Docker

All other platforms..

A Docker container is a way of packaging software that is more lightweight than Virtual Machines.

A Docker container can be easily deployed.

Because it does not include a full OS.

$ docker run APPLICATION

Get Started at

$ docker run hello-world
$ docker run -it ubuntu bash

interactive

$ docker run python
$ docker run -it python:2.7

tags

$ docker run --detach httpd
$ docker ps
$ docker inspect ID
$ docker pause ID
$ docker unpause ID
$ docker kill ID
# A basic apache server. To use either add or bind mount content under /var/www
FROM ubuntu:12.04

MAINTAINER Kimbro Staken version: 0.1

RUN apt-get update && apt-get install -y apache2 && apt-get clean && rm -rf /var/lib/apt/lists/*

ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2

EXPOSE 80

CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]

Dockerfile

CS410 Lecture 19

By Daniel Haehn

CS410 Lecture 19

Slides for CS410 Software Engineering at UMass Boston. See https://cs410.net!

  • 39

More from Daniel Haehn