A new requirement that the client asked me to look into was the possibility for downloads of GIS data in the form of shapefiles out of selections that have been done interactively in the map (in the browser).
At first I was a bit worried about the amount of processing done on the client - since all the calculation and assembly is done in the browser, but it seems to work quite well - even for large selections. For some reason the file preparation takes much more time in Microsoft Internet Explorer, compared to Mozilla Firefox or Google Chrome.
One thing that I needed to do - js2shapefile needs graphics objects for it's processing, and I had an array of features from a selection. This little snippet took care of that and prepared a new array of graphics that I could feed into the Shapefile class. Since the results array looks different if it comes from an identify or query task - I had to handled that in this routine as well.
An alternative method would be to set up a geoprocessing service, and program that in Python, using ArcPy (ESRI ArcGIS Python programming extensions). The request would then pass a group of id's and the name of the layer and the server would return the link to a zip-file with the specified data. I haven't yet set up any service like that, and it would have been interesting to play with that!