Last month I’ve a chance to develop an app using Sqlite and Entity Framework Code First. Before I started with this project, I thought everything will be easy because Sqlite and Entity Framework are both popular framework. Maybe I just need to install some nuget packages and it will work like a charm. But… yes, there is always a ‘but’ later, it’s just not so easy. Especially when I usually work with NHibernate than Entity Framework. The installation doesn’t complete his job when configuring the .config file (or maybe it just happens for me or does the author do it with intentionally?) and the Migration for Sqlite Entity Framework Code First is not supported (please correct me if I’m wrong). There are, of course, commercial products for Sqlite Migration but I prefer an open source framework or something free :). So in this post I would like to write down the steps required when starting a project for Sqlite Entity Framework Code First and how I make my own simple Migrations engine.
Lotus Notes and Lotus Domino are the client and server of a collaborative client-server software platform from IBM. The ecosystem provides business collaboration functionality, including email, calendars, to do lists, contacts management, discussion forums, file sharing, instant messaging, blogs, and user directories. Like other business applications, Lotus system conducts a database system behind to manage all data objects for sharing data between internal applications. To make the system itself more friendly to 3rd applications, Lotus also provides a driver – Lotus NotesSQL – so that 3rd applications can query data from Domino server. With Lotus NotesSQL, users and application developers can integrate Domino data with their applications through ODBC. IT professionals can enable their existing ODBC-enabled applications to access data stored in a Domino database. It allows ODBC-enabled data reporting tools, database tools, and application development tools to read, report, and update information that is stored in Domino databases (NSF files).
If you follow my previous posts, you may already know that we discussed how to make an application with database in Android before in Android, Dependency Injection (IOC) with roboguice and MVVM (Model-View-ViewModel) pattern. Although the main topic in that article relates to Dependency Injection but we had also a working example which fully supports all CRUD actions for Sqlite database. However, in practice, it shouldn’t work like that because the synchronous read/write actions will block the user interface and your apps will freeze. When your database grows over time, the query time gets longer and you app will completely freeze during the query get executed. Therefore, in this post, I would like to make a sample for illustrating how a database application can work in asynchronous mode.
Android emulator is very famous for its performance. It’s very, very, very notoriously… slow. If you debug your app with Android emulator, it get more extremely slower. This performance problem stems from the fact that Android OS is written for ARM processor (not for Intel/AMD processor or let’s say not for computer processor). Therefore when we get our apps run on Android emulator (which is running on Intel/AMD processor), every assembly code row has to be emulated. A run-time binary translation will happen to translate every assembly code of development machine to device machine. And that point slows down everything.
Flickr is a wonderful image hosting and video hosting of Yahoo. With a free account, you can get a disk space up to 1 TB for uploading and sharing your photos as well as videos. In this post, I would like to make a small demo showing how we can consume the Flickr’s REST web service and display public images of an album on Android phone. The images could be shown either in thumbnail mode or medium mode. The example app is just a proof of concept, you have to improve it when you want to build a same one in practice because I just don’t care about optimizing resources (memory) in source code. You will also ‘learn’ how to implement a singleton pattern (in entire app) with roboguice. That means, small example, interesting use cases.
Tab control is a popular component in desktop application. I think, most of desktop application contains at least a tab control in one way or another. In Android environment, we also have a tab control named “TabHost”, but since Android 3.0, it was replaced by ActionBar. In this post I would like to show how we can make a “fake” tab layout with ActionBar so that we can give user the same experience like TabHost. This control is built up by a combination of ActionBar and FragmentPagerAdapter. The labels will be located at the top, switching between tabs will load the content of the tabs. Moreover thanks to touch screen of smartphone, user can also swipe to navigate between tabs. The final result of our “fake” tab layout looks like following image (Please note that we aren’t going to make a “tab control” but a “tab layout”, they are different concepts)
In previous posts, I showed you how to get/post data to ASP.NET Web API service. However, until now, I only used JSON for communicating between server and client and what about for binary data? For example, uploading files to ASP.NET Web API? How should the controller work and which kind of HTTP request/HTTP format should the Android client send to server? In this blog post, I will show you a simple way to transfer binary data. In the demo, I have 2 components : web service and android client. Unlike the other post, for this one, unfortunately, I don’t have any sample web service (online over internet) for you to test. I don’t own any windows server (neither VPS nor dedicated server :() therefore I can’t host any web service allowing file uploading.
Some of my previous posts involved in web services made by ASP.NET Web API and I have received some feedback that it’s difficult to make the code run. The readers don’t know how to publish the sample web service which is included in source file. Therefore in this post I will show you how to publish a ASP.NET Web API service to localhost (your local computer). The tutorial is written for my current environment with Windows 8.1 and IIS 8.5. If you have another system and don’t find out how to follow a certain step in tutorial, make a comment below. Maybe I can help.