gpt4 book ai didi

html - Monocross/HTML5 与 MonoDroid/MonoTouch/Windows

转载 作者:搜寻专家 更新时间:2023-10-31 19:26:05 25 4
gpt4 key购买 nike

我阅读了一些有关 Monocross 的文章,它似乎支持与 ASP.NET MVC 非常相似的模型。它可以使用 HTML5/CSS/Javascript 作为 UI。

最初直接查看 MonoDroid 和 MonoTouch,它鼓励开发人员使用设备的 native 控件进行开发。我说 Monocross 在所有设备上都支持带有 HTTP/GET/POST 的 HTML/CSS/Javascript 是否正确? MonoDroid/MonoTouch 支持一直到 UI 的跨平台开发,但这种方法似乎在理论上获得了 100%(或接近)的代码重用。这是正确的吗?

最佳答案

单十字is a very thin layer on top of Xamarin's code . (看到右上角的 Xamarin 标签了吗?)
他们提供跨不同实现(例如 MonoTouch 和 MonoDroid)重用相同的 MVC 代码。

抽象化 MVC 适用于小样本,但这些人似乎虔诚地相信 100% 的代码共享——这是我不赞成的。这是一个美丽的概念,但在现实生活中从未奏效。

制作出色的应用程序很难,但我认为这并不难,因为数据库技术不同,或者因为您必须为 ASP .NET MVC、MonoTouch 或 MonoDroid 编写类似的类。如果那是软件开发的真正挑战,我们早就解决了。

MonoCross 似乎是 premature generalisation 中的一项练习—所有程序员都喜欢的东西。
但是抽象不是免费的。想想 Eric Gunnerson 的这个轶事:

I've know teams where this snowballed - they ended up with a "swiss army knife" component that was used in a lot of different scenarios. And like many components that do a lot, it was big, complex, and had a lot of hard-to-understand behavior. But developing it was an interesting technical challenge for the developers involved (read that as "fun and good for their careers"...)

The problem came when the team found that one operation took about 4 times as long as it should. But because of the generalized nature of the component doing the operation, there was no easy way to optimize it.

If the operation had been developed from scratch without using the "uber-component", there would have been several easy optimization approaches to take. But none of those would work on the generalized component, because you couldn't just implement an optimization in one scenario - it would have to work for all scenarios. You couldn't afford the dev cost to make it work everywhere, and in this case, even if you could, it would cause performance to regress in other scenarios.

(重点是我的。)

同时 MonoCross developers seem enthusiastic about it ,该项目似乎没有社区,而且我找不到基于 iFactr 或 MonoCross 构建的单个应用程序。

话虽这么说,但我认为它们并没有提供比 MonoTouch 或 MonoDroid 更有值(value)的东西。
在旁注中,Miguel approves :-) .

关于html - Monocross/HTML5 与 MonoDroid/MonoTouch/Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14042274/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com