Computational nanophotonic design : frameworks and applications