从果园中提取模块 [英] Extracting a Module from Orchard

查看:85
本文介绍了从果园中提取模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作场所遇到一个小问题,我们的IIS 6服务器无法运行Orchard(1.7).我们正在计划升级,但这将需要一些时间.

I am having a little problem in my workplace where we have a IIS 6 server where Orchard (1.7) will not run. We are planning an upgrade but that's going to take some time.

由于我们仅在IIS6上使用此站点来运行为Orchard编写的一个特定的自定义模块(基本上是具有自己的Controllers/Actions等的MVC模块),所以我认为临时解决方案可能是将该模块拆出并独立运行.

Since we are using this site on IIS6 only to run one particular custom module we wrote for Orchard (basically a MVC module with its own Controllers/Actions etc.) I was thinking that a temporary solution could be to rip that module out of Orchard and run it independently.

当然,此提取过程需要考虑到我与框架有多少联系.我想知道是否有某种指导来执行此操作,是否需要特别考虑一些内容.

Of course this extraction needs to take into account how many ties I have with the framework. I was wondering if there is some kind of guide to perform this and if there is something I need to take specially into account.

我正在Orchard中使用Users,所以我可能不得不重写一些用户代码.我也在使用授权器,这可能又意味着我需要重新布线.

I am using the Users in Orchard so I would probably have to rewrite some users code. I am also using the Authorizer, which again may mean I need to re-wire something else.

这似乎是一项艰巨的工作,所以我正在寻找一些快速入门技巧,如果您知道的话.

It seems like a daunting job so I am looking for some quick tips on how to proceed if you know any.

非常感谢!

推荐答案

这完全取决于您在模块中实际使用的组件. 真的很难为此写任何教程.

It all depends on what components you actually use within your module. Hard to write any tutorial on this, really.

关于Orchard.Users-您可以删除所有相关的代码用法,并依赖默认的基于ASP.NET角色的身份验证/授权模型.

Regarding Orchard.Users - you could drop all related code usages and rely on the default ASP.NET roles-based authentication/authorization model.

如果要保留依赖项注入,则需要集成它(适用于Autofac,但其他DI容器也可以使用).随意复制和更改您使用的任何Orchard组件,剥离不需要的代码.

If dependency injection is what you want to keep, then you need to integrate it yourself (for Autofac, but other DI containers will also work). Feel free to copy and change any Orchard components that you use, stripping the unneeded code.

在我看来,剥离和替换最困难的事情是依赖于内容项的任何代码-希望您没有它.重写这些片段听起来太过分了.但是,如果仅使用IRepository,则使用普通的NHibernate或EF应该很容易.

In my opinion the hardest thing to strip out and replace would be any code that relies on content items - hope you don't have it. Rewriting this pieces sounds like an overkill. But if you just use IRepository, going for plain NHibernate or EF instead should be quite easy.

这篇关于从果园中提取模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆