Grid computing enables the aggregation of a large number of computational resources for solving complex scientific and engineering problems. However, writing, deploying, and testing grid applications over highly heterogeneous and distributed infrastructure are complex and error prone. A number of grid integrated development environments (IDEs) have been proposed and implemented to simplify grid application development. This paper presents an extension to our previous work on a grid IDE in the form of a software framework with a well-defined API and an event mechanism. It provides novel tools to automate routine grid programming tasks and allow programmable actions to be invoked based on certain events. Its system model regards resources as first-class objects in the IDE and allows tight integration between the execution platforms and the code development process. We discuss how the framework improves the process of grid application development.