|
1 |
| -<!DOCTYPE html> |
2 |
| -<html lang="en"> |
3 |
| - <head> |
4 |
| - <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
5 |
| - <meta charset="utf-8"> |
6 |
| - <meta name="generator" content="Bootply" /> |
7 |
| - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
8 |
| - <title>StructureMap - Best Practices</title> |
9 |
| - <link href="/content/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
10 |
| - <link href="/content/prism.css" rel="stylesheet" type="text/css" /> |
11 |
| - <link href="/content/theme.css" rel="stylesheet" type="text/css" /> |
12 |
| - |
13 |
| - <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" /> |
14 |
| - <link rel="icon" type="image/x-icon" href="/content/images/structuremap-logo.ico"> |
15 |
| - <link rel="icon" type="image/png" href="/content/images/structuremap-logo-60x60.png"> |
16 |
| - <link rel="apple-touch-icon" type="image/png" href="/content/images/structuremap-logo-60x60.png"> |
17 |
| - <link rel="apple-touch-icon" type="image/png" sizes="72x72" href="/content/images/structuremap-logo-72x72.png"> |
18 |
| - <link rel="apple-touch-icon" type="image/png" sizes="114x114" href="/content/images/structuremap-logo-114x114.png"> |
19 |
| - <link rel="apple-touch-icon" type="image/png" sizes="144x144" href="/content/images/structuremap-logo-144x144.png"> |
20 |
| - |
21 |
| - <!-- CSS code from Bootply.com editor --> |
22 |
| - <link href="/content/affix.css" rel="stylesheet" type="text/css" /> |
23 |
| - </head> |
24 |
| - |
25 |
| - <!-- HTML code from Bootply.com editor --> |
26 |
| - |
27 |
| - <body > |
28 |
| - |
29 |
| -<a href="https://github.com/structuremap/structuremap"><img style="z-index: 5000; position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a> |
30 |
| - |
31 |
| - <nav class="navbar navbar-default navbar-fixed-top" role="banner"> |
32 |
| - <div class="container"> |
33 |
| - <div class="navbar-header"> |
34 |
| - <a href="/" class="navbar-brand">StructureMap 4.5.0</a> |
35 |
| - </div> |
36 |
| - <nav class="collapse navbar-collapse" role="navigation"> |
37 |
| - <ul class="nav navbar-nav pull-right"> |
38 |
| - <li> |
39 |
| - <a href="/quickstart">A Gentle Quickstart</a> |
40 |
| - </li> |
41 |
| - <li> |
42 |
| - <a href="/documentation">Documentation</a> |
43 |
| - </li> |
44 |
| - <li> |
45 |
| - <a href="https://groups.google.com/forum/#!forum/structuremap-users">Google Group</a> |
46 |
| - </li> |
47 |
| - <li> |
48 |
| -<a href="https://gitter.im/structuremap/structuremap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Join the chat at https://gitter.im/structuremap/structuremap" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a> |
49 |
| - </li> |
50 |
| - <li><a href="/autofactory" title="Auto-factories">Previous</a></li> |
51 |
| - <li><a href="/history" title="History">Next</a></li> |
52 |
| - </ul> |
53 |
| - <div class="navbar-form navbar-left" role="search"> |
54 |
| - <div class="form-group"> |
55 |
| - <input id="search" type="search" class="form-control" placeholder="Search"> |
56 |
| - </div> |
57 |
| - </div> |
58 |
| - |
59 |
| - </nav> |
60 |
| - |
61 |
| - </div> |
62 |
| - </nav> |
63 |
| - |
64 |
| - <div class="container"> |
65 |
| - <nav class="navbar-inverse"> |
66 |
| - <ol class="breadcrumb"><li><a href="/">StructureMap</a></li><li class="active">Best Practices</li></ol> |
67 |
| - </nav> |
68 |
| - </div> |
69 |
| - |
70 |
| - <!--main--> |
71 |
| - <div class="container"> |
72 |
| - <div class="row"> |
73 |
| - <!--left--> |
74 |
| - |
75 |
| - <div class="col-md-3" id="leftCol"> |
76 |
| - <ul class="nav nav-stacked affix" id="sidebar"> |
77 |
| - <li><h3><img src="/content/images/structuremap-logo-210x210.png" alt="StructureMap 4.5.0" width="210" height="210"></h3></li> |
78 |
| - <li><h3 class="no-margin">Next</h3><p><a href="/history">History</a></p></li> |
79 |
| - <li><h3 class="no-margin">Previous</h3><a href="/autofactory">Auto-factories</a></p></li> |
80 |
| - </ul> |
81 |
| - |
82 |
| - </div><!--/left--> |
83 |
| - |
84 |
| - <!--right--> |
85 |
| - <div class="col-md-9"> |
86 |
| - <h1>Best Practices <a href="https://github.com/structuremap/structuremap/blob/master/documentation/best-practices.md" class="text-muted small pull-right fa fa-github" style="margin-top: 10px"> Edit on GitHub</a></h1> |
87 |
| - |
88 |
| - <hr /> |
89 |
| - |
90 |
| - <div id="main-pane"> |
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <meta name="generator" content="Bootply" /> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| 8 | + <title>StructureMap - Best Practices</title> |
| 9 | + <link href="/content/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
| 10 | + <link href="/content/prism.css" rel="stylesheet" type="text/css" /> |
| 11 | + <link href="/content/theme.css" rel="stylesheet" type="text/css" /> |
| 12 | + |
| 13 | + <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" /> |
| 14 | + <link rel="icon" type="image/x-icon" href="/content/images/structuremap-logo.ico"> |
| 15 | + <link rel="icon" type="image/png" href="/content/images/structuremap-logo-60x60.png"> |
| 16 | + <link rel="apple-touch-icon" type="image/png" href="/content/images/structuremap-logo-60x60.png"> |
| 17 | + <link rel="apple-touch-icon" type="image/png" sizes="72x72" href="/content/images/structuremap-logo-72x72.png"> |
| 18 | + <link rel="apple-touch-icon" type="image/png" sizes="114x114" href="/content/images/structuremap-logo-114x114.png"> |
| 19 | + <link rel="apple-touch-icon" type="image/png" sizes="144x144" href="/content/images/structuremap-logo-144x144.png"> |
| 20 | + |
| 21 | + <!-- CSS code from Bootply.com editor --> |
| 22 | + <link href="/content/affix.css" rel="stylesheet" type="text/css" /> |
| 23 | + </head> |
| 24 | + |
| 25 | + <!-- HTML code from Bootply.com editor --> |
| 26 | + |
| 27 | + <body > |
| 28 | + |
| 29 | +<a href="https://github.com/structuremap/structuremap"><img style="z-index: 5000; position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a> |
| 30 | + |
| 31 | + <nav class="navbar navbar-default navbar-fixed-top" role="banner"> |
| 32 | + <div class="container"> |
| 33 | + <div class="navbar-header"> |
| 34 | + <a href="/" class="navbar-brand">StructureMap 4.5.1</a> |
| 35 | + </div> |
| 36 | + <nav class="collapse navbar-collapse" role="navigation"> |
| 37 | + <ul class="nav navbar-nav pull-right"> |
| 38 | + <li> |
| 39 | + <a href="/quickstart">A Gentle Quickstart</a> |
| 40 | + </li> |
| 41 | + <li> |
| 42 | + <a href="/documentation">Documentation</a> |
| 43 | + </li> |
| 44 | + <li> |
| 45 | + <a href="https://groups.google.com/forum/#!forum/structuremap-users">Google Group</a> |
| 46 | + </li> |
| 47 | + <li> |
| 48 | +<a href="https://gitter.im/structuremap/structuremap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Join the chat at https://gitter.im/structuremap/structuremap" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a> |
| 49 | + </li> |
| 50 | + <li><a href="/autofactory" title="Auto-factories">Previous</a></li> |
| 51 | + <li><a href="/history" title="History">Next</a></li> |
| 52 | + </ul> |
| 53 | + <div class="navbar-form navbar-left" role="search"> |
| 54 | + <div class="form-group"> |
| 55 | + <input id="search" type="search" class="form-control" placeholder="Search"> |
| 56 | + </div> |
| 57 | + </div> |
| 58 | + |
| 59 | + </nav> |
| 60 | + |
| 61 | + </div> |
| 62 | + </nav> |
| 63 | + |
| 64 | + <div class="container"> |
| 65 | + <nav class="navbar-inverse"> |
| 66 | + <ol class="breadcrumb"><li><a href="/">StructureMap</a></li><li class="active">Best Practices</li></ol> |
| 67 | + </nav> |
| 68 | + </div> |
| 69 | + |
| 70 | + <!--main--> |
| 71 | + <div class="container"> |
| 72 | + <div class="row"> |
| 73 | + <!--left--> |
| 74 | + |
| 75 | + <div class="col-md-3" id="leftCol"> |
| 76 | + <ul class="nav nav-stacked affix" id="sidebar"> |
| 77 | + <li><h3><img src="/content/images/structuremap-logo-210x210.png" alt="StructureMap 4.5.1" width="210" height="210"></h3></li> |
| 78 | + <li><h3 class="no-margin">Next</h3><p><a href="/history">History</a></p></li> |
| 79 | + <li><h3 class="no-margin">Previous</h3><a href="/autofactory">Auto-factories</a></p></li> |
| 80 | + </ul> |
| 81 | + |
| 82 | + </div><!--/left--> |
| 83 | + |
| 84 | + <!--right--> |
| 85 | + <div class="col-md-9"> |
| 86 | + <h1>Best Practices <a href="https://github.com/structuremap/structuremap/blob/master/documentation/best-practices.md" class="text-muted small pull-right fa fa-github" style="margin-top: 10px"> Edit on GitHub</a></h1> |
| 87 | + |
| 88 | + <hr /> |
| 89 | + |
| 90 | + <div id="main-pane"> |
91 | 91 | <!--Title: Best Practices-->
|
92 | 92 | <!--Url: best-practices-->
|
93 | 93 | <p>All of these recommendations are the opinions and sole responsiblity of one <a href="http://jeremydmiller.com">Jeremy D. Miller</a>. The single best advice I can give you
|
@@ -126,62 +126,62 @@ <h2 id="favor-build-policies-over-fancy-runtime-decision-making">Favor Build Pol
|
126 | 126 | <p>While there are many powerful things you can do with StructureMap at runtime for conditional object resolution with <a href="/the-container/working-with-the-icontext-at-build-time">lambdas and IContext</a>,
|
127 | 127 | I recommend trying to "bake in" building decisions upfront with <a href="/registration/policies">build policies</a> for more efficient object resolution and so that
|
128 | 128 | the container behavior is surfaced through diagnostics like the <a href="/diagnostics/build-plans">build plan visualization</a>.</p>
|
129 |
| - |
130 |
| - </div> |
131 |
| - |
132 |
| - <hr /> |
133 |
| - |
134 |
| - <nav> |
135 |
| - <span> |
136 |
| - <strong>Previous: </strong><a href="/autofactory">Auto-factories</a> |
137 |
| - |
138 |
| - </span> |
139 |
| - <span class="pull-right"> |
140 |
| - |
141 |
| - <strong>Next: </strong><a href="/history">History</a> |
142 |
| - |
143 |
| - </span> |
144 |
| - </nav> |
145 |
| - |
146 |
| - </div><!--/right--> |
147 |
| - </div><!--/row--> |
148 |
| - </div><!--/container--> |
149 |
| - |
150 |
| - |
151 |
| - </body> |
152 |
| - |
153 |
| - |
154 |
| - <foot> |
155 |
| - <script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
156 |
| - <script type='text/javascript' src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> |
157 |
| - |
158 |
| - <script type="text/javascript" src="/content/embed.js"></script> |
159 |
| - <script type="text/javascript" src="/content/prism.js"></script> |
160 |
| - <script type="text/javascript" src="/content/sidebar.js"></script> |
161 |
| - <script type="text/javascript" src="/content/affix.js"></script> |
162 |
| - |
163 |
| -<script> |
164 |
| -$('#search').keyup(function(e){ |
165 |
| - if(e.keyCode == 13) { |
166 |
| - var search = $('#search').val(); |
167 |
| - |
168 |
| - var url = 'https://www.google.com/#q=site:structuremap.github.io ' + search; |
169 |
| - url = encodeURI(url); |
170 |
| - |
171 |
| - //alert(url); |
172 |
| - |
173 |
| - window.location.href = url; |
174 |
| - |
175 |
| - e.stopPropagation(); |
176 |
| - if (e.cancelBubble!=null) e.cancelBubble = true; |
177 |
| - return false; |
178 |
| - } |
179 |
| - |
180 |
| - |
181 |
| - |
182 |
| -}); |
183 |
| - |
184 |
| -</script> |
185 |
| - </foot> |
186 |
| -</html> |
187 |
| -
|
| 129 | + |
| 130 | + </div> |
| 131 | + |
| 132 | + <hr /> |
| 133 | + |
| 134 | + <nav> |
| 135 | + <span> |
| 136 | + <strong>Previous: </strong><a href="/autofactory">Auto-factories</a> |
| 137 | + |
| 138 | + </span> |
| 139 | + <span class="pull-right"> |
| 140 | + |
| 141 | + <strong>Next: </strong><a href="/history">History</a> |
| 142 | + |
| 143 | + </span> |
| 144 | + </nav> |
| 145 | + |
| 146 | + </div><!--/right--> |
| 147 | + </div><!--/row--> |
| 148 | + </div><!--/container--> |
| 149 | + |
| 150 | + |
| 151 | + </body> |
| 152 | + |
| 153 | + |
| 154 | + <foot> |
| 155 | + <script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
| 156 | + <script type='text/javascript' src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> |
| 157 | + |
| 158 | + <script type="text/javascript" src="/content/embed.js"></script> |
| 159 | + <script type="text/javascript" src="/content/prism.js"></script> |
| 160 | + <script type="text/javascript" src="/content/sidebar.js"></script> |
| 161 | + <script type="text/javascript" src="/content/affix.js"></script> |
| 162 | + |
| 163 | +<script> |
| 164 | +$('#search').keyup(function(e){ |
| 165 | + if(e.keyCode == 13) { |
| 166 | + var search = $('#search').val(); |
| 167 | + |
| 168 | + var url = 'https://www.google.com/#q=site:structuremap.github.io ' + search; |
| 169 | + url = encodeURI(url); |
| 170 | + |
| 171 | + //alert(url); |
| 172 | + |
| 173 | + window.location.href = url; |
| 174 | + |
| 175 | + e.stopPropagation(); |
| 176 | + if (e.cancelBubble!=null) e.cancelBubble = true; |
| 177 | + return false; |
| 178 | + } |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | +}); |
| 183 | + |
| 184 | +</script> |
| 185 | + </foot> |
| 186 | +</html> |
| 187 | + |
0 commit comments