-
Notifications
You must be signed in to change notification settings - Fork 1
/
2013-06-06.html
241 lines (181 loc) · 7.91 KB
/
2013-06-06.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta name="description" content="Client Server Web Architecture includes REST inspired Web APIs, significant JavaScript client side processing and Java or other server side language (many of which are available on the Java Virtual Machine).">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width" />
<title>Client Server Web Application Development - webapis</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/foundation.min.css" />
<link rel="stylesheet" href="js/assets/base.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<style>
body {line-height: 1.4;}
html { overflow-y: scroll !important;}
img {height: 25px;}
pre {
font-size: 12px;
line-height: 1
padding: 15px;
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */
overflow: auto;
}
span.tag{
position:relative;
left:-10px;
}
div.box {
position:relative;
width:90px;
height:20px;
top:-10px;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
border:27px solid #FFFF00;
background-color:#F2AD0C;
-webkit-box-shadow: #B3B3B3 5px 5px 5px;
-moz-box-shadow: #B3B3B3 5px 5px 5px;
box-shadow: #B3B3B3 5px 5px 5px;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /*for IE*/
-o-transform: rotate(20deg);}
div.jvm {color:red;}
div.webapis{color:blue;}
div.javascript{color: green;}
div.java{color: purple;}
</style>
<script src="js/vendor/custom.modernizr.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40376887-1', 'clientserverweb.com');
ga('send', 'pageview');
</script>
</head>
<body>
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1><a href='/'>Client Server Web Applications</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="left">
</ul>
<ul class="right">
<li class="active"><a href="jvm.html">JVM</a></li>
<li class="active"><a href="java.html">Java</a></li>
<li class="divider"></li>
<li><a href="javascript.html">JavaScript</a></li>
<li><a href="webapis.html">Web APIs</a></li>
<li class="divider hide-for-small"></li>
<li><a href="about.html">About</a></li>
</ul>
</section>
</nav>
<div class="row">
<div class="large-2 columns">
<h4>2013-06-06</h4>
<div class='box webapis'><span class='tag'>webapis</span></div>
</div>
<div class="large-10 columns">
<div class="panel">
<p>
<h4>REST Inspired Pragmatic Web-API Design</h4>
<p>REST as defined by
<a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm">Roy Fielding</a>
exerts a wide influence yet is seldom adopted <i>in toto</i>.
In <a href="http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api">Best Practices for a Pragmatic RESTful API</a>
Vinay Sahni summarizes factors that make an API flexible, easy to use, and easy to adopt. His post differs from Fielding's relatively
abstract, theoretical definition of constraints and includes factors like security, documentation, versioning, and JSON style.
While he includes some discussion about linking (pagination) he explicitly cites HATEOAS as not quite ready for prime time,
a concern that has relatively broad consensus among API developers currently.
</p>
<p>HATEOAS is still a topic of active interest of course. <a href="http://jsonapi.org/">JSON API</a> is a JSON-based
read/write hypermedia-type designed to support a smart client who wishes build a data-store of information.
Like the "Best Practices" post above, it is obviously REST inspired, but is tempered by concerns introduced
by specific web application API design (the API is extracted from the JSON transport
defined by <a href="http://emberjs.com/">Ember's</a> REST adapter.)
</p>
<p>
Securing Web APIs is another practical topic not addressed by REST directory. James Ward
presents a well articulated explanation of how to
<a href="http://www.jamesward.com/2013/05/13/securing-single-page-apps-and-rest-services">secure single page apps and REST services.</a>
In many cases, security is the determining factor on the viability of an API. Security is a practical constraint that influences
the adoption of an API to a much greater extent than other specified constraints that comprise REST.
</p>
<p>
The definition of REST in its theoretical purity is immensely valuable. But the long term vision driving REST constraints
introduces characteristics that are not flexible, easy to use, or easy to adopt. The history of the web shows that real-world
practicality wins over theoretical purity in the web world. REST ought to continue be recognized in its function as a standard-bearer
but most projects will benefit with clear articulation of how to apply its principles effectively given current development
expectations.
</p>
</p>
</div>
</div>
</div>
<div class="row">
<div class="large-2 columns">
</div>
<div class="large-10 columns">
<!-- REPO -->
</div>
</div>
<div class="row">
<div class="large-2 columns">
<a href="rss.xml"><img src='/img/rss.jpeg' /></a>
</div>
<div class="large-10 columns">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'clientserverweb';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</div>
</div>
<script>
document.write('<script src=' +
('__proto__' in {} ? 'js/vendor/zepto' : 'js/vendor/jquery') +
'.js><\/script>')
</script>
<script src="js/foundation.min.js"></script>
<!--
<script src="js/foundation/foundation.js"></script>
<script src="js/foundation/foundation.alerts.js"></script>
<script src="js/foundation/foundation.clearing.js"></script>
<script src="js/foundation/foundation.cookie.js"></script>
<script src="js/foundation/foundation.dropdown.js"></script>
<script src="js/foundation/foundation.forms.js"></script>
<script src="js/foundation/foundation.joyride.js"></script>
<script src="js/foundation/foundation.magellan.js"></script>
<script src="js/foundation/foundation.orbit.js"></script>
<script src="js/foundation/foundation.placeholder.js"></script>
<script src="js/foundation/foundation.reveal.js"></script>
<script src="js/foundation/foundation.section.js"></script>
<script src="js/foundation/foundation.tooltips.js"></script>
<script src="js/foundation/foundation.topbar.js"></script>
-->
<script>
$(document).foundation();
</script>
</body>
</html>