So we changed plans after serveral weeks, and decided to develop a local app. The side effects are obvous. We have to redesign and implement the user interface on Android, rewrite the data access interface with CouchDB server, deal with dataflows, and decide the interaction between data and interface, and we have got less time.
Another challenge is that I have to learn some stuffs that I didn’t even hear about. These includes Git, PhoneGap, AngularJS, CouchDB. All the new stuffs sound interesting and inspire me to learn, but sometimes it becomes very boring when I get stuck. For example, I got sutck when I tried to upload files into server because I didn’t know how the server deals with my file(content-type, and encoding). Then I had to turn to Dan for help:), or in other cases use web developer’s tool to track the HTML request.
In this project, I learned how to make use of GIT to manage my development process. But I should have updated my code more often, to save my changes to the server, and to inform my mentor Dan about my new improvement.
Compared with relational database such as MySQL or MS-SQL, CouchDB is a fresh-new idea for me because it is NO-SQL and document based. It discomforts me at first, but then it becomes very interesting and easy to use. CouchDB can provide a more flexible data model than relational database, and provide scalability and performance advantages. And what’s more, it can spread its data across servers automatically, making it extremely suitable for distributed system.
AngularJS is another new JS framework I have learned. The most fashion thing about AngularJS is bi-directional data binding, to avoid complex callbacks to listeners. And the directives of AngularJS is very useful to define my own tags, so I can do something interesting with my browser. It also support other features such as model, MVC, dependency injection. These features are very different from what I have learned in jQuery, and are really cool. Although I didn’t write any AngularJS code in this internship, I would love to try it in my future work.
Also, I’m more familiar with Android development. I learned on how to operates a listview to show different types of items with different views, how to control the styles and themes of application, how to find the ID of views on system widgets through source code and more.
There are 2 aspects that could be implemented in this project in the future. The first is about the encryption communication. For the sake of debugging, I didn’t encrypt and check the integrity of the message. But in fact, encryption is very important to avoid network sniffing, and also integrity checking is important to avoid message tampering.
The second is that multicast DNS (mDNS), which can be used to discover MediaGrid servers on LAN automatically. Usually, the IP of MediaGrid server is hard or unable to know manually, so mDNS will make MediaGrid much easier to use.
In these three internship, I not only mastered a lot of new skills and improved my programming skill, but also had the opportunity to know some excellent people and their excellent project. And their open-source spirit is a great encouragement for me.
Last, great thanks to Dan’s MediaGrid project and his kind help.
The video demo of MediaGridAndroid is located at MediaGridAndroidDemo