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 11 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.
  • R Rocky Moore

    Enters the MS Fan Boy Old Man: LINQ Yes.. LINQ Yes.. ?? LINQ is not just another data layer tool or some technology to destroy n-tier model as some seem to think. It is not just some toy for play. Microsoft has a much larger picture with LINQ which is basically a unified approach at searching, managing, grouping and ordering data no matter what form it takes. Does not matter if it is a simple array in memory, an XML file or a database, data is handled very much the same way allowing to understand one technology to cover all those different needs. Unification is the goal and LINQ is the answer. Many developers do not see the big picture and still think that you would only use LINQ every now and then. I use it often! My data layer is built on LINQ and internal business objects are handled by LINQ along with global internal application data that I need to search or organize. If there is a collection of data, there I will be with my LINQ queries. With LINQ it is a simple task to deal with data that is relational or heirarchical such as XML. It allows me to deal with data as objects and build new objects out of data. The LINQ 2 SQL is pretty cool but you have to watch out that you do not get bit by a large number of hits to the database, but can be managed with a little care. LINQ 2 SQL can take a lot of the work out of the databse handling if you trust in it to do the work for you. To start with, I approached it much like ADO.NET and building out Sprocs for most of the work, but found that LINQ 2 SQL does a fairly good job (and I expect even better in the future versions) generating everything that is needed without all the extra developer time to do it. It can handle some complicated queries (nested joins and groupings) without much effort. One of the first stumbling blocks in LINQ is the syntax. It is much like learning a new SQL language and many tend to fight learning something new. The first error is to approach LINQ as you would SQL, they are quite different beasts. As an example, you comment that you think the query is backwards, but really, once you are use to the syntax, you think SQL is backwards :) That is the point, you need to approach it with an open mind and be flexible. After just a couple of weeks, a developer should be confortable and enjoy the time savings from use LINQ all over the place. I still advice keeping the database access portion in a data layer abstracted from the rest of the application, but it does do a decent job at generating objects

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

    Point taken. And I eventually will look into it. I have to look at all language enhancements to see if there is benifit in it for me, and of course so I can read other's code as well. I can see how a flawed perspective (assuming primarily a SQL replacement) could affect my view of LINQ. I'll have to look into it's other uses as well.


    Try code model generation tools at BoneSoft.com.

    1 Reply Last reply
    0
    • J JPaula

      MY main interest is the possibility of dealing with XML directly in code, instead of having to deal with strings and XML api's. The rest seems a bit odd - like SQL but not exactly :confused: JP

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

      XML is the one thing I doubt I'll use LINQ for. I've grown too attached to my serialization. I don't rely on strings and the DOM API either, serialization serialization serialization. One of the best (and fairly overlooked) innovations of the framework from 1.0 on.


      Try code model generation tools at BoneSoft.com.

      J 1 Reply Last reply
      0
      • B BoneSoft

        Frobro wrote:

        You've made very little attempt to understand LINQ

        Thanks Mr. Obvious, I'm glad you caught what was plainly spelled out for you. That was a well established fact from the initial post, and reiterated throughout the thread.

        Frobro wrote:

        You can happily continue in your blissful ignorance. The more enlightened among us... blah blah blah

        And I appreciate the personal attack oh enlightened one, may Budha be with you too. But I must admit, after that introduction I didn't bother to read the rest of your Post. Maybe later today. Cheers :)


        Try code model generation tools at BoneSoft.com.

        B Offline
        B Offline
        Big Daddy Farang
        wrote on last edited by
        #57

        BoneSoft wrote:

        I didn't bother to read the rest of your Post. Maybe later today.

        I'd recommend reading its post. I found it quite well written considering it's coming from a troll. ;) Regards, BDF

        B 1 Reply Last reply
        0
        • B BoneSoft

          XML is the one thing I doubt I'll use LINQ for. I've grown too attached to my serialization. I don't rely on strings and the DOM API either, serialization serialization serialization. One of the best (and fairly overlooked) innovations of the framework from 1.0 on.


          Try code model generation tools at BoneSoft.com.

          J Offline
          J Offline
          JPaula
          wrote on last edited by
          #58

          SO how do you work with multiple etherogeneous xml sources from external suppliers or customers where you want to cherry pick information from? Would you have to recreate all their object/data models? I can do that with standard WebServices (VS does that for me), but the majority of them have plain xml interfaces (no automatic object model creation). We currently deal with it using XML Api. Previously we used to use xsl, but xsl syntax is too dense, making it dificult for other people to analyse. JP

          B 1 Reply Last reply
          0
          • J JPaula

            SO how do you work with multiple etherogeneous xml sources from external suppliers or customers where you want to cherry pick information from? Would you have to recreate all their object/data models? I can do that with standard WebServices (VS does that for me), but the majority of them have plain xml interfaces (no automatic object model creation). We currently deal with it using XML Api. Previously we used to use xsl, but xsl syntax is too dense, making it dificult for other people to analyse. JP

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

            I've rarely needed to cherry pick details from XML, and in that scenario LINQ sounds like a great alternative. Because otherwise you'd have no real alternative but to use the DOM. Serialization would be gross overkill for that, I'll concede. A couple of years ago I was working for a company that ran a travel web site. They pulled all their information from several different sources, all XML, and virtually none were proper web services. I wound up writing my own tools to create XML serializable models from XML & XSD because I hated what XSD.exe produced. Once the tool was done, I could take their HUGE XML structures and create programmable entity classes in seconds. Effectively shaving months of work off in seconds. I dunno, maybe LINQ would be a more appealing solution for some. Currently other than XSD.exe, which sucks, I'm not aware of too many tools out there that generate serializable code from XML/XSD structures. XSL might be an interesting idea for transforming different models to a standard model, but XSL is a really gross language to deal with. I bet that took a lot of time and work.


            Try code model generation tools at BoneSoft.com.

            J 1 Reply Last reply
            0
            • F Frobro

              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 Offline
              B Offline
              BoneSoft
              wrote on last edited by
              #60

              Ok, I read it... After your condescension, the colorful imagery of surfing on another abstraction layer, the gross exageration of "several orders of magnitude", and your missguided assumption that my apprehension to jump on the band wagon equates to an "unwillingness to learn a little extra syntax" that can only come from a lack of "clarity and insight", all you really said was that you don't have to work with SQL and can access other data sources in the same manner. My point is just that SQL's never been a problem for me, and XML serialization will probably still be a more appealing approach to dealing with XML for me. But I enjoyed the "what a developer does" 101 course. While we're pointing out each others "problems", I'd say yours is assuming that I'm some dumb ass that doesn't understand all this icky development stuff. Here's my 101 course for you: When discussing something, if you want someone to see your point of view, talking down to them or worse belittling them is the fastest way to get people to stop listening to what you have to say and automatically discount anything you say. Which "is common to the human condition." If you'll notice, most people responding to this thread, dispite their view, courteously keep their responses in the tone of a peer. Showing that they don't automatically assume they are superior. And... query translation? When did you deal with that? I'd love to get my hands on a SQL parser, you wanna write an article and share?


              Try code model generation tools at BoneSoft.com.

              1 Reply Last reply
              0
              • B Big Daddy Farang

                BoneSoft wrote:

                I didn't bother to read the rest of your Post. Maybe later today.

                I'd recommend reading its post. I found it quite well written considering it's coming from a troll. ;) Regards, BDF

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

                I appreciate the recommendation. But his couple of points were made by nicer people. :-D


                Try code model generation tools at BoneSoft.com.

                F 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
                  srsabu
                  wrote on last edited by
                  #62

                  What got me excited about LINQ was a post I read somewhere where they were talking about PLINQ, where some of the LINQ queries are automatically parallelized to take advantage of multi-core environments. It made the point that performaing that optimization was possible with LINQ because you tell the compiler what you want to accomplish, not what steps to take to accomplish that.

                  B 1 Reply Last reply
                  0
                  • S srsabu

                    What got me excited about LINQ was a post I read somewhere where they were talking about PLINQ, where some of the LINQ queries are automatically parallelized to take advantage of multi-core environments. It made the point that performaing that optimization was possible with LINQ because you tell the compiler what you want to accomplish, not what steps to take to accomplish that.

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

                    Yeah, that sounds interesting. A step beyond connection pooling. Good point.


                    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.

                      C Offline
                      C Offline
                      chaiguy1337
                      wrote on last edited by
                      #64

                      SQL is a dinosaur. For young developers such as myself, the extra overhead of learning a COMPLETELY different syntax construction can be considered nothing but a pain. And I mean these two things are from different worlds. I'm personally very much in favor LINQ just on the basis of making it a more C#-like syntax, let alone all of the other benefits that come along with it, such as strong typing and intellisense. Logan

                      B 1 Reply Last reply
                      0
                      • C chaiguy1337

                        SQL is a dinosaur. For young developers such as myself, the extra overhead of learning a COMPLETELY different syntax construction can be considered nothing but a pain. And I mean these two things are from different worlds. I'm personally very much in favor LINQ just on the basis of making it a more C#-like syntax, let alone all of the other benefits that come along with it, such as strong typing and intellisense. Logan

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

                        That's another good point I hadn't thought of. I actually started out with database work back with SQL Server 6.5, and moved to ASP as a way to front that data. I hadn't really considered what it would be like learning SQL after starting with .Net. However, the dinosuars were around for more and 100 million years. I doubt seriously that SQL will last that long, but it won't be going away soon. If you have the luxury (or curse depending on your perspective) of working in an organization large enough to have the DBAs working independant of development, that may be enough for you. Otherwise, you may have to get used to some SQL anyway. But a good point nontheless.


                        Try code model generation tools at BoneSoft.com.

                        C 1 Reply Last reply
                        0
                        • B BoneSoft

                          That's another good point I hadn't thought of. I actually started out with database work back with SQL Server 6.5, and moved to ASP as a way to front that data. I hadn't really considered what it would be like learning SQL after starting with .Net. However, the dinosuars were around for more and 100 million years. I doubt seriously that SQL will last that long, but it won't be going away soon. If you have the luxury (or curse depending on your perspective) of working in an organization large enough to have the DBAs working independant of development, that may be enough for you. Otherwise, you may have to get used to some SQL anyway. But a good point nontheless.


                          Try code model generation tools at BoneSoft.com.

                          C Offline
                          C Offline
                          chaiguy1337
                          wrote on last edited by
                          #66

                          Well currently my organization consists of myself ;P and yes, I've been forced to deal quite a bit with SQL, despite really focusing on the application side of things. That said, I'm glad to have learned as much as I have about database management and organization through my experience, but time and time again I'll come back to some database code I've written and I'll have forgotten exactly how to do something in SQL (usually little things like do I need a bracket here or a quote there, or how do I get that as XML again) so I'll have to look it up. If the syntax were more familiar perhaps I wouldn't have to go through that each time, and maybe I'd even remember it! ;) Logan

                          B 1 Reply Last reply
                          0
                          • C chaiguy1337

                            Well currently my organization consists of myself ;P and yes, I've been forced to deal quite a bit with SQL, despite really focusing on the application side of things. That said, I'm glad to have learned as much as I have about database management and organization through my experience, but time and time again I'll come back to some database code I've written and I'll have forgotten exactly how to do something in SQL (usually little things like do I need a bracket here or a quote there, or how do I get that as XML again) so I'll have to look it up. If the syntax were more familiar perhaps I wouldn't have to go through that each time, and maybe I'd even remember it! ;) Logan

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

                            Yeah I feel your pain. Anything beyond the normal day to day syntax I still regularly have to look up, which seems to waste time. Good example was just this morning I couldn't remember how to make a password case sensative and had to look it up.

                            SELECT *
                            FROM
                            [User] u
                            WHERE
                            u.UserName = @Uid
                            and (Password = @Pwd COLLATE Latin1_General_CS_AS)

                            In case you ever need it. ;) But yeah, I suppose it's good that they are at least trying to bridge the gap and lessen the programmer's exposure to unmanaged resources. Since it's not really possible (at least quickly) to get the entire industry to support a standard in data storage, (beyond a SQL standard that's loosely supported), I guess you're left having to try to standardize within your framework/language environment. And it sounds like LINQ is a step in that direction.


                            Try code model generation tools at BoneSoft.com.

                            1 Reply Last reply
                            0
                            • B BoneSoft

                              I've rarely needed to cherry pick details from XML, and in that scenario LINQ sounds like a great alternative. Because otherwise you'd have no real alternative but to use the DOM. Serialization would be gross overkill for that, I'll concede. A couple of years ago I was working for a company that ran a travel web site. They pulled all their information from several different sources, all XML, and virtually none were proper web services. I wound up writing my own tools to create XML serializable models from XML & XSD because I hated what XSD.exe produced. Once the tool was done, I could take their HUGE XML structures and create programmable entity classes in seconds. Effectively shaving months of work off in seconds. I dunno, maybe LINQ would be a more appealing solution for some. Currently other than XSD.exe, which sucks, I'm not aware of too many tools out there that generate serializable code from XML/XSD structures. XSL might be an interesting idea for transforming different models to a standard model, but XSL is a really gross language to deal with. I bet that took a lot of time and work.


                              Try code model generation tools at BoneSoft.com.

                              J Offline
                              J Offline
                              JPaula
                              wrote on last edited by
                              #68

                              Interesting ideas. Thanks for your response. In fact, I am working on the travel industry and that's exactly my scenario. I never had the idea of creating programmable entity classes due to the amount of code needed for otherwise small tasks, but it sounds like a good idea, if we can make them automatically from XML/XSD. A tool such as yours would be great asset. It's a shame I am still using plain VB6 for some older products. JP

                              B 1 Reply Last reply
                              0
                              • J JPaula

                                Interesting ideas. Thanks for your response. In fact, I am working on the travel industry and that's exactly my scenario. I never had the idea of creating programmable entity classes due to the amount of code needed for otherwise small tasks, but it sounds like a good idea, if we can make them automatically from XML/XSD. A tool such as yours would be great asset. It's a shame I am still using plain VB6 for some older products. JP

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

                                Yeouch! I don't know if I could still find my way around VB6. Yeah, we pulled from the big boys like Amadeus and Saber, and lots of smaller sources. I spent most of my time working on the car interface, so we pulled from Hertz, Enterprise, and 4 or 5 other companies, all with different XML. We had to pull all that and turn it all into our own format so they could all be presented together. It's funny how many of those companies are OTA compliant and still have VASTLY different XML models. The OTA schema is a mess. I finally completely gave up on OTA and just built seperate models for everybody. Since I could generate code for that, it saved a huge amount of time. But I still had to translate their model to ours so they could all be presented with ours. I guess if you could use LINQ in that scenario, it might be better than serialization. Maybe it's a good thing that at the time I didn't have to decide between the two. I can't imagine trying to do any of that with VB6. Good luck to you, I don't envy your situation.


                                Try code model generation tools at BoneSoft.com.

                                1 Reply Last reply
                                0
                                • M Mitchell D Geere

                                  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 Offline
                                  C Offline
                                  Colin Angus Mackay
                                  wrote on last edited by
                                  #70

                                  Mitchell D. Geere wrote:

                                  Yes they have been released at the same time (except for v3.0 of the framework).

                                  Please remember that .NET 3.0 was a marketing descision and nothing to do with it actually being version 3.0 of the Framework. At best it was 2.1 or 2.5. What was WinFX (now .NET 3.0) is just an add on. There are no changes to the .NET 2.0 framework.


                                  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 1 Reply Last reply
                                  0
                                  • C Colin Angus Mackay

                                    Mitchell D. Geere wrote:

                                    Yes they have been released at the same time (except for v3.0 of the framework).

                                    Please remember that .NET 3.0 was a marketing descision and nothing to do with it actually being version 3.0 of the Framework. At best it was 2.1 or 2.5. What was WinFX (now .NET 3.0) is just an add on. There are no changes to the .NET 2.0 framework.


                                    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
                                    #71

                                    Sorry yes a mistake in my writing. 3.0 isn't a whole framework it is just merely an add on to 2.0. However my point here wasn't that, my point was that there seems to be a tight association between the frameworks and the IDE where people refer to them interchangeably. Which is wrong there is no 2003 framework there is a 1.1, but there is a 2003 IDE. Get where I am going? So alot of folk complain about the '2003 framework', but what they really mean is that their IDE is bust. :)

                                    Mitchell Geere

                                    1 Reply Last reply
                                    0
                                    • K Kevinio

                                      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

                                      C Offline
                                      C Offline
                                      Colin Angus Mackay
                                      wrote on last edited by
                                      #72

                                      Kevinio wrote:

                                      Surely good practice as a coder dictates that you should understand the technologies and workings of the code you are implementing?

                                      Coder? No. Developer? Yes. To me a coder and developer are distinctly different. A coder doesn't design and doesn't architect. A coder is someone who arrived in their position by accident or chance. Someone who doesn't really care about the technology or how it works, even if they profess that they do. A Developer cares about good design and good architecture. They are genuinely interested in the technology and how it actually fits together.

                                      Kevinio wrote:

                                      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.

                                      I don't think so. I don't think it belongs in the data layer. I've always said: Let the database do what it is best at. Let the database filter and sort your data. LINQ should be used, in my opinion, in the business layer on existing business objects.

                                      Kevinio wrote:

                                      for example User.Login().

                                      I know what you are getting at. Although I don't think this is a valid example. The database should not be returning passwords. This query should be done exclusively in the datbase. What it is useful for is if you have already built some business objects and you want to quickly get just those with particular properties. It isn't for filtering data that should have already been filtered before reaching your application. It certainly wouldn't be any use for checking someone signing in to a system such as code project with 4million+ users.

                                      Kevinio wrote:

                                      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.

                                      You don't need to use anonymous types either. In the above example you could just select c. You would only create anonymous types if it gave you an advantage for some reason. I don't see a reason in this example.

                                      Kevinio wrote:

                                      Pretty normal senario you would say, but guess what, you cann

                                      K 1 Reply 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 )

                                        T Offline
                                        T Offline
                                        Tom Delany
                                        wrote on last edited by
                                        #73

                                        Christian Graus wrote:

                                        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

                                        Kind of like Nuclear Weapons, eh? :):laugh:

                                        WE ARE DYSLEXIC OF BORG. Refutance is systile. Your a$$ will be laminated.

                                        1 Reply Last reply
                                        0
                                        • B BoneSoft

                                          I appreciate the recommendation. But his couple of points were made by nicer people. :-D


                                          Try code model generation tools at BoneSoft.com.

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

                                          Alright already! Enough flame-throwing. My bad. Let's all hold hands and sing Koombaya instead :-D

                                          B 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