Databinding vs Multi-tier

I'm a bit confused - see if you can help me out. It seems like microsoft is really big on the multi-tiered approach to development(presentation, business, data), but now, with visual studio 2005, they're also really pushing the new and improved typed dataset for databinding. Am I wrong, or is it virtually impossible to take full advantage of the new typed dataset and still separate your system into presentation and data layers You create a datasource (for your windows forms project) and start dragging different entities onto the form and bang, there is your app. But that violates the separation approach because your data-access code is in the same layer/level/tier as your presentation. Not only that, but if you wanted to build a web-based interface to the same data, you have to regenerate the datasource in the new web project, and recreate and custom code you used.

Any thoughts on this would be appreciated,

Bob

(if this would be better answered in another forum, I'd be happy to post it there)



Answer this question

Databinding vs Multi-tier

  • JBeyer

    But you can't drag and drop if you do that. That's what I was getting at.
  • Rob Clapham

    Yes, project must be compiled otherwise it won't see it :)

  • Rustum

    Sergey Galich wrote:
    You can. You can add typed data set by dropping DataSet on form and selecting referenced dataset. You can set this dataset as datasource object for your project also, so you can drag and drop it.

    Ok, this would be great, but I'm not having any luck getting it to work. I'll tell you how I'm set up and maybe you can walk me through it. I have a solution with two projects: Equipment Manager (presentation) and EM Data (data access). I have a dataset configured in EM Data called EMLightDataset.xsd. How do I make that a datasource for my equipment manager project


  • Marcel Kunz

    You can go to menu "Data/Add new data source", then select Object and in tree select your dataset (if it's not there - press Add reference).

    P.S. Your dataset must be public to be visible (just in case;)



  • Nate McMurtray

    Apparently I spoke too soon. I can now see the datasource in my equipment manager project, but the drag and drop operation does not complete successfully. The table adapter is never added to the form and it is unable to bind to the datasource.
  • jacksparo

    Arnon Rotem Gal Oz wrote:

    In my opinion this is because visual studio is a general purpose development environment so it caters to the needs of different users (Microsoft defines 3 "personas" representing typical users : Mort, Elvis and Einstein - you can see a blog I made recently on personas - http://www.rgoarchitects.com/blog/PermaLink,guid,e7b6a3cc-eeea-4dd3-b909-b1f197f00492.aspx)

    Thus, the quick drag and drop tools are there to serve both casual hobbyist users and as a RAD tool for quick GUI prototypes. On the other hand tiers, layers, services etc. are more recommended for, pardon the cliche, enterprise class applications.

    just my .2 cents

    Arnon

    Thanks. That makes sense to me. But what bothers me is how microsoft wants us to stop using the drag and drop sqldataadapters and sqlconnection objects. With VS 2003, I built my data access layer as a component class library. Now I *can* still do that, but was discouraged from doing so in this post from Steve Lasker (third message in thread):

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=236276&SiteID=1


  • sskalskii

    You can. You can add typed data set by dropping DataSet on form and selecting referenced dataset. You can set this dataset as datasource object for your project also, so you can drag and drop it.

  • DirkR

    I think the problem was I had never actually saved the EM Data project. Until I saved it, I could add a reference to the project in my equipment manager project, but it still never showed the dataset as being an available object to create as a datasource. Once I saved the project, then I could reference the dataset. Thanks for your help.
  • fxcoper

    Hi!

    You can make dataset in separate library (data layer) and then use it in WinForms or WebForms application (presentation layer).



  • JPurd

    It wasn't there. Ony the equipment manager project was there. Even when I added the EM Data project as a reference, the dataset still didn't show up. I checked the designer code for the EMLightDataset.xsd and the class is public (btw I am using vb.net). Anyway all that to say I still can't add a reference. The EM Data project is a class library by the way.
  • Lorenzo Colautti

    In my opinion this is because visual studio is a general purpose development environment so it caters to the needs of different users (Microsoft defines 3 "personas" representing typical users : Mort, Elvis and Einstein - you can see a blog I made recently on personas - http://www.rgoarchitects.com/blog/PermaLink,guid,e7b6a3cc-eeea-4dd3-b909-b1f197f00492.aspx)

    Thus, the quick drag and drop tools are there to serve both casual hobbyist users and as a RAD tool for quick GUI prototypes. On the other hand tiers, layers, services etc. are more recommended for, pardon the cliche, enterprise class applications.

    just my .2 cents

    Arnon



  • Databinding vs Multi-tier