Slashdot Mirror


Programming .NET 3.5

lamaditx writes "The world of the .NET framework is taken to the next level by the release of .NET 3.5. The intended audience of this book are experienced .NET programmers. There are no sections that tell you details about C#, SQL servers or anything like that. I don't recommend this book if you never worked on a .NET project and don't know how to set up a SQL database. You should be aware that the code is written in C#. You might use one of the software code converters if you prefer Visual Basic instead. I think the code is still readable even if you do not know C#. I appreciate the fact that the authors decided to use one language only because it keeps the book smaller. The authors assume you are using Visual Studio 2008. You don't necessarily need to update to 2008 if you are working with an older edition because you can use the free Express Edition to get started." Keep reading for the rest of Adrian's review. Programming .NET 3.5 author Jesse Liberty & Alex Horovitz pages 476 publisher O'Reilly Media rating 7/10 reviewer Adrian Lambeck ISBN ISBN 978-0-596-52756-3 summary Covers all main .NET technologies found in .NET 3.5 The table of contents is available from O'Reilly — together with a chapter preview — here. The book does not come with any extras but includes the usual free 45 days access to the book on Safari.

This book covers the key technologies in .NET. There are books on each of these technologies: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), XAML, AJAX,C# and Silverlight already, but this book shows you how everything is connected with each other. As the authors note: "Our goal is to show you the 25% that you will use 85% of the time.". From my point of view this is good because I have a .NET 2.0 background and wanted to know what is new in .NET 3.5 and how things are connected.

The book is divided in 3 main parts. The first is presentation, which covers XAML, WPF and AJAX. The second describes how to take advantage of the design pattern support in .NET. The last part covers the business layer which includes LINQ, WCF, WF and CardSpace.

The first part starts with XAML. This is the eXtensible A The next main topic is using WPF which is the successor of Windows Forms. The authors explain how to connect data structures to the user interface which I consider to be one of the most important parts of using WPF. You will also find a lot of code and XAML layout descriptions.

The chapter on Silverlight was not very helpful to me. Silverlight is the competitor of Adobe Flash. Giving samples how to layout a Silverlight application is essentially the same as a WPF application thus it dives into more details of XAML. I am missing the real Silverlight message so this part did not meet my expectations.

The third technology you will learn about is AJAX which leads us away from the desktop client to a web client. The explanation how AJAX works is pretty good. The authors show you step by step how to create a todo list web-application with a database backend using ASP.NET and AJAX. Again, this does not cover all AJAX controls or ASP.NET but it shows you how the parts are interconnected and assumes that if you know how to handle one control, then you can also figure out how to handle all the others. Most web applications need some kind of access control. At this point the authors argue that it is faster to implement your own security tables instead of using the ASP.NET forms-based controls.My opinion is that you should never do something that is not correct to teach something else. There are always people who get it wrong in a way you did not anticipate. My recommendation: use the ASP.NET components and do not implement them by yourself.

The second part about the design patterns was surprising to me because I expected the common introduction to standard design pattern. The Model-View-Controller project implements the pattern for ASP.NET and allows developers to incorporate it easily. The advantage is that you get a comprehensive and easy to understand introduction how .NET supports design pattern implementation. I guess this will lead some developers from theory of design patterns to actually implementing them.

I consider the third part to be the real interesting content. It starts with LINQ which bridges object-oriented code to relational databases. You get to know the differences to SQL and also the advantages it provides by explaining new concepts. The examples are easy to understand and successfully make their point.

Windows Communication Foundation (WCF) covers the hot Service-Oriented-Architecture (SOA) topic. The authors explain what it is all about but you will need some knowledge about Web Services and XML to really get it. The introduction is rather short but more details are explained in the corresponding example.

The chapter about Windows Workflow Foundation (WF) starts with a short example how you implement a workflow without WF. After that you get to see how you do the same with WF. This way the necessity for WF become clear and you understand how to take advantage of this technology.

Card Space is the successor of Microsoft passport which was not successful as an authentication service with respect to user acceptance. This is also the key issue that decides on the success of Card Space. Maybe the improved interoperability will help. The chapter provides you with a short authenticate-yourself test and shows you how to offer Card Space authentication in your ASP.NET application.

The book is a good entry to the world of .NET 3.5 because it gives you an idea about every part and what it is good for. Maybe you do not need all of it for your job but at least you know that it exists and how it might be useful. I think it is reasonable that a comprehensive introduction to .NET 3.5 can not satisfy everybody because the range of topics is too broad. One can argue that this kind of information could also be retrieved from the net. I consider the book to be a better resource because it already summarizes the important information such that you do not drown in a flood of information.

There is also some criticism as I pointed out earlier. Maybe I am just a little picky about the details but if you print code download references into a book, they must be available. Most examples can be downloaded but the Alex Horovitz site was not reachable when I tried to access it. Another personal remark is that I do not like to see quotes from Wikipedia. Other people might think different about that so you just need to decide on your own.

I rate this book a 7. The authors scratch the surface of every topic and choose an appropriate style to explain it. You can tell that they thought about how to explain each topic on it's own and give you not just the "how" but also the "why".

Adrian Lambeck is a graduate student in "Media and Information Technologies" and worked with .NET for a few years.

You can purchase Programming .NET 3.5 from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

3 of 224 comments (clear)

  1. Re:Just Read this book by Shados · · Score: 2, Interesting

    o'reilly .NET books in general seem to be fairly awful. I have their design patterns with C# 3.0 book, which advertise itself as a book that takes the Gang of Four design patterns and show how they can be implemented better using built in C# 3.0 features (such as the observer pattern with delegates or events)

    That sounds promising, except the author clearly fails to understand what C# 3.0 has to offer, and thus most of the book uses only C# 2.0 features (and explains them in great details, as if they were new). They also heavily misunderstand some of the patterns, which could mislead someone not familiar with the design patterns to begin with.

    All around awful. So I'm not surprised about this one.

  2. Re:recommended for advanced programmers by fireboy1919 · · Score: 3, Interesting

    Java could have its own LINQ analog and type inference already, if only Sun (or Google, or IBM, or other of the big players) wanted it - which they don't. End result - talented language designers like Neal Gafter are leaving the Java scene and joining Microsoft [artima.com] to work on C#.

    Well...Linq is sort of a hybrid thing, but it's mostly Microsoft finally adding an ORM language to .Net.

    Quite frankly, as a developer who uses both Java and .Net in my job (and am currently using .Net 3.5 sp1), Linq is an embarrassment.
    I have found the following problems:
    1) I cannot easily be sure which parts will run in the database and which in the VM.
    2) I have little control over how caching works.
    3) Does an extremely poor job of modeling relationships other than "Has A" and "Belongs To" (the very common "Has and Belongs to Many", for example, is missing).
    4) Some functions that work in BOTH the database and the VM don't work with Linq, or don't work reliably (examples I've found: shift operator, bitwise and when used with ulong).
    5) Almost all of the database functionality in Linq will not work with anything besides SQL Server.

    All of these reasons are why I'm sticking with Hibernate for Java, and NHibernate for .Net for as long as I can. Hibernate behaves predictably and reliably, and you can figure out what its doing when you have to and optimize queries that are taking too long, and you seldom have to worry about it failing in unpredictable ways.

    The only complaint I have with Hibernate is that you can't do subselects containing aggregate functions in Hibernate Query Language.

    --
    Mod me down and I will become more powerful than you can possibly imagine!
  3. Re:recommended for advanced programmers by shutdown+-p+now · · Score: 2, Interesting

    This is true of nearly every operator in each language variant. The important thing isn't recognizing all the operators/functions and how they work; it's recognizing the difference between a function/operator and a table and field. If the ORM can do that, it has all it needs to convert queries from its language into pure SQL.

    I'm not quite sure what you mean, but my point was that there is no such thing as a "pure generic SQL". SQL generated for Oracle will not work for Postgres or MSSQL. You can probably have a very basic ORM that only uses a common subset of SQL for the stuff that it generates, and loads the rest of it onto the programmer; but that would mean that anything written using such an ORM is not really backend-agnostic. Entity Framework, in contrast, chooses to hide those SQL differences, which is why it needs backend providers that know what they are. Similarly, Hibernate also chooses to hide those SQL differences, which is why it needs backend drivers as well.