Weakly bound nuclei are open quantum many-body systems and can have exotic structures and dynamics in contrast to our knowledges of stable nuclei. Currently the related studies are among the central topics in nuclear physics and are important for further improvements of nuclear theory and understandings of element enrichment processes in astrophysical environments. Since the improvements of intensity and quality of radioactive nuclear beams are very difficult, theoretical studies will be very helpful for planning experiments and the interpretation of results. Here we review recent developments of continuum density functional theory and studies of weakly bound nuclei. The theoretical challenge is to self-consistently describe the weak-binding effects, exotic shapes, continuum effects and dynamics together. To this end, our main work is to solve the Hartree-Fock-Bogoliubov equation in non-spherical coordinate- spaces and then to describe the ground state properties as well as collective excitations of weakly bound nuclei. In the 2D lattice, we solved the HFB equation with the B-spline techniques. More recently, we solved the HFB equation in the 3D coordinate-space with the adaptive multi-resolution multi-wavelet techniques, which is novel and much more efficient. Based on our calculations, we discussed the exotic egg-like deformed halo structures, the core-halo deformation decoupling, and the role of continuum contributions. We also see pairing density distributions have remarkable deformed halo structures. The deformed cores are not so favorable for the formation of 2 n -halos, in particular heavy 2 n -halos. The non-resonant continuum rather than the resonant continuum is mainly responsible for halo features. With the quasiparticle blocking calculations, we also studied the deformed 1 n -halo nuclei, in which the pairing density is unusual due to the spin polarization. In addition, we developed the deformed continuum FAM-QRPA calculations in coordinate spaces and studied the emergent soft monopole collective excitations. The soft collective modes are unique in weakly bound nuclei and are useful for studies of nuclear properties in extreme conditions. Compared to the conventional QRPA diagonalization method, the FAM-QRPA solves the QRPA equation iteratively and is more efficient. Otherwise the deformed QRPA calculations with continuum would be very challenging. We see the pairing density halos and non-resonant continuum play an important role in these soft collective excitations. Our studies involved large coordinate-space calculations in Tianhe supercomputers to take into account shape deformations, large spatial extensions and continuum spectra. Otherwise, calculations within small coordinate spaces would produce a coarse continuum discretization and even false resonance peaks. Finally we give some persectives on studies of weakly bound nuclei and our plans. Since weakly bound nuclei exhibit few-body physics in many-body systems, the conventional shell-structure picture breaks down in this respect. Theorefore new many-body techniques, time-dependent 3D dynamics and improved effective interactions are very desirable. The studies of weakly bound nuclei as open quantum systems that involve threshold effects and continuum contributions can have broad interdisciplinary interests.