First meetup
21 July 2014 marked our first usergroup meetup. After having discussed starting an Android usergroup since the beginning of the year, we decided to just do it.
We decided to start small and tried to keep it fairly informal, so after a quick introduction we had 2 topics to discuss:
- Recent developments in the Android world (By Matt)
- Sugar ORM (By Ross)
Recent developments in the Android world
As Google IO happened recently, we mostly focused on announcements from there. The keynote is well worth watching: Google I/O 14 Keynote
We also briefly discussed:
And as everybody that attended works on Discovery Vitality applications, this was quite a big one for us:
Sugar ORM
Ross gave us a quick introduction to Sugar ORM
Sugar ORM is a very simple ORM for Android that allows you to interact with SQLite in a simple way with minimal boilerplate.
Sugar CRM focuses on two things and nothing more:
- Database creation
- Simple APIs to manipulate domain objects
Setup
Sugar ORM requires very little setup.
All you need to do is, specify SugarApp as your application class in AndroidManifest.xml. You do that by changing the android:name attribute of the application tag.
There’s also some optional meta tags to configure it. In your AndroidManifest.xml:
Entities
You simply extend SugarRecord for all the classes that you need persisted. That’s it:
APIs
Performing CRUD operations are very simple. Functions like save(), delete() and findById(..) are provided to make the work easy.
Save Entity:
Load Entity:
Update Entity:
Delete Entity:
Bulk Operations: