Archives

Archives / 2008 / August
  • WPF for Business Applications, ready for the average user?

    We're starting a new project and naturally we looked at leveraging the latest .NET framework features (auto properties, extension methods, lamdas, LINQ, etc.). The question of user interface came up and we had some decisions to make.

    This specific project we looked at building one client web front-end (for the majority of the users) and a SmartClient for a smaller contigent that requires a little more real-time feel along with more rich features the web client might not be able to do (without a lot of heavy lifting). As we were looking to start things, the notion of WPF vs. WinForms came up. This led us down a path to look at Prism (the Composite WPF project from the Patterns and Practices group) which has a lot to offer in frameworks and being able to do more with WPF (Prism is WPF only). WPF also has some benefits to automation (there are some new products that are tying into the automation frameworks) and testing. The pretty UI is just an afterthought and not the focus since we're building what would be considered a "traditional" business application (forms and maybe grids and reports).

    WPF also has the advantage that we could deliver the application using xbap which kicks ClickOnce up a notch. The Prism framework is based on modules loading into XAML regions so we were even looking at re-using XAML user controls and plugging them into different clients.

    This has kicked off a bit of a controversy and discussion. Is WPF really suited to business applications? Of course the answer is (as always) it depends. If you're business application requires a rich UI and a visual paradigm, then the obvious answer is yes. It's more intuitive for a user to drag a part from one component to another (say in a room designer) than to pick items from a grid and enter values in a form.

    However for the larger business applications (the meat and potatoes of the corporate world) we don't deal with "rich UIs" so where does that leave you? WinForms is not dead and according to Glenn Block is the "recommended breadth solution for LOB application development in the foreseeable future". The trade off is that if you're building SmartClients you might look toward a framework that provides a lot of OOTB features that you don't have to do. I'm not a big fan of NIH syndrome and the idea of having to rewrite loggers, event handlers, aggregators, presentation models and everything else you build into a SmartClient. Frankly, I don't get paid to build frameworks or re-invent the wheel for every application my client wants.

    Prism provides a nice framework (IMHO CAB done right) that you can leverage and pull it out in piecemeal to what you need. Unfortunately, it's WPF only. While some of the principles can be carried over to WinForms I think you'll end up doing more work to say try to get DataBinding working the same way (if at all). There are other aspects to WPF (ignoring the pretty UI) that don't carry over to WinForms (routed events, event aggregation, etc.) all of which you have to build yourself (or use CAB which is the overbloated bazooka edition of WinForm programming).

    The word from my twitter folks is somewhat slighted toward WPF:

    • WPF databinding isn't as evil as its predecessors and some people wouldn't build a WPF app without it
    • Control templating and eventing in WPF is useful even for the basic forms and datagrids
    • Testable automations ARE good reasons to use it

    Other questions that come up:

    • Do you really need/want a separate designer to build your UI and keep it completely separate from your application code? In WPF this is easier. For WinForms you need to outfit them with Visual Studio and frankly, I've never used a designer on a WinForms project (I have on WPF ones, but not business applications)
    • What is the adoption from the user perspective and can you get them to think "outside of the form" and be creative with solutions. In WPF you're not as bound to traditonal approaches to visual problems and building the same solutions is somewhat easier (trust me, manipulating pixels in WinForms is a bugger to put a control on top of another one, in WPF it just works)
    • Can you bake the learning curve of WPF into a business application budget or should it be something that developers just know? (i.e. only start a WPF app when you have developers that know it inside and out, which few do these days)

    I’m on the fence on WPF. From an automation and programming model, I think it’s fathoms above WinForms. I don’t mind the crafting of a good looking UI as I’m used to it in Blend and can whip off a UI just as fast as I can with WinForms. However I’m not sure its worth the extra effort (is there extra effort) in building business applications with it, but I’m torn with xbap where we can deliver a rich user experience without having to install a client.

    For WinForms you generally have to either harvest what you have from existing applications or RYO when it comes to the application framework. Re-writing presenter base classes, validation strategies, various implementations of patterns like repository and specification, and building a service layer over things like NHibernate can be fairly straight forward but still might take a few weeks, weeks of cost that the customer doesn't want to pay for to see nothing out the other end.

    There is the build as you go model, which works for any technology however you do want to keep consistency when you're building 5+ large applications a year and there's turnaround in the IT department. Re-inventing the wheel for every application isn't an option for anyone.

    Feel free to chime in with your thoughts, experiences, and ideas. Thanks!

  • ALT.NET Canada - Day 3 - The Sharing Circle

    ALT.NET Canada wrapped up in the grand ballroom at the University Sunday afternoon. It was a great end to an awesome weekend. As with Open Spaces Technology there's a closing, and Doc introduced the Sharing Circle to everyone (some of Open Spaces Technology is rooted in Native American traditions). Everyone had something to say about the experience (you're not obligated to say anything) so it's a great way to see how our little gathering affected everyone. Enjoy!

  • ALT.NET Canada - Day 3 - Frameworks Fishbowl

    We had a lively discussion with everyone on day 3 around what frameworks you would use (Microsoft or otherwise) and how to decide. Some of the converstations get a little heated thanks to various individuals and the original fishbowl morphs as more chairs are added in the middle (as opposed to being taken away). Should be an enjoyable watch.

    BTW, I screwed up editing this thing (thanks Windows Movie Maker, you know how I feel about you) so the beginning starts about halfway through (around the 25 minute mark) then it jumps back to the beginning. Sorry about that.

  • ALT.NET Canada - Day 3 - Coupling and Decoupling your Applications

    Here we are at day 3 at ALT.NET Canada. This session was hosted by Donald Belcham and focused around discussing techniques and designs to decouple your solutions. As with most of the sessions this weekend, the conversation went to other places like deployment tools and techniques, coding to interfaces, and talks around how to introduce these techniques to your teams. Enjoy the vid:

  • ALT.NET Canada - Day 2 - Noah, build me an Ark!

    Saturday at ALT.NET Canada kicked off with a talk on the build process. The discussion was centered around build files and asks the question if NAnt has outlived it's usefulness, or are we putting too much into our build files? Lots of discussions of alternatives (Boo, Ruby, etc.) and products. The second half of the conversation shifted more to the deploy side, but as you'll see it's all related. Great stuff to start off the day. Here's the vid:

  • What videos would you like to see?

    Tomorrow is the last day of ALT.NET Canada and there are some great topics lined up. So I thought I would throw it out there for you guys to pick what sessions I video capture. What do you want to see? I can only be at one in each time slot, let me know what you think would be a good one to capture.

    Choose, but choose wisely.

    Here are the choices:

    10:00

    • Is convention over configuration important to .NET developers?
    • Introducing good decoupling practices to a team.
    • SOA. Are people still heading in this direction?

    11:30

    • What can we as ALT.NET do to enhance and foster the Canadian Developer Community.
    • What did Microsoft do wrong in 2007-2008?
    • How to choose frameworks? Is the Microsoft one always right or wrong?
    • Why choose Agile and how to do Agile without failing?

    Please leave your choices in the comments on this post. If there are any votes I'll video capture the ones with the most, otherwise I'll flip a coin or something and pick one randomly.

    Thanks!

  • ALT.NET Canada - Day 2 - DDD and more D

    Today was DDD day at ALT.NET Canada as we had several sessions on Domain Driven Design. There was a chalk talk hosted by Greg Young, a talk on Distributed Domain Driven Design (DDDD) that I initiated, and a Birds of a Feather style chat towards the end of the day (including the topic of "where the f**k do you put business logic"). It was a healthy discussion that went to a lot of great places. Here's the video for the chalk talk:

  • ALT.NET Canada - Day 1 - The Marketplace

    Here's the schedule of sessions for this weekend at ALT.NET Canada that the group came up with Friday night (aka The Marketplace)

    image

    Saturday

    10:00 11:30 2:30 4:00
    Which Presentation Technology do you use? What are web technologies going to be in 2012? Telecommuting - Who wants to wear pants to work? What approaches to use for occasionally connected applications? Volunteering our software development skills to more than just open source software.
    Building extensible frameworks leveraging framework consumer selectable IoC containers. Source Code Best Practices Behavior Driven Development - Tools, Practices and introducing BDD to a team WCF
    Build Files - Time to give XML a break. Deployment tools, approaches, ideas. How to minimize deployment pain. Domain Driven Design chalk talk How do we design/build DDD systems across the Enterprise. Command/Query separation patterns and best practices. Domain Driven Design Birds of a Feather. Business Logic - Where the fsck do you put it?
    Skills, practices, platforms, and interest in mobile apps. How can I introduce messaging to my team? Educating business about investing in sound long term software development lifecycle management. How do we bridge the IT-Business gap? WPF. Experiences, learnings, advice.

    Sunday

    10:00 11:30
    No session scheduled yet. What can we as ALT.NET do to enhance and foster the Canadian Developer Community.
    Is convention over configuration important to .NET developers? What did Microsoft do wrong in 2007-2008?
    Introducing good decoupling practices to a team. How to choose frameworks? Is the Microsoft one always right or wrong?
    SOA. Are people still heading in this direction? Why choose Agile and how to do Agile without failing?

    Some really awesome topics here and should make for some amazing discussions this weekend!

  • ALT.NET Canada - Day 1 - Immersion

    It's the first day in Calgary and the launch of our first (and hopefully not last) Open Spaces event on ALT.NET (Canada style!). We're pleased as punch to have Steven "Doc" List up here facilitating the weekend and generally keeping us nerds in check. It was a great turnout tonight with a full house and lots of great participation, questions, and discussions.

    alt.net calgary day 1 010

    I didn't get a chance to write down this weekends sessions but they were pretty cool, ranging from DDD to build files, who needs them? I'll post the session list tomorrow morning when I get back to the University.

    It was no Beijing launch events (and we didn't even have a single protester) but it was fun and friendly and it worked. I captured the opening kickoff by Doc and will continue to fill up my hard drive for some of the sessions this weekend (and then posting them online here) so you can get a sense of what Open Spaces is all about and how our little version of ALT.NET goes.

    So here's my very first video capture and mini-production. Maybe future ones will have a little more polish to them. Hope you enjoy it!