0

WP7.5/ Silverlight app. This is a story book type app.

I am in a process to refactor my code. So I created a base storypage class. The core story pages are almost similar with back/next/home buttons on it. What differs on each page is images, animations, some text and sounds played on the click of images.

I plan to store story specific data into an XML file. So on each page NavigatedTo, I load my objects and initialize variables with the data from xml. I pass the storypageId to grab appropriate element from the XML.

My Question:

  • Is it a good way to go? or do you see any issues with this.
  • A typical story consists of about 15-20 pages. So basically my XML will have 15-20 Page elements. I will be reading XML on each page load. Can this cause any performance issue?
  • In future the app will have more stories. So would it be a good idea to store all stories in one XML or is it good to go one XML per story. My major concern is any performance implications as the size of XML will grow.

Has anyone come across such situation and can share their experience. Any ideas / suggestions welcome. Thanks for reading.

4

1 回答 1

0

我认为 XML 可以很好地存储数据,但是如果您预加载下一页,它将隐藏普通阅读器的加载延迟。这个想法是始终尝试将当前页面、下一页和上一页放在内存中。然后根据内存使用情况,您甚至可以预加载接下来的 2 或 3 页。

于 2012-07-03T07:37:09.170 回答