Git Product home page Git Product logo

unity-design-patterns's People

Contributors

dmattson avatar hasanbayatme avatar naphier avatar thesupersoup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unity-design-patterns's Issues

Worth bearing in mind: "Design patterns as a sign of missing language features"

http://wiki.c2.com/?AreDesignPatternsMissingLanguageFeatures

C# is a fairly dynamic language - as far as static languages go... I just wanted to put it out there that some of the Gang of Four patterns might map directly on to language features.

I haven't looked through this repo yet and I'm far from being either a C# expert or a Design Pattern expert but I thought it might be an interesting idea to throw into the mix.

Project Discussion

@dmattson
Feel free to discuss anything over here. I had some other discussion threads, but they were old and those folks just made suggestions and didn't seem to want to contribute.
Thanks for joining in!

Interfaces

Maybe a dumb question, but why is Command an abstract class and not an interface?

Folder Structure/Each Patterns approach and design

Right,

The Issue I mentioned before is that I think the concepts you have at present outlines the patterns as you understand them now, not in a way that facilitates someone who doesn't have the level of knowledge you do.

people have a problem grasping design patterns because of:

  • Don't see the benefit
  • Don't get the logic/class interaction
  • Don't understand the language syntax
  • Understand it in the given example but not how/when to use it in their own projects

so in the interest of hitting all of those pain points the trick is to walk them through it.
so i propose a folder structure under each pattern as:

  • Command Pattern
  • What is it (only uses console write, no logic outside of pattern architecture)
    - Without Pattern
    • (pre pattern scripts and 1. PrePatternExample scene)
      - With Pattern
    • (post pattern scripts and 1. PostPatternExample scene)
  • Practical Example (actual more 'designed' code that does a thing, e.g character movement)
    - Starting Code
    • Without (moves the character around using standard code)
    • With (splits movement up into commands)
      - New Feature/Code Change (introduces a 'problem' a scaling issue, showing how the pattern makes the solution easier)
    • Without (changes or rewrites the code a large amount to facilitate feature)
    • With (adds a new command, changes it with one line)
      - Outcome (expanded examples with some exaggerated growth to show the 'without' code spagetti-ing)
    • Without
    • With

This stucture shows the equivalent of
'hello world' for each pattern,
shows the native unity alternative to make it easier to see that you are doing,
shows a functional feature sans-pattern to give them some grounding and a relatable setting,
'updates' the code to show what refactoring-to-patterns looks like.
then, as they are now no doubt asking themselves, 'great i now know HOW to apply it but not WHY',
you propose a problem and show how the pattern made it easier.

finally you give them a 'continue on from here' in both styles so they can follow along trying it both ways and getting a feel for why the pattern is an improvement.

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.