The limitations of current Internet-based learning systems (e.g., their inability to deal with diverse learners and requirements and the high cost of developing a new learning system) have lead to educational middleware that can handle diverse requirements and various learning components distributed over the Internet. Following the paradigm of component-oriented development we have designed a learning middleware suite, called the Collaborative and Sharable Learning (CoSL) system. CoSL is both a platform for building e-learning systems and a tool set for making it easier to develop course materials for elearning. The CoSL system is context-independent so that its adaptation to a specific topic can be achieved with limited effort and time. To meet the challenging requirements of learning systems, the CoSL system has adopted three advanced techniques: (1) XML-based data exchange and integration, (2) agent-based communication and (3) data mining-based intelligent decision making. CoSL allows us to build and manage global learning systems in a distributed and heterogeneous environment.