Why You Need SOA and Continuous Deployment

When everyone wants to do things their way, there will be chaos.

If you work with developers vith various talents, you’ll understand the quote above. There is a way to leverage this scenario, and that is to have small teams take responsibilities of various aspects of your product(s). This encourages ownership hence, higher productivity. But you have to make sure there are solid structures in place. This brings us back to the topic “SOA (Service Oriented Architecture) and Continuous Deployment”. You can read more about SOAs by Martin Fowler from here.

We currently adviced our team to embrace Microservices(using this synonymously with SOAs) and Continuous Deployment. Though it was a bit difficult at the beginning, we are very happy now. Not only has productivity gone up, we are happier as developers. After the team was encouraged to look at docker, we settled on dokku which is like a mini-Heroku, based on docker. As developers, we love to automate stuff, hence the reason for settling with something “similar” to Heroku.

With this architecture, individual teams could decide on the languages and frameworks they want to use and we still get a unified environment for various services. Docker is a linux container engine and fun to play with. Dokku sits on top of this (with 100 lines of bash script), to deliver continuous git deployment. I suggest playing with docker for a while before moving to dokku, and you might not even want dokku for your use case. Dokku does not support multiple hosts, that’s why we are all waiting for Flynn, which currently has 15+ sponsors.

Recap of OOP Concepts

Wow, OOP (Object-Oriented Programming) is way older than me and may be you. Well, how much of it’s concepts do we know. I’ll use the ruby code below to give a recap on some of the concepts in OOP.

Out Pet class definition with two methods

class Pet
  # This method call creates both getters and setters for each variable passed
  attr_accessor :name, :color

  def initialize(name, color)
    @name  = name
    @color = color

  def greet
    puts "Hi, meet #{@name}, my lovely pet."

The Cat class inherits from Pet and overrides the “greet” method

# Cat inherits from Pet which is the superclass in this case
class Cat < Pet

  def greet
    puts "Meow"

The Dog class inherits from Pet and overrides the “greet” method as well

# Dog is another subclass that inherits from Pet as well
class Dog < Pet

  def greet
    puts "Woof"

Objects & Classes

Objects model real-world objects and can be seen as “black boxes” that encapsulate attributes and behaviours. Eg, if “Pet” is the object, the attributes are name, color, etc. If “Dog” is the object, one unique behaviour is barking.

Classes are the main stuff. You can think of them as templates or blueprints that objects immitate. Hence, an object is called “an instance” of a class. From the code above, Pet, Cat and Dog are classes.

Imagine you are filling a form, the blank form is analogous to a class whiles a filled form is analogous to an object. The blank form is a blueprint (Class), but the filled form is unique to you (Object). The code snippets below give examples of objects that are based on the classes defined above.

# Asuming we have a brown dog called Jack
# Here we create an instance (jack) of the Dog class
jack = Dog.new("Jack", "Brown")

# Lets create another one
my_pet = Cat.new("Pretty Pet", "Black and White")

Classes have methods which define the behaviours of the object in question. Let’s take a look at the “greet” method on Pet.

# For "jack" which is a Dog,
jack.greet # Prints "Woof"

# For my_pet which is a Cat,
my_pet.greet # Prints "Meow"

Coming next are Inheritance, Encapsulation etc

When They Are Gone

How we felt and how we are feeling now cannot change the fact that they are gone. Loosing our loved ones has always been painful but I take solace in the consoling words of Christ. They are in a better place and we will see them on that day.

Today marks my mum’s one year but I just can’t believe it’s been a year already. When I think about it and how it all happened, it always brings up one question; how prepared am I to meet my maker. Beloved in the Lord, let’s prepare for His coming and live every second of our lives for Him and Him alone. My mum spent her life working for the Lord. She made me into what I am today, and I hope to follow her legacy.

If you are reading this but not yet in Christ, pause and ask; why all this noise about Him. Well, if it is true (which we believe is), what will you do about it? You need no special abilities to ponder over this questions so just start pondering right away. Speak to Him and listen, you’ll be surprised at what you’ll hear. If you still do not agree with me, just pick up the gospel according to John and read it for fun. Keep asking, keep listening and you will understand.

Dedicated to my dear mum (aka Davi) of blessed memory.

God bless you for reading.

Why We Blog

Though I appreciate blogs, it took me sometime to create mine. Knowing I’ve missed a lot, am here to make it up to myself. There are so many blogs out there that bring happiness into other’s lives but what really is the essence of blogging. I took the liberty of “googling” first before asking anyway. A good friend of mine will always “bing” it even if he were working in Google. :D

If you are reading this, I would appreciate your comments on why you blog and the benefits you’ve seen so far. Hopefully, this will give someone a push to start that wonderful blog.

As an avid lover of technology, I hope to tell others about my life which include things I did, things am doing and things I want to do.

Thank you and enjoy the comments.