简体   繁体   English

跨平台富客户端开发的最佳方法

[英]Best approach for cross-platform rich client development

I have many years experience using WPF/C# to develop client and server apps. 我有多年使用WPF / C#开发客户端和服务器应用程序的经验。 I'm currently thinking about the best choice of technologies for a rich client app that is capable of fairly dynamic, animating data visualizations; 我目前正在考虑针对富客户端应用程序的最佳技术选择,该应用程序能够相当动态地实现动画数据可视化。 preferably with efficiency measures such as UI virtualization so I can be efficient with memory. 最好采用诸如UI虚拟化之类的效率措施,这样我就可以有效利用内存。

WPF and XAML is great for this sort of work; WPF和XAML对于此类工作非常有用。 sadly, in wishing to have a data visualization client run on Android and iOS, as well as Windows, I would rather not have to go through developing clients for each particular platform and so I'm seeking a very good, cross-platform client library with these sorts of capabilities. 可悲的是,希望在Android和iOS以及Windows上运行数据可视化客户端,我宁愿不必为每个特定平台开发客户端,因此我正在寻找一个很好的跨平台客户端库具有这些功能。

There seems to be two main options for this, both with disadvantages: 似乎有两个主要选择,但都有缺点:

  • Build a web client. 建立一个Web客户端。 HTML5 I lack experience with, but it seems to lack the richness of WPF and doesn't seem to yet be fully supported. 我没有使用HTML5的经验,但似乎缺乏WPF的丰富性,并且似乎尚未得到完全的支持。 Because of this, it isn't yet a de-facto universal client markup standard. 因此,它还不是实际的通用客户端标记标准。 Bog standard HTML 4 and CSS is extremely difficult to produce rich animating UIs with. 难以使用标准的HTML 4和CSS来生成丰富的动画UI。 Happy to be challenged on this opinion if those with experience of HTML5/JS have comments. 如果有HTML5 / JS经验的人有意见,我们很乐意对此观点提出质疑。
  • Use a cross-platform UI library such as Xamarin.Forms - which supports XAML/WPF. 使用跨平台的UI库,例如Xamarin.Forms-支持XAML / WPF。 The main advantage is I could use the amazing C#/.NET framework with a cross-compatible client - but I'm not sure in choosing this technology that I will be missing out on developments in HTML5, and don't know if the platform has issues or complications. 主要优点是我可以将惊人的C#/。NET框架与交叉兼容的客户端一起使用-但是我不确定选择这种技术是否会错过HTML5的开发,并且不知道该平台是否有问题或并发症。

Macromedia Flash seems to be dying a slow death. Macromedia Flash似乎快要死了。 Does anyone have any advice, who has created a rich client app that works on Android, Mac and Windows? 是否有人提出了建议,并且创建了可在Android,Mac和Windows上运行的富客户端应用程序? Was trying to go for a cross-platform solution more trouble than it was worth and is it preferable then to spend time developing the same client views natively on each platform? 是否试图寻求一个跨平台的解决方案,而不是花更多的精力,然后花时间在每个平台上本地开发相同的客户端视图呢?

Thanks 谢谢

Here are my two cents - I think you won't find a perfect solution, because there isn't one available yet. 这是我的两分钱-我想您不会找到理想的解决方案,因为还没有。 You should aim to find the best possible solution while realizing it won't be perfect. 您应该力求找到最佳解决方案,同时意识到它并不完美。

HTML5 based cross platform solutions (PhoneGap is probably the most mature) - if your app is rich with animations and graphics, that's probably not the way to go. 基于HTML5的跨平台解决方案(PhoneGap可能是最成熟的解决方案)-如果您的应用程序包含丰富的动画和图形,则可能不是这样。 On older devices, and also in some of the new ones, the results won't be good (especially on Android devices). 在较旧的设备上,以及在某些新设备上,效果都不会很好(尤其是在Android设备上)。 I think HTML5 solutions are OK for static apps (static in the visual aspect). 我认为HTML5解决方案适合静态应用程序(在视觉方面是静态的)。

Regarding Xamarin - I'm not very familiar with Xamarin Forms, it seems quite interesting, but I don't think it's mature yet and you should take into consideration that with a relatively new product you will spend a lot of time finding answers for which in Native development you'll find in seconds. 关于Xamarin-我对Xamarin Forms不太熟悉,这似乎很有趣,但是我认为它还不成熟,因此您应该考虑到,相对较新的产品,您将花费大量时间来寻找答案。在本机开发中,您将在几秒钟内找到。

That said, I like Xamarin, as the performance of the apps (at least Xamarin.iOS in which I've developed a few apps) is as good as native. 就是说,我喜欢Xamarin,因为应用程序(至少我已经开发了一些应用程序的Xamarin.iOS)的性能与本机一样好。 You can consider developing with Xamarin, partially cross platform - in which you create the UI for each platform, and can share the business logic of your app - this way you can probably share 50% precent of the code. 您可以考虑使用Xamarin(部分跨平台)进行开发-在其中为每个平台创建UI,并可以共享应用程序的业务逻辑-这样,您大概可以共享50%的代码。

Bonus point also to the fact that you're already ac# developer. 奖金还表明您已经是开发人员。

Flash/Flex is actually quite good for apps with animations, so if you're familiar with action script, it's not a bad choice. Flash / Flex实际上非常适合带有动画的应用程序,因此,如果您熟悉动作脚本,这不是一个坏选择。 Though if you plan for the future it's not the best investment, as you probably benefit more from other technologies. 尽管如果您为未来做好计划,那并不是最好的投资,因为您可能会从其他技术中受益。

If I needed to make this choice, and you don't want to develop the apps natively, I would go with Xamarin. 如果我需要做出选择,而您又不想本地开发应用程序,那么我会选择Xamarin。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM