Git Product home page Git Product logo

_motif-js_0.1's Issues

notes #2 (on the publication [1])

1 Introduction

The most common form of a design pattern is a descriptive one such as a pattern catalogue entry or a Web page. This form preserves the instructional nature of patterns, as a cache of known solutions to recurring design problems. Design patterns provide a common design lexicon, and communicate both the structure of a design and the reasoning behind it [2].

  • First aspect is description (structure and reasoning)
  • Aim of a pattern : solve recurring design problems
  • One aspect brought by a pattern is the lexicon

The design pattern documentation usually contains a description of the pattern that consists of eleven parts : intent, motivation, applicability, structure, participants, collaborations, consequences, implementation, sample code, known uses and related patterns [10].

  • Future parameters (11) ?
  • Relation to previous definition : structure and reasoning ?

During the implementation process, the adapted design pattern is a specification. Experienced programmers can quickly transform the specification into code.

  • Description -> specification -> code ?

[Generative design patterns that generate code] reduce implementation time, are less prone to programmer error, promote rapid prototyping and code reuse, support performance tuning, and provide better overall software engineering benefits.

  • Second aspect is generation
  • List of other advantages and aims for patterns (5+)
  • Generates not only code, but documentation, status reports, interfaces to interact with (configuration, instantiation, custom menus/UI/UX)

1.1 Generative design pattern problems

A static framework cannot meet these conflicting requirements unless the traversal code is not included in the framework. This defeats the purpose of generating the
code from the design pattern
.

  • "traversal code is not included ...", making it a pure function
  • instance = motif._processors[processorId](instance, params)
  • Mitigating pattern's aim : generate code (100 ... * %, complete or parts) ?

In this case the names and signatures could be weaved with a generic framework to produce the final framework code.

  • motif framework > custom framework (on-the-fly ?)

Consider code generation after adaptation, which can generate simple efficient code. Unfortunately, during adaptation, the pattern quickly gathers application-specific characteristics.

  • Minimalist top-level specifications and application-specific composable traits ?
  • Idem for the processors, which should be composable too
  • Composable not inherited

1.2 Parameterized design patterns

Each design pattern must be analyzed to identify specific adaptation parameters.

Thoughts

Thought 1

HUMAN the first processor

When it comes to the reader's attention, patterns in their descriptive form are already generative : it (tries to) generates mental representation/thoughts association in the reader's mind.

I added the try mention because, as stated in [1] :

design patterns are written documents that are subject to human interpretation

notes #1

  1. a pattern (described by a motif instance/as described by the motif pattern*) is a (js) file
    * This is the ambivalence of the motif pattern.

  2. a pattern can be instantiated

  3. an instance can be :

    • A pattern can also be a function,
    • An object structure (class),
    • A folder, a file,
    • combination of these.
  4. a pattern's (a motif instance) instances occur on (where does it start in the host structure) and with (how is packaged the instance) a specific folder tree pattern

  5. a motif is packaged with (key-concepts ?) :

    • its descriptive baggage
    • INSTANCES : a model (SPECIFICATIONS) that describes its instances
    • (description & specifications are tested as being parts of motif instances)
    • GENERATOR(s) : for pattern instantiation (produce instances) (keep list of instances ?)
    • something to test instances
    • PROCESSORS : (consume instances)
    • something to test instances
  6. a processor can be : test, documentation, whatever ...

Refinement 1

Keys: pattern, motif, description, instance, specifications, test, generator, instantiation/creation/production, processor, documentation ...

A pattern describes what is common between its instances ?

  1. HUMAN : the first PROCESSOR ?

    • Primary questions :"- What does this pattern do ? How can I use it ? How can I create one ?"
    • Secondary : "->Where can I find it ? What are its instances ? What is its config ?"

    The HI! program > list all processors.

  2. FILES : address (path), content, on-demand modules

  3. Example : get motif's processors list

instance /** next step */ =
  motif._processors.list(
    instance /** previous step */,
    params
  )

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.