Definitely a good option if it gets complicated. check here for some simple examples and even a library