有任何工具、库或建议来简化动态问题功能吗?

发布于 2024-10-30 03:55:41 字数 1057 浏览 4 评论 0原文

我正在开发一个相对简单的 ASP.NET 项目,除了一项要求将自定义调查问卷附加到特定类型的任务之外。这些调查问卷需要定期定制,并且应用程序本身的开发不需要添加调查问卷。目前的调查问卷不需要编辑工具,可以通过上传模板、更改数据库中的某些内容等方式来完成。它们可以以任何格式存储,并且需要捕获生成的输出以便稍后编辑或查看。

调查问卷中的问题类型可以是:

  1. 选择(从列表中选择一个)
  2. 输入(文本、整数、日期等)
  3. 是/否

能够根据其他问题的答案显示问题。例如,如果他们对问题 X 回答“是”,则显示问题 Y,否则显示问题 Z。需要能够对问题应用数据验证,例如必填字段、范围等(都可以通过基本正则表达式捕获)。

最简单的分解是:

  1. 创建一个新事件。
  2. 根据事件类型显示特定的调查问卷。
  3. 调查问卷可能会随着时间的推移而变化,但每次都可以被视为新版本,并且数据将始终与特定版本相关,不需要迁移到更新版本。
  4. 必须捕获调查问卷的输出(数据元素和最终计算值)。
  5. 输入的数据元素的 XML 输出(或任何其他格式)。

最佳(独角兽)方案是拥有 XML 格式的基本模板或用户可以学习轻松创建的内容,并将其存储在数据库中并进行版本控制。当用户发起新活动时,应用程序将获取适当的模板,该模板将向用户显示调查问卷。用户将填写它,输出将作为某种类型的输出发布(同样,XML 很好,但不是必需的)。该输出将附加到事件中。完毕。

我可以利用任何 .NET 兼容工具/库来完成此任务吗? InfoPath 似乎是一个可能有用的工具,但我对它的经验几乎为零,所以我不确定它的限制/实现以及它是否只是矫枉过正。该解决方案需要包含在 ASP.NET 应用程序中。用于创建模板的外部编辑器工具就可以了,但模板必须可以在网络上查看和编辑,并且对用户没有任何限制。

任何人都可以提供已完成此操作的示例或有关您如何解决此问题的提示吗? 由于除了这一功能之外,该应用程序相对容易创建,因此我宁愿不花 80% 的时间尝试实现自定义调查问卷功能,而将更多时间花在应用程序试图解决的问题上。

可用技术:ASP.NET、Silverlight、SQL Server

I am working on an ASP.NET project that is relatively simple except for one requirement which requires custom questionnaires be attached to specific types of tasks. These questionnaires need to be customized regularly and no development, within the app itself, should be needed add questionnaires. The questionnaires currently do not require an editing tool and can be done by uploading a template, changing something in a DB, whatever. They can be stored in any format and the resulting output needs to be captured to be edited or viewed later.

The types of questions in the questionnaire could be:

  1. Selections (select one from a list)
  2. Input (text, integers, dates, etc)
  3. Yes/No

The ability to display questions based on answers from other questions. For example if they answer yes to question X, display question Y else display question Z. Need to be able to apply data validation such as required fields, ranges, etc on questions (could all be probably capture by basic regex).

The simplest break down would be:

  1. Create a new event.
  2. Based on the type of event display a specific questionnaire.
  3. Questionnaires can change over time but they can be considered as new version each time and data will always be related to a specific version and not need to be migrated to updated versions.
  4. The questionnaire output (data elements and a final calculated value) must be captured.
  5. XML output (or any other format) of data elements entered.

The optimal (unicorn) scenario would be to have a basic template in XML or something that a user can learn to create easily and it would be stored and versioned in a DB. When a user makes a new event, the app would fetch the appropriate template which would display the questionnaire to the user. The user would fill it out and the output would be posted as some type of output (again XML would be nice but not required). That output would be attached to the event. Done.

Are there any .NET compatible tools/libraries that I could leverage to accomplish this? InfoPath seems like a tool that might be of use but I have almost zero experience with it so I am not sure about its constraints / implementation and if it is just overkill. The solution needs to be contained within the ASP.NET application. An external editor tool for creating templates would be ok but the templates must be viewable and editable on the web with no constraints to the user.

Can anyone provide examples of this being done or hints on how you might have tackled this?
Since the application is relatively easy to create other than this one feature, I would rather not spend 80% of my time trying to implement the custom questionnaire functionality and spend more time on the problem the application is trying to solve.

Tech available: ASP.NET, Silverlight, SQL Server

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

看轻我的陪伴 2024-11-06 03:55:41

我建议看看 dot net nuke 实现,我确信应该有很多可行的选择(如果不是全部免费)。

DotNetNuke

看看 Forge 以查看免费插件

I would suggest having a look at a dot net nuke implementation, I am sure there should be a lot of viable options (if not all free).

DotNetNuke

Have a look at the Forge to see free plugins

深海夜未眠 2024-11-06 03:55:41

考虑在 CodePlex 评估 SurveyMaster。它根据 Microsoft 公共许可证 (Ms-PL) 获得许可,您可以根据需要修改其源。

Consider evaluating SurveyMaster at CodePlex. It's licensed under Microsoft Public License (Ms-PL), and you can modify its source for your needs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文