3 Deeper Integration with AJAX & Routing

 

This chapter covers:

  • Integrating fragments into a page via AJAX
  • Utilizing the nginx web-server to serve all applications from one domain
  • Implementing request routing to forward incoming requests to the right server

We covered a lot of ground in the previous chapter. The applications for two teams are ready to go. You learned how to integrate user interfaces via links and iframes. These are all valid integration methods and they provide strong isolation. But they come with tradeoffs in the areas of usability, performance, layout flexibility, accessibility and search engine compatibility. In this chapter we’ll look at fragment integration via AJAX to address these issues. We’ll also configure a shared web-server to expose all applications through a single domain.

3.1  Integrating via AJAX

Our customers love the new product page. Presenting all recommendations directly on that page has measurable positive effects. In average people spend more time on the site than before.

But Waldemar, responsible for online marketing, noticed that the site does not rank very well in most search engines. He suspects that the suboptimal ranking has something to do with the use of iframes. In an online forum he read something about link juice which is flowing in the wrong direction and suboptimal cross product linking. He talks to the development teams to discuss options to improve the ranking.

3.1.1  How to do it

3.1.2  Not self-contained

3.1.3  Scoping styles and scripts

3.1.4  Progressive enhancement

3.1.5  Declarative loading with h-include

3.1.6  The benefits

3.1.7  The drawbacks

3.1.8  When does an AJAX integration make sense?

3.1.9  Summary

3.2  Routing via a shared web-server

3.2.1  How to do it

3.2.2  Request routing

3.2.3  Route configuration methods

3.2.4  Infrastructure Ownership

3.2.5  When does it make sense?

3.3  Summary

sitemap