Implementing quick web prototypes – Metatag SW architecture

As developers in the software industry, we have quite a few project ideas from time to time. Often, we don’t give it much a thought and consider it too complex to implement the idea. Hence, the idea fades away in some days. However, with the availability of numerous tools and technologies, we can just get the ideas implemented quickly with the right choices. In this post, we try to list the technological choices used in our meta-tag application explained in the previous blog. An important goal for us is to create prototypes quickly. Hence, we opted for tools that were ready for use.

Most of the ideas have common aspects like gathering data, representing the data in a meaningful form per the business logic and persisting the data. Invariably, there are some data administration needs.  The different aspects are illustrated in the below diagram:

For our meta tag application, data collection happens when unstructured data is read from the nfc tag in form of numbers or images. The application backend provides the business logic by deciding what needs to be done when and where for the gathered data. The structured data is then persisted for use in the database. The user interface defines the data representation and charts and lists are used where appropriate. Our application has some data administration needs like removing tags or users or bulk uploading data. In summary, we have to choose technologies with which we can implement our user interface(s), business logic and data persistence needs. The nature of the application idea defines the user interface needs.

So, where did we start?

The obvious choice was using open source technologies – perhaps with a backend supporting two-way communication, a noSQL database and a single page application for the front end. In addition to the core application features, we needed generic functionalities like authentication and user management and deployment.

After trying out different independent components, we finally opted for generator-angular-full-stack boilerplate. To us, this appeared to be a one-stop solution for our experimental, functional and non-functional needs. For our meta-tag application, we needed NFC reading capability and it should be faster to prototype. So we opted for ionic2 application. With ionic2, it is possible for us to leverage our existing web programming expertise. Thus, with generator-angular-full-stack boilerplate and ionic2, we can map our solution choices as follows.

Angular-full-stack-generator is a Mongo Expressjs Angularjs Nodejs (MEAN) application stack. More information about MEAN can be found at http://mean.io. This boilerplate helped to meet the following functional requirements built in:

  1. Backend REST server
  2. Socket server
  • Frontend for data administration (or collection/visualization as well)
  1. Database management using Mongoose
  2. User authentication using emails
  3. User authentication using social media
  • Route validation

In addition, the below development needs were also met.

  • Integrated testing tools for unit testing, end to end tests and integration tests
  • Live reload
  • Code analysis tools like jslint
  • Minification and uglification

We opted for ionic2 for our mobile applications development. The choice of ionic2 helped us in several ways as listed below:

  1. Easy to get started with existing web development skills
  2. Developing with HTML, CSS and javascript is much faster than native apps
  3. Develop one application and the option to deploy in both iOS and Android platforms
  4. Further, our application UI is simple and does not depend on built-in phone hardware.

Thus with our technological choices, we are able to get the application ready and have the initial version of our ideas implemented. With the vast technological choices available, developers can easily prototype the ideas quickly is our conclusion!

Location specific information access using NFC

We have been developing small web application for testing possibilities of NFC technology. Near field communication is basically wireless communication system when user touches remote device. Modern cell phones have NFC functionality built in. Typical uses are automatic configuring Bluetooth devices and numerous smart card applications such as transportation tickets.

NFC needs 2 for tango. One is accessing information and the other has the information. NFC tag is physical item that has one physical location in world. NFC tag has small memory and unique identifier number. NFC tag is powered by reader when information is accessed. Cell phone can write some information to tag.

Metatag prototype application uses NFC tags for access points to information. Touching tag will open needed information instantly. Just touch the tag and viewer app is opened (app or web browser depending on case) with attached information automatically. Information here is pointer to actual information that locates on Metatag web server.

Metatag has 3 different types of information to be used: 1) numbers 2) online pictures and 3) journal. With these users can access online help just touching the tag, report various numerical data (where IoT is not applicable) and write text notes information fast by accessing tag.

When tag is set to public mode, app will write URL to tag that is the pointer to data on server.  When tag has URL, phone can open URL with phone browser and app is not needed (public view).

Example of numerical value. 

Example of online help. Information as images. 

Example of journal. 

Short video about storing information to tag. NFC labels are used as access points that can be programmed with most smartphones.