ASP.net 中的模块化编程
我不知道使用“模块化编程”一词作为主题标题是否正确。 我正在开发一个网站应用程序,它由不同的部分组成,例如:
- 注册信息、
- 编辑信息、
- 更改用户密码等。
该软件将上传到不同的服务器上。 该软件应该有一个部分,软件管理员可以使用该部分物理删除上述其他部分或再次添加它们。 如果我想解释更多,管理员可以选中或取消选中复选框并指定要物理删除或复制的部分。
我能做些什么?我听说过 Drupal、Joomla 等 CMS 中的模块化编程,用户可以在其中安装或卸载模块。
我可以在运行时删除 ASPX 文件吗?
I don't know whether usage of the term 'modular programming' as the topic title is correct or not.
I'm developing a website application which consist of different parts such as:
- Registering information
- Editing information
- Changing user password and so on.
This software will be uploaded on different servers.
This software should have a part using which the Administrator of software can physically remove the other mentioned above parts or add them again.
If I wanna explain more, Administrator can check or uncheck the check boxes and specify which parts to physically remove or copy.
What can I do? I have heard about modular programming in CMSes like Drupal, Joomla in which a user can install or uninstall modules.
Can I remove my ASPX files in runtime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 http://msdn.microsoft.com/en-us/library/ff648752 .aspx。
它说“他们支持独立开发的模块的XCopy部署。”
但对于您提到的模块类型,我建议将其实现为普通网站,并仅部署您想要授予访问权限的 ASPX 文件。
网站的 DLL 将包含所有 ASPX 的代码,但您可以部署选定的 ASPX 文件,这完全没问题。
除此之外,您还需要相应地设置导航,以便删除的文件不应出现在导航中,为此您可以使用 SiteMapDataSource。
示例请参见 http://www.w3schools.com/aspnet/aspnet_navigation.asp。
该站点地图是 xml,因此很容易根据部署选择性 ASPX 文件的相同标准动态生成它。
Check out http://msdn.microsoft.com/en-us/library/ff648752.aspx.
It says "They support XCopy deployment of independently developed modules."
But for the kind of modules you have mentioned I suggest to implement it as normal web site and deploy only ASPX files you want to give access.
The DLL of website will have code for all the ASPX but you can deploy selected ASPX file and it is perfectly fine.
In addition to this you need to set navigation accordingly so that this removed files should not appear in navigation, for that you can use SiteMapDataSource.
Find example at http://www.w3schools.com/aspnet/aspnet_navigation.asp.
This sitemap is xml so it is easy to generate it dynamically based on same criteria of deploying selective ASPX files.