Archive

Tag Archives: java

Some time ago I designed and implemented mobile solution to browse/search legal information actual in the Netherlands. There are a lot of legal institutions, rules, etc. in the Netherlands, so, the idea of application is to provide the roadmap for regular user to solve specified law question/problem.

There is a client-server solution. From one hand there is free android application which can be used as offline manual. As it’s mostly content oriented application, I created it by PhoneGap + HTML5 + jQueryMobile technology. But it’s not pure HTML5/JS/CSS solution because it needs several PhoneGap plugins implemented by Java.

Server side of the solution is a simple PHP+MySQL CMS implemented as single-page backbone.js web application to compose and correct the content of the manual. I also used Slim MVC, Twig templates and idiorm ORM to MySQL frameworks.

The workflow is:

  1. Content manager edits the content (CRUD) and deploy new version available via HTTP online;
  2. The clients automatically update (check, download and install) the latest version of content from that HTTP interface when they are online;
  3. Then the clients may use new content even offline.

There are also such useful features:

  • search by tags
  • feedback form
  • share the link/content via email/facebook/twitter/etc.

Image

For new multiplayer social game I created simple TCP client as Android application. It connects to special echo server (.NET) and sends/receives packets to/from other clients. Packets are UTF-8 text messages prefixed by string length 4-bytes integer as a header of the packet.

Android-tcp-client

I used Java NIO to implement network layer with second worker thread to wait for connection establishment and further reading of incoming packets. Network layer is separated of GUI, so, ready to be used in other Android application. Eclipse project, .NET server and client for tests are here.

 

I just completed with tiny Java/Swing tool for matching words translation. This game loads vocabulary from file. The goal is matching all words translations correctly.
This implementation is standard MVC design. GUI notifies controller via delegate interface and the model notifies controller by observer pattern.

Wordsmatch