To introduce the concept of docklet, let's take a look at a typical web page template.
The concept of docklet is more like an app for smartphones, rather than a web application. A docklet, is a specialized application designed to deliver a specific functionality embedded in a web page. (e.g. a simple component which performs a specific task to retrieve and display the last entry in a blog).
Docklets try to harmonize development and user interface design. A well defined separation of the workspaces, allows developers focus on programming and designers concentrate on user interface without interfering with each other.
Docklets are based on the Model Widget Controller (MWC), that adopt the same concept of MVC, a widely adopted industry architectural pattern.
The controller is responsible to decode the input URL and instructs the model and the widget to perform actions based on that input. The model manages the behavior and data of the application and the widget returns the data needed to render the user interface component.
As mentioned before docklets can be packaged and reused across the applications including the .jar file in the application WEB-INF/lib folder.