(For background on this project, see yesterday’s post.)
The application I’m experimenting with is called Community Resource Directory (CRD). It’s a simple application which other community managers and myself will use to keep track of various online community resources such as weblogs, mailing lists, forums, news groups, etc. Resources will have one or more categories (relating to the particular technology they address) and one medium (mailing list, forum, weblog, etc.). The application will support all the operations you would expect: adding, updating and deleting resources, categories and mediums.
I’m well on my way to having the HTML version of this application functional. As of this moment, I can add, update and delete categories. So far, I’m very happy with the way the architecture is turning out. It’s much more complex than if I had just decided to hack together a quick ColdFusion/HTML version of the application, but even though the application is not particularly extensive, I am treating it as though it could grow into something much larger. In my opinion, the key to a successful and effective architecture is that it should never grow in complexity (beyond an initial level of complexity) no matter what type of functionality you add to your application and how big it gets. The application should scale in size, not in complexity. In other words, it’s ok if the application seems a little complicated at 5 pages as long as it is no more complicated at 500.
I have designed the ColdFusion/HTML version of the application to use web services, and much to my delight, although I am invoking as many as 4 remote functions during the course of a single request, the application is still very fast. Of course, the web services happen to be located on the computer the client is running on, so this isn’t a fair test yet, but I’m glad to see that using web services is not noticeably slower than invoking the components they wrap directly.
One thing I am being very careful not ever do is put any remote function invocations in loops. For instance, if I want to delete ten categories, the wrong way to accomplish this would be to call the remote deleteCategory function ten times in a loop. Instead, I build an array of category IDs that are meant to be deleted, and send that over the wire instead. This is much more efficient, and should have a dramatic impact on how well the application performs.