I don't know how to use both of them. So a sample code with pros and cons is perfect. Which one is preferred? Why?