Alginate gel formation on-chip is presented in the first part of this thesis. The technique allows immobilization, and release, of biological cells on-chip. Furthermore, via layer by layer deposition, a locally heterogeneous environment can be generated at will, down to a resolution at the size scale of a single cell. The technique is proven to be biocompatible by the observation of cell division in the gel. A comprehensive theoretical framework for the alginate gel formation on-chip is provided. Further, experimental evidence for the existence of diffusion potentials in the vicinity of the reaction zone is given. It is concluded that rather than being a purely diffusive process, alginate diffusion under physiological salt conditions is an electrophoretic migration phenomenon. In practice, the gel growth on-chip is visualized by using fluorescein-tagged alginate, and rapid and reliable microfluidic switching schemes are developed. In a second part, a dielectrophoretic cell sorting device based on an equilibrium between opposing dielectrophoretic force fields is presented. By driving the two force fields at different excitation frequencies, the cell-type-specific dielectric response is exploited for focusing the different cells onto different flowlines, and hence sorting them in a continuous manner. The technique is characterised in terms of the calculation of the electric fields in the channel using conformal mapping, and the electric field expressions thus obtained are used to relate the particles' equilibrium positions to their dielectric response. Applications of the technique include separation of viable from non-viable cells and synchronization of yeast cell cultures.