I'm developing an Universal App in c# - Is there a way to consume EWS in Universal Apps?
The cool thing about webservices is, that you can consume them from anything that can reach out to http. So you can talk to it using HttpClient.
As ews is a very complex api, you may look out for the EWS managed api package. They sadly don't support .Net Core yet (and therefore UWP Apps). But it's open source they take pull requests, so you just try to move it over to a .netstandard type of library.
So in short: Yes you can, but it's complicated...
Related
I am learning development for Windows Universal Platform and I wanted to create a simple app capable of leveraging some Spotify data once the user logs in.
I can see from the documentation that there is an SDK for Android and iOS, and a library that is considered deprecated.
Do you guys know if there is any way for me to still communicate with the Spotify API using .NET/C# ?
Thanks a lot,
Florian
There doesn't seem to be a SDK from Spotify, but there are references to WebApi .Net Wrappers at the bottom of this official page:
Spotify Web API Wrapper on Codeplex
Spotify Web API Wrapper on GitHub
When developing .NET 4.5 desktop apps for Windows I have been used to use System.Net.Http.HttpClient for all communication with a backend Web API. I am now developing a Windows Store app and has noticed the existence of Windows.Web.Http.HttpClient. I have looked for information on what the main differences are between the two clients but without any luck.
From MSDN I know that I should start using Windows.Web.Http.HttpClient in my Windows Store app since System.Net.Http.HttpClient might be removed from the API:
Note The System.Net.Http and System.Net.Http.Headers namespace might not be available in future versions of Windows for use by Windows Store apps. Starting with Windows 8.1 and Windows Server 2012 R2, use Windows.Web.Http.HttpClient in the Windows.Web.Http namespace and the related Windows.Web.Http.Headers and Windows.Web.Http.Filters namespaces instead for Windows Runtime apps.
But apart from this information, I have a hard time figuring out what are the main differences and what is the main benefit of using Windows.Web.Http.HttpClient? What does it add that we don't already got in System.Net.Http.HttpClient?
Answers backed by official documentation are greatly appreciated.
Windows.Web.Http is a WinRT API available in all the WinRT programming languages supported: C#, VB, C++/CX and JavaScript. This enables the option to write the same code in the language of your choice.
System.Net.Http is a .NET API, and it is only available for C# and VB developers.
Windows.Web.Http advantages
WinRT APIs are written in native code, which translates in better performance.
Windows.Web.Http is on top of a common Windows HTTP stack, and reuses resources already in use by other Windows components. System.Net.Http is a separate implementation of the HTTP protocol that is not frequently used by other Windows components. So, in some cases, you save resources by choosing Windows.Web.Http.
Windows.Web.Http has better integration with WinRT types, such as IInputStream, IOutputStream and IBuffer. Avoiding the .NET extensions that convert System.IO.Stream into IInputStream or IOutputStream and System.Array into Windows.Storage.Streams.IBuffer can improve performance and save resources in some cases.
Windows.Web.Http has the new features, such as HTTP/2 support.
Windows.Web.Http is COM based and can be used by any programming language that understands COM.
System.Net.Http advantages
System.Net.Http is available since Windows 8 or .NET 4.5 and Windows.Web.Http is only available since Windows 8.1 and Windows Phone 8.1.
It is straight forward to port WinRT code using System.Net.Http to ASP.NET or Xamarin (Portable Class Library)
Windows 8 and 8.1 projects or desktop projects: †
Authentication headers and credentials are isolated per HttpClient (example)
Cookie container isolated per HttpClient
Does not cache HTTP responses, so subsequent requests will never come from the cache, a common issue with servers that does not set the correct Cache-Control header (example)
Works with System.Net.NetworkCredential
† For Windows Universal Projects (UWP), System.Net.Http is a wrapper on top of Windows.Web.Http, as described here.
Further reading: Demystifying HttpClient APIs in the Universal Windows Platform
There is not much to find about it. Some things that come in my mind:
The new API doesn't have dependencies to some low-level Windows functions, like the current API does.
The new API is better capable handling new methods related to the HTTP protocol, like WebSockets, etc.
Some useful information can be found in this blog post which also referenced this Build video. They speak about better cache control, and a way to add filters for authentication, easy access to cookies, reconnecting, etc.
I'm developing an iOS/Objective-C Enterprise application that needs access to a SQL Server back-end via a hosted C# service. WCF is the obvious choice for the plumbing, but like most Microsoft development technologies, once you get beyond a simple demo app, it gets pretty ugly.
I came across ServiceStack and it looks much nicer than WCF. It worries me that I can find almost no references to anybody else using an iOS/Objective-C client (although I do see a couple references to iOS/Mono ServiceStack clients).
ServiceStack is clearly focused on standard protocols so i'm sure it can do the job, but I have the nagging feeling that I'm missing something. Am I trying to drive nails with a blender or something?
What's the mainstream solution for iOS/Objective-C developers connecting to a back-end SQL Server database?
From the outside you can think of ServiceStack as just shipping clean JSON over the wire, although ServiceStack does provide a nice story for .NET clients by being able to share typed DTOs to provide an end-to-end Typed API for free, i.e. without any code-gen or additional effort. The web service output itself is clean and doesn't have any coupling to ServiceStack and can be easily consumed with the standard JSON or XML serializers in each of the respective platforms.
The swedishstartupspace.com recently posted how they built their winning SLussen iOS mobile app in a day at the Uppsala Hackathon. They used the native iOS RestKit library to consume their back-end ServiceStack API.
Others have used Xamarin.iOS front-end to build native iOS apps in C#, there's also a course on PluralSight showcasing how to use c# to develop Xamarin.iOS native mobile apps talking to a ServiceStack back-end.
Can anyone help or direct me to a guide for using Amazon Web Service in Visual Studio 2010? I tried downloading the .Net SDK from the amazon website but it wouldn't let me add the reference to the .dll because it said that it wasn't build for Windows Phone 7.
Thank you
It seems there's no library for WP7 yet. This is because AWS does not allow cross domain requests (although there are some workarounds like this one), and therefore there's not much from the Silverlight world.
Your options here are:
Create a proxy service that talks with AWS through the .NET api. You will need to publish this service when you go live with your app though.
Build your own library based on REST (AWS will stop supporting SOAP next month). You can find the complete documentation of each web service here. Note that this would take much more time and effort, but you could make it open source so other developers can benefit and contribute to it too.
So we already have a web service that was develop a long time ago. It's the legacy .net web service (not WCF)
I'm looking into how to build a web application that i'll be able to run on multiple different devices : IPhone, IPad, Android.
So far i've seen PhoneGap : http://www.phonegap.com/. This is interesting for us because it seems to allow us to use Native Device Features. Our app needs to use Scanning capabilities.
Since phonegap is based on HTML ... would it be possible to have it communicate with our legacy web service? How can this be achieved?
Let's say our app don't need to use any device native features, I guess just building a regular ASP.NET page should work right?
Do I have to make modification to our existing webservice? Like making it RESTful?
Any advice is appreciated,
Thanks,
You simply create an XMLHttpRequest in Javascript, pass in your GET/POST parameters, and handle the XML which the webservice returns. It's quite simple, really!
jQuery gives javascript developers $.get and $.post functions which make this extremely easy. Remember, you can use any javascript library and function supported by the devices webview within your phonegap application!
Titanium Appcelerator is another alternative.
The application is developed in javascript and native code generated for iPhone, Android and in the latest release for Blackberry as well.
EDIT: Here is a comparison of Phonegap and Titanium.
Related discussion on Stackoverflow:
Is Titanium appcelerator worth it for developing camera based application on ipad, iphone and android?