locked
LINQ + WCF vs Traditional DAL/BLL approach RRS feed

  • Question

  • User913922097 posted

    Hi there,

    i spent almost a week digging into WCF first and then LINQ. both of them are great technologies and i can see the potential there. i am just angry why i did not tried them before...

    anyways, one new project i will have to work on has among its requirements wrapping the functionality somewhere, so that it can be re-used over and over without having to write it again. i know i can use class libraries but the way the project is going to evolve will require exposing the functionality online, so better start now strategizing for that.

    WCF seem to have great improvements over the traditional asp.net asmx, especially when it comes to securing the ws, so there is no problem on that side. however, linq on the other side has disappointed me a bit.

    when i say linq, i am talking about linq to SQL, since i havent tried the other ones yet.

    one thing i have tried to do is to build some performance benchmarkings between StoredProc/DataAdapters/LINQ to SQL.

    the loser is of course LINQ, but when compiling the queries, the perf is almost the same.. so there is no benefit on that side.

    also, when trying to migrate an existing DAL (dataset with multiple datatableadapters/queries/relationships), the result was not worth it.

    first of all, my developpers will have to learn a new language just to do the same thing.

    second is the fact that building N-tier applications will be a bit more confusing and difficult than using the old DAL/BLL approach

    third argument is that with most projects, there is no DBA, and to "blindly" write LINQ queries without having some way of previewing the data returned or the effectiveness of the query like with the mature tools provided SQL Server 2005/2008, is not really an appealing idea...

    plus, there is absolutely no performance increase...

    so, what do you guys think (keeping aside the "Linq is dead, the future is entity framework" argument)? where is the actual benefit of using LINQ to SQL?

     

    ps: note that my BLL are returning datatables. it is easier when the database scheme changes sometimes (i know bad design, but tell that to my boss...) than having to update the business objects class everytime

     

     

    Friday, September 11, 2009 6:01 PM

Answers

  • User-514194766 posted

    i know i can use class libraries but the way the project is going to evolve will require exposing the functionality online, so better start now strategizing for that.
     

    If you don't need it don't do it . you can have you DAL and BLL designed and build a wcf project on top of them to expose them online 

    so, what do you guys think (keeping aside the "Linq is dead, the future is entity framework" argument)? where is the actual benefit of using LINQ to SQL?

    Entity framework is better than linq to Sql but it's missing features if you can try NHibernate it is way better .

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 11, 2009 11:17 PM
  • User1696475319 posted

    Linq to Sql isn't exactly dead... it's just more of a rapid application development (RAD) tool rather than a fully blown enterprise tool.  Your concerns seem to be centered around decoupling, efficiency and speed. 

    We did benchmarking tests too, we found that ADO.NET > Linq to Sql > ADOEF overall.  That's because you have your datacontext overhead in the last two cases, you're not getting away from that. 

    I wouldn't say that your developers have to learn a new 'language', it's just an addition to the same language which will be applied in lots of different places - it can be used in many areas of coding (XMl, strings, collections, objects, entities).

    Anyways, if LTS isn't meeting your needs, don't use it.  Always use what's best for your needs - and at the moment it sounds like a WCF service + regular ADO.NET behind it are what you're looking for. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 12, 2009 7:06 PM
  • User1320101480 posted

    Hi,

    I've been using LINQ+ WCF and WCF+ADO.NET,

    With LINQ, you get the easy way out for developers who aren't comfortable with SQL.

    With ADO.NET the performence is a bit better.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 12, 2009 7:16 PM

All replies

  • User-514194766 posted

    i know i can use class libraries but the way the project is going to evolve will require exposing the functionality online, so better start now strategizing for that.
     

    If you don't need it don't do it . you can have you DAL and BLL designed and build a wcf project on top of them to expose them online 

    so, what do you guys think (keeping aside the "Linq is dead, the future is entity framework" argument)? where is the actual benefit of using LINQ to SQL?

    Entity framework is better than linq to Sql but it's missing features if you can try NHibernate it is way better .

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 11, 2009 11:17 PM
  • User1696475319 posted

    Linq to Sql isn't exactly dead... it's just more of a rapid application development (RAD) tool rather than a fully blown enterprise tool.  Your concerns seem to be centered around decoupling, efficiency and speed. 

    We did benchmarking tests too, we found that ADO.NET > Linq to Sql > ADOEF overall.  That's because you have your datacontext overhead in the last two cases, you're not getting away from that. 

    I wouldn't say that your developers have to learn a new 'language', it's just an addition to the same language which will be applied in lots of different places - it can be used in many areas of coding (XMl, strings, collections, objects, entities).

    Anyways, if LTS isn't meeting your needs, don't use it.  Always use what's best for your needs - and at the moment it sounds like a WCF service + regular ADO.NET behind it are what you're looking for. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 12, 2009 7:06 PM
  • User1320101480 posted

    Hi,

    I've been using LINQ+ WCF and WCF+ADO.NET,

    With LINQ, you get the easy way out for developers who aren't comfortable with SQL.

    With ADO.NET the performence is a bit better.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 12, 2009 7:16 PM
  • User1781299949 posted

    I research about using LINQ to SQL. So i should research about ADO.NET technology. Right? Good article to read.

    Friday, January 15, 2010 2:26 AM