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. The Lounge
  3. Missing LINQ?

Missing LINQ?

Scheduled Pinned Locked Moved The Lounge
databasecsharplinqcomtools
78 Posts 33 Posters 8 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.
  • C Colin Angus Mackay

    Scott Dorman wrote:

    Right now there isn't anyone at Microsoft focused specifically on LINQ and getting the word out about it.

    I don't know... Daniel Moth, one of the UK's DPEs, has done quite a good job in some of his presentations. http://www.danielmoth.com/Blog/2007/02/decomposing-linq.html[^] Skip to the last code sample to see what it looks like without LINQ. Daniel has got quite a good series of blog posts on LINQ. I've also got some information on LINQ and some of the new language constructs in C# 3.0: * Anonymous Types[^] * Method Extensions[^] * Automatic Properties[^] * A start on LINQ[^] * Object Initialisers I[^] * Object Initialisers II[^] * Object Initialisers III[^]


    Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

    S Offline
    S Offline
    Scott Dorman
    wrote on last edited by
    #26

    Colin Angus Mackay wrote:

    I don't know... Daniel Moth, one of the UK's DPEs, has done quite a good job in some of his presentations.

    Absolutely. Daniel has done an excellent job, but as far as I know he's not focused on the .NET Framework as a whole, but rather specific pieces. (I'm not actually sure what Daniels focus is since he does tend to have a rather ecclectic set of topics. :)) That's more what I was referring to. There currently isn't anyone in DPE that is focused specifically on tying together the pieces and covering the Framework and Visual Studio changes from a "big picture" viewpoint.

    Scott.


    —In just two days, tomorrow will be yesterday. [Forum Guidelines] [Articles] [Blog]

    1 Reply Last reply
    0
    • B BoneSoft

      Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


      Try code model generation tools at BoneSoft.com.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #27

      LINQ is more syntactic sugar, but it can be powerful. My only fear is how badly it will perform in the hands of the ignorant. But that's a good thing, having features that are powerful in the right hands, instead of worrying about what they can do in the wrong hands, is a step towards the C++ approach to language design. I applaud that. Now they just need to make switch statements more useful, and provide a meaningful const keyword.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      B T 2 Replies Last reply
      0
      • C Christian Graus

        LINQ is more syntactic sugar, but it can be powerful. My only fear is how badly it will perform in the hands of the ignorant. But that's a good thing, having features that are powerful in the right hands, instead of worrying about what they can do in the wrong hands, is a step towards the C++ approach to language design. I applaud that. Now they just need to make switch statements more useful, and provide a meaningful const keyword.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        B Offline
        B Offline
        BoneSoft
        wrote on last edited by
        #28

        True, MS has done enough to pander to the hard of thinking. I'd say VB.Net was plenty enough. :laugh:


        Try code model generation tools at BoneSoft.com.

        1 Reply Last reply
        0
        • B BoneSoft

          Scott Dorman wrote:

          to reduce the complexity of accessing and integrating information that is not natively defined using OO technology

          Yeah, that's always been one of the biggest problems. Xml serialization has bridged the XML gap somewhat, but database has always been a problem. And I'm not sure I like most current and past approaches to addressing that. I wasn't a huge EJB fan, but then again, I didn't do a lot of work with them. I suppose LINQ may be a step forward, but the syntax just looks so bizzare to me.


          Try code model generation tools at BoneSoft.com.

          T Offline
          T Offline
          Todd Smith
          wrote on last edited by
          #29

          It's really no worse than learning the regular expression syntax is it?

          Todd Smith

          B 1 Reply Last reply
          0
          • B BoneSoft

            Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


            Try code model generation tools at BoneSoft.com.

            M Offline
            M Offline
            Member 96
            wrote on last edited by
            #30

            I'm with you 100%. It looks cryptic, bizarre and no one here has yet been able to give me any compelling reasons why I should care about it or use it for anything in my day to day work. If it's somehow related to querying then why in the world the weird syntax? Many of us programmers are intimately familiar with sql syntax, something that was close would have made for easier adoption. I'll wait until 2010 as others have said or until it's damn near impossible not to use it then have a look at it. If I really cared I could learn it quickly I'm sure but without a good reason behind it I fail to see the point of wasting brain space on something so mundane and clearly obtuse.


            Modo vincis, modo vinceris.

            B 1 Reply Last reply
            0
            • B BoneSoft

              Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


              Try code model generation tools at BoneSoft.com.

              R Offline
              R Offline
              Rama Krishna Vavilala
              wrote on last edited by
              #31

              I have to deal with collections a lot in my code. LINQ to Objects has been especially useful in this regard. LINQ offers several common functions that work for custom collections and standard collections alike. (Granted you can always write the functions but with LINQ you don't have to anymore). Sorting, Filtering and grouping data for all collections is now far more easier. Again it si for my specific case as I use collections a lot. Another beautiful thing is that LINQ unifies querying over SQL and that over objects. Your code need not bother whether it is querying over objects or databases (or even XML). For database (SQL Server mainly) the code is automatically transformed to SQL and is run on the database server and for objects it automatically uses the built-in LINQ to objects. The LINQ to XML stuff is far simpler than XML DOM or even using XML Reader directly.

              Co-Author ASP.NET AJAX in Action

              B 1 Reply Last reply
              0
              • T Todd Smith

                It's really no worse than learning the regular expression syntax is it?

                Todd Smith

                B Offline
                B Offline
                BoneSoft
                wrote on last edited by
                #32

                I dunno, Regex wasn't that foreign and I could immediately see the point and the benefit. But purely with respect to learning curve, the jury's still out until I actually learn LINQ. (If I actually learn LINQ)


                Try code model generation tools at BoneSoft.com.

                1 Reply Last reply
                0
                • M Member 96

                  I'm with you 100%. It looks cryptic, bizarre and no one here has yet been able to give me any compelling reasons why I should care about it or use it for anything in my day to day work. If it's somehow related to querying then why in the world the weird syntax? Many of us programmers are intimately familiar with sql syntax, something that was close would have made for easier adoption. I'll wait until 2010 as others have said or until it's damn near impossible not to use it then have a look at it. If I really cared I could learn it quickly I'm sure but without a good reason behind it I fail to see the point of wasting brain space on something so mundane and clearly obtuse.


                  Modo vincis, modo vinceris.

                  B Offline
                  B Offline
                  BoneSoft
                  wrote on last edited by
                  #33

                  It's good to know I'm not alone. I rarely get to talk shop and don't really know where the majority stands on this stuff. With LINQ specifically, it looks like it will always be an optional tool. But with all the new stuff, I feel like I need to learn enough to decide if it's worth my while to delve into full throttle.


                  Try code model generation tools at BoneSoft.com.

                  1 Reply Last reply
                  0
                  • R Rama Krishna Vavilala

                    I have to deal with collections a lot in my code. LINQ to Objects has been especially useful in this regard. LINQ offers several common functions that work for custom collections and standard collections alike. (Granted you can always write the functions but with LINQ you don't have to anymore). Sorting, Filtering and grouping data for all collections is now far more easier. Again it si for my specific case as I use collections a lot. Another beautiful thing is that LINQ unifies querying over SQL and that over objects. Your code need not bother whether it is querying over objects or databases (or even XML). For database (SQL Server mainly) the code is automatically transformed to SQL and is run on the database server and for objects it automatically uses the built-in LINQ to objects. The LINQ to XML stuff is far simpler than XML DOM or even using XML Reader directly.

                    Co-Author ASP.NET AJAX in Action

                    B Offline
                    B Offline
                    BoneSoft
                    wrote on last edited by
                    #34

                    That brings up another problem with data access that's been around as long as data access has... The framework has gone a long way toward making it easier to access different engines, but it only abstracts to a certain degree. Data access may never have a single interface between different platforms. But that comes down more to standards than anything. But for XML, I refuse to worry about the DOM or XmlReader. I love XML seriliazation. And I can't imagine LINQ or anything else improving on that. All you need is a nice tool (like mine ;P) and you instantly have an XML serializable model that can be used for that and any other purpose. It's one of the many reasons I may never look back at Java again, I hated dealing with their DOM or SAX or basically any of their XML models.


                    Try code model generation tools at BoneSoft.com.

                    1 Reply Last reply
                    0
                    • B BoneSoft

                      Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                      Try code model generation tools at BoneSoft.com.

                      S Offline
                      S Offline
                      Shog9 0
                      wrote on last edited by
                      #35

                      I like it. So there. :->

                      every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- Chris Losinger, Online Poker Players?

                      1 Reply Last reply
                      0
                      • B BoneSoft

                        Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                        Try code model generation tools at BoneSoft.com.

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #36

                        The reason Linq looks wierd is that, to get intellisense to work, they had to but the "subject" of the query in front. So, with DLinq, it's the table name. Otherwise intellisense wouldn't be able to help the lazybones programmer figure out the columns associated with the table. Marc

                        Thyme In The Country
                        Interacx
                        My Blog

                        B 1 Reply Last reply
                        0
                        • B BoneSoft

                          Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                          Try code model generation tools at BoneSoft.com.

                          N Offline
                          N Offline
                          NormDroid
                          wrote on last edited by
                          #37

                          No reservations at all, it's the most natural technology to emerge from Microsoft for a long time.

                          Chuck Norris counted to infinity - twice.

                          1 Reply Last reply
                          0
                          • B BoneSoft

                            Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                            Try code model generation tools at BoneSoft.com.

                            S Offline
                            S Offline
                            Stuart Dootson
                            wrote on last edited by
                            #38

                            BoneSoft wrote:

                            But could it not have been more... SQL-like?

                            Ummm - it pretty much *is* SQL, apart from the ordering of the statement clauses? This example off Wikipedia looks quite SQL-ish to me.

                            var q = from o in db.Orders, c in db.Customers
                            where o.Quality == "200" && (o.CustomerID == c.CustomerID)
                            select new { o.DueDate, c.CompanyName, c.ItemID, c.ItemName };

                            The other thing to remember is that LINQ is generalized across *anything*, so long as it implements the appropriate interface or methods. This makes it incredibly easy to perform operations on collections of objects, rather than having to loop over them. This feature is just one part of the migration into C# of features normally found in functional programming languages - type inference, lambdas, LINQ (pretty much equivalent to list comprehensions). Now, if they could work out how to safely add lightweight processes and message passing a la Erlang, .NET languages would really be in a good position to make good use of multicore chips. Of course, so long as you have shared, mutable state, you're always going to be in a position to have 'interesting' threading bugs.

                            B 1 Reply Last reply
                            0
                            • C Colin Angus Mackay

                              BoneSoft wrote:

                              I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..."

                              I would very much doubt that. LINQ is just syntactic sugar for a number of new classes that were added to the .NET Framework. You can perform the same thing but without using LINQ by just calling the appropriate methods. In fact that should be taught because it will show people how it is actually put together.

                              BoneSoft wrote:

                              But could it not have been more... SQL-like?

                              No. The basis of C# and SQL are different. SQL is mostly a declarative set based language, while C# is procedural. (i.e. In SQL you say what you want and the query optimiser figures out how to get it. In C# you specify HOW you want it to function.) You can view LINQ as a hybrid of the two.

                              BoneSoft wrote:

                              Am I alone here or does anybody else have reservations about LINQ?

                              My only reservation about LINQ is that I can see how newbies will be able to abuse it without fully understanding what is going on under the hood.


                              Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

                              M Offline
                              M Offline
                              Mitchell D Geere
                              wrote on last edited by
                              #39

                              I think that MS did an awesome job on the .net languages and the framework. I am yet to see another language compare to C# and a framework compare to .NET I have used the open source cousin (mono) and wasnt to impressed, and I have used Java and still not impressed. Where MS do kinda drop the balls is with the IDE and that is where most of you get confused, you tightly associate the IDE with the framework at that time. Yes they have been released at the same time (except for v3.0 of the framework). Managed programming has for years now made it very easy for newbies to create disgusting code (Java is included here) so I really think it is an education thing. Programmers need to still under go the same trainning (whether that is personal or formal) that one use to back in the day before managed code. So they can learn about the repocutions of bad code. Have them understand memory and processing and io, and sorting algorithms etc. So that they dont just associate the idea of writing a file with system.io etc. but actually understand what the underlaying is doing. On linq I have been playing with this for a long time now. I think it is awesome, it is as said really just a mask of what is going on in the background. However from a coding efficiency it is great. Not sure how many of you have played with Rail systems like Ruby, or MVC frameworks like codeigniter etc. If you have you will appreciate Linq being here. All I have a gripe with is the IDE and would like to see something more solid in the future, I have been working with BETA 2 of Orcas for a while now as well and there still some bugs but I am hoping that gets sorted by the end of the year. ;)

                              Mitchell Geere

                              C 1 Reply Last reply
                              0
                              • B BoneSoft

                                Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                                Try code model generation tools at BoneSoft.com.

                                R Offline
                                R Offline
                                reshi999
                                wrote on last edited by
                                #40

                                I attended the MIX:07 conference and all the Microsoft bods were hyping up LINQ as the next big thing, when they were not hyping up silverlight that is :-) From my initial play around I'd say its useful for dynamic apps where users shape their queries, and significantly reduces the amount of code required to get an ASP dataset - otherwise its performance sucks. So its good if you want to make code readable, but are not to worried about the time it takes to get your data.

                                1 Reply Last reply
                                0
                                • B BoneSoft

                                  Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                                  Try code model generation tools at BoneSoft.com.

                                  M Offline
                                  M Offline
                                  Mendelt
                                  wrote on last edited by
                                  #41

                                  It took me about 15 minutes to get started with linq. The biggest difference is that you have to type the from-part first so intellisense knows what hints to give you. The rest looks a bit too much like SQL for me because linq is very different from SQL. Tried querying XML-files yet? or arrays/collections?

                                  1 Reply Last reply
                                  0
                                  • B BoneSoft

                                    Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                                    Try code model generation tools at BoneSoft.com.

                                    P Offline
                                    P Offline
                                    peterwaine
                                    wrote on last edited by
                                    #42

                                    Typing and intellisense on databases, tables and fields is what does it for me. Data source abstaction, the same syntax should work on and storeage medium. It looks and feels much more "modern". There are a plethora of ORM tools out there that "code generate" similar classes, not as well IMO. Also, here we are in 2007, using sophisticated OO languages (C# and other .NET derivatives, Java etc) and then theres T-SQL, looking like it's 1990.

                                    1 Reply Last reply
                                    0
                                    • C Colin Angus Mackay

                                      BoneSoft wrote:

                                      I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..."

                                      I would very much doubt that. LINQ is just syntactic sugar for a number of new classes that were added to the .NET Framework. You can perform the same thing but without using LINQ by just calling the appropriate methods. In fact that should be taught because it will show people how it is actually put together.

                                      BoneSoft wrote:

                                      But could it not have been more... SQL-like?

                                      No. The basis of C# and SQL are different. SQL is mostly a declarative set based language, while C# is procedural. (i.e. In SQL you say what you want and the query optimiser figures out how to get it. In C# you specify HOW you want it to function.) You can view LINQ as a hybrid of the two.

                                      BoneSoft wrote:

                                      Am I alone here or does anybody else have reservations about LINQ?

                                      My only reservation about LINQ is that I can see how newbies will be able to abuse it without fully understanding what is going on under the hood.


                                      Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

                                      K Offline
                                      K Offline
                                      Kevinio
                                      wrote on last edited by
                                      #43

                                      I pretty much agree with all the points made above. I have been playing around with LINQ for quite a while now and can see big benefits from having a set of features that allow you to query several different data types/structures using one common syntax. Yes it takes a little getting used to but don't all new languages/code implementations. Surely good practice as a coder dictates that you should understand the technologies and workings of the code you are implementing? On this basis I definatly agree that the methods/classes underlying this new feature set should be taught and explained as to grasp more fully the under the hood workings and to not be led blindly down an alley. I do have major revisions with LINQ however so far from my playing. The technology seems to be totally inadequate for a multi tier environment. Take a simple n tier environemnt, database, data layer, business layer, ui layer. For the data layer you create LINQ classes to query your data structures. Take this simple senario, your UI has a button that calls a method contained in your business layer, for example User.Login(). When this method is called you want your business layer to make a call to your data layer using LINQ. When you write the code in your business layer you use the new annonymous type keyword, var, to create a smaller subset of your customer object. for example: var _Cust = from c in DataLayer.Customers where c.UserName = "Some Name" and c.Password = "Password" select new {c.UserId, c.FirstName, c.Surname} So, in the senario above we have used projection to create a new annonymous type, which is a great complier trick on MS part. This saves us creating many different methods to return different data collections/structures for the same object etc. We can create them on the fly and loop through them etc. However here comes the point were it all comes unstuck as far as i can tell. We now want to return our new type to the UI layer so that we can use the data it contains to bind to our presentation layer. Pretty normal senario you would say, but guess what, you cannot return a annonymous data types from a method!!!! So a method trying to return a var data type will not compile. This to me seems totally crazy, microsoft give us this great power of type projection with some really neat compiler trickery but then prevent us from returning it from any of our methods which to me makes it un-usable in any n-tier system. Yes use it in a single layer in a void method but thats about all folks. How do

                                      B C 2 Replies Last reply
                                      0
                                      • B BoneSoft

                                        Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                                        Try code model generation tools at BoneSoft.com.

                                        F Offline
                                        F Offline
                                        Frobro
                                        wrote on last edited by
                                        #44

                                        You've made very little attempt to understand LINQ. However, the great thing about it is you never have to use it. You can happily continue in your blissful ignorance. The more enlightened among us will eagerly start leveraging the power and flexibility of being able to query RDMS, file and memory object data sources simultaneously, all with the effeciency of IDE and compiler support. We will shave off the many man-hours lost in 'debugging' in shoddy database management and scripting tools as we cruise along on a great layer of abstraction, increasing our productivity and competitive edge by several orders of magnitude. Resistance to change is common to the human condition, but I hope that you will overcome your unwillingness to learn a little extra syntax. Frankly, I'm convinced that LINQ is the natural evolution from the the mediocre-success attempts at object databases and object persistence frameworks that we've seen from various companies (e.g CodeGear ECO & DevExpress PO - both of which I have the utmost respect for). If you really wanna grasp this LINQ stuff, I suggest you watch the video of Charlie Calvert and Anders Hejlsberg explaining and discussing it in some depth. You can Google it. I hope it'll bring a little clarity and insight. You've gotta understand that SQL only does half the job. Generally, a developer does this: 1. Create a database in the RDMS 2. Write SQL queries, test them against the RDMS and store them somewhere (code, SP etc) 3. In the application write code to connect to RDMS and pass the raw SQL 4. Receive the raw data results from the RDBMS 5. Convert the results to code objects for manipulation in the application 6. Implement controls & code for the user to work with the data LINQ halves the steps and reduces the process to: 1. Create a database in the RDMS 2. Write LINQ queries within IDE 3. Implement controls & code for the user to work with the data What a pleasure! Less cumbresome donkeywork and the same results and performance. Brilliant! Plus I get to query a whole bunch of other stuff (even combine the queries) and not have to worry about loading, drivers, query translation. Man, I think I'm getting a woodie... Note that you use wizards in the IDE to establish a framework for your LINQ queries (it connects to the RDMS and automatically generates code objects that the LINQ queries will work with).

                                        B 2 Replies Last reply
                                        0
                                        • B BoneSoft

                                          Is anybody else more than just a little uneasy about LINQ? The few examples I've seen make no sense to me. And I can't see what drove them to this solution either. I picture somebody at MS saying "ya know, let's take this well known standardized perfectly good query language that everybody is used to, chuck it out the window, and make a cryptic bizzare syntax built into the language itsef..." Ok, I can see some advantages to having it built it to the languages, not least of all avoiding the need for string storage and manipulation. But could it not have been more... SQL-like? Am I alone here or does anybody else have reservations about LINQ? And I know there are some people out there that are really excited about it, I'd like to hear what they have to say too.


                                          Try code model generation tools at BoneSoft.com.

                                          J Offline
                                          J Offline
                                          Josh Fischer
                                          wrote on last edited by
                                          #45

                                          I think you are assuming that LINQ is solely intended to be a SQL replacement which it is not. It is meant to be (yet another) layer of abstraction that allows you to interact with the query related aspects of databases, XML, DataSets and even your business objects in a common fashion. I have no special love for M$ and tend to agree with the other posts that we should wait and see how the final (or second) version turns out, but I think we may find it to be a useful tool. The use of attributes on class and property names is very similar to what I do to simply query generation and sproc parameter passing in my own code. Having something like that built into the framework (or is it technically a langugue feature?) should be nice. I have found that the main project page has some good information.

                                          Josh Fischer

                                          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