Best practices for building a bidirectional web applications?