I present an in-depth review of the trends and the directions taken by researchers worldwide in optical code-division multiple-access (OCDMA) systems. I highlight those trends and features that I believe are essential to the successful introduction of various OCDMA techniques in communication systems and data networks in the near future. In particular I begin by giving a comprehensive review of the construction of optical orthogonal codes (OOCs). Specifically I discuss the recently developed algorithms that are based on matrix algebra, which simplify and enhance the efficiencies of algorithms in OOC generation. In communication systems studies I first focus on and discuss various OCDMA techniques, such as incoherent and coherent OCDMA. A comprehensive discussion takes place on all important aspects of each OCDMA technique. In particular, I elaborate on enabling technologies that are needed prior to full scale consideration of OCDMA in communication systems. For incoherent OCDMA the technique is categorized into two distinguished techniques, namely, 1D and 2D OCDMA. For each technique I discuss the various receiver structures proposed to date. In particular I discuss a recently introduced powerful receiver structure based on optical AND logic gate elements. Based on this receiver structure I conclude that in many practical applications, OOCs with a cross-correlation value equal to 2 or 3, which have a much larger cardinality compared to OOCs with = 1, perform much better. Many fundamental issues, including architectural consideration of multiple amplifiers, various acquisition algorithms, and advanced signaling methods, such as pulse position modulation, are discussed. For coherent OCDMA or spectrally encoded ultrashort light pulse OCDMA, I begin by having an indepth discussion on the key and enabling technologies that are essential in the successful implementation of this very important and extremely powerful technique. In particular on the encoder-decoder side I present discussions on various key device technologies such as virtually imaged pulsed array, fiber Bragg gratings, and arrayed waveguide gratings. On the receiver side I elaborate on various nonlinear detection schemes used in such OCDMA networks. I will present an analytical framework on the above nonlinear detection schemes and discuss their pros and cons. I extend the discussion to various data networks. In particular I will discuss applications such as wireless OCDMA LAN, free-space OCDMA, fiber-to-the-home, and other code-divisionmultiple-access-based packet communication networks using label addressing and processing techniques to indicate the directions and the applications for which OCDMA systems are considered. It is believed that in the not so distant future OCDMA, once fully developed and matured, will be an inseparable part of advanced optical communication systems and networks, due to its various desirable features and functionalities. clever encoding and decoding mechanisms that are essential for future all-optical communication systems an...