那么以后可能就是这样子。。。。
239 |├── .gitignore ├── CNAME ├── LICENSE ├── Makefile ├── README.md ├── assets └── article │ ├── chapter1 │ ├── chrome-timeline.jpg │ ├── idea-debug.png │ ├── launchy.png │ ├── learn.jpg │ ├── linux-learn-line.png │ ├── linux-server-console.jpg │ ├── nostyle.png │ ├── output-input.png │ ├── pm.png │ ├── popular.jpg │ ├── redfonts.png │ ├── render-html.png │ ├── server-dns-forward.jpg │ ├── windows-launch.png │ └── wrong.jpg │ ├── chapter2 │ ├── ajax_request.png │ ├── api-history.png │ ├── baas-diagram.png │ ├── chrome-ajax-poll.jpg │ ├── duplicate-business-logic-with-domain.png │ ├── duplicate-business-logic.png │ ├── jwt-process.jpeg │ ├── lucene-arch.jpg │ ├── mvc-mvvm-mvp.png │ ├── one-api.png │ └── service-mvc.png │ ├── chapter3 │ ├── after-add.png │ ├── before-add.png │ ├── build-web-project.png │ ├── coding.png │ ├── extract-method.png │ ├── gitflow.png │ ├── hello-world.png │ ├── inline.jpg │ ├── js.png │ ├── learn.jpg │ ├── mock-server.png │ ├── pm.png │ ├── popular.jpg │ ├── replace.jpg │ ├── tdd.jpg │ ├── test-pyramid.png │ └── wrong.jpg │ ├── chapter4 │ ├── aufs_layers.jpg │ ├── auto-deployment.png │ ├── basic-images.png │ ├── deployment-flow.png │ ├── docker-execdriver-diagram.png │ ├── docker-with-tomcat.png │ ├── feature-toggle.png │ ├── hierarchy-vs-graph.png │ ├── internal-vs-external.png │ ├── java-virtual-machine.jpg │ ├── jython-arch.jpg │ ├── lxc-vm.jpg │ ├── lxc-vs-docker.png │ ├── markdown.png │ ├── mysql-architecture.png │ ├── rpm-deploy.jpg │ ├── rpm-koji.jpg │ ├── tomcat-architecture.png │ ├── tomcat-servlet.jpg │ ├── virtual_machine.png │ ├── virtualenv.jpg │ └── what-is-vm-diagram.png │ ├── chapter5 │ ├── ga-app.jpg │ ├── growth-ga.png │ ├── ie-alert.jpg │ ├── layer.jpg │ ├── lean-analytics.png │ ├── lean.jpg │ ├── learn-design.png │ ├── main-traffic.png │ ├── mvp.png │ ├── my-website-seo.jpg │ ├── phodal-traffic.png │ ├── popup.jpg │ ├── run-usage.jpg │ ├── search-engine-arch.jpg │ ├── search-phodal.jpg │ ├── ux-design.jpg │ ├── ux-elements.png │ ├── ux-field.jpg │ └── ux_design.jpg │ ├── chapter6 │ ├── cd-process.jpg │ ├── cd-workflow.png │ ├── ci.jpg │ ├── continuous-delivery-continuous-deployment.jpg │ └── continuous-delivery.jpg │ ├── chapter8 │ ├── basic-paf.png │ ├── blog-basic.png │ ├── blog-with-fe-be.png │ ├── blog-with-frontend.png │ ├── cache-website-blog.png │ ├── combinedlist.png │ ├── cqrs-2.png │ ├── cqrs-arch.png │ ├── cqrs-separate-storage.png │ ├── cqrs-vs-mvc.jpg │ ├── ddd-cqrs-eb.jpg │ ├── decentralised-data.png │ ├── dispatcher-services.png │ ├── django-mtv.png │ ├── django_app_arch.jpg │ ├── edit-pub.jpg │ ├── emacs-architecture.png │ ├── emergent-design.jpg │ ├── git-internals-commits.png │ ├── happy-retro.jpg │ ├── hexo-workflow.png │ ├── nginx-microservices.png │ ├── output-input.png │ ├── playarchtectureasyncrequest.png │ ├── retro-feature.jpg │ ├── spring-mvc.png │ └── travis-edit-publish-code.png │ ├── compressimages.py │ └── prelude │ ├── alipay.png │ ├── bucket.jpg │ ├── caf_mvc_arch.png │ ├── cgi-arch.gif │ ├── cgi-script.png │ ├── develop-history.png │ ├── expert-vs-fullstack.png │ ├── growth-hacking.jpg │ ├── in-out-thinking.jpeg │ ├── old-se.jpg │ ├── oneui-serviceful-arch.png │ ├── scrum-communication.png │ ├── scrum-issues.png │ ├── scrum.png │ ├── tech-org.png │ ├── waterfall-process.png │ ├── wechat-pay.png │ ├── wechat.jpg │ └── xiaomiquan.jpg ├── build ├── author.html ├── head.html ├── metadata.xml ├── share.html ├── stats.html └── title.txt ├── chapters ├── 0.0.0-prelude.md ├── 1.0.md ├── 1.1.0-setup.md ├── 1.1.0-tool.md ├── 1.1.1-env-osx.md ├── 1.1.2-env-windows.md ├── 1.1.3-env-linux.md ├── 1.2-learn-language.md ├── 1.3-web-basic.md ├── 1.4.0-html.md ├── 1.4.1-css.md ├── 1.4.2-js.md ├── 2.0.0-back-front.md ├── 2.1.0-backend-language.md ├── 2.1.2-mvc.md ├── 2.1.3-serviceful.md ├── 2.1.4-persistence.md ├── 2.2.0-choice-frontend.md ├── 2.2.2-communication.md ├── 3.0.0-coding.md ├── 3.0.1-builder.md ├── 3.0.2-git.md ├── 3.0.3-tasking.md ├── 3.0.4-typing.md ├── 3.0.5-knowledge.md ├── 3.1.0-how-to-test.md ├── 3.1.1-test-double.md ├── 3.1.2-tdd.md ├── 3.2.1-readable.md ├── 3.2.2-refactor.md ├── 3.2.3-intellij-refactor.md ├── 3.3.0-refactor-to-pattern.md ├── 4.0.0-golive.md ├── 4.1.0-runenv.md ├── 4.2.0-lnmp.md ├── 4.2.1-cache.md ├── 4.3.1-configurable.md ├── 4.4.0-auto-deploy.md ├── 5.0.0-data-analytics.md ├── 5.1.0-lean.md ├── 5.1.1-da.md ├── 5.1.2-ga.md ├── 5.2.0-performance.md ├── 5.3.0-seo.md ├── 5.4.0-first-ux.md ├── 5.4.1-learn-design.md ├── 6.0.0-cd.md ├── 6.1.1-ci.md ├── 6.2.1-cd.md ├── 6.3.0-cl.md ├── 7.0.0-legacy-system.md ├── 7.1.1-legacy-code.md ├── 7.1.2-change-code.md ├── 7.2.1-refactor2.md ├── 8.0.0-retro-rearch.md ├── 8.1.1-summary.md ├── 8.1.2-retro.md ├── 8.2.0-arch-pattern.md ├── 8.2.1-emergent-design.md ├── 8.3.0-architecture.md └── 8.3.1-seperate.md ├── cover.jpg ├── css └── vendor.css ├── epub.css ├── growth.md ├── img ├── favicon.ico └── growth.jpg ├── index.html ├── listings-setup.tex ├── marketing ├── alipay.png ├── apple.png ├── growth-paper.jpeg ├── wechat.png └── wp.jpg ├── style.css └── template └── template.tex /.gitignore: -------------------------------------------------------------------------------- 1 | growth.rtf 2 | growth.mobi 3 | growth.pdf 4 | growth.epub -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | growth.phodal.com -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include_dir=build 2 | source=chapters/*.md 3 | title='Growth' 4 | filename='growth' 5 | 6 | 7 | all: html epub rtf pdf mobi 8 | 9 | markdown: 10 | awk 'FNR==1{print ""}{print}' $(source) > $(filename).md 11 | 12 | html: markdown 13 | pandoc -s $(filename).md -t html5 -o index.html -c style.css \ 14 | --include-in-header $(include_dir)/head.html \ 15 | --include-before-body $(include_dir)/author.html \ 16 | --include-before-body $(include_dir)/share.html \ 17 | --include-after-body $(include_dir)/stats.html \ 18 | --title-prefix "Growth: 全栈增长工程师指南" \ 19 | --normalize \ 20 | --smart \ 21 | --toc 22 | 23 | epub: markdown 24 | pandoc -s $(filename).md --normalize --smart -t epub -o $(filename).epub \ 25 | --epub-metadata $(include_dir)/metadata.xml \ 26 | --epub-stylesheet epub.css \ 27 | --epub-cover-image img/growth.jpg \ 28 | --title-prefix $(title) \ 29 | --normalize \ 30 | --smart \ 31 | --toc 32 | 33 | rtf: markdown 34 | pandoc -s $(filename).md -o $(filename).rtf \ 35 | --title-prefix $(title) \ 36 | --normalize \ 37 | --smart 38 | 39 | pdf: markdown 40 | # OS X: http://www.tug.org/mactex/ 41 | # Then find its path: find /usr/ -name "pdflatex" 42 | # Then symlink it: ln -s /path/to/pdflatex /usr/local/bin 43 | pandoc -s $(filename).md -o $(filename).pdf \ 44 | --title-prefix $(title) \ 45 | --listings -H listings-setup.tex \ 46 | --template=template/template.tex \ 47 | --normalize \ 48 | --smart \ 49 | --toc \ 50 | --latex-engine=`which xelatex` 51 | 52 | mobi: epub 53 | # Symlink bin: ln -s /path/to/kindlegen /usr/local/bin 54 | kindlegen $(filename).epub -------------------------------------------------------------------------------- /assets/article/chapter1/chrome-timeline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/chrome-timeline.jpg -------------------------------------------------------------------------------- /assets/article/chapter1/idea-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/idea-debug.png -------------------------------------------------------------------------------- /assets/article/chapter1/launchy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/launchy.png -------------------------------------------------------------------------------- /assets/article/chapter1/learn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/learn.jpg -------------------------------------------------------------------------------- /assets/article/chapter1/linux-learn-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/linux-learn-line.png -------------------------------------------------------------------------------- /assets/article/chapter1/linux-server-console.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/linux-server-console.jpg -------------------------------------------------------------------------------- /assets/article/chapter1/nostyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/nostyle.png -------------------------------------------------------------------------------- /assets/article/chapter1/output-input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/output-input.png -------------------------------------------------------------------------------- /assets/article/chapter1/pm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/pm.png -------------------------------------------------------------------------------- /assets/article/chapter1/popular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/popular.jpg -------------------------------------------------------------------------------- /assets/article/chapter1/redfonts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/redfonts.png -------------------------------------------------------------------------------- /assets/article/chapter1/render-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/render-html.png -------------------------------------------------------------------------------- /assets/article/chapter1/server-dns-forward.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/server-dns-forward.jpg -------------------------------------------------------------------------------- /assets/article/chapter1/windows-launch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/windows-launch.png -------------------------------------------------------------------------------- /assets/article/chapter1/wrong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter1/wrong.jpg -------------------------------------------------------------------------------- /assets/article/chapter2/ajax_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/ajax_request.png -------------------------------------------------------------------------------- /assets/article/chapter2/api-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/api-history.png -------------------------------------------------------------------------------- /assets/article/chapter2/baas-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/baas-diagram.png -------------------------------------------------------------------------------- /assets/article/chapter2/chrome-ajax-poll.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/chrome-ajax-poll.jpg -------------------------------------------------------------------------------- /assets/article/chapter2/duplicate-business-logic-with-domain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/duplicate-business-logic-with-domain.png -------------------------------------------------------------------------------- /assets/article/chapter2/duplicate-business-logic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/duplicate-business-logic.png -------------------------------------------------------------------------------- /assets/article/chapter2/jwt-process.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/jwt-process.jpeg -------------------------------------------------------------------------------- /assets/article/chapter2/lucene-arch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/lucene-arch.jpg -------------------------------------------------------------------------------- /assets/article/chapter2/mvc-mvvm-mvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/mvc-mvvm-mvp.png -------------------------------------------------------------------------------- /assets/article/chapter2/one-api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/one-api.png -------------------------------------------------------------------------------- /assets/article/chapter2/service-mvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter2/service-mvc.png -------------------------------------------------------------------------------- /assets/article/chapter3/after-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/after-add.png -------------------------------------------------------------------------------- /assets/article/chapter3/before-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/before-add.png -------------------------------------------------------------------------------- /assets/article/chapter3/build-web-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/build-web-project.png -------------------------------------------------------------------------------- /assets/article/chapter3/coding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/coding.png -------------------------------------------------------------------------------- /assets/article/chapter3/extract-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/extract-method.png -------------------------------------------------------------------------------- /assets/article/chapter3/gitflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/gitflow.png -------------------------------------------------------------------------------- /assets/article/chapter3/hello-world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/hello-world.png -------------------------------------------------------------------------------- /assets/article/chapter3/inline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/inline.jpg -------------------------------------------------------------------------------- /assets/article/chapter3/js.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/js.png -------------------------------------------------------------------------------- /assets/article/chapter3/learn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/learn.jpg -------------------------------------------------------------------------------- /assets/article/chapter3/mock-server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/mock-server.png -------------------------------------------------------------------------------- /assets/article/chapter3/pm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/pm.png -------------------------------------------------------------------------------- /assets/article/chapter3/popular.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/popular.jpg -------------------------------------------------------------------------------- /assets/article/chapter3/replace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/replace.jpg -------------------------------------------------------------------------------- /assets/article/chapter3/tdd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/tdd.jpg -------------------------------------------------------------------------------- /assets/article/chapter3/test-pyramid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/test-pyramid.png -------------------------------------------------------------------------------- /assets/article/chapter3/wrong.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter3/wrong.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/aufs_layers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/aufs_layers.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/auto-deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/auto-deployment.png -------------------------------------------------------------------------------- /assets/article/chapter4/basic-images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/basic-images.png -------------------------------------------------------------------------------- /assets/article/chapter4/deployment-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/deployment-flow.png -------------------------------------------------------------------------------- /assets/article/chapter4/docker-execdriver-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/docker-execdriver-diagram.png -------------------------------------------------------------------------------- /assets/article/chapter4/docker-with-tomcat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/docker-with-tomcat.png -------------------------------------------------------------------------------- /assets/article/chapter4/feature-toggle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/feature-toggle.png -------------------------------------------------------------------------------- /assets/article/chapter4/hierarchy-vs-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/hierarchy-vs-graph.png -------------------------------------------------------------------------------- /assets/article/chapter4/internal-vs-external.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/internal-vs-external.png -------------------------------------------------------------------------------- /assets/article/chapter4/java-virtual-machine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/java-virtual-machine.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/jython-arch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/jython-arch.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/lxc-vm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/lxc-vm.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/lxc-vs-docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/lxc-vs-docker.png -------------------------------------------------------------------------------- /assets/article/chapter4/markdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/markdown.png -------------------------------------------------------------------------------- /assets/article/chapter4/mysql-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/mysql-architecture.png -------------------------------------------------------------------------------- /assets/article/chapter4/rpm-deploy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/rpm-deploy.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/rpm-koji.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/rpm-koji.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/tomcat-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/tomcat-architecture.png -------------------------------------------------------------------------------- /assets/article/chapter4/tomcat-servlet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/tomcat-servlet.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/virtual_machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/virtual_machine.png -------------------------------------------------------------------------------- /assets/article/chapter4/virtualenv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/virtualenv.jpg -------------------------------------------------------------------------------- /assets/article/chapter4/what-is-vm-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter4/what-is-vm-diagram.png -------------------------------------------------------------------------------- /assets/article/chapter5/ga-app.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ga-app.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/growth-ga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/growth-ga.png -------------------------------------------------------------------------------- /assets/article/chapter5/ie-alert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ie-alert.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/layer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/layer.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/lean-analytics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/lean-analytics.png -------------------------------------------------------------------------------- /assets/article/chapter5/lean.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/lean.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/learn-design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/learn-design.png -------------------------------------------------------------------------------- /assets/article/chapter5/main-traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/main-traffic.png -------------------------------------------------------------------------------- /assets/article/chapter5/mvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/mvp.png -------------------------------------------------------------------------------- /assets/article/chapter5/my-website-seo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/my-website-seo.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/phodal-traffic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/phodal-traffic.png -------------------------------------------------------------------------------- /assets/article/chapter5/popup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/popup.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/run-usage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/run-usage.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/search-engine-arch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/search-engine-arch.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/search-phodal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/search-phodal.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/ux-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ux-design.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/ux-elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ux-elements.png -------------------------------------------------------------------------------- /assets/article/chapter5/ux-field.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ux-field.jpg -------------------------------------------------------------------------------- /assets/article/chapter5/ux_design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter5/ux_design.jpg -------------------------------------------------------------------------------- /assets/article/chapter6/cd-process.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter6/cd-process.jpg -------------------------------------------------------------------------------- /assets/article/chapter6/cd-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter6/cd-workflow.png -------------------------------------------------------------------------------- /assets/article/chapter6/ci.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter6/ci.jpg -------------------------------------------------------------------------------- /assets/article/chapter6/continuous-delivery-continuous-deployment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter6/continuous-delivery-continuous-deployment.jpg -------------------------------------------------------------------------------- /assets/article/chapter6/continuous-delivery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter6/continuous-delivery.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/basic-paf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/basic-paf.png -------------------------------------------------------------------------------- /assets/article/chapter8/blog-basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/blog-basic.png -------------------------------------------------------------------------------- /assets/article/chapter8/blog-with-fe-be.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/blog-with-fe-be.png -------------------------------------------------------------------------------- /assets/article/chapter8/blog-with-frontend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/blog-with-frontend.png -------------------------------------------------------------------------------- /assets/article/chapter8/cache-website-blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/cache-website-blog.png -------------------------------------------------------------------------------- /assets/article/chapter8/combinedlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/combinedlist.png -------------------------------------------------------------------------------- /assets/article/chapter8/cqrs-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/cqrs-2.png -------------------------------------------------------------------------------- /assets/article/chapter8/cqrs-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/cqrs-arch.png -------------------------------------------------------------------------------- /assets/article/chapter8/cqrs-separate-storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/cqrs-separate-storage.png -------------------------------------------------------------------------------- /assets/article/chapter8/cqrs-vs-mvc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/cqrs-vs-mvc.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/ddd-cqrs-eb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/ddd-cqrs-eb.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/decentralised-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/decentralised-data.png -------------------------------------------------------------------------------- /assets/article/chapter8/dispatcher-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/dispatcher-services.png -------------------------------------------------------------------------------- /assets/article/chapter8/django-mtv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/django-mtv.png -------------------------------------------------------------------------------- /assets/article/chapter8/django_app_arch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/django_app_arch.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/edit-pub.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/edit-pub.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/emacs-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/emacs-architecture.png -------------------------------------------------------------------------------- /assets/article/chapter8/emergent-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/emergent-design.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/git-internals-commits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/git-internals-commits.png -------------------------------------------------------------------------------- /assets/article/chapter8/happy-retro.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/happy-retro.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/hexo-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/hexo-workflow.png -------------------------------------------------------------------------------- /assets/article/chapter8/nginx-microservices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/nginx-microservices.png -------------------------------------------------------------------------------- /assets/article/chapter8/output-input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/output-input.png -------------------------------------------------------------------------------- /assets/article/chapter8/playarchtectureasyncrequest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/playarchtectureasyncrequest.png -------------------------------------------------------------------------------- /assets/article/chapter8/retro-feature.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/retro-feature.jpg -------------------------------------------------------------------------------- /assets/article/chapter8/spring-mvc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/spring-mvc.png -------------------------------------------------------------------------------- /assets/article/chapter8/travis-edit-publish-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/chapter8/travis-edit-publish-code.png -------------------------------------------------------------------------------- /assets/article/compressimages.py: -------------------------------------------------------------------------------- 1 | from PIL import Image, ImageFile 2 | from sys import exit, stderr 3 | from os.path import getsize, isfile, isdir, join 4 | from os import remove, rename, walk, stat 5 | from stat import S_IWRITE 6 | from shutil import move 7 | from argparse import ArgumentParser 8 | from abc import ABCMeta, abstractmethod 9 | 10 | class ProcessBase: 11 | """Abstract base class for file processors.""" 12 | __metaclass__ = ABCMeta 13 | 14 | def __init__(self): 15 | self.extensions = [] 16 | self.backupextension = 'compressimages-backup' 17 | 18 | @abstractmethod 19 | def processfile(self, filename): 20 | """Abstract method which carries out the process on the specified file. 21 | Returns True if successful, False otherwise.""" 22 | pass 23 | 24 | def processdir(self, path): 25 | """Recursively processes files in the specified directory matching 26 | the self.extensions list (case-insensitively).""" 27 | 28 | filecount = 0 # Number of files successfully updated 29 | 30 | for root, dirs, files in walk(path): 31 | for file in files: 32 | # Check file extensions against allowed list 33 | lowercasefile = file.lower() 34 | matches = False 35 | for ext in self.extensions: 36 | if lowercasefile.endswith('.' + ext): 37 | matches = True 38 | break 39 | if matches: 40 | # File has eligible extension, so process 41 | fullpath = join(root, file) 42 | if self.processfile(fullpath): 43 | filecount = filecount + 1 44 | return filecount 45 | 46 | class CompressImage(ProcessBase): 47 | """Processor which attempts to reduce image file size.""" 48 | def __init__(self): 49 | ProcessBase.__init__(self) 50 | self.extensions = ['jpg', 'jpeg', 'png'] 51 | 52 | def processfile(self, filename): 53 | """Renames the specified image to a backup path, 54 | and writes out the image again with optimal settings.""" 55 | try: 56 | # Skip read-only files 57 | if (not stat(filename)[0] & S_IWRITE): 58 | print 'Ignoring read-only file "' + filename + '".' 59 | return False 60 | 61 | # Create a backup 62 | backupname = filename + '.' + self.backupextension 63 | 64 | if isfile(backupname): 65 | print 'Ignoring file "' + filename + '" for which existing backup file is present.' 66 | return False 67 | 68 | rename(filename, backupname) 69 | except Exception as e: 70 | stderr.write('Skipping file "' + filename + '" for which backup cannot be made: ' + str(e) + '\n') 71 | return False 72 | 73 | ok = False 74 | 75 | try: 76 | # Open the image 77 | with open(backupname, 'rb') as file: 78 | img = Image.open(file) 79 | 80 | # Check that it's a supported format 81 | format = str(img.format) 82 | if format != 'PNG' and format != 'JPEG': 83 | print 'Ignoring file "' + filename + '" with unsupported format ' + format 84 | return False 85 | 86 | # This line avoids problems that can arise saving larger JPEG files with PIL 87 | ImageFile.MAXBLOCK = img.size[0] * img.size[1] 88 | 89 | # The 'quality' option is ignored for PNG files 90 | img.save(filename, quality=90, optimize=True) 91 | 92 | # Check that we've actually made it smaller 93 | origsize = getsize(backupname) 94 | newsize = getsize(filename) 95 | 96 | if newsize >= origsize: 97 | print 'Cannot further compress "' + filename + '".' 98 | return False 99 | 100 | # Successful compression 101 | ok = True 102 | except Exception as e: 103 | stderr.write('Failure whilst processing "' + filename + '": ' + str(e) + '\n') 104 | finally: 105 | if not ok: 106 | try: 107 | move(backupname, filename) 108 | except Exception as e: 109 | stderr.write('ERROR: could not restore backup file for "' + filename + '": ' + str(e) + '\n') 110 | 111 | return ok 112 | 113 | class RestoreBackupImage(ProcessBase): 114 | """Processor which restores image from backup.""" 115 | 116 | def __init__(self): 117 | ProcessBase.__init__(self) 118 | self.extensions = [self.backupextension] 119 | 120 | def processfile(self, filename): 121 | """Moves the backup file back to its original name.""" 122 | try: 123 | move(filename, filename[: -(len(self.backupextension) + 1)]) 124 | return True 125 | except Exception as e: 126 | stderr.write('Failed to restore backup file "' + filename + '": ' + str(e) + '\n') 127 | return False 128 | 129 | class DeleteBackupImage(ProcessBase): 130 | """Processor which deletes backup image.""" 131 | 132 | def __init__(self): 133 | ProcessBase.__init__(self) 134 | self.extensions = [self.backupextension] 135 | 136 | def processfile(self, filename): 137 | """Deletes the specified file.""" 138 | try: 139 | remove(filename) 140 | return True 141 | except Exception as e: 142 | stderr.write('Failed to delete backup file "' + filename + '": ' + str(e) + '\n') 143 | return False 144 | 145 | if __name__ == "__main__": 146 | # Argument parsing 147 | modecompress = 'compress' 148 | moderestorebackup = 'restorebackup' 149 | modedeletebackup = 'deletebackup' 150 | parser = ArgumentParser(description='Reduce file size of PNG and JPEG images.') 151 | parser.add_argument( 152 | 'path', 153 | help='File or directory name') 154 | parser.add_argument( 155 | '--mode', dest='mode', default=modecompress, 156 | choices=[modecompress, moderestorebackup, modedeletebackup], 157 | help='Mode to run with (default: ' + modecompress + '). ' 158 | + modecompress + ': Compress the image(s). ' 159 | + moderestorebackup + ': Restore the backup images (valid for directory path only). ' 160 | + modedeletebackup + ': Delete the backup images (valid for directory path only).') 161 | 162 | args = parser.parse_args() 163 | 164 | # Construct processor requested mode 165 | if args.mode == modecompress: 166 | processor = CompressImage() 167 | elif args.mode == moderestorebackup: 168 | processor = RestoreBackupImage() 169 | elif args.mode == modedeletebackup: 170 | processor = DeleteBackupImage() 171 | 172 | # Run according to whether path is a file or a directory 173 | if isfile(args.path): 174 | if args.mode != modecompress: 175 | stderr.write('Mode "' + args.mode + '" supported on directories only.\n') 176 | exit(1) 177 | processor.processfile(args.path) 178 | elif isdir(args.path): 179 | filecount = processor.processdir(args.path) 180 | print '\nSuccessfully updated file count: ' + str(filecount) 181 | else: 182 | stderr.write('Invalid path "' + args.path + '"\n') 183 | exit(1) -------------------------------------------------------------------------------- /assets/article/prelude/alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/alipay.png -------------------------------------------------------------------------------- /assets/article/prelude/bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/bucket.jpg -------------------------------------------------------------------------------- /assets/article/prelude/caf_mvc_arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/caf_mvc_arch.png -------------------------------------------------------------------------------- /assets/article/prelude/cgi-arch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/cgi-arch.gif -------------------------------------------------------------------------------- /assets/article/prelude/cgi-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/cgi-script.png -------------------------------------------------------------------------------- /assets/article/prelude/develop-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/develop-history.png -------------------------------------------------------------------------------- /assets/article/prelude/expert-vs-fullstack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/expert-vs-fullstack.png -------------------------------------------------------------------------------- /assets/article/prelude/growth-hacking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/growth-hacking.jpg -------------------------------------------------------------------------------- /assets/article/prelude/in-out-thinking.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/in-out-thinking.jpeg -------------------------------------------------------------------------------- /assets/article/prelude/old-se.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/old-se.jpg -------------------------------------------------------------------------------- /assets/article/prelude/oneui-serviceful-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/oneui-serviceful-arch.png -------------------------------------------------------------------------------- /assets/article/prelude/scrum-communication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/scrum-communication.png -------------------------------------------------------------------------------- /assets/article/prelude/scrum-issues.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/scrum-issues.png -------------------------------------------------------------------------------- /assets/article/prelude/scrum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/scrum.png -------------------------------------------------------------------------------- /assets/article/prelude/tech-org.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/tech-org.png -------------------------------------------------------------------------------- /assets/article/prelude/waterfall-process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/waterfall-process.png -------------------------------------------------------------------------------- /assets/article/prelude/wechat-pay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/wechat-pay.png -------------------------------------------------------------------------------- /assets/article/prelude/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/wechat.jpg -------------------------------------------------------------------------------- /assets/article/prelude/xiaomiquan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phodal/growth-ebook/37b443cbd2501a727fbe87bcbd19b58c37520442/assets/article/prelude/xiaomiquan.jpg -------------------------------------------------------------------------------- /build/author.html: -------------------------------------------------------------------------------- 1 |
By Phodal (Follow Me: 微博、知乎、SegmentFault) 3 |
4 | 5 |GitHub: Growth: 全栈增长工程师指南
6 | 7 |8 | 下载: 9 | Epub版、Mobi版、PDF版、RTF版 10 |
11 | 12 |
京东:http://item.jd.com/12195442.html
15 |当当: http://product.dangdang.com/25077858.html
16 |17 | 亚马逊: https://www.amazon.cn/dp/B0722YJR89 18 |
19 | 20 |25 | 阅读过程中遇到语法错误、拼写错误、技术错误等等,不妨来个Pull Request,这样可以帮助到其他阅读这本电子书的童鞋。 26 |
27 | 28 |我的其他电子书:
29 |36 |
微信公众号
37 |
--------------------------------------------------------------------------------
/build/head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/build/metadata.xml:
--------------------------------------------------------------------------------
1 |
hello,world
17 |
18 | 3. 保存为->"helloworld.html",
19 |
20 | 4. 双击打开这个文件。 正常情况下都应该是用你的默认浏览器打开。只要是一个正常工作的现代浏览器,都应该可以看到上面显示的是"Hello,world"。
21 |
22 | 这才是最短的 hello,world 程序,但是呢?在 Ruby 中会是这样子的
23 |
24 | ``` bash
25 | 2.0.0-p353 :001 > p "hello,world"
26 | "hello,world"
27 | => "hello,world"
28 | 2.0.0-p353 :002 >
29 | ```
30 |
31 | 等等,如果你了解过 HTML 的话,会觉得这一点都不符合语法规则,但是他工作了,没有什么比安装完 Nginx 后看到 It works! 更让人激动了。
32 |
33 | 遗憾的是,它可能无法在所有的浏览器上工作,所以我们需要去调试其中的 bug。
34 |
35 | ####调试 hello,world
36 |
37 | 我们会发现我们的代码在浏览器中变成了下面的代码,如果你和我一样用的是 Chrome,那么你可以右键浏览器中的空白区域,点击审查元素,就会看到下面的代码。
38 |
39 | ``` html
40 |
41 |
42 | hello,world
43 |
44 | ```
45 |
46 | 这个才是真正能在大部分浏览器上工作的代码,所以复制它到编辑器里吧。
47 |
48 | ####说说 hello,world
49 |
50 | 我很不喜欢其中的<\*>*>,但是我也没有找到别的方法来代替它们,所以这是一个设计得当的语言。甚至大部分人都说这算不上是一门真正的语言,不过 HTML 的原义是
51 |
52 | > 超文本标记语言
53 |
54 | 所以我们可以发现其中的关键词是标记——markup,也就是说 html 是一个 markup,head 是一个 markup,body 也是一个 markup。
55 |
56 | 然而,我们真正工作的代码是在 body 里面,至于为什么是在这里面,这个问题就太复杂了。打个比方来说:
57 |
58 | 1. 我们所使用的汉语是人类用智慧创造的,我们所正在学的这门语言同样也是人类创造的。
59 |
60 | 2. 我们在自己的语言里遵循着 **桌子是桌子,凳子是凳子** 的原则,很少有人会问为什么。
61 |
62 |
63 | ###中文?
64 |
65 | 所以我们也可以把计算机语言与现实世界里用于交流沟通的语言划上一个等号。而我们所要学习的语言,并不是我们最熟悉的汉语语言,所以我们便觉得这些很复杂,但是如果我们试着用汉语替换掉上面的代码的话
66 | ```HTML
67 | <语言>
68 | <头><结束头>
69 | <身体>你好,世界<结束身体>
70 | <结束语言>
71 | ```
72 | 这看上去很奇怪,只是因为是直译过去的原因,也许你会觉得这样会好理解一点,但是输入上可就一点儿也不方便,因为这键盘本身就不适合我们去输入汉字,同时也意味着可能你输入的会有问题。
73 |
74 | 让我们把上面的代码代替掉原来的代码然后保存,打开浏览器会看到下面的结果
75 | ```HTML
76 | <语言> <头><结束头> <身体>你好,世界<结束身体> <结束语言>
77 | ```
78 |
79 | 更不幸的结果可能是
80 |
81 | ```HTML
82 | <璇█> <澶�><缁撴潫澶�> <韬綋>浣犲ソ锛屼笘鐣�<缁撴潫韬綋> <缁撴潫璇█>
83 | ```
84 |
85 | 这是一个编码问题,对中文支持不友好。
86 |
87 | 我们把上面的代码改为和标记语言一样的结构
88 |
89 | ```HTML
90 | <语言>
91 | <头>头>
92 | <身体>你好,世界身体>
93 | 语言>
94 | ```
95 |
96 | 于是我们看到的结果便是
97 |
98 | ```HTML
99 | <语言> <头> <身体>你好,世界
100 | ```
101 |
102 | 被 Chrome 浏览器解析成什么样了?
103 |
104 | ``` html
105 | <语言>
106 | <头>
107 | <身体>你好,世界
108 |
109 |
110 | ```
111 |
112 | 以``结尾的是注释,写给人看的代码,不是给机器看的,所以机器不会去理解这些代码。
113 |
114 | 但是当我们把代码改成
115 |
116 | ```HTML
117 | Red
15 | 16 | 17 | 18 | ``` 19 | 20 | 只是, 21 | 22 | ``` javascript 23 | var para=document.getElementById("para"); 24 | para.style.color="blue"; 25 | ``` 26 | 27 | 将字体变成了蓝色,CSS+HTML 让页面有序的工作着,但是 JavaScript 却打乱了这些秩序,有着唯恐世界不乱的精彩,也难怪被冠以小三之名了——或许终于可以理解,为什么以前人们对于 JavaScript 没有好感了——不过这里要讲的是正室,也就是 CSS,这时还没有 JavaScript。 28 | 29 |  30 | 31 | ###简介 32 | 33 | 这不是一篇专业讲述 CSS 的书籍,所以我不会去说 CSS 是怎么来的,有些东西我们既然可以很容易从其他地方知道,也就不需要花太多时间去重复。诸如重构等这些的目的之一也在于去除重复的代码,不过有些重复是不可少的,也是有必要的,而通常这些东西可能是由其他地方复制过来的。 34 | 35 | 到目前为止我们没有依赖于任何特殊的硬件或者是软件,对于我们来说我们最基本的需求就是一台电脑,或者可以是你的平板电脑,当然也可以是你的智能手机,因为他们都有个浏览器,而这些都是能用的,对于我们的 CSS 来说也不会有例外的。 36 | 37 | CSS(Cascading Style Sheets),到今天我也没有记得他的全称,CSS 还有一个中文名字是层叠式样式表,事实上翻译成什么可能并不是我们关心的内容,我们需要关心的是他能做些什么。作为三剑客之一,它的主要目的在于可以让我们方便灵活地去控制 Web 页面的外观表现。我们可以用它做出像淘宝一样复杂的界面,也可以像我们的书本一样简单,不过如果要和我们书本一样简单的话,可能不需要用到 CSS。HTML 一开始就是依照报纸的格式而设计的,我们还可以继续用上面说到的编辑器,又或者是其他的。如果你喜欢 DreamWeaver 那也不错,不过一开始使用 IDE 可无助于我们写出良好的代码。 38 | 39 | 忘说了,CSS 也是有版本的,和 Windows,Linux 内核等等一样,但是更新可能没有那么频繁,HTML 也是有版本的,JavaScript 也是有版本的,复杂的东西不是当前考虑的内容。 40 | 41 | ####代码结构 42 | 43 | 对于我们的上面的 Red 示例来说,如果没有一个好的结构,那么以后可能就是这样子。 44 | 45 | ```HTML 46 | 47 | 48 | 49 | 50 | 51 |如果没有一个好的结构
52 |那么以后可能就是这样子。。。。
53 | 54 | 55 | ``` 56 | 57 | 虽然我们看到的还是一样的: 58 | 59 |  60 | 61 | 于是我们就按各种书上的建议重新写了上面的代码 62 | 63 | ```HTML 64 | 65 | 66 | 67 |如果没有一个好的结构
85 |那么以后可能就是这样子。。。。
86 | 87 | 88 | ``` 89 | 90 | 总算比上面好看也好理解多了,这只是临时的用法,当文件太大的时候,正式一点的写法应该如下所示: 91 | 92 | ```HTML 93 | 94 | 95 | 96 |如果没有一个好的结构
101 |那么以后可能就是这样子。。。。
102 | 103 | 104 | ``` 105 | 106 | 我们需要 107 | 108 | ```HTML 109 | 110 | 111 | 112 |如果没有一个好的结构
117 |那么以后可能就是这样子。。。。
118 | 119 | 120 | ``` 121 | 122 | 然后我们有一个像 app.js 一样的 style.css 放在同目录下,而他的内容便是 123 | 124 | ```CSS 125 | .para{ 126 | font-size: 22px; 127 | color: #f00; 128 | text-align: center; 129 | padding-left: 20px; 130 | } 131 | .para2{ 132 | font-size: 44px; 133 | color: #3ed; 134 | text-indent: 2em; 135 | padding-left: 2em; 136 | } 137 | ``` 138 | 139 | 这代码和 JS 的代码有如此多的相似 140 | 141 | ```javascript 142 | var para={ 143 | font_size: '22px', 144 | color: '#f00', 145 | text_align: 'center', 146 | padding_left: '20px', 147 | } 148 | ``` 149 | 150 | 而22px、20px以及#f00都是数值,因此: 151 | 152 | ```javascript 153 | var para={ 154 | font_size: 22px, 155 | color: #f00, 156 | text_align: center, 157 | padding_left: 20px, 158 | } 159 | ``` 160 | 161 | 目测差距已经尽可能的小了,至于这些话题会在以后讨论到,如果要让我们的编译器更正确的工作,那么我们就需要非常多这样的符号,除非你乐意去理解: 162 | 163 | ```lisp 164 | (dotimes (i 4) (print i)) 165 | ``` 166 | 167 | 总的来说我们减少了符号的使用,但是用 lisp 便带入了更多的括号,不过这是一种简洁的表达方式,也许我们可以在其他语言中看到。 168 | 169 | ``` 170 | \d{2}/[A-Z][a-z][a-z]/\d{4} 171 | ``` 172 | 173 | 上面的代码,是为了从一堆数据中找出“某日/某月/某年”。如果一开始不理解那是正则表达式,就会觉得那个很复杂。 174 | 175 | 这门语言可能是为设计师而设计的,但是设计师大部分还是不懂编程的,不过相对来说这门语言还是比其他语言简单易懂一些。 176 | 177 | ###样式与目标 178 | 179 | 如下所示,就是我们的样式 180 | 181 | ```css 182 | .para{ 183 | font-size: 22px; 184 | color: #f00; 185 | text-align: center; 186 | padding-left: 20px; 187 | } 188 | ``` 189 | 190 | 我们的目标就是 191 | 192 | > 如果没有一个好的结构 193 | 194 | 所以样式和目标在这里牵手了,问题是他们是如何在一起的呢?下面就是 CSS 与 HTML 沟通的重点所在了: 195 | 196 | ###选择器 197 | 198 | 我们用到的选择器叫做类选择器,也就是 class,或者说应该称之为 class 选择器更合适。与类选择器最常一起出现的是 ID 选择器,不过这个适用于比较高级的场合,诸如用 JS 控制 DOM 的时候就需要用到 ID 选择器。而基本的选择器就是如下面的例子: 199 | 200 | ```css 201 | p.para{ 202 | color: #f0f; 203 | } 204 | ``` 205 | 206 | 将代码添加到 style.css 的最下面会发现“如果没有一个好的结构”变成了粉红色,当然我们还会有这样的写法 207 | 208 | ```css 209 | p>.para{ 210 | color: #f0f; 211 | } 212 | ``` 213 | 214 | 为了产生上面的特殊的样式,虽然不好看,但是我们终于理解什么叫层叠样式了,下面的代码的权重比上面高,也因此有更高的优先规则。 215 | 216 | 而通常我们可以通过一个 217 | 218 | ```css 219 | p{ 220 | text-align: left; 221 | } 222 | ``` 223 | 224 | 这样的元素选择器来给予所有的 p 元素一个左对齐。 225 | 226 | 还有复杂一点的复合型选择器,下面的是 HTML 文件 227 | 228 | ```html 229 | 230 | 231 | 232 |如果没有一个好的结构
237 |那么以后可能就是这样子。。。。
239 |那么以后可能就是这样子。。。。
275 |