GithubHelp home page GithubHelp logo

emjose / design-patterns-101 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 38.7 MB

A flip card app highlighting the 23 design patterns for object-oriented programming by the Gang of Four.

Home Page: design-patterns-101.vercel.app

HTML 73.74% CSS 18.28% JavaScript 7.98%
css html design-patterns gang-of-four flipcard flipcards

design-patterns-101's Introduction

previous 100 days of code next

Design Patterns 101


Design Patterns 101

Table of Contents


#100DaysOfCode

Day 33: February 1, 2022

  • To begin learning about design patterns, I made flip cards by adapting my Agile 101 project.

  • Design patterns are general solutions to commonly occurring problems in software design.

  • Design patterns can be described as reusable and customizable blueprints or templates.

  • The flip cards feature the 23 design patterns first described in the book:

    Design Patterns: Elements of Reusable Object-Oriented Software (1994)

    by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (known as the the Gang of Four)

  • The material and art are from Refactoring.Guru and Dmitry Zhart. Images formatted with Adobe Photoshop.

  • This app is best viewed on a desktop computer or a laptop, using a Chrome, Firefox, or Edge browser.


Installation

1. Git clone and cd into the repo folder:

git clone [email protected]:emjose/design-patterns-101.git && cd design-patterns-101

2. Run the command:

open index.html

Live Site

Live Site


Design Patterns 101 is keyboard accessible, and a mouse hover will flip a card over.

Design Patterns 101 is a progressive web app.

• Pressing the tab key (or a mouse click) will pause a selected card in its flipped state.

• A tab key press or a mouse click outside of the flipped card reverts that card to its original state.

• On a touchscreen device: tapping another card will flip the previously selected card back to its initial state.


Issues

  • This app is best viewed on a desktop computer or a laptop, using a Chrome, Firefox, or Edge browser.

  • Like its sister project Agile 101, the Design Patterns 101 cards didn't flip correctly on a mobile phone.

  • The primary issue is that the :hover pseudo class is problematic on touchscreens.

  • Stack Overflow questions ( OneTwo ) led to the solutions of adding :focus to CSS properties and tabindex="0" to HTML elements.

  • The vendor prefixes (-webkit-, -moz-, -ms-, -o-) were also added to the transform and backface-visibility CSS properties.

  • An issue with some touchscreen devices: Tapping a card may yield a partial blue outline that doesn't correctly surround the card. However, cards will flip correctly when tapped.

  • August 2022 update: The partial blue outline issue was resolved by disabling the outline property and enabling the border property for the :focus state in a mobile media query.


Live Site

The partial blue outline that may appear on touchscreen or mobile devices.


Resources


Copyright

  • This project is for made for educational purposes only.

  • Material copyright of © Refactoring.Guru. All Rights Reserved.

  • Art copyright of © Dmitry Zhart. All Rights Reserved.


Let's Connect!

Twitter badge Linkedin badge Medium badge Instagram badge Gmail badge Portfolio badge Github badge

Back to Top

design-patterns-101's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.