|
147 | 147 |
|
148 | 148 | <div id="body"> |
149 | 149 |
|
150 | | - <h1>Specific Media Types vs Data Formats</h1> |
| 150 | + <h1>Custom media types - Adding the VCard Format</h1> |
151 | 151 | <p> |
152 | 152 | An often overlooked feature in ServiceStack is its ability to easily support custom media types and formats. |
153 | 153 | </p> |
| 154 | + |
| 155 | + <h3>Specific Media Types vs Data Formats</h3> |
154 | 156 | <p> |
155 | 157 | It's not given as much prominence as ServiceStack's other formats simply because supporting specific media types |
156 | | - require more development effort to implement and are unlike other built-in ServiceStack generic formats |
157 | | - (JSON, XML, CSV, JSV, HTML, SOAP) that all your services can immediately take advantage of <b>without any extra effort</b>. |
| 158 | + require more custom development effort so are unlike other built-in ServiceStack generic data formats |
| 159 | + (JSON, XML, CSV, JSV, HTML, SOAP) that are automatically available to all your services <b>without any extra effort</b>. |
158 | 160 | </p> |
159 | 161 |
|
160 | | - <p> |
161 | | - Although when you need to, adding Custom Media Types in Service Stack is easy where with just <b>1 Line of Code</b> you |
162 | | - can register your format and have it is immediately availble in ServiceStack's REST pipeline and auto-generated |
163 | | - <a href="metadata">/metadata</a> pages. |
164 | | - </p> |
| 162 | + <h2>Creating the VCard Custom Media Type</h2> |
165 | 163 |
|
166 | | - <h2>Custom media types - VCard</h2> |
167 | 164 | <p> |
168 | 165 | At times when your clients have built-in support for a specific media-type it can allow richer functionality and |
169 | 166 | a deeper integration into users applications than what would otherwise be possible. An example of this is |
170 | 167 | allowing users to import contact information directly into Outlook by providing contact information |
171 | | - in the <a href="http://en.wikipedia.org/wiki/VCard">VCard Format</a> which they can download off a contact directory search. |
| 168 | + in the <a href="http://en.wikipedia.org/wiki/VCard">VCard Format</a>, which you can make available for instance |
| 169 | + on the results page on an online contact directory search. |
| 170 | + </p> |
| 171 | + |
| 172 | + <p> |
| 173 | + So when it's beneficial to, adding Custom Media Types in Service Stack is easy where in just <b>1 Line of Code</b> you |
| 174 | + can register your format and have it immediately availble in ServiceStack's REST pipeline and auto-generated |
| 175 | + <a href="metadata">/metadata</a> pages. |
172 | 176 | </p> |
173 | 177 |
|
174 | 178 | <p> |
175 | | - Below is a live example of what is possible which utilizes data returned from Northwinds <b>Customer</b> web services that |
176 | | - allows for the unusual relationship of allowing a MONO web server deep access into your Windows Outlook client :) |
| 179 | + Below is a live example of what is possible when we add the VCard format to the Northwinds <b>Customer</b> web services. |
| 180 | + It allows us to provide the unusual relationship giving our MONO web server deep access into your Windows Outlook client :) |
177 | 181 | </p> |
178 | 182 |
|
179 | 183 | <a href="customers/ALFKI?format=x-vcard"><img src="img/vcard-ALFKI.png" alt="Maria Anders VCard" style="margin:10px;" /></a> |
|
0 commit comments