开发者

Should i bring bytearray of image along with entity? - ria services

I have near about 100 entities and each entity has custom property of byteArray which is the actual byte array of the image. My ques开发者_开发百科tion is should i bring the byte array also along with the entities or should i make 100 requests(each request for each entity) so that the user can atleast see something while the other bytearrays are being downloaded.

Thanks in advance :)


Think through the application requirements and make a decision based on that. How big are the byte[]s? What will the receiving app actually do with these? Display them all at once or on-demand? Will they be displayed initially just as thumbnails?

Your decision isn't just whether or not to include the byte[]... depending on the actual requirements, you could put the byte[]s as seperate entities which can be retrieved by making paged requests to that collection as the user scrolls through some list. Or you could decide to create seperate entities to represent thumbnails of the images. Lots of options...


I wouldn't recommend loading the images along with the data. You should break it apart into multiple loads. Display the information first and then have the images load asynchronously as they are needed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜