[MonoTouch] Webservice or ?
Demis Bellot
demis.bellot at gmail.com
Thu Dec 8 15:52:37 EST 2011
As the author I would like to add:
- ServiceStack is supported on Mono on either ASP.NET <http://asp.net/> or
HttpListener hosts.
- I personally believe it promotes the "right way" to develop web
services (i.e. based on remote services best-practices), for a quick
summary between WCF and ServiceStack API design see:
https://gist.github.com/1386381
- It's non-invasive and intuitive and there is very minimal
API/configuration that gets in your way as your code-first POCO DTO's is
what's used to define your API.
- It's more idiomatic to C# as it lets you return POCOs and exceptions
are automatically converted and serialized with ideal HTTP error codes,
etc. (The HTTP output is also completely customizable)
- Each service supports the can return any
http://stackoverflow.com/questions/6245616/does-servicestack-support-binary-responses
- You can re-use your DTOs used to design your Web Services with on your
client which provides succinct typed (Sync/Async) generic ServiceClients
without any code-gen (e.g
http://www.servicestack.net/RestFiles/#!files/tests/SyncRestClientTests.cs.txt
)
It also includes .NET's fastest JsonSerializer (
http://servicestack.net/benchmarks/) which should be a more important
consideration especially in resource-context sensitive environments like
mobiles.
The MonoTouch builds of the Json/Jsv Serializers are kept at:
https://github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoTouch
Here's an example MonoTouch application showing how to call an External
WebService with both Async and Sync Service Clients:
https://github.com/ServiceStack/ServiceStack.Examples/blob/master/src/MonoTouch/RestFilesClient/RestFilesClient/Main.cs
Although it gets overshadowed in popularity by MS offerings (IMO not based
on merit/performance/best practices) as most devs that actually getting
around to evaluating it consider it to be major productivity and
performance win of which you can see by going back through the Groups
history:
https://groups.google.com/forum/#!forum/servicestack
Here's a fairly recent review of it:
https://coldie.net/?tag=servicestack
And even better you can get support by sending to this mailing list if you
wish :)
Cheers,
On Thu, Dec 8, 2011 at 3:03 PM, Josh Handel <Josh.Handel at catapultsystems.com
> wrote:
> Go give Web.API a scan.. Its not your normal WCF experience.. I had REST
> services up and running in no time.. And if you return iqueriables you can
> actually query and filter your data via querystring args you pass in.. So
> rather than writing a "query service" or handling how you want to query
> data.. you can use the OpenData protocal and the new Web.API stuff will
> take the results from your service call (as an iqueriable) parse and run
> the passed in query on top of it, then serialize and send the trimmed data
> down in XML or JSON..
>
> Normally I would say go with some Ruby platform like Rails or Sinatra if
> all you are doing is REST calls.. but this new Web.API stuff is a game
> changer.. For instance, I use DTOs to model my data crossing the wire from
> my REST call to my mobile device.. I actually reuse those POCO cs files in
> my mobile app and JSON.NET deserializes right in to them.. Because they
> are shared source, change the POCO in one file and both my client and my
> server continue to talk the same language :-)..
>
> *Josh Handel*
>
> *Mobile Architect*
>
> 512.328.8181 | Main
>
> 512.328.0584 | Fax
>
> 512.577-6568 | Cell
>
> www.catapultsystems.com<https://webmail.catapultsystems.com/owa/UrlBlockedError.aspx>
>
>
>
> *CATAPULT SYSTEMS INC.*
>
> *THE MICROSOFT CONSULTING COMPANY*
> ------------------------------
> *From:* monotouch-bounces at lists.ximian.com [
> monotouch-bounces at lists.ximian.com] on behalf of Tom Opgenorth [
> tom at opgenorth.net]
> *Sent:* Thursday, December 08, 2011 10:17 AM
> *To:* Nic Wise
> *Cc:* monotouch at lists.ximian.com
>
> *Subject:* Re: [MonoTouch] Webservice or ?
>
> Starting to go down this road myself.
>
> Right now I'm going with REST and JSON. Using Sinatra for the server
> side for now. If it turns out the server has to be .NET, I was going to
> use Nancy (due to its similiarity to Sinatra) or maybe Open Rasta.
> Although, I might now have to take a look at ServiceStack too.
>
> My experiences with WCF have been tolerable, but I'd shy away from it if
> I was starting fresh.
>
> On Thu, Dec 8, 2011 at 05:31, Nic Wise <nicw at fastchicken.co.nz> wrote:
>
>> How complex is your data?
>>
>> For very simple stuff: JSON over HTTP gets my vote.
>>
>> For more complex stuff... JSON over HTTP. Unless you have SOAP/WCF
>> services already written.
>>
>> On Thu, Dec 8, 2011 at 12:26, MojoDK <mrj at fpr.dk> wrote:
>> > Hi,
>> >
>> > I'm new to this, so please bear wtih me. :)
>> >
>> > I need my MT iPhone app to communicate with my company server. What is
>> the
>> > best way to do this? Through webservices? JSon?
>> >
>> > Thanks!
>> > Mojo
>> >
>> > --
>> > View this message in context:
>> http://monotouch.2284126.n4.nabble.com/Webservice-or-tp4172578p4172578.html
>> > Sent from the MonoTouch mailing list archive at Nabble.com.
>> > _______________________________________________
>> > MonoTouch mailing list
>> > MonoTouch at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/monotouch
>>
>>
>>
>> --
>> Nic Wise
>> t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>> b. http://www.fastchicken.co.nz/
>>
>> Nearest Bus: find when the next bus is coming to your stop.
>> http://goo.gl/Vcz1p
>> mobileAgent (for FreeAgent): get your accounts in your pocket.
>> http://goo.gl/IuBU
>> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
>> London Bike App: Find the nearest Boris Bike, and get riding!
>> http://goo.gl/Icp2
>> _______________________________________________
>> MonoTouch mailing list
>> MonoTouch at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>
>
>
> --
> http://www.opgenorth.net
>
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
--
- Demis
http://twitter.com/demisbellot
http://www.servicestack.net/mythz_blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111208/ea90c21b/attachment.html
More information about the MonoTouch
mailing list