简体   繁体   English

只有WPF,WCF和基于ADO.net的.Net项目,而将DB作为Sybase可以吗?

[英]only WPF,WCF and ADO.net based .Net project while having DB as Sybase is it possible?

We are having 5 years old mini ERP applications LAN based (Intranet only) with us, written in ASP.net 2.0 我们使用ASP.net 2.0编写的基于LAN的小型ERP ERP应用程序(仅适用于Intranet)已有5年历史了

Now Since requirement changes a lot and Workflow also changed a lot, we decided to rewrite it again from scratch using WPF,WCF and our own custom Data Access Layer. 现在,由于需求发生了很多变化,工作流程也发生了很多变化,我们决定使用WPF,WCF和我们自己的自定义数据访问层从头开始重新编写它。

As it is LAN based our organisations is having Windows only Systems , so We can install the client module on each system.We are planning to develop both (Browser Based HTTP) and WPF based (Desktop) client Modules. 由于基于局域网,我们的组织只有Windows系统,因此我们可以在每个系统上安装客户端模块。我们计划开发(基于浏览器的HTTP)和基于WPF的(桌面)客户端模块。

So , basically what i want to know from you people is that 所以,基本上我想从你们那里知道的是

  1. Is it possible to create a solution with WPF project template(for UI),WCF Project template(for Middleware) and custom Data Access Library(AS DataAccessLayer)? 是否可以使用WPF项目模板(用于UI),WCF项目模板(用于中间件)和自定义数据访问库(AS DataAccessLayer)来创建解决方案?

  2. Later on if needed we will give browser based HTML+jQuery UI also so can we reuse the code mentioned in 1# ? 稍后,如果需要,我们还将提供基于浏览器的HTML + jQuery UI,因此我们可以重用1#中提到的代码吗?

  3. Our client wants Sybase as DB so is it possible to make DAL through Sybase DB? 我们的客户希望将Sybase作为数据库,因此可以通过Sybase DB进行DAL吗?

Dont treat it discussion type Question and Dont close it 不要对待讨论类型的问题,不要关闭它

I simply wants to know the solution as 3 answers to these 3 questions due to these strange requirement with us :) 由于我们的这些奇怪要求,我只是想将解决方案作为这3个问题的3个答案:)

The answer is that it is definitely possible to do all of this. 答案是绝对有可能做到所有这些。

Creating a front-end in WPF, a middle tier in WCF and a custom Data Access layer will work out well for you. 在WPF中创建前端,在WCF中创建中间层和自定义数据访问层将非常适合您。 Here is some guidance on how to connect WPF and WCF: http://wcfguidanceforwpf.codeplex.com/ 这是有关如何连接WPF和WCF的一些指导: http : //wcfguidanceforwpf.codeplex.com/

You can definitely replace the WPF front-end with a HTML+jQuery UI. 您绝对可以用HTML + jQuery UI替换WPF前端。 Here is some code on how to make use of a WCF service through jQuery: link 这是一些有关如何通过jQuery使用WCF服务的代码: 链接

C# can access Sybase just fine. C#可以很好地访问Sybase。 See This 这个

Adam, 亚当,

Yes it possible to all three question. 是的,这三个问题都是可能的。

  1. The are frameworks such as Prism / Caliburn / MMVM Light which can help with you UI. 诸如Prism / Caliburn / MMVM Light之类的框架可以为您的UI提供帮助。
  2. If you base you business logic behind a WEB Api (SOAP / REST), you should be able to use similar business logic for both. 如果您将业务逻辑基于WEB Api(SOAP / REST),则应该能够对两者都使用类似的业务逻辑。
  3. The database providers for Sybase, but may want to consider using an ORM (Object Relation Mapper) (Nhibernate / Entity Framework) Sybase的数据库提供程序,但可能要考虑使用ORM(对象关系映射器)(Nhibernate /实体框架)

Cheers 干杯

Iain 伊恩

The first two questions are well covered by the other answers. 其他答案很好地涵盖了前两个问题。 For the Sybase portion of the question here is what you should know: 对于问题的Sybase部分,您应该了解以下内容:

Whether you plan to use a straight ADO.NET data layer or an ORM, the required DLLs and configuration set up are applicable to both. 无论您打算使用直接的ADO.NET数据层还是ORM,所需的DLL和配置设置都适用于两者。 If you plan to use NHibernate 3.0 with Sybase then you should review the information here because it must use the NHibernate 2.1.2 provided dialect. 如果打算将NHibernate 3.0与Sybase一起使用, 则应在此处查看信息,因为它必须使用NHibernate 2.1.2提供的方言。 NHibernate 2.1.2 does work just fine out of the box with Sybase ASE version 12. For that version, configure NHibernate with this dialect & driver: NHibernate 2.1.2确实可以在Sybase ASE 12版中正常使用。对于该版本,请使用以下方言和驱动程序配置NHibernate:

NHibernate.Dialect.SybaseAdoNet12Dialect NHibernate.Dialect.SybaseAdoNet12Dialect
NHibernate.Driver.SybaseAdoNet12ClientDriver NHibernate.Driver.SybaseAdoNet12ClientDriver

The SqlAnywhere drivers are different I believe but for ASE the DLLs you'll need to reference are listed below. 我相信SqlAnywhere驱动程序是不同的,但是对于ASE,您需要参考的DLL如下所列。 You can only get them from Sybase through their support program to comply with their licensing. 您只能通过他们的支持计划从Sybase获得他们,以遵守他们的许可。

Lastly, the Sybase ADO.NET driver seems to be a thin layer over their unmanaged DLL and its usage and stability shows it. 最后,Sybase ADO.NET驱动程序似乎是其非托管DLL的薄层,其用法和稳定性证明了这一点。 It is certainly finickier to configure than the other ADO.NET drivers I've worked with. 当然,与我使用过的其他ADO.NET驱动程序相比,配置更加灵活。 For example, since Sybase isn't typically configured to support a Unicode character set you need to set/map the .NET string parameters to use AnsiString or AnsiStringFixedLength (or AseDbType.VarChar) as appropriate. 例如,由于Sybase通常未配置为支持Unicode字符集,因此您需要设置/映射.NET字符串参数,以适当地使用AnsiString或AnsiStringFixedLength(或AseDbType.VarChar)。 What's even more bizarre is if you forget to do this, the driver will silently fail and just write a null value to the table column. 更奇怪的是,如果您忘记执行此操作,驱动程序将无提示地失败,仅将null值写入表列。

sbgse2.dll sbgse2.dll
Sybase.AdoNet2.AseClient.dll Sybase.AdoNet2.AseClient.dll
sybcsi_certicom_fips26.dll sybcsi_certicom_fips26.dll
sybcsi_core26.dll sybcsi_core26.dll
sybcsi_profiler26.dll sybcsi_profiler26.dll
sybdrvado20.dll sybdrvado20.dll

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

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