It's becoming common to hear about declarative versus imperative architectures when listening to vendors talk about modern networking, automaton and policy solutions. And usually, the discussions center on Promise Theory, making the conversation even more confusing.
So what is the difference between declarative and imperative architectures? Simply put, imperative focuses on the "how," while declarative focuses on the "what." As an example, in an imperative architecture using the OpenFlow protocol, a controller would explicitly tell the switch how to handle network traffic. On the other hand, in a declarative architecture using OpFlex or modern DevOps IT automation tools, a controller/master would tell the switch what the desired state should be. The desired state could be "give high priority" or "drop this particular traffic," and that is interpreted by the individual target device without the controller being aware of how the device will achieve the desired state. In the imperative architecture, the exact commands or instruction set would be sent down to the device to make the change.