Tag Info

Hot answers tagged

47

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 ...


29

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 ...


24

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 ...


7

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

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

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 ...


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 ...


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

Clearly WPF is the way to go thinking in the future. Mastering it is hard, but the platform is very well architected and flexible. A few lines of advice: Start easy: Don't try to implement your first project using only MVVM or fancy animations. Start simple with windows, button and lists. Take advantage of DataBinding. Buy the book WPF Unleashed by Adam ...


4

If you need to have the same control, with the same formatting, etc. in a whole bunch of places, then this isn't a bad idea. However, if each class you create would only be used once, then you're not really removing any complexity, only moving it around. I'd prefer linear, conceptually simple straight-line code to a bunch of classes that are only ...


4

Pick up a bit of C# and use that as your language with which to attack WinForms. Using C++ with Winforms is going to require learning C++/CLI anyway, which depending on your C++ experience, seems like a radically different dialect and can give you a run for your money. Given the fact that Microsoft "didn't get around to" completing the Intellisense for ...


4

I maintain a new WinForms/WPF application based on the MVVM pattern and Update Controls. It started as WinForms, then I created a WPF version because of the marketing importance of a UI that looks good. I thought it would be an interesting design constraint to maintain an application that supported two completely different UI technologies with the same ...



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