I'm planning on writing a "medium-size" WinForms application that I'll write in C#, .NET 3.5. I have some "generic design questions" in mind that I was hoping to get addressed here.
Thanks(?)
1) Don't catch any exceptions. The vast majority of them tell you about a bug in your code, you'll want to know about them right away. If during testing and deployment, you find error conditions that you think you can handle (there aren't many of them), you can always add the try/catch block. If you plan on handling exceptions, be sure to liberally sprinkle try/finally blocks in your code so the state of your classes is preserved even if there's an exception that prevents cleanup code from running. There is no notable cost to using try without catch.
2) Satellite assemblies are not bulky. Just a small DLL in a subdirectory of your deployment folder. No special code is required, everything is automatic. Most of all, it is a standard solution. You can send your .resx files to a localization service and they'll use standard tools (like Winres.exe) to provide you with the translations. Asking them to deal with something custom is going to be expensive and potentially troublesome.
3) Alternatives are SQL Server CE (same approach as SQLite) and SQL Server Express. The latter gives you the most bang for the buck, but must be installed. That isn't hard.
4) It depends on your target audience, but if look-and-feel is at a factor in a buying decision at all, hire a UI designer. S/he'll catch UI bloopers and make it look spiffy.
Regarding first question - have a look at Enterprise Library Exception Handling Block. Microsoft did a great job at providing documentation and code to solve this problem.
Regarding other question (especially #4) it is hard to recommend something without knowing details of your application.
I pretty much have the same answer as aku for the first question, you might want to take a look at the Enterprise Library in general since there are several useful blocks such as the Logging and Validation blocks.
Can't help with the second since I haven't worked on any projects that needed to support localization of any kind.
Without a better idea of what kind of data/application you are developing it is kind of difficult to recommend local data storage. A couple of thoughts that I have (no particular order) are:
Why not download Visual C# 2005 or 2008 Express Edition? Designing is easy
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.