Introduction In this post, we’ll dive deep into the fascinating evolution of web services—from their early SOAP-based beginnings, through the rise of WebDAV and REST, and all the way to modern solutions like GraphQL and gRPC. Each approach addressed a particular set of challenges, and all of them left a lasting mark on the way applications talk to each other over the Internet. Let’s explore how web services went from clunky XML exchanges to streamlined JSON endpoints to high-performance, real-time systems. Regardless of whether you are a seasoned developer or just starting your journey, understanding these historical shifts will give you valuable insights into the “why” behind today’s popular API styles. Early Days with SOAP and RPC-Focused Services The Advent of Simple Object Access Protocol (SOAP) In the late 1990s, Simple Object Access Protocol (SOAP) emerged as a game-changer for exchanging data across different platforms. It mainly ran over HTTP (though it wasn’t strictly li...
Traits are reusable components representing a set of methods or behaviors that can be used to extend the functionality of multiple classes. Some programming languages like Groovy and Scala have been supporting Traits for a long time, and allow dynamic association of Traits to any object, at runtime. Java being a strongly typed programming language, enforces a very strict discipline of type association, upfront whilst declaring any language element, e.g. variables, functions, etc; and the same is applicable for Classes too. Therefore when you implement a class in Java, the associative types for the class, must be specified as a part of the declaration of the class, which strongly binds the type interfaces to the class, and cannot be changed in runtime. The concept of Traits is implemented in Java using Interfaces, which contain default methods and variables to allow maintaining an object's state. However, these interfaces then have to be tightly coupled with the class decl...