带有 Fluent NHibernate 的 Mono 2.4 上的 ASP.NET MVC 1 和 2 [英] ASP.NET MVC 1 and 2 on Mono 2.4 with Fluent NHibernate

查看:19
本文介绍了带有 Fluent NHibernate 的 Mono 2.4 上的 ASP.NET MVC 1 和 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 ASP.NET MVC 创建一个应用程序,它应该在 mono 2.4 下运行(编译将在 Windows 机器上完成).有没有人得到这个运气?这是我已经尝试过的:

I'd like to create an application using ASP.NET MVC, that should run under mono 2.4 (compiling will be done on a Windows box). Has anyone getting luck with this? Here is what I've already tried:

  1. 单声道上的 ASP.NET MVC,不支持任何持久性模型,并使用 naml 作为视图引擎
  2. S#aml 架构,恕我直言,这是一个相当不错的框架,但它过于依赖于在单声道下无法正常工作的东西(如 Windsor)

第一部分运行良好,我没有遇到任何重大问题.但我无法让第二部分工作.似乎它对 Castle.Windsor 的依赖破坏了整个单声道支持(但可能还有其他部分).

The first part worked fine, I didn't encounter any major problems. But I couldn't get the second part working. It seems it's dependency on Castle.Windsor breaks the whole mono support (but there might be other parts too).

因此我决定创建一个替代框架,它借鉴了 s#arp-architecture 的一些想法,但设计为在单声道下工作(如果我能够做到这一点,我会将它发布给社区当然).控制器和视图部分工作正常(虽然这里没有什么神奇之处,它们一直在工作),但在开始持久性部分工作之前我有一些问题:

Therefore I decided to create an alternative framework, that borrows some of the ideas of s#arp-architecture, but designed to be working under mono (and if I'm able to do this I'll release it for the community of course). The controller and view part is working fine (not much magic here though, they have been always working), but I have some questions before I start job on the persistence part:

  • 哪些 NHibernate 版本在单声道下工作?我听说 1.2 运行良好.2.0.1/2.1 beta 在单声道下工作吗?
  • Fluent.NHibernate 和 NHibernate.Linq 在单声道下工作吗?(对于后者,它似乎需要一些单声道中不可用的依赖项)
  • 对于单声道下的 NHibernate 持久性支持,有什么好的替代方案吗?

替代问题:

  • 是否有任何框架已经支持 mono+persistence+asp.net mvc 或者我是第一个考虑这个的人?
  • 如果您已经这样做了:您对稳定性/可用性有何看法?

感谢您的回答

更新了框架以支持 ASP.NET MVC 2:http://shaml.sztupy.hu/

Updated the framework to support ASP.NET MVC 2: http://shaml.sztupy.hu/

推荐答案

好的.我开始了一个新项目,它将 S#arp 架构中最好的东西与单声道工作相结合.它使用 ruby​​ 脚本代替 T4Toolkit 来完成生成工作,就像使用 rails 或 merb 一样.

Okay. I started on a new project that incorporates the best from S#arp Architecture with stuff, that work on mono. Instead of T4Toolkit it uses a ruby script to do the generation job, just as with rails or merb.

要使用从 github 安装 shaml gem:

To use install the shaml gem from github:

gem install shaml

然后创建一个新的应用程序:

Then create a new application:

shaml generate app AppName

并创建资源:

shaml generate resource NewRes "name:string;date:DateTime"

S#aml 架构项目主页:http://shaml.sztupy.hu/

S#aml Architecture project homepage: http://shaml.sztupy.hu/

GitHub 项目:http://github.com/sztupy/shaml/tree/master

这篇关于带有 Fluent NHibernate 的 Mono 2.4 上的 ASP.NET MVC 1 和 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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