- Model View Controller pattern
- Improved application organisation through a seperation of concerns
- Explicit seperation from application logic from the user interface
- Easier maintenance because the structure determines where changes have to be made
- Decoupling data storage and visualization that enables a better unit testing
- Avoid duplication of low level model and controllers
- In JavaScript enforced by frameworks like Backbone, Ember.js or JavaScriptMVC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hashTable = function () { | |
// Task: Hashtable for every filetype | |
var hashCode = function (value) { | |
var hash = 0, i, chr, len; | |
value = value.toString(); | |
if (value.length === 0) { | |
return hash; | |
} |
Nutzung des docker repos
docker pull myuser/myapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source: http://tosbourn.com/using-git-to-create-an-archive-of-changed-files/ | |
git archive -o update.zip HEAD $(git diff --name-only HEAD^) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
project=${PWD##*/} | |
git clone https://github.com/alexander-heimbuch/webdev-boilerplate.git . | |
rm -rf .git && \ | |
sed -i '' "s/project-name/$project/g" package.json && \ | |
npm i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Convert Array like Object to Array | |
* Source: http://xahlee.info/js/js_convert_array-like.html | |
*/ | |
Object.prototype.toArray = function () { | |
return Array.prototype.slice.call(this); | |
} | |
// {0:"a", 1:"b",2:"c", length:3}.toArray() => ['a', 'b', 'c'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check if is Array | |
*/ | |
Object.prototype.isArray = function () { | |
if(Object.prototype.toString.call(this) === '[object Array]') { | |
return true; | |
} | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Minimal jQuery replacement | |
*/ | |
(function () { | |
'use strict'; | |
var find = function (element) { | |
return function (query) { | |
var results = element.querySelectorAll(query), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
unzip -qq instantclient-sqlplus-macos.x64-11.2.0.4.0.zip | |
unzip -qq instantclient-basic-macos.x64-11.2.0.4.0.zip | |
cd instantclient_11_2 | |
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/bin | |
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/lib | |
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/jdbc/lib | |
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/rdbms/jlib | |
mkdir -p /Applications/oracle/product/instantclient_64/11.2.0.4.0/sqlplus/admin |
OlderNewer