Enabling modular application development for management and security in software-defined networks