Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

Windows Forms Developers: Tell me about your applications

Pete Brown - 16 November 2010

I want to help Windows Forms developers transition applications to Silverlight and WPF. To do that, it will help me to understand the types of applications that are being maintained or newly developed in winforms today.

Specifically:

  1. What does your windows forms app do? Can you describe its key scenarios?
  2. Where is your database access happening?
    1. ADO.NET calls from the code-behind for the form?
    2. Services?
    3. Same project, but encapsulated into a class?
    4. XML data?
    5. Other?
  3. Do you integrate with other services in the organization? If so, what and how?
  4. What types of security authentication approaches are you using?
    1. Windows authentication using single sign-on?
    2. Custom authentication tables in your database?
    3. Integrate with ASP.NET membership?
    4. Something else?
  5. How do you handle authorization in your applications?
    1. Field-by-Field security?
    2. Function or button-level security (ie, need privs to do an update, but not a read)?
    3. Others?
  6. Where is your application logic and rules?
    1. It's in the code-behind!
    2. I'm using a business rules framework like CSLA or something similar
    3. It's encapsulated in classes on the client
    4. It's in services on one or more servers
    5. Others?
  7. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?
  8. If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

Help me help you. Answer as many of the questions above as you can, in the comments below. This is going to lead into content (talks, videos, posts etc.) and perhaps even tooling and templates to help make the transition easier for you. Anything which is a Silverlight feature request or WPF feature request should go on those sites.

Please share this with the other developers in your organizations, your customers etc.

         
posted by Pete Brown on Tuesday, November 16, 2010
filed under:          

31 comments for “Windows Forms Developers: Tell me about your applications”

  1. Rod Macsays:
    1. What does your windows forms app do? Can you describe its key scenarios?

    Accesses a remote SQL DB to update an ASP.NET site

    2. Where is your database access happening?

    client side datasets (WinForms), server side datareaders (ASP.NET)

    3. Do you integrate with other services in the organization? If so, what and how?

    No

    4. What types of security authentication approaches are you using?

    custom authentication

    5. How do you handle authorization in your applications?

    custom authorization

    6. Where is your application logic and rules?

    client and server (WinForms & ASP.NET respectively)

    7. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    7.1. Yes. No dataset support in SL therefore WPF is the only possible route (too much to do if I change the UI and the data layers)
    7.2 No property grid in WPF forcing use of an ugly WinForms control

    8. If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    8.1 Decouple WPF from Direct3D
    8.2 Rewrite WPF to embrace WP7 and WEC
    8.3 Forget about cross platform Silverlight, the idea is dead and Bob Muglia was right
  2. Duncan McGregorsays:
    1. What does your windows forms app do? Can you describe its key scenarios?

    We have many applications for managing Property, Jobs, Orders, Mail, Car Parking, Work/Repairs Requests, Timesheets, Staff.
    With many of these applications the user will have multiple forms open and generate reports using a warpper library we have written for the Microsoft Reportviewer local report control.
    The users may have more than one of these applicatons open at a time so with the default behaviour of WPF which does not have an equivilant for MDI parent the users may get lost as to which forms belong with which application.

    2. Where is your database access happening?

    Our database access is through data access and business logic classes and data in the views/forms is managed using a MVP (Model View Presenter) pattern so there is a minimal amount of code behind the form, the MVP interfaces and Model and Presenter implementations are stored is seperate libraries so the 'application'/views propject can be changed at any time.
    We are using LINQ-to-SQL data contexts for interfacing with our SQL server databases

    3. Do you integrate with other services in the organization? If so, what and how?

    We have some validation database quieries that go though to other sections of the organization, and we provide data to other sections of the organization

    4. What types of security authentication approaches are you using?

    Intergrated authentication for client desktop applications.
    Custom authentication for Silverlight & ASP.NET web applications

    5. How do you handle authorization in your applications?

    Active directory roles
    Database Roles
    In-house implemneted roles

    6. Where is your application logic and rules?

    In the business logic classes, in the data access libraries
    In the

    7. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    We have moved many of our external facing web applications to Silverlight.
    For out destop client applications we have implemented some new applications in WPF but have not converted old applications as we will need to implement equivilant controls (Convert existing custom controls to be built on interfaces, so we can keep logic)
    Also working out the best stratergy to overcome the lack of a MDI child forms structure.

    8. If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    Sample code of how to implement the docking behaviour that exists in the VS2010 editor.

    Guidance on an MDI equivilant stratergy for WPF.

    ListView.View and GridView added to Silverlight so we can have a headered listview that is not in a grid like the DataGrid control.
  3. Dougsays:
    What does your windows forms app do? Can you describe its key scenarios?
    Document management frontend. Users can drag/drop/checkin/checkout view historial versions...
    We are trying to make it look like Windows Explorer.
    Where is your database access happening?
    No DB, just Web services
    Do you integrate with other services in the organization? If so, what and how?
    Yes, thru Java web services. The front end is acting like a dump terminal.
    What types of security authentication approaches are you using?
    Windows authentication using single sign-on
    How do you handle authorization in your applications?
    Folder/document level security
    Where is your application logic and rules?
    It's in the presenter in Passive View
    It's in services on one or more servers

    Have you tried moving to Silverlight or WPF?
    Thinking about it. But scared because of XML syntax and designer in VS 2008. Also I heard WPF performance sucks.
    If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.
    How about MS go ahead and make use of WPF in their flagship products (Windows, Office). We are not comfortable seeing MS doen't use WPF in those products.
  4. Petesays:
    @Parker

    Agreed on type safety. Not so much on poor performance. You generally see performance issues only with thousands and thousands of binding elements - not the typical business application case. That said, we're working on some things in WPF v.next to help perf/stability.

    As to inconsistent conventions, the markup extension syntax certain requires getting used to (thankfully, VS2010 makes it so you can do many binding statements using either the designer or intellisense in the editor), but I wouldn't call it inconsistent myself. Do you have any specifics to help me see what you're running into?

    Pete
  5. Jack Bondbesays:
    I don't know if this has been addressed in IE9, but the WebControl really ought to behave like other controls in regards to rendering. You simply can't effectively scale and rotate the existing WebControl.
  6. Garethsays:
    1. Ensures users in a factory adhere to correct assembly process by prompting for scans, interfacing with hardware, checking scanned items against server-side bill of materials stored in SQL Server, etc.

    2 / 3. DB Access happens on a server, in a combination of remoted and WCF windows services.

    4. Some integration with SAP via the .NET SAP connector. (Argh! The horror)

    5 / 6 / 7 Uses combination of a custom User/PIN/Role based authentication on client (credentials fetched from SQL Server via App Server) along with Windows integrated authentication and role based SQL Security

    9/10 App logic in a mixture of the client, server services and SQL stored procs. Things which are definitely business logic we try and keep on the server side.

    11 Partially moved to WPF. A plugin based architecture allows us to develop newer modifications in WPF, with the WinForms WPF Element Host control. Learning xaml proved to be a struggle at first, but now I much prefer it to WinForms.

    12 I'd like to see more poweful tools for editing XAML in Visual Studio for common tasks (please don't make me fire up blend just to tweak a gradient fill with sliders)

    In terms of moving to WPF/Silverlight guidance, a WinForms - WPF equivalency chart or some such would have been useful at the time, e.g.

    WinForms:

    this.ForeColor = Color.Azure;

    WPF

    this.Foreground = new SolidColorBrush(Colors.Azure);


  7. Matthew Phillipssays:
    "If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier?"

    I ask for one thing only:

    To not distribute information randomly through blogs, sometimes with dubious URLs, and without ever quoting the version of the product the info is about, but to put the info in MSDN properly.
  8. Patrick Schallersays:
    1) LOB App that allows Case Managers to enter and manage Members data.
    2) Linq To SQL Project
    3) Not currently.
    4) Windows Authentication, Single sign-on AND Integration with ASP.NET membership.
    5) Function Level based on Job Role.
    6) Mostly in the Code-behind or DAL.... :-(
    7) I want to move to SL4 but I have fairly large offline data considerations
    8.1) Accessing Local SQL storage in SL4.
    8.2) Proper Enterprise, LOB Solution Structure.
    8.3) MORE Windows Forms Controls to XAML(WPF or SL) Controls migration guidance.

    Thank you very much!
  9. DeveloperDansays:
    M Phillips comment on randomly distributed information resonates with me. Pete, look at your short list of questions. Where do I go to upgrade my knowledge on these topics from WinForms to WPF/Silverlight? ...random locations. I'd like a single source of the truth for learning sequentially as I would find chapters in a book. I'd like guidance on decisions I'll need to make along the way (i.e. data access). I'd also like a complete real world application that I can be guided through as the sequential learning path evolves. WPF/Silverlight is a huge subject. It's always easier to fall back on the familiar WinForms environment.
  10. SAsays:
    Pete,
    My application was written using C# Forms, before WPF was released. This application does most of the control creation on run time. Design time controls are just a blank tree view on left panel and a listview on the right panel, and the menu. So, XAML is not useful. Could you please point me to the websites or books which guides me how to to program in WPF using code behind only (without using XAML significantly). I would appreciate your help.

    Thanks.
  11. JamesBsays:
    1. What does your windows forms app do? Can you describe its key scenarios?

    We are using SCSF/CAB guidance for our ERP applications ( CRM, Cashregister, finances, ... )

    2. Where is your database access happening?

    We are using NH with CSLA.

    3. Do you integrate with other services in the organization? If so, what and how?

    Yes .. we use WCF ( 90% of the time ).

    4. What types of security authentication approaches are you using?
    5. How do you handle authorization in your applications?
    6. Where is your application logic and rules?

    CSLA.

    7. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    We were thinking ( 2 years ago ) about going with WPF ... but our senior DEV. didn't like the "No windows look-and-feel" when developing ( it's a whole new concept if you are an "old cat".

    If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    Some "simple" guidence on the KEY differences "WPF and WinForms" for users who are in win-forms business for 10+ years. It's a big mind-shift. Our company had problems with MVP patterns and ORM-s ... that's why we didn't want to "push it more" with something completly "new" like WPF.

    Thanks
  12. Stephen Clearysays:
    ◦What does your windows forms app do? Can you describe its key scenarios?

    Configures a tool used in oil pipleline inspections. It has two key scenarios: configure the tool before a "run", and retrieve the recorded data after a "run".

    ◦Where is your database access happening?

    We use EF4 to a local database. Some entities are accessed by code-behind; others have a layer of abstraction in-between.

    ◦Do you integrate with other services in the organization? If so, what and how?

    No. The program must run standalone on a laptop without connectivity in the field.

    ◦What types of security authentication approaches are you using?

    None. :)

    ◦Where is your application logic and rules?

    There is a "business logic layer" of sorts, but it's just a DLL that is accessed by the client. It is possible that this may evolve into an actual API for third parties to use.

    ◦Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    Yes; we tried moving to WPF. We also considered Silverlight, but the lack of the TPL was a showstopper.

    There were two problems in moving to WPF:
    1) There is a good story in .NET for DB entities (EF4), and there is a good story in .NET for asynchronous operations (TPL), but there isn't a good story for asynchronous DB entities. The asynchronous data binding can get tricky.
    2) We have a huge about of data and controls to display. Our first revision was pretty decent, utilizing the accordion control from the WPF toolkit. Unfortunately, the latest version of WPF has broken that control. We have been waiting for an updated toolkit but no news yet...

    ◦If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    The main thing I'd like is for WPF and Silverlight to be treated equally. Right now, it seems that SL is receiving all the fanfare what with WP7 and everything, while WPF is left to rot in its almost-finished state. The toolkit (including VSM, DatePicker, etc) should really be pushed through to production quality.
  13. itaisays:
    I think the primary difference between Winfrom application development and SL/WPF is that Winfrom apps have a well understood ux model (e.g Menu bar File/Edit/Help) and a consistent look & feel with their surrounding applications as far as Windows controls (at least until Vista). The ux model was always consistent across windows versions which made life simple.I think the challenge with WPF/SL is that you are expected to have some artistic qualifications as these frameworks lend themselves to "Web 2.0 style" in other words the ux model is not obvious. You don't need Expression (Blend) to write a simple Winform App :)
  14. Carlo Kuipsays:
    Hi Pete,

    We spoke last week at #tee10 about this specific issue of providing guidance for winforms devs to transition to WPF/SL. Great book btw :-)

    1)What does your windows forms app do? Can you describe its key scenarios?
    Accounting overview for financial statements, lots of drill down and master detail-detail-detail-detail-more detail

    2)Where is your database access happening?
    Depends on the configuration but standalone it's all on the client

    3) ADO.NET calls from the code-behind for the form?
    Nope

    4)Services?
    No

    5)Same project, but encapsulated into a class?
    Nope

    6)XML data?
    Yes

    7)Other?
    Heavy reporting + printing

    8)Do you integrate with other services in the organization? If so, what and how?
    No, not yet

    9) What types of security authentication approaches are you using?
    Custom

    10)Windows authentication using single sign-on?
    No

    11)How do you handle authorization in your applications?
    RBAC

    12) Where is your application logic and rules?
    centralized gateway component, database of course handles integrity

    13)Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?
    We tried SL2 and SL3, had a lot of issues regarding the tool set to use, back then little availability of off-the-shelf 3rd party controls, bandwidth considerations, deployment problems, weekly updates to SL

    14)If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.
    - Architecture prerequisites quickscan, what pieces of the puzzle should be in place to even consider a conversion/rebuild
    - Developer training resources specific to this subject (like mentioned guidance on converting winforms properties to SL properties)
    - List of absolute NO-NO's

    Cheers,
    Carlo
  15. chrissie1says:
    1. What does your windows forms app do? Can you describe its key scenarios?
    Forensic case-, analysis-, kitmanagement and other reference databases

    3. Where is your database access happening?

    in a DAO layer with nHibernate

    3. Do you integrate with other services in the organization? If so, what and how?

    Yes, a central database.

    4. What types of security authentication approaches are you using?

    Windows authentication

    5. How do you handle authorization in your applications?

    No need yet

    5. Where is your application logic and rules?

    Domain model

    6. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    Yes and I have the reason why not documented
    http://blogs.lessthandot.com/index.php/All/?p=973

    7. Don't think much tooling will help. Allthough I have my bussiness logic out of the forms I would still have to remake over 200 forms and make use of the power of WPF. Allthough I had no problem running bth at the same time in the same application so it could be done gradualy. But I prefere to add new features then work for months to just have the same thing.
  16. Tudorsays:
    I think that for existing, non-trivial WinForms applications used for real business process - large applications developed during more than 2 or 3 years, it does not make sense, from a financial point of view to "transition" to WPF or Silverlight - in most cases the normal course of action is to maintain the existing application until is no longer used, or to do a complete re-write when such a re-write is necessary for other reasons (beter architecture, code rot etc..)
    Usually a developer moves to WPF or Silverlight when he has to implement a new application, and in this case anyway he has to learn all the necessary skills again.

    On the other side, do not forget that still today many big companies are still actively developing very large applications using WinForms, started no longer than 1 or 2 years ago, so we expect Microsoft to invest in actively supporting WinForms, in paralel with WPF in the forseeable future
    (I think the next 7 - 10 years is a minimum).
  17. Ashishsays:
    Hello Pete,

    I have been developing web application in which i have created functionality of drag and drop onto canvas. I am dropping images onto canvas. for this functionality i have taken same code created by Keith manhony as per below link.

    http://cid-1eb3f7fa80e5873a.skydrive.live.com/self.aspx/Public/DragDropApplication.zip

    Now in my application i am not able to restrict functionality of overlapping of images onto one another. like i have dropped one image onto canvas and if i drop another image onto same image it will overlap on 1st one. I want 2nd image to be placed at its original position whenerver i try to drop images onto one another.

    As per the comments in the code written by Keith it is limitation of above example and i want to overcome of this functionality.

    Can anyone please guide me how can i achieve this functionality?or what chage i should made in DragDropManager.cs class in above example. I have tried to dig or modify the code according to my requirements on my own way but i could not achieve.


    Thanks & Regards
    Ashish

  18. Nicholas Piaseckisays:
    1. What does your windows forms app do? Can you describe its key scenarios?

    - Administrative CRUD for e-commerce store
    - Order processing (receipt printing and thermal shipping label printing)
    - Document processing and generation (certificate of origin, commercial invoice)

    2. Where is your database access happening?

    On client via OO model using NHibernate

    3. Do you integrate with other services in the organization? If so, what and how?

    Not in the organization, but a number of third party Web services: Twitter, Endicia, USPS, FedEx

    4. What types of security authentication approaches are you using?

    WIndows authentication

    5. How do you handle authorization in your applications?

    IPrincipal ... view model has "CanDoThis" "CanDoThat" booleans that are databound to controls

    6. Where is your application logic and rules?

    Most rules live in the OO model ... but validation tends to be duplicated at the UI layer as view models are specifically tailored to the UI

    7. Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?

    Learning curve, I just need an MDI app, seems hard to create "decent looking" LoB app if you're just a developer (there are no designers here, this is for internal use), already know and use GDI a lot of generating documents / metafiles, I don't need to embed a video in a select box, what business value does migrating from WinForms truly offer?

    8. If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    - MDI still makes sense for a lot of internal administrative applications
    - XPS makes my head hurt
    - Big chunks of Windows and Windows Live are still using native code ... to a business, WinForms seems less risky than WPF ... though VS2010 really helped a lot in proving that it wasn't going to be another LINQ-to-SQL
  19. small_mountainsays:
    I think before you spend a lot of time trying to move WinForms apps into WPF apps, you need to address immediate-mode vs. retained mode graphics. The app I moved to WPF was an MFC app, not a WinForms app, but by far the biggest issue we've had has been working around the fact that WPF graphics is retained mode only, with the workaround being to not use WPF graphics. Now, if people are basically doing database front ends, this doesn't become an issue. But if your WinForms app is doing any sort of data-driven visualization, this will be the most significant pain point in moving over. Maybe "output redirection" in WPF v.Next is going to help this issue, I don't know. I sure hope so.

    Eric
  20. Joe Caffeinesays:
    What does your windows forms app do?

    The application is a document/image management click once app. It integrates with a COM based image viewer and a COM based scanner component.

    Can you describe its key scenarios?

    It was created to be the document management aspect of a web based property management system. The web application links to it via parameterized urls.

    Where is your database access happening?

    The database access is all server side and exposed through services. A mix of http REST and binary/tcp via WCF. There are multiple service projects.

    Do you integrate with other services in the organization?

    Yes. The documents that the application uses are provided via a REST API. The property management information is provided by REST and binary/tcp WCF services. The authentication is windows security based but the authorization is handled through another binary/tcp WCF service that leverages our security model.

    What types of security authentication approaches are you using? Windows.

    Windows authentication using single sign-on? yes.

    Custom authentication tables in your database? no.

    Integrate with ASP.NET membership? no.

    Something else? in-house.

    How do you handle authorization in your applications? database driven via a party/accountability system.

    Field-by-Field security? no.

    Function or button-level security (ie, need privs to do an update, but not a read)?
    Others? yes.

    Where is your application logic and rules? handled by the service layer on multiple servers.

    Have you tried moving to Silverlight or WPF? I initially wanted to write the application as a silverlight app but the COM interop requirement nixed that idea. Then I thought about WPF but there were two things which stopped me there: 1. the end users are running older model windows xp based machines (we begin upgrades to win7 in 2011) so that was a performance concern. 2. This application is replacing a component of another windows forms app. The UI design was simply to replicate as closely as possible, the look and feel of the other app. Yes, I know WPF has the ability to produce/reproduce any kind of UI imaginable but I had some prepackaged windows forms controls that gave me 90% of the UI I needed.

    If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    1. A document which shows how GDI objects map to their WPF counterparts with examples.
    2. A .net component which encapsulates communications to ISIS and TWAIN based scanners.
    3. A document which walks through the process of migrating a typical LOB application from windows forms to WPF including covering custom controls.
  21. Iansays:
    How would spending many man months (more likely man years) moving to WPF help us meet our NEXT dead line? (We always have an important deadline every few weeks for a customer waiting for a new release)

    We have about 10 devs working on our app, and at least two active branches, so the concept of having yet another team converting the code to WPF, while customer are still demanding quick enhancements is unthinkable.

    As we don’t have anyone with “artistic qualifications” I don’t see what the flexible look and feel that WPF provide will give us – it is more likely to lead to an inconstant UI. I also don’t see why developers should be forced to use two different tools when Visual Studio is all that is needed for WinForms. Just the learning curve on Expression Blend is enough to put me of a move to WPF.

    However for a new application or a large new part of a current application the case for using WPF instead of WinForms is very good.

    So the most useful guidance would be on how to mix WPF with Winform in current applications, there should be more examples of using WPF in Winform apps, then native WPF apps, as mixed apps are what you get in the real world.

    Grid may be the best area to push WPF in, as most companies have to buy in a 3rd party grid for WinForms, but the built in WPF grid is often good enough and avoids a lot of pain with licences.
  22. John Mocambiquesays:
    My winform apps are all for internal-intranet use. They provide custom interfaces for tracking information and reporting out.
    The database access happens via ODBC, ADO .NET, and custom classes. The entire database backend is MySQL or Microsoft Access (rarely).

    For security the applications use custom authentication tables.

    The application logic is in the code-behind and in the database (VIEWS,TRIGGERS,STORED PROCEDURES).

    I have been dabbling a little in Silverlight (due to some free Telerik controls) but don't like that I need to create a WCF data service in order to use the MySQL .NET Connector -> I am sure there are valid reasons for this extra layer but for me its a layer of un-needed work.

    The reasons that I contain to use Winforms:
    * speed -> its very quick to create a application.
    * screen-size -> when using devices with restricted screen sizes the placement of controls is crucial.
    * runs on the network -> the intranet is all Windows Terminal Services and a winforms app doesn't need any IIS or other things to run.
  23. Mikhail Opletayevsays:
    I have a lot of experience designing WinForms apps. Here is a screenshot from my the latest app I designed: http://execqview.com/images/facility-age-gender.gif. This is a very simple screen, there are quite a few of more complex screens with hundreds of controls and a lot of data binding/data entry.

    I had an opportunity to move to WPF however I ran into some problems that prevented me from doing so:

    1) Lack of business controls. WinForms doesn't have a lot of good controls built in but there are mature 3rd party libraries like DevExpress. For instance, take one of the most common controls in business apps: data grid. The grid from my screenshot up above comes with bands, multi sorting, totals, column selection, grouping, reordering, filtering, incremental search, custom cell rendering, cell controls, export to excel, and many other features. It can hold 100,000 records without any consequences to performance whatsoever. This is just one example. Tree view, tree list, scheduling controls, layouts, menu controls, ribbon controls, tab controls, charts, etc. All these things are readily available for WinForms development and provide an amazing productivity boost. The market for WPF controls is a lot weaker. Even established vendors like DevExpress have rather weak libraries for WPF.

    2) Incredibly complicated design system. In WinForms you have controls that you can anchor to other controls. A very simple concept. In WPF you have different layouts that are cumbersome and yet inferior to anchoring in terms of real work. On top of it, you have access to myriads of properties such as gradients, layouts, panes, paths, resources, templates, 3D, timelines, and many other things. It's just crazy complicated and almost assumes that you have to have a designer on the team. Setting up even a simple application requires a lot more work with WPF which results in lower productivity.

    3) As a developer, you can't leverage almost anything from your WinForms experience. Literally, you have to throw what you know away, clear your mind, and embrace all kinds of new concepts such as MVVM, new data binding, new control structure and design, resources, etc. You have to learn new tools such as Blend. It takes a while to get productive using all these new concepts and tools. We are talking about a serious learning curve here. A curve that is not easily justified at the moment.

    4) Most WPF applications don't have a good feel to them. I am sorry but that's true. They are slow, clunky, and non-native looking. You CAN make them look slick and flashy but it requires a lot of effort and a set of strong artistic skills. Unfortunately, most GUI applications are written by businesses for businesses. Teams don't have access to designers and have very strict time lines. Not a lot of mainstream developers have a luxury of turning their apps into a piece of art.

    Essentially, it takes a lot more effort and time to write WPF applications and unless you need a very flashy app there are no clear benefits that you gain. There is simply no reason to use WPF for business GUI applications at this time.
  24. Marksays:

    Ditto everything Mikhail Opletayev listed!

    We have several internal WinForms LOB apps and whenever we consider migrating to WPF or even using it for new apps we find that WinForms easily wins the cost/benefit analysis vs WPF. One major obstacle: the required skillset to make a WinForms app with a decent UX is much more readily available than that for WPF (which all but requires a professional designer/artist on the team). As a Windows developer and longtime VS user I have no time for or interest in learning and using Expression Blend. So until I can do everything I need to do to build a decent WPF app within VS, I'll be sticking with WinForms.

  25. Tushar Bhattsays:
    ◦What does your windows forms app do? Can you describe its key scenarios?

    ERP Application, with Sales, Purchase, Inventory, Financial Accounting having complex form design and complex interrelationship among different forms.

    ◦Where is your database access happening?

    Database Access is happening at client side onto Database server having complex Stored Procedures.
    Data Access is mainly through OLEDB and ADO.NET interface for SQL Server or Oracle or Sybase

    ◦ADO.NET calls from the code-behind for the form?

    Calles from codebehind for the form

    ◦Services?

    No

    ◦Same project, but encapsulated into a class?

    No

    ◦XML data?

    NO
    ◦Other?

    Reporting tool is used like Crystal Reports and its integrated Data Access facility.

    ◦Do you integrate with other services in the organization? If so, what and how?

    Database common for other ASP.NET application.

    ◦What types of security authentication approaches are you using?

    Custom authentication is used where credentials are accessed from database

    ◦Windows authentication using single sign-on?

    No

    ◦Custom authentication tables in your database?

    YES

    ◦Integrate with ASP.NET membership?
    No
    ◦Something else?
    Custom

    ◦How do you handle authorization in your applications?
    Custom authorization
    ◦Field-by-Field security?
    No
    ◦Function or button-level security (ie, need privs to do an update, but not a read)?
    Button level security with priviledges
    ◦Others?
    No
    ◦Where is your application logic and rules?
    Code behind (Two tier application)
    ◦It's in the code-behind!
    Yes
    ◦I'm using a business rules framework like CSLA or something similar
    No
    ◦It's encapsulated in classes on the client
    No
    ◦It's in services on one or more servers
    No
    ◦Others?
    No
    ◦Have you tried moving to Silverlight or WPF? If so, what were the things that tripped you up?
    ◦If you had the chance to ask for 3 things you'd like Microsoft to provide (specific guidance, source examples, templates etc.) what would you like us to give you to make your migration easier? Please be as specific as you can.

    After reading documentation and books on silverlight following limitations have been observed which needs to be addressed

    - Data Access
    -Reporting
    -Printing

  26. Chris Whellamssays:
    A few of the pain points we have felt are :

    1. No MDI in WPF - nobody seems to be mentioning this. Msft have removed that feature

    2. Realted to 1 above - we have been unable to find official guidance that on how to make multi-form L.O.B business applications. Compare this with WP7 where there is documentation and design guidelines for Metro. This is a serious omission in my opinion and will lead to a myriad of messy inconsistent applications - WinForms apps may be "boring" but they are consistent - business users feel comforatable with the consistent UI experience of MDI. I am not suggesting that you should put MDI into WPF - but at least provide guidance and support for implementing multiform l.o.b apps.

    3. MVVM - there are now a number of MVVM templates,frameworks etc It would be nice if there was something out of the box - how do we know what is the "right" one to pick ? I have also heard some of our devs mention that MVVM and WPF navigation maybe don't play nice ?

    3. Be more "visibly" active in the community. Karl Shifflet, yourself and many other guys are blogging - but compared to say Scott Gu or Scott Hanselmann you're not so visible. Both Scotts do an amazing job and create excellent walkthroughs and demos, Hanselmann has a great podcast. Its all about getting the WPF message across to devs.

    Obervations of some comments
    - Don't agree with the layout comments some people have made - WPF has infintely better layout than WinForms - you just need to learn how to use it properly.
    - There are now many 3rd party grids and component tool packs - grouping in grids is available from most of the control vendors.
    - The default Msft WPF DataGrid is much better that the default grid in Winforms - again you need to research and learn how to use it.
    - If it ain't broken don't fix - who said you need to migrate your WinForms app to WPF ? Don't understand why people complain about that. If you're happy on Winforms then stick with it. WPF can support great "eye candy" and databinding is far superior but they are not necessarily good reasons to migrate a solid WinForms app to WPF.

    Thanks
  27. Petesays:
    Thank you to everyone who posted here or emailed me privately. This is all great info for me to factor into our plans.

    You all are building some really interesting applications. I had honestly expected a large number of "forms over data" responses, but instead received anything but :)

    Pete
  28. Ronsays:
    I'm just starting development and saw this post. Whil I am a seasoned developer in C#/winforms with WCF, DBA, and workflow experience, I am looking at Silverlight 4 OOB for my new project.

    Here's what it entails:
    1. Silverlight 4 OOB
    2. Authentication using ACS to yahoo, google, wlid, and paypal IP's.
    3. Authorization using ASP.NET membership and roles if this is possible.
    4. SL app communicating directly with non-Azure REST services.
    5. SL app calling SOAP WCF services hosted by Azure.
    6. ASP.NET membership data stored in azure tables.


    Other than the DBA stuff, it's all new to me.

    Ron

  29. ajneigtpwtsays:
    [url=http://www.martin-audio.com/budapest/home.asp?id=27]ミュウミュウ バッグ 売る み[/url] new exhibit at Neville Public Museum.txt
    [url=http://www.martin-audio.com/budapest/home.asp?id=368]ミュウミュウ 財布 バッグ ブランド[/url] to learn more about blogging.txt
    [url=http://www.martin-audio.com/budapest/home.asp?id=600]ミュウミュウ 公式通販 財布[/url] committed suicide from cyberbullying.txt

Comment on this Post

Remember me