Original scientific paperThe increased usage of smart devices and appliances opens new venues to build applications that integrate physical and virtual world into consumer-oriented context-sensitive cyber-physical systems (CPS). Since physical processes are dynamic, concurrent, event-driven, and powered by various sensors, controllers, and actuators, a combination of service-oriented architecture (SOA) and event-driven architecture (EDA) is the most promising software architecture for virtualization of heterogeneous components into interoperable application building blocks. In this paper, we propose a CPS design paradigm where devices, such as sensors, controllers, and actuators, are virtualized into environmental services. To support event-driven workflow coordination, we designed special-purpose coopetition services that provide fundamental EDA characteristics, such as decoupled interactions, many-to-many communication, publish/subscribe messaging, event triggering, and asynchronous operations. Based on these two groups of services, we present a design of event-driven service composition languages that target two distinct groups of developers. Using Python as an example, we present a transformation of arbitrary general-purpose programming language into an event-driven service composition language for developers familiar with parallel programming using operating system kernel mechanisms. On the other hand, we present the design and cognitive evaluation of an end-user language, whose 2D tabular workspace resembles the process of sketching an automation application on a sheet of paper.Key words: Cyber-physical systems, Service-oriented event-driven programming, Multi-device applications, Tabular programmingKrajnjem korisniku prilagodeni programski jezici za poosobljavanje računalom upravljanih okolina. Povećanom uporabom suvremenih elektroničkih uredaja otvaraju se nove mogućnosti za izgradnju primjenskih programa koji objedinjuju fizički prostor i informacijske sustave u korisniku usmjerene računalom upravljane okoline. Suvremeni prostori opremljeni su različitim vrstama osjetila, upravljača i pokretačkih uredaja koji vremenski uskladeno upravljaju dinamičkim i dogadajima poticanim paralelnim procesima. Spregom uslužno usmjerene i dogadajima poticane arhitekture omogućen je pristup raznorodnim fizičkim uredajima u obliku medusobno sukladnih gradivnih komponenti primjenskih programa. U radu je predložena paradigma izgradnje računalom upravljanih okolina u kojoj se uredajima iz okoline pristupa putem programskih usluga. Za potrebe oblikovanja dogadajima poticanih tijekova izvodenja programa, oblikovan je poseban skup usluga suradnje i natjecanja. Te usluge ostvaruju osnovne značajke arhitekture zasnovane na dogadajima, kao što su neizravno medudjelovanje, komunikacija u grupi, objavi/pretplati komunikacija, pokretanje dogadaja i asinkrone operacije. Na osnovi tih dviju skupina usluga, oblikovana su dva jezika za dogadajima poticanu kompoziciju usluga. Na primjeru jezika Python, prikazano je preoblikovanje jezika o...