2
  1. I am developing a Client-Server based application in which client application will access server database to store billing information. It will also have report generation facility. Windows Forms is good in document printing & I don't see such facility or controls in WPF. If I am wrong then please correct me.
  2. I want database security, which DB should I use, SQL Server, MySQL or Oracle. I would like to use free DB but security is my priority.
  3. Please suggest how I can implement a Client-Server architecture with multiple clients in C#?

Thank you Geeks!!!

James Kolpack
  • 9,331
  • 2
  • 44
  • 59
Raj
  • 3,890
  • 7
  • 52
  • 80
  • This entry might help you as well: http://stackoverflow.com/questions/1926000/why-should-i-use-wpf-over-winforms-any-examples-of-wpf-outperforming-winforms/1926023#1926023 – TimothyP Apr 05 '10 at 16:35

4 Answers4

5
  1. Using WPF will allow you to deliver a more innovative User Experience. There's a decent high level overview of Working with Documents in WPF on MSDN.

  2. Any database should be able to provide decent security. If you're using C#, I would recommend one of the versions of SQL Server (If SQL Server Express works for you...go for it).

  3. Windows Communication Foundation (WCF).

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
1

1 - Actually, WPF provides better/easier document/control printing that winforms does. Additionally, WPF still provides support for RDLC and other reporting solutions for printing & reporting. Asking if you should use WPF or WinForms is like asking if you should eat lemons or limes for vitamin C. Regardless of which one you use, you'll get where you're trying to go, but the flavor and experience will be wildly different.

2 - The database is not your security. The DB you choose will have little to no impact on your security. Personally, I would look at Active Directory and Domain security, and basically allowing the system to use the user's domain account and domain groups to control authentication and authorization.

3 -There are many possible solutions to a client-server framework, and each one has its own strengths and drawback, and then there's also the possibility of using webforms which you've not even touched upon.

Stephen Wrighton
  • 36,783
  • 6
  • 67
  • 86
  • Sorry dude, I don't feel that saying 'Hire my company' as a serious part of an answer is all that cool, especially considering when you really didn't give any other real advice. – Chad Ruppert Apr 05 '10 at 15:46
  • Did you not read the three words immediately afterwards? As for real advice - I noted that WPF provides easier printing than winforms, DB is not the source of security, and the fact that he's overlooking webforms as a valid client/server architecture by focusing on winfroms/wpf. Ultimately, he doesn't have enough details to provide suggestions on the arch. (i.e. what's the required uptime? does it need to be network aware? is every client going to be the same "type" of app?). It's fine & well to scream "WCF" when ultimately that is possibly sending him down the wrong path. – Stephen Wrighton Apr 05 '10 at 16:23
  • 1
    +1 I like to throw the occasional joke into my answers, and it frightens me that the dogpile of negatives could double the total of all positive votes across all answers! – Jeffrey L Whitledge Apr 05 '10 at 16:54
  • @Jeffery - I was slightly taken aback by it as well. – Stephen Wrighton Apr 05 '10 at 17:20
  • @Stephen - I misread the period as a comma in the original comment. Sincere apologies. – Chad Ruppert Apr 07 '10 at 14:57
  • @Chad - I can understand that, and it's not a problem. Just the... extreme negativity that attached itself to the post was somewhat... startling. – Stephen Wrighton Apr 07 '10 at 16:43
1

Regarding 1.

WPF has a handy PrintDialog control with a PrintVisual method on it. This can be used to print any visual elements from a WPF controls hierarchy and may be able to satisfy your printing requirements.

I have developed many applications in WinForms and only a few in WPF, but I would lean very heavily in the WPF direction for any new development. It is very flexible and powerful.

Jeffrey L Whitledge
  • 58,241
  • 9
  • 71
  • 99
  • One gotcha on PrintVisual (at least last time I checked), it does not allow a visual to span more than one print page (they get cropped). You can work around this by manually splitting up the raw image. Just a heads up. – Christoph Apr 05 '10 at 16:17
  • Another way to get around this is to resize the control to page width, and then send it to the printer, and then resize it back to its original size. – Stephen Wrighton Apr 05 '10 at 17:16
1

1- WPF is awesome when you want to implement a windows application, and consider the freedom it gives and the separation of concern you can eventually get, I would say 100% go with WPF. There are many ways to control your printing procedure that some have been already explained in above.

2- For database, depending on your load and concurrency, you can choose a different database. Oracle is an awesome one, but probably the most expensive one. So, at the end you need to compare MySQL which is a fantastic db and at the same time free, and SQL server express edition which is a free version of the enterprise/professional version of Microsoft SQL server. Express edition is basically the limited edition of the same database, and if you need o expand your network and support, you might not be able to afford the fees of an enterprise solution. So one idea can be to stick to the best free database from the beginning if you foresee such a demand in the future. The security of these both databases are somehow in the same level, but you need to work on your network/server securities as well, because I found them harder to break.

3-Using Windows Communication Foundation (WCF) is very simple and easy especially when you want to use something like WPF. You basically create some data contracts and publish them, and that would be your communication end points. You basically call them, and deal with them as they are your local methods. Highly recommended. So what do you mean exactly by multiple clients? Does it mean different types of client (like web-based, mobile apps, etc.)? I also suggest taking a look at RESTful web services as it has the same kind of communication concepts. I just mentioned some names, so you can start reading something about each of them.

paradisonoir
  • 2,892
  • 9
  • 30
  • 41