I must admit posting the same question on stackoverflow.com ;) I guess these are the best places to ask for assistance in it.
I am looking for a better architecture and design choice for the new task I got assigned to. It is basically a type of display board (similar to what you see in airports or stock exchanges but for another purpose) that needs to be programmed. It should have many text items, price tags, and buttons for selection. The whole thing should run in a browser and reflect real-time changes (such as frequent updates of prices, and rearrangement of items).
First choice of technology that comes to mind is GWT that helps to keep traffic low and allows for targeted updates of display areas (since rendering happens on the client side). Based on my experience, there are some cons with this choice however: porting HTML and CSS from static layouts is much more time-consuming in GWT since you only see generated HTML at runtime (UiBinder makes is somewhat more convenient, but the problem at large remains), DevMode is excruciatingly slow under Linux and compiling a permutations for a single deploy can take minutes. Which all contributes to much slower development times than with say JSP or JSF.
Is there some other technology or approach that is very low-key in terms of traffic and is able to display data changing in a real time? We obviously don't want to save the whole new page if some price tag changes its value or position on the display. And faster development times would be a treat
What would be an appropriate pattern to adopt for this case. I've tried having an index object that would contain references to other price and item objects. So that if arrangement of price tags changes on the screen, new ones arrive, old ones get updated a new index object is created and sent to the client. The client knows than that the display should be updated and renders it anew. The positive thing is that it gives you many reusable components (price and item object), on the negative side though is that this rerendering of the whole screen, if a new item is added, is becomes CPU intensive as more updates come. There is also no one-to-one correspondence between index object and layout of the page: so if you designer has chosen a table-based layout and there is one empty row between item 1 and item 2 then you cannot map index position of the item object to its position on the owning table without some additional processing.
I am sure there are many similar projects in the wild that cope with the mentioned challenges. Hearing what technologies developers have chosen to deal with it and how it played out will definitely help me with this assignment. Thanks
Options that you'd want to consider for implementing the UI could be any of the following -
Flex (Using a swf object embedded into your page.) -- Most seamless updates to the UI.
GWT (Like you said.) -- The use of a strongly typed lang over using JS may be many, but then again you'll find many advocates for using JS. I am turning into one of those too...
You might want to consider data interchange formats like XML, Json, AMF just to list a few.
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad: