简体   繁体   English

Silverlight网页体系结构

[英]Silverlight web page architecture

New to silverlight. Silverlight的新手。 Traditionally if I were to design a wizard-like process where a user had to go through 3 or 4 steps, I'd have each step as a separate aspx page. 传统上,如果我要设计一个类似向导的过程,其中用户必须经过3或4个步骤,则每个步骤都应作为单独的aspx页面。 Using silverlight, would you do it all in one component, or would you have 3 separate pages each with a different silverlight component? 使用Silverlight,您将在一个组件中完成所有操作,还是将每个独立的Silverlight组件放置在3个单独的页面中? What kind of advantages/disadvantages are there for either approach? 每种方法都有哪些优点/缺点?

A wizard typically needs to maintain state between screens, which would be much easier to do on a single page instead of multiple pages. 向导通常需要维护屏幕之间的状态,这将更容易在单个页面而不是多个页面上完成。 You also have the benefit of initializing a SL control once instead of multiple times. 您还具有一次初始化SL控件而不是多次初始化的好处。

The disadvantage to loading the whole wizard on one page is that one SL control has the potential to be bigger than several smaller controls, depending on how you package it all up. 将整个向导加载到一页上的缺点是,一个SL控件可能比几个较小的控件更大,这取决于打包方式。 This means a longer initialization time. 这意味着更长的初始化时间。 Also, I would worry about the user using the back and forward buttons in the browser to navigate the wizard. 另外,我会担心用户使用浏览器中的后退和前进按钮来导航向导。 I don't know if you can intercept those clicks from Silverlight and just navigate the SL control screens back or forward, or if you even want to do so. 我不知道您是否可以拦截来自Silverlight的那些点击,而只是向后或向前导航SL控制屏幕,或者是否愿意。

If the wizard is only a few screens I would imagine the pros of using it on one page outweigh the cons. 如果向导只有几个屏幕,我会想象在一页上使用它的优点胜过缺点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM