Skip to content

Commit 53ef99d

Browse files
committed
adding new diagram to the app dependencies page
1 parent 527c166 commit 53ef99d

File tree

7 files changed

+100
-12
lines changed

7 files changed

+100
-12
lines changed

application-dependencies.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,18 @@ <h2>Finding libraries</h2>
7878
grouped by categories.</p>
7979
</li>
8080
</ul>
81-
<h2>Isolating application dependencies</h2>
81+
<h2>Isolating dependencies</h2>
8282
<p>Dependencies are installed separately from system-level packages to prevent
8383
library version conflicts. The most common isolation method is
8484
<a href="http://www.virtualenv.org/en/latest/">virtualenv</a>. Each virtualenv is its
8585
own copy of the Python interpreter and depedencies in the site-packages
8686
directory. To use a virtualenv it must first be created with the virtualenv
8787
command and then activated.</p>
88+
<p>The virtualenv stores dependencies in an isolated environment. The web
89+
application then relies only on that virtualenv instance which has a separate
90+
copy of the Python interpreter and site-packages directory. A high level of
91+
how a server configured with virtualenv can look is shown in the picture below.</p>
92+
<p><img src="theme/img/server-setup.png" alt="How the virtualenv separates dependencies on the server." width="100%" class="technical-diagram" /></p>
8893
<h2>Installing Python dependencies</h2>
8994
<p>The recommended way to install Python library dependencies is with the
9095
<a href="http://www.pip-installer.org/en/latest/">pip</a> command when a virtualenv

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-02T17:35:37Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2014-06-03T07:25:56Z</updated></feed>

source/content/pages/03-deployment/0315-application-dependencies.markdown

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,21 @@ all yourself. A few of the best collections of Python libraries are
5757
grouped by categories.
5858

5959

60-
## Isolating application dependencies
60+
## Isolating dependencies
6161
Dependencies are installed separately from system-level packages to prevent
6262
library version conflicts. The most common isolation method is
6363
[virtualenv](http://www.virtualenv.org/en/latest/). Each virtualenv is its
6464
own copy of the Python interpreter and depedencies in the site-packages
6565
directory. To use a virtualenv it must first be created with the virtualenv
6666
command and then activated.
6767

68+
The virtualenv stores dependencies in an isolated environment. The web
69+
application then relies only on that virtualenv instance which has a separate
70+
copy of the Python interpreter and site-packages directory. A high level of
71+
how a server configured with virtualenv can look is shown in the picture below.
72+
73+
<img src="theme/img/server-setup.png" alt="How the virtualenv separates dependencies on the server." width="100%" class="technical-diagram" />
74+
6875

6976
## Installing Python dependencies
7077
The recommended way to install Python library dependencies is with the

source/mockups/server-setup.bmml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="766" measuredH="648" mockupW="722" mockupH="591">
2+
<controls>
3+
<control controlID="3" controlTypeID="com.balsamiq.mockups::TextArea" x="87" y="180" w="250" h="143" measuredW="200" measuredH="140" zOrder="2" locked="false" isInGroup="-1">
4+
<controlProperties>
5+
<align>center</align>
6+
<size>28</size>
7+
<text>%20%0AWSGI%20Server%20/%20%0AGateway</text>
8+
</controlProperties>
9+
</control>
10+
<control controlID="7" controlTypeID="com.balsamiq.mockups::Arrow" x="164" y="321" w="74" h="57" measuredW="150" measuredH="100" zOrder="5" locked="false" isInGroup="-1">
11+
<controlProperties>
12+
<direction>bottom</direction>
13+
<leftArrow>true</leftArrow>
14+
<rightArrow>false</rightArrow>
15+
<text>Invokes</text>
16+
</controlProperties>
17+
</control>
18+
<control controlID="9" controlTypeID="com.balsamiq.mockups::Canvas" x="44" y="57" w="722" h="591" measuredW="100" measuredH="70" zOrder="0" locked="false" isInGroup="-1"/>
19+
<control controlID="10" controlTypeID="com.balsamiq.mockups::SubTitle" x="59" y="72" w="-1" h="-1" measuredW="75" measuredH="27" zOrder="6" locked="false" isInGroup="-1">
20+
<controlProperties>
21+
<text>Server</text>
22+
</controlProperties>
23+
</control>
24+
<control controlID="11" controlTypeID="com.balsamiq.mockups::Canvas" x="59" y="114" w="693" h="512" measuredW="100" measuredH="70" zOrder="1" locked="false" isInGroup="-1"/>
25+
<control controlID="12" controlTypeID="com.balsamiq.mockups::SubTitle" x="74" y="129" w="-1" h="-1" measuredW="58" measuredH="27" zOrder="7" locked="false" isInGroup="-1">
26+
<controlProperties>
27+
<text>Linux</text>
28+
</controlProperties>
29+
</control>
30+
<control controlID="13" controlTypeID="com.balsamiq.mockups::TextArea" x="454" y="171" w="269" h="106" measuredW="200" measuredH="140" zOrder="8" locked="false" isInGroup="-1">
31+
<controlProperties>
32+
<align>center</align>
33+
<size>28</size>
34+
<text>%20%0AWeb%20Server</text>
35+
</controlProperties>
36+
</control>
37+
<control controlID="14" controlTypeID="com.balsamiq.mockups::Arrow" x="337" y="188" w="116" h="45" measuredW="150" measuredH="100" zOrder="9" locked="false" isInGroup="-1">
38+
<controlProperties>
39+
<direction>bottom</direction>
40+
<rightArrow>false</rightArrow>
41+
<text>Pass%20requests</text>
42+
</controlProperties>
43+
</control>
44+
<control controlID="15" controlTypeID="com.balsamiq.mockups::Canvas" x="454" y="378" w="250" h="215" measuredW="100" measuredH="70" zOrder="10" locked="false" isInGroup="-1"/>
45+
<control controlID="18" controlTypeID="com.balsamiq.mockups::TextArea" x="87" y="378" w="278" h="215" measuredW="200" measuredH="140" zOrder="3" locked="false" isInGroup="-1">
46+
<controlProperties>
47+
<align>center</align>
48+
<size>28</size>
49+
<text>%20%0A%20%0AWSGI%20Application%20/%20%0AFramework</text>
50+
</controlProperties>
51+
</control>
52+
<control controlID="19" controlTypeID="com.balsamiq.mockups::TextArea" x="87" y="378" w="159" h="38" measuredW="200" measuredH="140" zOrder="4" locked="false" isInGroup="-1">
53+
<controlProperties>
54+
<size>20</size>
55+
<text>%20Callable%20object</text>
56+
</controlProperties>
57+
</control>
58+
<control controlID="20" controlTypeID="com.balsamiq.mockups::Arrow" x="365" y="454" w="110" h="22" measuredW="150" measuredH="100" zOrder="11" locked="false" isInGroup="-1">
59+
<controlProperties>
60+
<direction>bottom</direction>
61+
<leftArrow>false</leftArrow>
62+
<text>Relies%20on</text>
63+
</controlProperties>
64+
</control>
65+
<control controlID="21" controlTypeID="com.balsamiq.mockups::SubTitle" x="469" y="398" w="-1" h="-1" measuredW="108" measuredH="27" zOrder="12" locked="false" isInGroup="-1">
66+
<controlProperties>
67+
<text>virtualenv</text>
68+
</controlProperties>
69+
</control>
70+
<control controlID="22" controlTypeID="com.balsamiq.mockups::List" x="472" y="438" w="217" h="126" measuredW="100" measuredH="126" zOrder="13" locked="false" isInGroup="-1">
71+
<controlProperties>
72+
<text>Django%3D%3D1.6.5%0Adj-database-url%3D%3D0.3%0Atwilio%3D3.3.36%0A...</text>
73+
</controlProperties>
74+
</control>
75+
</controls>
76+
</mockup>

source/mockups/wsgi-interface.bmml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="879" measuredH="377" mockupW="808" mockupH="338">
1+
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="707" measuredH="334" mockupW="636" mockupH="215">
22
<controls>
3-
<control controlID="3" controlTypeID="com.balsamiq.mockups::TextArea" x="71" y="39" w="350" h="338" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="-1">
3+
<control controlID="8" controlTypeID="com.balsamiq.mockups::TextArea" x="71" y="119" w="250" h="215" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="-1">
44
<controlProperties>
55
<align>center</align>
66
<size>28</size>
7-
<text>%20%0A%20%0A%20%0A%20%0AWSGI%20Server%20/%20%0AGateway</text>
7+
<text>%20%0A%20%20%0AWSGI%20Server%20/%20%0AGateway</text>
88
</controlProperties>
99
</control>
10-
<control controlID="6" controlTypeID="__group__" x="529" y="39" w="350" h="338" measuredW="350" measuredH="338" zOrder="1" locked="false" isInGroup="-1">
10+
<control controlID="9" controlTypeID="__group__" x="429" y="119" w="278" h="215" measuredW="278" measuredH="215" zOrder="1" locked="false" isInGroup="-1">
1111
<groupChildrenDescriptors>
12-
<control controlID="0" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="0" w="350" h="338" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="6">
12+
<control controlID="0" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="0" w="278" h="215" measuredW="200" measuredH="140" zOrder="0" locked="false" isInGroup="9">
1313
<controlProperties>
1414
<align>center</align>
1515
<size>28</size>
16-
<text>%20%0A%20%0A%20%0A%20%0AWSGI%20Application%20/%20%0AFramework</text>
16+
<text>%20%0A%20%0AWSGI%20Application%20/%20%0AFramework</text>
1717
</controlProperties>
1818
</control>
19-
<control controlID="1" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="33" w="200" h="74" measuredW="200" measuredH="140" zOrder="1" locked="false" isInGroup="6">
19+
<control controlID="1" controlTypeID="com.balsamiq.mockups::TextArea" x="0" y="12" w="159" h="47" measuredW="200" measuredH="140" zOrder="1" locked="false" isInGroup="9">
2020
<controlProperties>
2121
<size>20</size>
22-
<text>%20%0ACallable%20object</text>
22+
<text>%20Callable%20object</text>
2323
</controlProperties>
2424
</control>
2525
</groupChildrenDescriptors>
2626
</control>
27-
<control controlID="7" controlTypeID="com.balsamiq.mockups::Arrow" x="421" y="111" w="108" h="49" measuredW="150" measuredH="100" zOrder="2" locked="false" isInGroup="-1">
27+
<control controlID="10" controlTypeID="com.balsamiq.mockups::Arrow" x="321" y="151" w="108" h="49" measuredW="150" measuredH="100" zOrder="2" locked="false" isInGroup="-1">
2828
<controlProperties>
2929
<direction>bottom</direction>
3030
<leftArrow>false</leftArrow>
42.3 KB
Loading

theme/img/server-setup.png

42.3 KB
Loading

0 commit comments

Comments
 (0)