webframeworks

If you want to design/develop an IoT (see a list of interesting IoT gadgets here) solution for your client, no doubt you need consider the kind of framework you want to use in your solution to simplify your work .

I plan to create a sample/template solution for my IoT project. As a start, I need to answer at least the following questions.

  1. Where to host my server? Is there any cloud based virtual machine that I can use for free?
  2. Is there any web framework which can simplify my work (at least for device and user management)?

To answer question 2, I first have to decide which programming language I want to use. I am currently an active Android programmer, so I decide to go with Java for server programming. With Java in mind, this is what I first found:

So, basically I still do not have an answer for question 2. There are simply too many Java frameworks out there (c.f. https://zeroturnaround.com/rebellabs/the-curious-coders-java-web-frameworks-comparison-spring-mvc-grails-vaadin-gwt-wicket-play-struts-and-jsf/). There is no single framework which outperforms the others in all directions.

With what I found so far, I am going nowhere. So I have to reconsider again what I really want to achieve here. Ok, I remember I used to use Bottle and Flask (both are in Python) to quickly setup a server for my Android app to access/manipulate remote data. The server size is small. The setup is easy and fast. These frameworks are categorized as microframework. There are similar microframeworks in Java, such as Spark and others.

But the problem with microframeworks is that it is very difficult to create a neat/fancy user interface. Take the way how I normally develop my Android app as an example, I divide my Android projects into 3 parts:

  • A set of (common) modules which consists of the models, controllers, database access, file I/O, etc.
  • A module which consists of all the UIs that uses the common modules.
  • A module which wraps the common modules as an SDK. Other developers can use this SDK to create their own UIs.

I like the way I arrange my code in Android, so I think I should duplicate it to the server development. That means, the framework should support UI development as well. At least, the process should be as simple (and fun) as possible. With this new criterion, I found Cuba. I like the idea that Cuba comes with its own IDE. The table view, chart view, map, and other UI components looks interesting. Unfortunately, it is a commercial platform (i.e. $$$). Then I realized that Cuba actually make use of Vaadin to generate the web interfaces and, most importantly, Vaadin is free.

So I think we have a winner — Vaadin.

Go back to the two questions I asked at the beginning of this post, I am still searching for answer to question 1. But I think the answer is highly related to the answer to question 2.

 

Leave a comment