Functional Lens in Swift

Swift Language က Lens အကြောင်း အခြေခံလေးပါ ထားပါတော့ ကျွန်တော်တို့မှာ Employee ဆိုတဲ့ type ရှိတယ်ပေါ့။ ကျွန်တော်တို့က အဲ့ဒီ Employee ရဲ့ Designation တစ်ခုပဲပါတဲ့ View တစ်ခုဖန်တီးချင်တယ်ပေါ့။ အဲ့ဒီ Designation ကနေ title ဆိုတဲ့ value ကို get လုပ်ပြီးပြချင်တယ်ပေါ့။ နောက် project ရဲ့တစ်နေရာရာမှာ အဲ့ဒီ title ကို ပြင်ချင်တာမျိုးရှိလာနိုင်တယ် ပြီးတော့ အဲ့ဒီ Employee တစ်ခုလုံးကို update လုပ်တာမျိုးပေါ့။ အဲ့တော့ Code အနေနဲ့ကြည့်ရအောင်… struct Employee { let name: String let designation: Designation } struct Designation { let title: String let department: String } အဲဒီမှာ Employee ရဲ့ title ကိုယူတာကတော့ရှင်းပါတယ်။ employee.

Analytics Wrapper

I wrote this library for those who have to sacrifice apk size to add analytics in Android Apps like me. Google Analytics uses something called Google Measurement Protocol behind the scenes. This is well documented API and you can built with your desired language easily. I want to use it in other projects and I don’t wanna copy this file again and again. So I wrote this wrapper as Android Dependency and publish it to Jcenter.