简体   繁体   中英

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

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.

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.

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)?

  2. Later on if needed we will give browser based HTML+jQuery UI also so can we reuse the code mentioned in 1# ?

  3. Our client wants Sybase as DB so is it possible to make DAL through Sybase DB?

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 :)

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. Here is some guidance on how to connect WPF and WCF: http://wcfguidanceforwpf.codeplex.com/

You can definitely replace the WPF front-end with a HTML+jQuery UI. Here is some code on how to make use of a WCF service through jQuery: link

C# can access Sybase just fine. 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.
  2. If you base you business logic behind a WEB Api (SOAP / REST), you should be able to use similar business logic for both.
  3. The database providers for Sybase, but may want to consider using an ORM (Object Relation Mapper) (Nhibernate / Entity Framework)

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:

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. 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 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.Dialect.SybaseAdoNet12Dialect
NHibernate.Driver.SybaseAdoNet12ClientDriver

The SqlAnywhere drivers are different I believe but for ASE the DLLs you'll need to reference are listed below. You can only get them from Sybase through their support program to comply with their licensing.

Lastly, the Sybase ADO.NET driver seems to be a thin layer over their unmanaged DLL and its usage and stability shows it. It is certainly finickier to configure than the other ADO.NET drivers I've worked with. 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. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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