I’m in the process of creating a large single-page web-app using ext-js for the UI components with Rails on the backend. I’ve come to good solutions for transferring data using Whorm gem and Rails support of RESTful Resources.
What I haven’t come to a conclusion on is how to structure the UI and business logic aspects of the application. I’ve had a look at a few options, including Netzke but haven’t seen anything that I really think fits my needs.
How should a web-application that uses ext-js components, layouts, and controls in the browser and Rails on the server best implement UI component re-use, good organization, and maintainability while maintaining a flexible layout design.
Specifically I’m looking for best-practice suggestions for structuring the code that creates and configures UI components (many UI config options will be based on user data)
- Should EXT classes be extended in static JS for often re-used customizations and then instantiated with various configuration options by generated JS within html partials?
- Should partials create javascript blocks that instantiate EXT components?
- Should partials call helpers that return ruby hashes for EXT component config which is then dumped to Json?
- Something else entirely?
There are many options and I'd love to hear from people who've been down this road and found some methodology that worked for them.