Tag Info

Hot answers tagged

48

When designing a project and laying out the architecture I start from two directions. First I look at the project being designed and determine what the buisness problems is that needs to be solved. I look at the people who will be using it and start with a crude UI design. At this point I am ignoring the data and just looking at what the users are asking ...


30

I like dividing my projects into layers That way it's easier to manage cyclic dependencies. I can guarantee that no project is importing the View project (layer) by mistake, for example. I also tend to break my layers in sub-layers. So all my solutions have a list of projects like this: Product.Core Product.Model Product.Presenter Product.Persistence ...


27

I'll expand my comment: ... if you're adding or removing elements, you want a list (or other flexible data structure). Arrays are only really good when you know exactly how many elements you need at the start. A Quick Breakdown Arrays are good when you have a fixed number of elements that is unlikely to change, and you wish to access it in a ...


19

If you have a Delphi background, you will be disappointed in WinForms. You will try to do things that were easy in the VCL, only to find that they're painfully difficult, or even impossible. WPF will be much less confining. For example, here are just a few of the WinForms limitations we've run into: WinForms has nothing that compares to TAction, so if ...


19

You pretty much can't. Any pirate group who wants to crack your software will, for fun, and then give it to everyone else and there is nothing you can do. Microsoft can't keep Windows off torrent sites, and the UK government can't stop people visiting The Pirate Bay. There's a reason that the new wisdom in many creative circles is to accept piracy and use ...


15

This is my recommendation. Use MSDN I started with this site: wpftutorial Learn MVVM pattern. This is a good article. There are a few MVVM frameworks. This question may help you to choose one.


15

Consider WPF. If you are unfamiliar with WPF, I recommend Windows Presentation Foundation Unleashed. WPF allows for content in web browsers or standard windows applications. WPF also is resolution independent - the content on a mobile device has the same crisp look as the content on a 50 inch tv. Windows Forms is limited when it comes to a highly ...


13

Organizing Projects I typically try to divide up my projects by namespace, like you say. Each tier of an application, or component is its own project. When it comes to how I decide how to break my solution up into projects, I focus on reusability and dependencies of those projects. I think about how other members of my team will be using the project, and ...


12

I am usually very surprised with people saying that they didn't had a good experience with WPF. I am a developer who switched from C++/MFC to C#/WinForms to C#/WPF. The transition from WinForms to WPF wasn't a easy one because learning XAML is not very easy but once you get hold of it, it is an awesome technology. I, for one, cannot go back to WinForms. WPF ...


9

I've just been through this, so it's fresh in my mind. Core are: Dependency property system, Routed Event system, Commands, Binding, INotifyPropertyChanged, Styles, Control templates, Data templates, Hierarchical templates, Triggers, Resources, ObservableCollection Pattern wise: MVVM, Unit of Work, Repository and DI/IOC. MVVM is the main one, the others ...


8

A good place to start would be http://stackoverflow.com/questions/109997/. The main advice I'd give, is don't go in with the assumption that people are untrustworthy--assume trust, mostly. There will be pirating, but even if someone hits a red flag, don't attack them--otherwise, you may turn off any honest customers that hit weird situations. A light ...


8

It looks like you've fallen into some of the common pitfalls, but don't worry, they can be fixed :) First you need to look at your application a little differently and start breaking it down into chunks. We can split the chunks in two directions. First we can separate controlling logic (The business rules, data access code, user rights code,all that sort of ...


7

Face it: you will be unable to get rid of all pirated copies of your software. Any anti-piracy system can be worked around. A sufficiently interested warez person/group could write a crack which bypasses the activation-related parts in your software. You could write a counterattack to this, and then it becomes a catch: pirates vs. your implementations of ...


7

Using WCF has both advantages and disadvantages compared to direct socket programming. The main advantage is that you do not need to care about programming a server loop or communication protocol. You split your communication into function/method calls, include these functions/methods in your contract interface, create a class that implements it, ...


7

You should concern yourself with data rather than subjectivity. Thus you should be monitoring/measuring/profiling to determine improvements. That monitoring needs to be in both production and test (and dev) environments. Ideally, you shouldn't be optimizing anything until after you see the results of performance. Otherwise you risk a "premature ...


6

It's very common and I can't find many complaints regarding the speed of Unity/Ninject type resolution. Your classes doing the heaviest lifting that have the most external dependencies you want to inject into should be nowhere near the Windows Forms framework code you're writing and so the fact that you're using Windows Forms shouldn't bare heavily on your ...


6

It sounds like what need is to have your programs digitally signed (i.e. Code Signing). This is similar in concept to an SSL certificate, in that it proves that the program is from whomever the certificate was issued to & has not been modified (e.g. malicious code added). The key to understanding Code Signing though, is that the certificates are ...


5

The person you will be working for will know what you mean, but HR may not. Review the posted requirements for the job, and tweak your resume if necessary to fit their particular set of keywords (assuming you have the skills).


5

This is an odd question, but in the real world time equals money. The designer generated code is not difficult to understand, so writing it by hand is an unnecessary time and money sink. Use the designer. Furthermore, the designer generated code is probably in a format that you will not use in any other aspects of programming, and it actually uses some ...


5

A user control is a composition of existing controls while a custom control is a control derived from one base control. This might be better in stackoverflow btw.


5

I don't know why you need static controls. Maybe you know something I don't. I've used a lot of visual inheritance but I've never seen static controls to be necessary. If you have a common treeview control, let every form instance have its own instance of the control, and share a single instance of the data bound to the treeviews. Sharing control state (as ...


5

There's a number of ways to control UI complexity. If you have lots of forms, you can choose a design pattern that manages transitions: Application Controller for example, or closer to the metal: State. You can compose groups of controls into single controls. In winforms, you use User Controls. If the complexity is coming from the quantity of code in your ...


5

If the UI layer has no access to the assemblies or authentication information needed to access the database, it is impossible to access the database directly from that layer. If you have separated your layers into separate assemblies, and limit the public data types and members to only those needed in the higher level layer, it is easy to detect a violation, ...


5

You can use a date field as a primary key, but you can't key on PART of a field. You'd have to make a separate field with just the date. This particular condition isn't something that would normally be enforced by building it into the primary key of a table anyway. Your "Employee can't work same shift on same date twice even in two locations" is a business ...


4

When I write code in .NET, there is a clear tendency to have clusters of related functionality. Each of which may have some sub-sets of the same. I like to break out the main groups physically - one of these per VS project. I then further subdivide logically using assemblies. Following this pattern, one of my current projects looks like this: Wadmt ...


4

Ideally you should use the same phrasing as was used in the job posting you're replying to, but I think WinForms is acceptable in general. I'm pretty sure my resume says WinForms and WebForms on it, which I think has a nice bit of symmetry to it. If you're going to go that route, make sure you say "WinForms" everywhere else to remain consistent. That said, ...


4

I should first note that I am mostly a asp.net developer, though I have used winforms plenty before. The switch to WPF is not as big as you are making it (imo) after a week or so (40+ hours), most was second nature again. Anyways I believe Anders Hejlsberg is one of the architects behind WPF, at least according to the publishers of this book-> “As one of ...


4

A lot of what you present here is very reasonable and sound. Some of the choices are going to depend on specifics with the application and which one "feels" right. As is the case most of the time, there isn't going to be one right answer. Some of the choices will make sense here and those choices could be completely wrong for the next application and ...



Only top voted, non community-wiki answers of a minimum length are eligible