We got to know with Google, Flickr and Twitter API service in some of my previous posts. All these provide us an authentication scheme so that we can authenticate ourselves and get permissions to 3rd party resources. We have also created our own REST web services by using ASP.NET Web API for publishing data to our clients. However, until now, our web services are all simply public to everyone. Everyone can use them, even our competitors (if there’s any) 🙂 That’s not good and I also received questions if a web service can be protected by using authentication. So in this post I would like to make an introduction about new technology of Microsoft : The ASP.NET Identity. We’ll build a very simple REST web service with ASP.NET Web API and ASP.NET Identity from Visual Studio template and try to access it from a .NET client.
The ASP.NET Identity system is designed to replace the previous ASP.NET Membership and Simple Membership systems. It includes profile support, OAuth integration, works with OWIN, and is included with the ASP.NET templates shipped with Visual Studio 2013.
Continue reading C# – ASP.NET Web API and ASP.NET Identity
Handling asynchronously is a ‘must’ for all mobile applications when executing any long time operation. For example, in Android, when a network operation is going to be called, it has to be executed on other thread (not UI thread). If the developers try to run a network operation on UI thread, Android OS will force the app to stop with an exception of android.os.NetworkOnMainThreadException. As usual, the developers will put long time operation in a AsyncTask (or a Thread) and let it run. I also introduced this class in many Android posts before. However I have only one AsyncTask running at a time in all of examples. A reader asked me if I can create a list of AsyncTask and execute them at the same time. Something likes Parallel Computing? The answer is ‘Yes, of course’. We can do that in Android. Therefore, in this post, I would like to show how I simulate a multi-threading case with AsyncTask and some experimental cases for comparison between native Java and Android Java in Parallel Computing
Continue reading Android – Introduction to Parallel Computing