merge branch ahead
This commit is contained in:
@@ -1,159 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Belle Lab Tasks</h1>
|
||||
<h2>Applcation Structure</h2>
|
||||
<ul>
|
||||
<li>Work on dialogs, plenty to choose from</li>
|
||||
<li>A reuseable tree component for pickers</li>
|
||||
<li>migrate all the navigation stuff into a navigation service</li>
|
||||
<li>a scriptloading service to replace requireJs, with labJs, $script or similiar</li>
|
||||
<li>reusable modal component (show in left side, right side, generic closing events etc)</li>
|
||||
</ul>
|
||||
<h2>Components</h2>
|
||||
<ul>
|
||||
<li>tabs directive</li>
|
||||
<li>date picker</li>
|
||||
<li>tabs property editor</li>
|
||||
<li>localization strategy?<ul>
|
||||
<li>localize filter: {{This is my default english value,content.area.key | localize}}</li>
|
||||
<li>So, it will use the default value if there is none found for the key, and register this
|
||||
value in the localize service, keys should not contain commas</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Chores</h2>
|
||||
<ul>
|
||||
<li>Write a test</li>
|
||||
<li>Write docs</li>
|
||||
<li>Automate something<ul>
|
||||
<li>OSX:<ul>
|
||||
<li>start webserver</li>
|
||||
<li>start grunt watch</li>
|
||||
<li>improve test output?</li>
|
||||
<li>phantomJs?</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>windows<ul>
|
||||
<li>start webserver</li>
|
||||
<li>start grunt</li>
|
||||
<li>install node stuff?</li>
|
||||
<li>register chrome_bin in path</li>
|
||||
<li>or register phantomJS?</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Belle Lab Tasks</h1>
|
||||
<h2>Applcation Structure</h2>
|
||||
<ul>
|
||||
<li>Work on dialogs, plenty to choose from</li>
|
||||
<li>A reuseable tree component for pickers</li>
|
||||
<li>migrate all the navigation stuff into a navigation service</li>
|
||||
<li>a scriptloading service to replace requireJs, with labJs, $script or similiar</li>
|
||||
<li>reusable modal component (show in left side, right side, generic closing events etc)</li>
|
||||
</ul>
|
||||
<h2>Components</h2>
|
||||
<ul>
|
||||
<li>tabs directive</li>
|
||||
<li>date picker</li>
|
||||
<li>tabs property editor</li>
|
||||
<li>localization strategy?<ul>
|
||||
<li>localize filter: {{This is my default english value,content.area.key | localize}}</li>
|
||||
<li>So, it will use the default value if there is none found for the key, and register this
|
||||
value in the localize service, keys should not contain commas</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Chores</h2>
|
||||
<ul>
|
||||
<li>Write a test</li>
|
||||
<li>Write docs</li>
|
||||
<li>Automate something<ul>
|
||||
<li>OSX:<ul>
|
||||
<li>start webserver</li>
|
||||
<li>start grunt watch</li>
|
||||
<li>improve test output?</li>
|
||||
<li>phantomJs?</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>windows<ul>
|
||||
<li>start webserver</li>
|
||||
<li>start grunt</li>
|
||||
<li>install node stuff?</li>
|
||||
<li>register chrome_bin in path</li>
|
||||
<li>or register phantomJS?</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,198 +1,198 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Codereview with Peter Bacon Darwin</h1>
|
||||
<h2>Office at cogworks:</h2>
|
||||
<p>71-75 Shelton Street
|
||||
London
|
||||
WC2H 9JQ</p>
|
||||
<p>Meeting room 11 - 17</p>
|
||||
<h2>Issues to go through:</h2>
|
||||
<h3>Structure, dependencies and external libraries</h3>
|
||||
<ul>
|
||||
<li>review of modules structure and suggestions on how to handle loading things when needed.</li>
|
||||
<li><p>replace requireJs for dependency loading, so we dont have to load tinyMCE, googlemaps, etc
|
||||
on app start $script, yepNope, labjs?</p>
|
||||
</li>
|
||||
<li><p>get the app to load .aspx pages in an iframe instead of a "normal" view</p>
|
||||
<ul>
|
||||
<li>write directive for loading templates to replace ng-include</li>
|
||||
<li>if .aspx, load in iframe, </li>
|
||||
<li>if not found try default, finally load error msg </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Javascript as resources from dlls? - add a scriptService to load these? - yes
|
||||
merge those resources into the umbraco.app.js file </li>
|
||||
</ul>
|
||||
<p><a href="http://briantford.com/blog/huuuuuge-angular-apps.html">http://briantford.com/blog/huuuuuge-angular-apps.html</a></p>
|
||||
<h3>Refactoring</h3>
|
||||
<ul>
|
||||
<li><p>Convert tree into directive, recursive, lazy-load</p>
|
||||
<ul>
|
||||
<li>$watchCollection $watch on the entire tree model</li>
|
||||
<li>reuse the old tree plugin to inject into dom instead of into angular</li>
|
||||
<li>10 levels of digest limit</li>
|
||||
<li>fine for CG, bad for release</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>best practices for directives, what should we convert?</p>
|
||||
</li>
|
||||
<li>other areas to convert?<ul>
|
||||
<li>for guidelines, look at angular/bootstrap-ui</li>
|
||||
<li>replace our components with ng-bootstrap or angular-strap</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Application logic</h3>
|
||||
<ul>
|
||||
<li>Authentication, force login, authenticate user against acccess to sections?</li>
|
||||
<li>whats the best way to handle urls, routes and state management,
|
||||
so the tree, sections etc, syncs with urls and the state of the application</li>
|
||||
<li>tinyMCE directive angular-ui </li>
|
||||
<li>How to handle file-uploads<ul>
|
||||
<li>through a service?</li>
|
||||
<li>ng-upload? or jquery-upload-plugin thingy?</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>validation, ng-form $valid and directives should be enough<ul>
|
||||
<li>add remote directive: angular-app/admin/users/user-edit.js for directive code</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Dev experience</h3>
|
||||
<ul>
|
||||
<li><p>H Way to handle templates with missing controller? -> replace ng-include? <- yup
|
||||
angular-app/samples/directives/fielddirective for code</p>
|
||||
<ul>
|
||||
<li>H generel exception handling with feedback to log or notifications service</li>
|
||||
<li>L jslint code on the server?<br> <a href="http://madskristensen.net/post/Verify-JavaScript-syntax-using-C.aspx">http://madskristensen.net/post/Verify-JavaScript-syntax-using-C.aspx</a></li>
|
||||
<li>L automated setup of node, grunt, jasmine and karma, powershell and .sh? </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Testing</h3>
|
||||
<ul>
|
||||
<li>Best way to test against service data, simply mock data in memory, or better way?</li>
|
||||
<li>Testing dom manipulating components, like modals</li>
|
||||
<li>e2e testing</li>
|
||||
<li>teamcity intergration</li>
|
||||
<li>testing templates</li>
|
||||
</ul>
|
||||
<h1>Notes</h1>
|
||||
<ul>
|
||||
<li>Javascript as resources? - add a scriptService to load these? nope, they will compile into umbraco.app.js</li>
|
||||
<li>capture errors with javascript code, to not load it into the combined files
|
||||
(serverside jsLint) - mads blogpost for compiling js</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Codereview with Peter Bacon Darwin</h1>
|
||||
<h2>Office at cogworks:</h2>
|
||||
<p>71-75 Shelton Street
|
||||
London
|
||||
WC2H 9JQ</p>
|
||||
<p>Meeting room 11 - 17</p>
|
||||
<h2>Issues to go through:</h2>
|
||||
<h3>Structure, dependencies and external libraries</h3>
|
||||
<ul>
|
||||
<li>review of modules structure and suggestions on how to handle loading things when needed.</li>
|
||||
<li><p>replace requireJs for dependency loading, so we dont have to load tinyMCE, googlemaps, etc
|
||||
on app start $script, yepNope, labjs?</p>
|
||||
</li>
|
||||
<li><p>get the app to load .aspx pages in an iframe instead of a "normal" view</p>
|
||||
<ul>
|
||||
<li>write directive for loading templates to replace ng-include</li>
|
||||
<li>if .aspx, load in iframe, </li>
|
||||
<li>if not found try default, finally load error msg </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Javascript as resources from dlls? - add a scriptService to load these? - yes
|
||||
merge those resources into the umbraco.app.js file </li>
|
||||
</ul>
|
||||
<p><a href="http://briantford.com/blog/huuuuuge-angular-apps.html">http://briantford.com/blog/huuuuuge-angular-apps.html</a></p>
|
||||
<h3>Refactoring</h3>
|
||||
<ul>
|
||||
<li><p>Convert tree into directive, recursive, lazy-load</p>
|
||||
<ul>
|
||||
<li>$watchCollection $watch on the entire tree model</li>
|
||||
<li>reuse the old tree plugin to inject into dom instead of into angular</li>
|
||||
<li>10 levels of digest limit</li>
|
||||
<li>fine for CG, bad for release</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><p>best practices for directives, what should we convert?</p>
|
||||
</li>
|
||||
<li>other areas to convert?<ul>
|
||||
<li>for guidelines, look at angular/bootstrap-ui</li>
|
||||
<li>replace our components with ng-bootstrap or angular-strap</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Application logic</h3>
|
||||
<ul>
|
||||
<li>Authentication, force login, authenticate user against acccess to sections?</li>
|
||||
<li>whats the best way to handle urls, routes and state management,
|
||||
so the tree, sections etc, syncs with urls and the state of the application</li>
|
||||
<li>tinyMCE directive angular-ui </li>
|
||||
<li>How to handle file-uploads<ul>
|
||||
<li>through a service?</li>
|
||||
<li>ng-upload? or jquery-upload-plugin thingy?</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>validation, ng-form $valid and directives should be enough<ul>
|
||||
<li>add remote directive: angular-app/admin/users/user-edit.js for directive code</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Dev experience</h3>
|
||||
<ul>
|
||||
<li><p>H Way to handle templates with missing controller? -> replace ng-include? <- yup
|
||||
angular-app/samples/directives/fielddirective for code</p>
|
||||
<ul>
|
||||
<li>H generel exception handling with feedback to log or notifications service</li>
|
||||
<li>L jslint code on the server?<br> <a href="http://madskristensen.net/post/Verify-JavaScript-syntax-using-C.aspx">http://madskristensen.net/post/Verify-JavaScript-syntax-using-C.aspx</a></li>
|
||||
<li>L automated setup of node, grunt, jasmine and karma, powershell and .sh? </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Testing</h3>
|
||||
<ul>
|
||||
<li>Best way to test against service data, simply mock data in memory, or better way?</li>
|
||||
<li>Testing dom manipulating components, like modals</li>
|
||||
<li>e2e testing</li>
|
||||
<li>teamcity intergration</li>
|
||||
<li>testing templates</li>
|
||||
</ul>
|
||||
<h1>Notes</h1>
|
||||
<ul>
|
||||
<li>Javascript as resources? - add a scriptService to load these? nope, they will compile into umbraco.app.js</li>
|
||||
<li>capture errors with javascript code, to not load it into the combined files
|
||||
(serverside jsLint) - mads blogpost for compiling js</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,147 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Getting up and running with Belle</h1>
|
||||
<p><em>The super fast introduction to getting belle running on your local machine, both as a pre-built environment, and with the full setup with unit-tests, grunt-tasks and node.</em></p>
|
||||
<h2>Running the prebuilt site</h2>
|
||||
<h3>Windows</h3>
|
||||
<p>Right-click the <code>/build</code> folder and choose "open in webmatrix", run the website in webmatrix and browse to <code>localhost:9999/Belle/</code>, this should display the Belle login screen</p>
|
||||
<p><em>Port 9999 should be used because that is the target site that the grunt build command mentioned below will launch</em></p>
|
||||
<h3>OSX</h3>
|
||||
<p>Open a terminal inside the "/build" folder and run the command:</p>
|
||||
<pre><code>python -m SimpleHTTPServer 9999</code></pre>
|
||||
<p>This will start a local webserver, hosting the site on <code>localhost:9999</code> browse to localhost:9999/Belle/ which should display the belle login screen.</p>
|
||||
<h2>Uing the dev environment</h2>
|
||||
<p><em>The dev environment is tad more tricky to get running, since it depends on a number of unit tests and automated tools, to produce the contents of the /build folder</em></p>
|
||||
<p><em>The dev environment is cross platform, so will work on both osx and windows, and do not currently have any dependencies to .net</em></p>
|
||||
<h3>Install node.js</h3>
|
||||
<p>We need node to run tests and automated less compiling and other automated tasks. go to <a href="http://nodejs.org">http://nodejs.org</a>. Node.js is a powerfull javascript engine, which allows us to run all our tests and tasks written in javascript locally.</p>
|
||||
<p><em>note:</em> On windows you might need to restart explorer.exe to register node.</p>
|
||||
<h3>Install dependencies</h3>
|
||||
<p>Next we need to install all the required packages. This is done with the package tool, included with node.js, open /Umbraco.Belle.Client in cmd.exe or osx terminal and run the command:</p>
|
||||
<pre><code>npm install</code></pre>
|
||||
<p>this will fetch all needed packages to your local machine.</p>
|
||||
<h3>Install grunt globally</h3>
|
||||
<p>Grunt is a task runner for node.js, and we use it for all automated tasks in the build process. For convenience we need to install it globally on your machine, so it can be used directly in cmd.exe or the terminal.</p>
|
||||
<p>So run the command:</p>
|
||||
<pre><code>npm install grunt-cli -g</code></pre>
|
||||
<p><em>note:</em> On windows you might need to restart explorer.exe to register the grunt cmd.</p>
|
||||
<p><em>note:</em> On OSX you might need to run:</p>
|
||||
<pre><code>sudo npm install grunt-cli -g</code></pre>
|
||||
<p>Now that you have node and grunt installed, you can open <code>/Umbraco.Belle.Client</code> in either <code>cmd.exe</code> or terminal and run: </p>
|
||||
<pre><code>grunt dev</code></pre>
|
||||
<p>This will build the site, merge less files, run tests and create the /Build folder, launch the web browser and monitor changes.</p>
|
||||
<h3>Automated builds and tests</h3>
|
||||
<p>grunt dev will continue to run in the background monitoring changes to files. When changes are detected it will rebuild the JS and also run the unit tests.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Getting up and running with Belle</h1>
|
||||
<p><em>The super fast introduction to getting belle running on your local machine, both as a pre-built environment, and with the full setup with unit-tests, grunt-tasks and node.</em></p>
|
||||
<h2>Running the prebuilt site</h2>
|
||||
<h3>Windows</h3>
|
||||
<p>Right-click the <code>/build</code> folder and choose "open in webmatrix", run the website in webmatrix and browse to <code>localhost:9999/Belle/</code>, this should display the Belle login screen</p>
|
||||
<p><em>Port 9999 should be used because that is the target site that the grunt build command mentioned below will launch</em></p>
|
||||
<h3>OSX</h3>
|
||||
<p>Open a terminal inside the "/build" folder and run the command:</p>
|
||||
<pre><code>python -m SimpleHTTPServer 9999</code></pre>
|
||||
<p>This will start a local webserver, hosting the site on <code>localhost:9999</code> browse to localhost:9999/Belle/ which should display the belle login screen.</p>
|
||||
<h2>Uing the dev environment</h2>
|
||||
<p><em>The dev environment is tad more tricky to get running, since it depends on a number of unit tests and automated tools, to produce the contents of the /build folder</em></p>
|
||||
<p><em>The dev environment is cross platform, so will work on both osx and windows, and do not currently have any dependencies to .net</em></p>
|
||||
<h3>Install node.js</h3>
|
||||
<p>We need node to run tests and automated less compiling and other automated tasks. go to <a href="http://nodejs.org">http://nodejs.org</a>. Node.js is a powerfull javascript engine, which allows us to run all our tests and tasks written in javascript locally.</p>
|
||||
<p><em>note:</em> On windows you might need to restart explorer.exe to register node.</p>
|
||||
<h3>Install dependencies</h3>
|
||||
<p>Next we need to install all the required packages. This is done with the package tool, included with node.js, open /Umbraco.Belle.Client in cmd.exe or osx terminal and run the command:</p>
|
||||
<pre><code>npm install</code></pre>
|
||||
<p>this will fetch all needed packages to your local machine.</p>
|
||||
<h3>Install grunt globally</h3>
|
||||
<p>Grunt is a task runner for node.js, and we use it for all automated tasks in the build process. For convenience we need to install it globally on your machine, so it can be used directly in cmd.exe or the terminal.</p>
|
||||
<p>So run the command:</p>
|
||||
<pre><code>npm install grunt-cli -g</code></pre>
|
||||
<p><em>note:</em> On windows you might need to restart explorer.exe to register the grunt cmd.</p>
|
||||
<p><em>note:</em> On OSX you might need to run:</p>
|
||||
<pre><code>sudo npm install grunt-cli -g</code></pre>
|
||||
<p>Now that you have node and grunt installed, you can open <code>/Umbraco.Belle.Client</code> in either <code>cmd.exe</code> or terminal and run: </p>
|
||||
<pre><code>grunt dev</code></pre>
|
||||
<p>This will build the site, merge less files, run tests and create the /Build folder, launch the web browser and monitor changes.</p>
|
||||
<h3>Automated builds and tests</h3>
|
||||
<p>grunt dev will continue to run in the background monitoring changes to files. When changes are detected it will rebuild the JS and also run the unit tests.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,176 +1,176 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Things to do</h1>
|
||||
<h2>Structure</h2>
|
||||
<ul>
|
||||
<li>One module pr file idea, instead of registering everything on app.js</li>
|
||||
<li><p>Have core services, resources and other common items under umbraco</p>
|
||||
</li>
|
||||
<li><p>third party modules outside of the root umbraco module, but registered in app.js</p>
|
||||
</li>
|
||||
<li><p>to access 3rd party service:
|
||||
ecomEditor.controller.js
|
||||
angular.module("umbraco.myeditor", ["ecommerce.services"]).controller("ecom.editor", </p>
|
||||
<pre><code> function("inventoryFactory"){
|
||||
do things...
|
||||
});</code></pre>
|
||||
</li>
|
||||
<li><p>best way to setup services and controllers are:
|
||||
.controller("name",[
|
||||
"service",
|
||||
"dependency",
|
||||
function(s, d){</p>
|
||||
<p> }
|
||||
]);</p>
|
||||
</li>
|
||||
<li><p>move logic from controllers to services, especcially around navigation</p>
|
||||
<ul>
|
||||
<li>easier for testing</li>
|
||||
<li>only keep view interactions, everything into a service</li>
|
||||
<li>looser testing on controllers</li>
|
||||
<li>for testing the dialogs, look in angular source or angular bootstrap projects</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Routing</h2>
|
||||
<p>Change /section/page/id to /section/area/page/id to support all section scenarios
|
||||
Have a fallback to defaults?</p>
|
||||
<h2>Legacy</h2>
|
||||
<ul>
|
||||
<li>for UmbClientTools we can access the services in angular from
|
||||
angular.element("body").injector().get("notifications");</li>
|
||||
<li>rootscope available in same location</li>
|
||||
<li>the bootstrap method returns the injector</li>
|
||||
</ul>
|
||||
<h2>ScriptLoaderService</h2>
|
||||
<pre><code>- Service to load required scripts for a controller using $script
|
||||
- remove requirejs dependency as it makes things muddy</code></pre>
|
||||
<h2>Authentication</h2>
|
||||
<p>Angular-app: common/security/interceptor.js , intercept http requests</p>
|
||||
<h2>Promises</h2>
|
||||
<pre><code>Use promises pattern for all our services
|
||||
$http.get(url)
|
||||
.then(function(response){
|
||||
return response.data;
|
||||
}, function(response){
|
||||
return $q.reject("http failed");
|
||||
}).then(function(data){
|
||||
alert("our data:" + data);
|
||||
})</code></pre>
|
||||
<h2>Think about rest services and authentication</h2>
|
||||
<p>Usecase: member picker editor, which fetches member-data</p>
|
||||
<h2>Avoid $resource and instead use $http</h2>
|
||||
<p>Sublime linter</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>doc</title>
|
||||
<style>
|
||||
/*github.com style (c) Vasily Polovnyov <vast@whiteants.net>*/
|
||||
pre code {
|
||||
display: block; padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8ff
|
||||
}
|
||||
pre .comment,
|
||||
pre .template_comment,
|
||||
pre .diff .header,
|
||||
pre .javadoc {
|
||||
color: #998;
|
||||
font-style: italic
|
||||
}
|
||||
pre .keyword,
|
||||
pre .css .rule .keyword,
|
||||
pre .winutils,
|
||||
pre .javascript .title,
|
||||
pre .nginx .title,
|
||||
pre .subst,
|
||||
pre .request,
|
||||
pre .status {
|
||||
color: #333;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .number,
|
||||
pre .hexcolor,
|
||||
pre .ruby .constant {
|
||||
color: #099;
|
||||
}
|
||||
pre .string,
|
||||
pre .tag .value,
|
||||
pre .phpdoc,
|
||||
pre .tex .formula {
|
||||
color: #d14
|
||||
}
|
||||
pre .title,
|
||||
pre .id {
|
||||
color: #900;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .javascript .title,
|
||||
pre .lisp .title,
|
||||
pre .clojure .title,
|
||||
pre .subst {
|
||||
font-weight: normal
|
||||
}
|
||||
pre .class .title,
|
||||
pre .haskell .type,
|
||||
pre .vhdl .literal,
|
||||
pre .tex .command {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .tag,
|
||||
pre .tag .title,
|
||||
pre .rules .property,
|
||||
pre .django .tag .keyword {
|
||||
color: #000080;
|
||||
font-weight: normal
|
||||
}
|
||||
pre .attribute,
|
||||
pre .variable,
|
||||
pre .lisp .body {
|
||||
color: #008080
|
||||
}
|
||||
pre .regexp {
|
||||
color: #009926
|
||||
}
|
||||
pre .class {
|
||||
color: #458;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .symbol,
|
||||
pre .ruby .symbol .string,
|
||||
pre .lisp .keyword,
|
||||
pre .tex .special,
|
||||
pre .prompt {
|
||||
color: #990073
|
||||
}
|
||||
pre .built_in,
|
||||
pre .lisp .title,
|
||||
pre .clojure .built_in {
|
||||
color: #0086b3
|
||||
}
|
||||
pre .preprocessor,
|
||||
pre .pi,
|
||||
pre .doctype,
|
||||
pre .shebang,
|
||||
pre .cdata {
|
||||
color: #999;
|
||||
font-weight: bold
|
||||
}
|
||||
pre .deletion {
|
||||
background: #fdd
|
||||
}
|
||||
pre .addition {
|
||||
background: #dfd
|
||||
}
|
||||
pre .diff .change {
|
||||
background: #0086b3
|
||||
}
|
||||
pre .chunk {
|
||||
color: #aaa
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Things to do</h1>
|
||||
<h2>Structure</h2>
|
||||
<ul>
|
||||
<li>One module pr file idea, instead of registering everything on app.js</li>
|
||||
<li><p>Have core services, resources and other common items under umbraco</p>
|
||||
</li>
|
||||
<li><p>third party modules outside of the root umbraco module, but registered in app.js</p>
|
||||
</li>
|
||||
<li><p>to access 3rd party service:
|
||||
ecomEditor.controller.js
|
||||
angular.module("umbraco.myeditor", ["ecommerce.services"]).controller("ecom.editor", </p>
|
||||
<pre><code> function("inventoryFactory"){
|
||||
do things...
|
||||
});</code></pre>
|
||||
</li>
|
||||
<li><p>best way to setup services and controllers are:
|
||||
.controller("name",[
|
||||
"service",
|
||||
"dependency",
|
||||
function(s, d){</p>
|
||||
<p> }
|
||||
]);</p>
|
||||
</li>
|
||||
<li><p>move logic from controllers to services, especcially around navigation</p>
|
||||
<ul>
|
||||
<li>easier for testing</li>
|
||||
<li>only keep view interactions, everything into a service</li>
|
||||
<li>looser testing on controllers</li>
|
||||
<li>for testing the dialogs, look in angular source or angular bootstrap projects</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Routing</h2>
|
||||
<p>Change /section/page/id to /section/area/page/id to support all section scenarios
|
||||
Have a fallback to defaults?</p>
|
||||
<h2>Legacy</h2>
|
||||
<ul>
|
||||
<li>for UmbClientTools we can access the services in angular from
|
||||
angular.element("body").injector().get("notifications");</li>
|
||||
<li>rootscope available in same location</li>
|
||||
<li>the bootstrap method returns the injector</li>
|
||||
</ul>
|
||||
<h2>ScriptLoaderService</h2>
|
||||
<pre><code>- Service to load required scripts for a controller using $script
|
||||
- remove requirejs dependency as it makes things muddy</code></pre>
|
||||
<h2>Authentication</h2>
|
||||
<p>Angular-app: common/security/interceptor.js , intercept http requests</p>
|
||||
<h2>Promises</h2>
|
||||
<pre><code>Use promises pattern for all our services
|
||||
$http.get(url)
|
||||
.then(function(response){
|
||||
return response.data;
|
||||
}, function(response){
|
||||
return $q.reject("http failed");
|
||||
}).then(function(data){
|
||||
alert("our data:" + data);
|
||||
})</code></pre>
|
||||
<h2>Think about rest services and authentication</h2>
|
||||
<p>Usecase: member picker editor, which fetches member-data</p>
|
||||
<h2>Avoid $resource and instead use $http</h2>
|
||||
<p>Sublime linter</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user