"The core of the I Ching is a Western Zhou divination text called the Changes of Zhou (周易 Zhōu yì).[3] Various modern scholars suggest dates ranging between the 10th and 4th centuries BC for the assembly of the text in approximately its current form."
"The I Ching, also known as the Classic of Changes or Book of Changes in English, is an ancient divination text and the oldest of the Chinese classics. Possessing a history of more than two and a half millennia of commentary and interpretation, the I Ching is an influential text read throughout the world, providing inspiration to the worlds of religion, psychoanalysis, business, literature, and art."
The name, referring to I-Ching is just a joke. The material to this repo came when I was preparing for one of my latest presentations (Client-side Development in 2016). One of the presentation's goals is to compare 3 main things that concerns us (Web Developers) today: Programming Paradigms or Concepts; APIs formats and Frameworks.
Little by little, I started drawing some comparison tables, which now you can see here.
After getting those tables in place for my presentation, a friend (thank you!) -- Thiago Sciotta -- suggested that I created a github repo for it, where the user would be able to answer some questions and get the results. My first thought was that it is a very delicate topic to create such a thing so I want to go ahead and say this -> Disclaimer: All of the data colleted here and the way it is disposed reflects only my own and not important opinion, which I don't state as truth.
Having said that, I really think that if more people join and contribute to the comparison tables we might get somewhere just a tiny bit useful, that is why I want to tell you how to collaborate. Everything in this application is flexible: bases of comparison, what is going to be compared and comparisons themselves.
- Fork this repo
- Clone
npm i
node server.js
- Open localhost:3000
The main thing you need to know is that:
- Given bases of comparison
- Objects of comparison
- And relationship between such objects and bases of comparison
- The application will process the results for you
Example:
- Base of comparison: Time (short or long)
- Objects of comparison: Concepts (Imperative or Functional)
- Relationship between them: Short-Imperative; Long-Functional
The thing is, we can have as many bases of comparison as we want (time, challenges, premises, and so forth). The result will always be a cross intersection between all the relationships made. Check the tables once again.
I will improve this documentation with time, but for now this is the most important:
- Choose an identifier (eg. apis)
- Open the db/objects folder
- Create a file with the identifier name, and js extension, that looks like this:
'use strict'
module.exports = [
"RPC",
"REST",
"GRAPH"
]
- Go to the db/objects/objects.js file
- Add your object of comparison to the comparison array, that now looks like this:
comparisons = ['concepts', 'apis', 'frameworks']
- That is it! Your just added something to be compared
- Choose and identifier (eg. time)
- Open the db/objects folder
- Create a file with the identifier name, and js extension, that looks like this:
'use strict'
module.exports = [
"Short term",
"Long term"
]
- Go to the db/objects/objects.js file
- Add your base of comparison to the bases array, that now looks like this:
const bases = ['premises', 'challenges', 'time']
- Add your base question (which will appear to the user) into the basesQuestion array, that now looks like this:
const bases = ['premises', 'challenges', 'time'],
basesQuestions = [
"Which of the following questions corresponds to your team's biggest concerns?",
"What are your project's biggest challenges?",
"What is the timespan of your project (development time + online time)?"
]
- Note that the question Index must be the same as the base Index!
- Add the type of input the user will have to choose (checkbox or radio):
const bases = ['premises', 'challenges', 'time'],
basesQuestions = [
"Which of the following questions corresponds to your team's biggest concerns?",
"What are your project's biggest challenges?",
"What is the timespan of your project (development time + online time)?"
],
basesInputTypes = ['checkbox', 'checkbox', 'radio'],
- That is it! You just added your base of comparison
The previous steps were too easy, now let's get some work! To actually compare:
- Open the db/comparisons/ folder
- Create a file that follows the "#{identifier}Comparison" pattern, where the identifier is of the object of comparison (eg. apisComparison, frameworksComparison)
- The empty template of such file is:
'use strict'
const setComparisonBase = require('../operations/setComparisonBase'),
setRelationship = require('../operations/setRelationship'),
comparisonBase = setComparisonBase()
// Here is where you will compare
module.exports = comparisonBase
- Comparing is actually setting a relationship between what you want to compare, to any base of comparison
- Example:
setRelationship([['premises', 0], ['apis', 0]], comparisonBase)
- What I'm saying here is that the API with id 0, is good to the premise with id 0
// db/objects/apis.js
[
"RPC", // API with id 0
"REST",
"GRAPH"
]
// db/objects/premises.js
[
"Not necessary to learn something too complex", // Premise with id 0
"Modular and reusable parts",
"Without too much need of refactoring",
"Good user experience (fast, transitions, feedback, easy to use)"
]
- That is it! Check a full example
Create a pull request from your fork, it will be merged and deployed!
This section will grow with time. Basically speaking, and intersection of all the relationships is made based on the user selection.
The MIT License (MIT)
Copyright (c) 2016 Caio Vaccaro
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.