Developing in Layers
For a long time i have been using a scheme of things in developing UIs which has started to bug me, literally in every sense of the word. What i do is this:
For any page/view, i create the control, which in essence is a form or a configuration controller. Now, this control is independent from everything else, and i can use it as i deem fit. It has its own set of hooks using which i can feed and retrieve information from it. Mind you, these controls are very specific to the application itself and do not form a very integral part of a generic sdk. So, the freedom i get with these controls is absolute flexibility. I can place them in a page, a view, a pop up or a sidebar. But the only issue is that i have to play with some ground rules. Just one ground rule actually: I cannot make service calls from any of these controls. Like i discussed this in a previous post of mine in detail, doing so makes the control tightly bound with the service or the backend, hence limiting its usability in another part of the application. While this gives me a lot of freedom of where and how i want my UI to appear and look it gives me hell when i sit down to develop most of my app.