+ All Categories
Home > Documents > CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack)...

CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack)...

Date post: 15-Aug-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
18
CS342: Software Design Dec. 5, 2017
Transcript
Page 1: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

CS342: Software Design Dec. 5, 2017

Page 2: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter pattern

Solution stack

Today’s topic

Page 3: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

US plug vs European outlet

ClientAdapterAdaptee

Page 4: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Object oriented adapters

Page 5: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter pattern

The Adapter Pattern converts the interface of a class into another interface the clients expect. ● Lets classes work together that couldn’t otherwise because of

incompatible interfaces.● Decouple the client from the implemented interface.● Encapsulates that change so that the client doesn’t have to be

modified each time it needs to operate against a different interface

Page 6: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Duck vs. turkey

Page 7: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter class

Page 8: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Test drive the adapter

Page 9: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter pattern

The Adapter Pattern converts the interface of a class into another interface the clients expect. ● Lets classes work together that couldn’t otherwise because of

incompatible interfaces.● Decouple the client from the implemented interface.● Encapsulates that change so that the client doesn’t have to be

modified each time it needs to operate against a different interface

Page 10: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter pattern explained

Page 11: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

How does the client use the adapter?

Page 12: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

● Object composition● Program to an interface, not implementation● Add new implementations without changing interface

Adapter pattern advantages

Page 13: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Adapter diagram

Page 14: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Enumerator vs. Iterator

Page 15: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

EnumerationIterator

Page 16: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

A set of software components to create a complete platform such that no additional software is needed to support applications● LAMP - linux, apache, mysql, php● NMP - Nginx, mysql, Php● WINS (WISA) - Windows, IIS, .NET, SQL● Java EE● SMACK: Apache Spark, Mesos, Akka, Cassandra, Kafka● MEAN/MERN/MEVN

Technology stack (aka solution stack, software stack)

Page 17: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

Free and open-source JavaScript software stack for building dynamic web sites and web applications● Mongodb: document oriented db (non-relational)● Express.js: web application framework, middleware (backend)● Angular.js: web application framework (front end, MVC)● Node.js: Javascript runtime for server side

Page 18: CS342: Software Design€¦ · MEAN/MERN/MEVN Technology stack (aka solution stack, software stack) Free and open-source JavaScript software stack for building dynamic web sites and

MERN, MEVN: react.js (facebook, instagram), vue.js (Google)

● Javascript and JSON in all layers (show examples, code, db, service call)

● Advantages?

Similar stacks


Recommended