There are two main strategies for handling multiple "applications" on the web:
- subdomains (e.g. wiki.example.org, blog.example.org, admin.example.org, api.example.org/v1)
- subdirs (e.g. example.org/wiki, example.org/blog, example.org/admin, example.org/api/v1)
What are the differences (advantages and disadvantages) of these two solution when dealing with web programming (e.g. in terms of code organization, browsers security models, javascript etc).
Edit: CW as there's a correct answer, but it's very broad.