Gadget-based application framework