将 Orchard CMS 与自定义 MVC 电子商务网站合并
我有一个大型自定义电子商务引擎,当前正在使用 SQL Server 数据库(处理大多数数据任务的存储过程)、WCF 中间层(处理业务逻辑)和 MVC 前端站点(不了解任何数据库) )。我们对内容管理系统的需求正在迅速增加,考虑到我们的开发资源非常繁重,我正在努力找出实施该系统的最佳方法。
我首先想到的是它只有两个网站,一个 Orchard CMS 网站和我们的电子商务网站。我可以设置某种类型的请求路由,将目录浏览和购物车功能的 URL 发送到电子商务网站,而其他 URL 由 Orchard 网站处理。我必须在 Orchard 站点内构建几个模块(或小部件),以显示每个页面标题中显示的购物车摘要等内容。这似乎是处理这个问题的最简单方法,即使是短期的。
我的另一个想法是完全使用 Orchard 构建该网站。这需要将我们的电子商务逻辑移植到模块中。这似乎是一项艰巨的任务。我们所有的工作都是通过 Web 服务完成的,因此如果用户访问特定类别 URL,网站将调用 Web 服务并传递一些变量(客户 ID、类别等)。 Web 服务将返回该客户的类别、产品和价格,然后将其显示在屏幕上。
最后,最后一个选项的一个更复杂的版本是将产品实际存储在 Orchard 中,以便通过 Orchard CMS 管理可编辑字段(描述、元标签等)。这将需要对我们的 WCF 中间层进行重大改变(或吸收)。这看起来几乎是不可能的,但可能会允许更好地处理更多媒体(照片、视频、MSDS 表、产品文献等)。
到目前为止,您对这三种模型有何看法?
I have a large custom ecommerce engine that is currently using a SQL Server database (stored procedures handling most data tasks), a WCF middle-tier (handling business logic), and an MVC front-end site (that has no knowledge of any database). Our need for a content management system is increasing rapidly and I'm trying to figure out the best way to implement one, considering our very taxed development resources.
My first thought it to simply have two websites, an Orchard CMS site and our e-commerce site. I could setup some type of request routing that would send URLs for catalog browsing and cart functions to the ecommerce site, while other URLs get handled by the Orchard site. I would have to have a couple of modules (or widgets) built within the Orchard site that would display things like the cart summary that appears in the heading of each page. This seems like the easiest method of handling this, even if it is short-term.
My other thought is to have the site completely built using Orchard. This would require porting our ecommerce logic into modules. This seems like it would be one hell of a task. All of our work is done via web services, so if a user goes to a specific category URL, the site would call a web service and pass some variables (customer ID, category, etc). The web service would return the categories, products and prices for that customer - which would then be displayed on the screen.
Lastly, an even more complex version of the last option would be to actually store the products in Orchard, so that editable fields (description, meta tags, etc) would be managed through the Orchard CMS. This would require major changes to (or absorption of) our WCF middle-tier. This seems like it would be almost impossible, but may allow better handling of more media down the road (photos, videos, MSDS sheets, product literature, etc).
What are your thoughts so far, between these three models.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个简单的 Orchard 模块,它很像 MVC 项目中的一个区域。它使用控制器和视图,如果您熟悉 MVC,则很容易做到。如果您不愿意,则无需将其与 Orchard 进行大量集成。您的模块的内容将位于一个文件夹中,Orchard 将管理网站的其余内容。
要使模块中的页面使用站点中的 orchard 主题,您只需将 [Themed] 过滤器添加到控制器中。
Orchard 文档中的 hello world 示例 向您展示了如何来做到这一点。
这将是最简单的选择,但如果您决定将产品存储为 Orchard 内容项,则会有好处。到达那里会更困难,但您可以利用其他 Orchard 模块并向您的产品添加标签、评论和评论等内容部分。
You can create a simple Orchard module that is a lot like an area in an MVC project. It uses controllers and views and is easy to do if you're familiar with MVC. You don't need to integrate it very heavily with Orchard if you don't want too. Your module's content would be in a folder and Orchard would manage the rest of the site's content.
To make the pages in your module use the orchard theme from the site you just need to add the [Themed] filter to your controller.
The hello world example in the Orchard Documentation shows you how to do this.
This would be the easiest option, but there would be benefits if you decided to store the products as Orchard content items. It would be more difficult to get there, but you'd be able to take advantage of other Orchard modules and add content parts like tags, comments and reviews to your products.