On this current project of mine, I wanted to provide operations like adding / removing a field or adding / removing multiple fields to a BSON Object (from the BSON library – org.bson.BSONObject) along with operations like toBytes on it. Instead of creating a utils class that contains all these behaviors, I resorted to Scala’s Implicits. Continue reading
As I learn and discover more about functional programming each day, I personally feel that have I wasted these many years (over 15+) in working with objects and object orientation… It does leave me frustrated to an extent, but hey, its never too late to pick up things.
I just feel bad that with typical web apps what we really do is take the data, convert it to object hierarchy and graphs and eventually persist them in some Relational DB using an OR mapper; only to be read back as some view or to be iterated over a collection of objects for projections or aggregated views. Just makes me feel stupid….all these years, did I do that type of work and get paid? Continue reading