Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Why does Microsoft do this to me

Why does Microsoft do this to me

Scheduled Pinned Locked Moved WPF
architecturehelpquestionannouncementcsharp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tad McClellan
    wrote on last edited by
    #1

    So each version of Silverlight that comes out I take a look and see how the technology is progressing. I finally got to SL4. This may be user error but I'm really frustrated with the data access. I first tried POCO, using my own objects from the server. Got those passed through WCF and bound but then you can't use the DataAnnotations (I like the ID of having the validations for the data where the data lives in the class) when you bind on the client. Then I went to the WFC Data Service model using MVVM. Looked good but then guess what, same issue. Lastly I went to RIA but couldn't figure out how to add an object on the client. Evidently MS didn't build my Insert function on the Domain Service. So I went to go look for myself. So many generated functions with odd attributes my eyes hurt. I’ve looked at videos which all simply just edit objects but don’t add anything. But if they would I can get the DataAnnotations working with RIA but I have to do this kludgy Metadata object. So is there a better way or am I doing something wrong? I hate MS generated black boxes because they tend not to work for real applications and then when something does go bump in them you spend hours on google researching only to find out you are so in bed with them you have to wait till next release to get it fixed. I’m just about to create my own Data layer architecture for working with SL but before I do I thought I would do a sanity check with the guru’s. What did I miss? Is there a better way?

    TadMcClellan.Com

    M M 2 Replies Last reply
    0
    • T Tad McClellan

      So each version of Silverlight that comes out I take a look and see how the technology is progressing. I finally got to SL4. This may be user error but I'm really frustrated with the data access. I first tried POCO, using my own objects from the server. Got those passed through WCF and bound but then you can't use the DataAnnotations (I like the ID of having the validations for the data where the data lives in the class) when you bind on the client. Then I went to the WFC Data Service model using MVVM. Looked good but then guess what, same issue. Lastly I went to RIA but couldn't figure out how to add an object on the client. Evidently MS didn't build my Insert function on the Domain Service. So I went to go look for myself. So many generated functions with odd attributes my eyes hurt. I’ve looked at videos which all simply just edit objects but don’t add anything. But if they would I can get the DataAnnotations working with RIA but I have to do this kludgy Metadata object. So is there a better way or am I doing something wrong? I hate MS generated black boxes because they tend not to work for real applications and then when something does go bump in them you spend hours on google researching only to find out you are so in bed with them you have to wait till next release to get it fixed. I’m just about to create my own Data layer architecture for working with SL but before I do I thought I would do a sanity check with the guru’s. What did I miss? Is there a better way?

      TadMcClellan.Com

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      WCF RIA Services will give you the most RAD help with dataannotations. The metadata object may seem kludgy but it's not so bad. The code it is decorating is Visual Studio generated code that you shouldn't edit anyway so it doesn't really make a difference because you're not editing same code in more than one place. You're still responsible for adding CRUD operations to the service yourself, so if the default generated code doesn't include an insert method then you simply add one yourself. Generally you'll end up adding lots of variations on insert, delete, and add service methods. And there's no black box here. All the generated code is part of your project.

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • T Tad McClellan

        So each version of Silverlight that comes out I take a look and see how the technology is progressing. I finally got to SL4. This may be user error but I'm really frustrated with the data access. I first tried POCO, using my own objects from the server. Got those passed through WCF and bound but then you can't use the DataAnnotations (I like the ID of having the validations for the data where the data lives in the class) when you bind on the client. Then I went to the WFC Data Service model using MVVM. Looked good but then guess what, same issue. Lastly I went to RIA but couldn't figure out how to add an object on the client. Evidently MS didn't build my Insert function on the Domain Service. So I went to go look for myself. So many generated functions with odd attributes my eyes hurt. I’ve looked at videos which all simply just edit objects but don’t add anything. But if they would I can get the DataAnnotations working with RIA but I have to do this kludgy Metadata object. So is there a better way or am I doing something wrong? I hate MS generated black boxes because they tend not to work for real applications and then when something does go bump in them you spend hours on google researching only to find out you are so in bed with them you have to wait till next release to get it fixed. I’m just about to create my own Data layer architecture for working with SL but before I do I thought I would do a sanity check with the guru’s. What did I miss? Is there a better way?

        TadMcClellan.Com

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        There never was a chance that we would use RIA, for the same reasons you iterate, black box, MS defined and constrained functionality etc. We built our own, first building a code generator (modified the existing one which began life in VB5) to service the WCF requirements. This is basically simple boilerplate code for the object and CRUD work. This pushes 90% of our work into the VM and View, where we have some really cool snippets that eliminate all the donkey work and leaves us with the difficult stuff like making the dammed view do as it is told! It is painful getting a design idea wrong, you should see the crap we (I) created around dialog management before I got a handle on the child window concept.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups