Separating Spring and Dojo single page app codebases
        Posted  
        
            by 
                Pie21
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Pie21
        
        
        
        Published on 2012-09-22T15:35:43Z
        Indexed on 
            2012/09/22
            15:37 UTC
        
        
        Read the original article
        Hit count: 243
        
I'm working on a web application with a Spring Roo REST API backend and a Dojo single-page client app. Spring Roo provides a handy admin interface (with Web MVC) out of the box, so I'd like to keep that accessible for administrative duties.
However I'd like the Dojo app to be decoupled from the server application as possible. The server is a platform for which we expect new client applications to be developed, so I'd like to develop the 'official' client web app in isolation.
What is the best (or even just one good) way to structure the application code? It's easy to leave the server alone as an API and admin interface, but where does all the Dojo JS live? It works okay when it's in the Spring webapp directory, but gets complicated quickly as soon as the structure gets more complex or is moved anywhere else (Spring URL mappings are still awfully opaque to me). Ideally it could be hosted locally on a development machine, which introduces all the cross-domain JS issues as well.
© Stack Overflow or respective owner