Different ways to use ajax in the project