Wireless sensor networks (WSNs) are used for various ubiquitous and pervasive environments. A few common applications are security, agriculture, automation, and environmental monitoring. This paper provides the software architecture and design to develop a webbased application to query a wireless sensor network. A model-view-controller architecture is used to develop a generic web-based application. This application can act as a template to develop a simple interactive webbased tools for WSN-based technologies. The architecture is applied to design two monitoring protocols: continuous monitoring (CM) and query-based monitoring (QM). In CM, the application is designed for a specific query; however, in QM, the network is interactive and different queries can be sent.