A computer-implemented method comprising: receiving one or more user inputs received through a graphical user interface of an application programming tool; defining , based on the one or more user inputs, a set of capability abstractions for a particular application, wherein the particular application is to utilize a machine-to-machine network, and the set of capability abstractions comprises: at least one sensor capability abstraction, at least one actuator capability abstraction, a computation logic capability abstraction, at least one input user interface, UI, capability abstraction, and at least one output Ul capability abstraction for the particular application, the capability abstractions corresponding to a respective capability or functionality; define , based on the one or more user inputs, relationships between the set of capability abstractions, wherein the relationships comprise a relationship between the input Ul capability abstraction and the computation logic capability abstraction; generate executable code comprising service logic to deploy an instance of the particular application in an environment, wherein the code is generated based on the set of capability abstractions and the relationships, the method further comprising: identifying a set of resource abstractions corresponding to the set of capability abstractions; and identifying a collection of assets in the environment satisfying the set of resource abstractions, wherein the input UI capability abstraction and output UI capability abstraction each map to a respective plurality of resource abstractions in the set of resource abstractions, and wherein the service logic is further to select at least a portion of the collection of assets for deployment in the instance of the particular application and selection of the portion of the collection of assets is based on respective range or proximity of the assets to a gateway device of the management system corresponding to the environment. receiving one or more user inputs received through a graphical user interface of an application programming tool; defining , based on the one or more user inputs, a set of capability abstractions for a particular application, wherein the particular application is to utilize a machine-to-machine network, and the set of capability abstractions comprises: at least one sensor capability abstraction, at least one actuator capability abstraction, a computation logic capability abstraction, at least one input user interface, UI, capability abstraction, and at least one output Ul capability abstraction for the particular application, the capability abstractions corresponding to a respective capability or functionality; define , based on the one or more user inputs, relationships between the set of capability abstractions, wherein the relationships comprise a relationship between the input Ul capability abstraction and the computation logic capability abstraction; generate executable code comprising service logic to deploy an instance of the particular application in an environment, wherein the code is generated based on the set of capability abstractions and the relationships, the method further comprising: identifying a set of resource abstractions corresponding to the set of capability abstractions; and identifying a collection of assets in the environment satisfying the set of resource abstractions, wherein the input UI capability abstraction and output UI capability abstraction each map to a respective plurality of resource abstractions in the set of resource abstractions, and wherein the service logic is further to select at least a portion of the collection of assets for deployment in the instance of the particular application and selection of the portion of the collection of assets is based on respective range or proximity of the assets to a gateway device of the management system corresponding to the environment. <EOS>