Navigation across multiple sites / code languages with 1 source

102 Views Asked by At

Scenario: We have a client who has multiple large sites, a huge number of stakeholders and decision makers which rules out a redevelopment involving all of them at the moment. Some sites are php, some are coldfusion and others are ASP.NET. We are building them a new site with a "TopHat" navigation that will be used across these site to link them together. Google and LinkedIn do something similar (Screenshots attached).

Question: Is there a common term for this UI element? We invented the term "TopHat" to be able to collectively discuss the element.

Solution: While googling, I discovered closure templates: http://code.google.com/closure/templates/index.html Would a closure template be a good approach? From what I read I can then notify the devs of each site to include the javascript in their code. Any ideas or feedback would be much appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

If you only need JavaScript templates then Google Closure Templates will work for you as you compile the template code to JavaScript functions which will be called with parameters. On the server side Google Closure Templates lack libraries for the languages you mentioned other than JavaScript and Java.

If you rely on multiple server side languages handling the same templates you can consider Mustache. Mustache 2 should also be able to be compiled to small JavaScript functions per template.

Regarding your solution. If you develope new functionalities you just have to pass the new JavaScript file to your deveopers. But again - only if JavaScript is the only rendering language.