Windows Universal App适合我吗?-UI迁移 [英] Is Windows Universal App for me? - UI Migration

查看:53
本文介绍了Windows Universal App适合我吗?-UI迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个控制台应用程序,它执行一些数据库管理工作,直接与它们连接.它适用于MsSqlServer和Oracle(目前).

I have a console app that does some Database management stuff connecting directly to them. It works for MsSqlServer and Oracle (for now).

您可能知道,使用控制台应用程序效率不高.因此,我想将UI部分移植到桌面应用程序.我将所有核心代码存储在一个库中,控制台应用程序仅管理用户交互.

As you might know, using a console app is not so productive. So I wanted to port the UI part to a Desktop app. I have all core code in a library, console app just manages user interaction.

我做了一些测试,无法在UWA上使用库.然后尝试了共享库,令我惊讶的是我不能直接使用SqlServer.

I did some testing and can't use libraries on UWA. Then tried shared libraries and to my surprise I can't use SqlServer directly.

UWA是台式机应用程序的新方法吗?我不想先连接到服务,然后再连接到数据库,这对用户应用程序非常有用,但是我对我的软件所做的事情没有信心,我需要100%直接连接.

Are UWA the new way to do desktop apps? I dont want to connect to services and then to the database, it's good for user apps, but dont feel confident for the stuff my software does, i need 100% direct connection.

我应该尝试使用WPF吗(它可以与sqlserver连接一起使用吗?)?WinForms?如果他们像对WebForms一样放弃对WPF或WinForms的支持怎么办?

Should I try with WPF (does it work with sqlserver connections?)? WinForms? What if they drop support for WPF or WinForms like they going to do with WebForms?

想要UWA,因为它看起来非常好,MS使它看起来像是前进之路".

Wanted UWA because it looks very good and MS made it look like it's 'the way to go'.

有什么想法吗?

更新1

因此,有人说我可以使用可以处理所有任务的Web api或中间层,这样我就可以避免UWA的局限性.这不是一个坏主意,我也考虑过这一点.甚至以为我可以为任务和Web UI提供服务,因此可以从任何设备访问它.但是更难在私有/企业nerworks中进行部署.

So, some people say I could use web api or middle tier that can handle all the tasks and this way i can get around the restrictiveness of UWA. It's not a bad idea, i also thought about this. Even thought i can just have a service for tasks, and web UI, that way it will be accesible from any device. BUT harder to deploy in private/corporate nerworks.

我认为对于简单"工具而言,这是太多的架构.

I think it's too much architecture just for a "simple" tool.

因此,在经过一些思考之后(可能)找到了对此的一些中等答案:我将研究哪些项目可以帮助我与Windows和其他系统进行本机集成.由于手机和平板电脑可能已经超出了我的目标,因此至少我将针对linux和mac os.

So, after some thinkning found (probably) some middle level answer to this: I will research what projects can help me to do a native integration with Windows and other systems. Since Phones and Tablets are probably out of my targets already, then at least I will target linux and mac os .

认为他们正在开发的这个新的.Net版本将是OSS以及多平台.要进行检查,并在其他人感兴趣的情况下使此帖子保持最新状态.

Think this new .Net version they are working on it's going to be OSS and also multiplatform. Going to check it out and keep this post updated in case anyone else is interested.

更新2

现在我真的在中间层思考,但这会使开发变得更加复杂和更长:(

Now im really thinking on the middle tier, but it gonna make it more complicated and longer to develop :(

为此,我将需要:我的核心库,Windows服务或某种作业/任务服务,前端可能使用某些Webapi的html5.

For this i will need: my core library, a windows service or some kind of job/task service, front end probably html5 consuming some webapi.

任务/职位服务器上有任何建议吗?

Any recommendations on the task/job server?

推荐答案

要回答您的问题,他们不支持UWA应用程序中的许多System.Data功能,因此您不能使用诸如DataTable或DataReaders(即使UWA的Sqlite实现也没有DataReader,这使得在您事先不知道模型的情况下获取动态数据变得很困难).

To answer your question, they don't support a lot of the System.Data functionality in the UWA application and you can't use handy tools like DataTable's or DataReaders (even the Sqlite implementation for UWA's doesn't have a DataReader which makes getting dynamic data difficult where you don't know the model in advance).

推荐的方法是拥有一个可以调用的任何类型的中间层,该中间层可以为您完成所有数据访问(这种方法很好,但不适用于每个人的环境).

The recommended approach is to have a middle tier of any sort that you can call that does all of the data access for you (that approach is fine but isn't going to work for everyone's environment).

我认为您的选择如下:

  1. 在某个中间层创建UWA应用程序,该中间层可以进行数据访问调用,并以您认为合适的方式公开API.
  2. 如果您要在UI中使用XAML,但UWA的限制太多,请创建一个WPF应用程序,您可以在其中使用完整的框架来随意执行所需的操作.这意味着您可能可以使用以前使用的所有.Net库(例如SqlServer和Oracle ADO.Net提供程序).
  3. 使用WinForms,仍然可以使用,对高DPI应用程序不太友好(但并非不可能).根据Microsoft,WinForms是成熟的".他们没有很多新功能,但很快就不会推出.您也可以使用完整的框架,而不受WWA的UWA限制.

这篇关于Windows Universal App适合我吗?-UI迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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