Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

jddp writes "MacDonald is a programmer's programmer, and Pro Silverlight 4 in VB is a model of what a programmer's guide should be. He explains a mass of technical information in considerable detail without losing the big-picture. His clear and concise exposition of concepts and functionality is never confusing or needlessly repetitive. The book's organization is logical, yet the chapters can be read in isolation, as the need or interest arises." Keep reading for the rest of jddp's review.

Pro Silverlight 4 in VB

author

Matthew MacDonald

pages

896

publisher

Apress

rating

9/10

reviewer

jddp

ISBN

1430235489

summary

An invaluable reference for professional developers wanting to discover the new features of Silverlight

One thing this book doesn't provide is an overview of the subject for a novice trying to get the big-picture. After the briefest of introductions (10 pages), the author leaps right into building applications. Nor does it provide every technical detail you will need to complete your application. (That's why we have the web). However, if you want a book that can take you from having a rough map of the territory to being a self-sufficient Silverlight developer, I highly recommend this one.

Starting from the fundamentals of Silverlight such as XAML, Layout and Elements, McDonald rarely puts a step wrong as he winds through the technical details, progressing to specific functional areas such as such as Animation, Data Binding and Web services. Each chapter provides a brief overview of the functionality addressed before stepping through the programming details. His code examples are concise, but also convey the significance and use of the features very clearly. The examples do not sprawl across pages and pages, as in weaker tutorials, but they do build upon one another when necessary. Working code implementing the examples from the text is available at MacDonald's personal site for anyone to download — but apparently only in C# (as far as I could see. The VB version may be coming later, just as the VB book lagged the C# version). Due to the intelligent choice, structuring and clear implementation of his examples, I have found them a useful jumping-off point for "real-life" applications on several occasions. The author has gone beyond the scope of the book in at least one case, implemented an "advanced" capability (support for large file up/downloads via a Web Service) that I was specifically interested in.

As mentioned, the book does not contain an extensive technology overview and this is reflected by the absence of many of the buzzwords associated with Silverlight from the index. You will find no mention of RIA services. MVVM is only touched upon in the context of the new SL 4 support for the Command pattern. (Even so, his brief explanation is a great example of MacDonald's lucid and economical expository style. You could trawl the web for a long time without finding such a straightforward explanation.) However, while MacDonald does not attempt to convey any over-arching architectural vision, he is perfectly capable of clarifying some abstract design concepts. In Chapter 4 of the book he is already tackling the intimidating-sounding topics of Dependency Properties, Attached Properties and Routed Events. By the time you've read a few pages you're wondering what all the fuss was about. After less than six pages, MacDonald is working through a meaningful application of attached properties (a custom layout panel). Most of the chapter is devoted a detailed explanation and illustration of Mouse and Keyboard event handling, and to the new Commanding support in SL 4.

A final caveat: This is not a book for someone wanting to catch up on what's new in Silverlight 4. The information is there, but it is dispersed among the relevant sections of the old book, and there is no helpful index. Contrary to the impression given by the back-cover, the very occasional "What's New" boxes don't help much in homing in on new features. In fact, the organization of the material and most of the content is unchanged from the SL 3 edition, so I wouldn't buy this if you already have that book.

While reading this book, I sometimes wished for a wider view: discussions of the merits of different architectures; comparisons to design patterns used in other technologies, and so forth. This book will not be much help in defining the architecture for your next mega-app. This is a book to seize on when you need to get a handle on programming specific Silverlight features fast. You won't learn about every possible shortcut or dead-end on the trail, but you will never have to wonder where the heck you are.

While this book it isn't all things to all developers, it is hard to overstate its consistent intelligence and clarity, or its sheer usefulness (to programmers). Programmers just aren't supposed to be so articulate – are they?

Yes, it's a better place than Iraq and Afghanistan, but that's not saying much.

VB is really a dump as far as US-based beach towns go. There's a billion draconian rules about what you can and can't do, there's cops everywhere (it's a virtual police state), and the beach is tiny and crowded. You're not allowed to throw frisbees on the beach for god's sake. The town is just a shitty tourist trap.

Not only that, the surrounding cities in the Hampton-Roads area are shit too: Norfolk, Newport News, and worst of

I thought the only people who still used any variation of VB were the "oldtimers" who picked up coding in the 90s while dreaming of making lots of money. At least those are the only people I see still coding in VB.NET and the like these days, pretty much all the real geeks I know tend to have pet languages that they're not allowed to use at work (Python, Ruby, asm for some arcane old CPU or something completely different) and code C#.NET or Java for a living...

Some places still teach VB as the main language in IS programming courses. Perhaps because its syntax is more self-explanatory - e.g. compare C# keyword "abstract" vs VB "MustInherit" (on classes) and "MustOverride" (on methods), or "sealed" vs "NotOverridable", or "static" vs "Shared".

Don't forget "Exit For" and "Exit While" instead of break; - which not only explains exactly what's happening but also allows you to jump straight out of two nested loops on occasion if they are of different kinds, something you can't do in C#.

I also Like VB.Net's shortcut initialiser/constructor Dim foo as New ClassWithReallyReallyLongName() though C# now has var which does the same thing.

Where I work 3 out of 5 of us code C# for fun in our spare time. And in a way I'm glad that my job isn't the same as m

C# and VB.Net are two different syntaxes for using the same common runtime library. Arguing about whether C# is better or worse than VB.Net is the height of language snobbery. What matters is the.Net library underneath. The only reason to prefer one over the other is because you happen to prefer one syntax over the other.

What GP said is essentially correct - VB and C# are so close in terms of language features that if you know one, learning the other pretty much boils down to learning the syntactic differences, and those are for the most part one-to-one mappings or close to it. All C# programmers I knew could read VB code without much effort.

I agree with you.. by the way.. But I admit I am partial to C#... Bad taste left by old legacy VB6 customers...

However, with the current.NET framework it really does not matter. Yes, VB.NET classes definitions are an eye sore (too verbose in my opinion), but it doesnt take long to swap between one or the other... Meaning it really does not matter.

On the Silverlight... Never been there because I personally feel as a consultant that Silverlight died when Android and iOS came on the scene... Meaning, moving

C# and VB.Net are two different syntaxes for using the same common runtime library. Arguing about whether C# is better or worse than VB.Net is the height of language snobbery. What matters is the.Net library underneath. The only reason to prefer one over the other is because you happen to prefer one syntax over the other.

Sorry but if are going to call yourself a "professional" developer then you should know the syntax of Java and/or C#. Once you know one of those languages then you should be able to move between the two fairly easily as the job/project requires. If you go from knowing VB and learn only VB.NET then you will be limiting yourself considerably.

There are a number of languages which you can access Cocoa from on OS X but I would hardly consider all of them equal to each other.

Where in my post did you see anything about not knowing Java or C#? And what does Cocoa have to do with.Net development?

C# and VB.Net are two "skins" on the same underlying framework. If you are a language snob, you may not like it, but VB.Net developers can do EXACTLY the same functions that C# developers do. This kind of snobbery is what limits you from being a "professional" developer.

I'm sorry but you obviously have know knowledge of how.net works. It is syntax agnostic, you can write exactly the same functionality in both syntaxes and both syntaxes access all the same functionality. It doesn't matter what syntax you write in, they both do the same thing and you can program equally badly(or well) in both.

While I don't know if this review is a "paid" review or not, I do know (from personal experience) that a lot of them are. Could/. consider adding a rule or guideline requesting the reviewer to state if he/she was given the book for free or otherwise compensated for the review?

Great proposal. Here's my disclaimer.
I was given the book for free. I forked out $50 for its predecessor (SL3). I thought the old book was great, and I loved the additions to the new one too. The main problems with it are those I identified in the review. My first para was probably too gushy, and who reads beyon the first para?
I have easier ways to earn $60 (spare me the jokes), and were I paid in cash I wouldn't have spent it on an update to a book I already owned. Said that in the review too.

While I don't know if this review is a "paid" review or not, I do know (from personal experience) that a lot of them are. Could/. consider adding a rule or guideline requesting the reviewer to state if he/she was given the book for free or otherwise compensated for the review?

It's not very *proper* of them if they do not disclose that fact, is it? Considering the fact that most of/. believes in openness, neutrality and transparency, I'd say that disclaimers are a necessary prerequisite.

I can also tell you that it is often the case that authors are requested by the publisher to "recommend" reviewers for them to approach. If suitable targets are not acquired, they leverage their own private and consequently partisan fleet of buoyant yes-men to craft 1000-word critiques suitable

it's not only reviewer who is suspect but the guy who gets to plaster his amazon ref id on the link.. hint to slashdot: it's more credible if the reviews chosen actually tell something of the book and there are no ref id's.

Matthew MacDonald has been doing Silverlight books since version 1.0. I own his C# flavor of this 4.0 book. He's one of those authors that waits until a new technology has soaked in a bit, his book reflects that (as opposed to getting the book out their as soon as 4.0 was released). This book came out about 4 or 5 months after Silverlight 4.0 was released.

That's what makes it all the funnier. In his joke, it's not just a semantic error, it's actually syntactically incorrect to have those two words in the same sentence, just like you can't have two articles before the same noun.

But Microsoft is pulling the same shit Adobe is with Flash. Claiming it's "open" but gaming the spec release schedule in such a manner that it is impossible for anything but their implementation to actually work - By the time someone has implemented to the open spec, MS and Adobe have released new versions and content providers are using those new versions.

For example, there was hope that Monolight combined with Netflix transitioning to Silverlight would bring Netflix streaming to Linux. However, Netflix tracks Microsoft's Silverlight releases pretty quickly, meaning that on a consistent basis, by the time Monolight has caught up to wherever Netflix might have been, Netflix has moved on to the next Silverlight release. Same for nearly all other SL content out there.

It's the same sad situation for any of the alternative Flash players - They continue to remain novelties because Adobe never seems to update the spec until they have released the next version of Flash, meaning Gnash et al are always at least a generation behind. Let's not forget the fact that the Flash spec is missing critical stuff such as RTMPE documentation. (The only public RTMPE documentation out there was obtained via reverse engineering Adobe's implementation.)

I don't think I quite understand. No, I'm not uninstalling Flash either, because it's needed for far too many things (most notably YouTube). I'd be happy to replace it with Gnash or other FOSS alternative if it worked as well.

But I don't really see how Silverlight makes the situation any worse. Of course, SL doesn't have nearly as much penetration as Flash, so it's not like there's a bunch of sites where I require it.

In the.Net world, it's not quite that straight forward. For instance, Visual Studio 2010 is almost fully a.Net application (some parts are legacy C++ libraries/controls that just didn't get converted before launch). But being.Net just means that it was compiled to the.Net intermediate language. It could have been written in VB.Net, C#, J#, F#, PHP.Net, or any of the other high level.Net languages.

That's the awesome part of.Net. You can write in what ever language you are familiar with, against the sam

Correct. You have much better portability by writing software in Mono and then porting back to.NET, although there are plenty of extensions in Mono that don't exist in Microsoft's implementation too.

is a patent mine field

Only because people like you keep saying that it is. In the real world, nobody is suing anybody over this technology. For Microsoft, Mono provides a legitimacy for their language to show that it really is cross platform, open standard. It would be a public relations nightmare if they did an about face on this.

Yes, and this is why anybody who believes in open standards should stay away from Mono. If you follow Microsoft's lead you will get burned.

That doesn't make sense. There was nothing in what I said that could lead you to that conclusion. It is you own hatred of Microsoft makes you believe it. When has Microsoft ever made a promise not to sue for patent infringement about a public, free licence, and then turned around and sued anyway?

They won't give a shit once they get beyond the adoption stage. They'll just tell everybody to license their intellectual property that they invested in.

There is more than one standard covered by a promise not to sue. If they reneg on this one then all of their promises would be null and void. They wouldn't be able to convince anyone to use their standards then.

When has Microsoft ever made a promise not to sue for patent infringement about a public, free licence, and then turned around and sued anyway?

I never said they did or will. I said, "anybody who believes in open standards should stay away from Mono. If you follow Microsoft's lead you will get burned."

Well, unless you mean that Microsoft will literally come around and set fire to you, then I can't see what other reasonable interpretation there could be. You claim this isn't about being sued by Microsoft, but then you go on to say:

Microsoft already has a patent deal with Novell and it's distribution of Linux. Don't want to be sued by Microsoft for using Linux? Buy Novell and pay royalties to Microsoft.

So you ARE talking about being sued. How much of that deal was just a PR exercise anyway? It is not as if any other distro has been sued - especially for something that Microsoft promised to keep free. The only close thing would be TomTom being sued for using FAT32, but then tha

I wish you would stop paraphrasing me, badly. What I'm disputing is the following statement from you: "When has Microsoft ever made a promise not to sue for patent infringement about a public, free licence, and then turned around and sued anyway?"

The key point here is all the other parts tied to the non-public stuff. I spent several paragraphs on it. I am not claiming, and have never claimed, that Microsoft will sue over a patent after they granted you royalty-free rights to use it.

Huh? What exactly is wrong with my statement? I asked "When has Microsoft ever made a promise not to sue for patent infringement about a public, free licence, and then turned around and sued anyway?" and you answered "I never said they did or will." That looks incredibly like you are saying that this isn't about being sued by Microsoft. So if you agree that you are not in danger of being sued for using Mono, what is your problem with it? Let's see:

Later on, if Silverlight is adopted by the web as a whole, in part because it is "cross-platform", then they can just pull the plug on Linux. New versions will be tied to Windows. The idea of being cross-platform will be quietly dropped.

You're really pissing me off. You keep moving between a specific scenario to a generalization, as if the two were equal.

That's funny. I'm getting pissed off because you can't address the specific claim, but instead keep wandering off into unrelated scenarios about different products and then spew general anti-Microsoft FUD. But then you went on to say:

Mono is a large project that goes well beyond the Community Promise stuff.

Wow, that is actually about the correct software package. Maybe we are finally going to see some insightful argument that blows my position out of the ballpark...

The danger is adopting Mono leads to greater adoption of proprietary parts, and strengthens Microsoft's hand.

Oh no! You have gone back to reiterating an old FUD claim, one that apparently required the user to switch away from

Actually I'd say there was nothing wrong with VB6 either as long as you used it correctly the problem was since it was easy to pick up many would learn just enough to be dangerous. But frankly I have seen horribly bad code written in plenty of different languages so I don't consider that a strictly VB problem. But if you used as intended, for making a RAD GUI for a database, well then it worked quite beautifully and I doubt anyone could do that particular niche job any faster or better with any other langua

Well said. It's probably important to point out that best and worst feature of VB is its ease of use. That allows competent programmers to perform tasks very rapidly, but allows people who have no business being programmers to write crap code.

BTW, you may already know but the new versions of Microsoft Expression not only allow customers to design forms but from their own desktop if needed. It's really intended for BAs, but allows the flexibility of course.

The same way you can put "ActionScript" (for Flash and so) and "Professional" in the same sentence?

Not that semantically makes any less oxymoronic, but anyway... the English language support bigger abuses that this one - after all, the political clique of many countries in this world do it every day (even letting aside the markedrones).

To start, the company's name is soooo lame. You can figure out the guys that started this weren't really into originality. I mean, I know this was the 70's and all, but c'mon : Micro. Soft. Microsoft. That's so duh, I dont know what else to say.

To start, the company's name is soooo lame. You can figure out the guys that started this weren't really into originality. I mean, I know this was the 70's and all, but c'mon : Micro. Soft. Microsoft. That's so duh, I dont know what else to say.

I had always thought that they took the name "micro-soft" from Neuromancer, but a quick check shows that MS preceded the novel, so William Gibson must in fact have been referencing them, who knew they were so hip once?

VB is a programming language that's definitely in use. Why the rush to write it off?

I hate Perl and Lisp, but I don't drag them through the mud. They're tools people use to accomplish tasks like any other language.

Or closer to home, I hate Macs (I have 2, and only the Mac Mini is in use, and that's just so I can compile iDevice apps... talk about proprietary) but they're a tool people use. So why drag them through the mud?

And people will install it if they want to use the app written in Silverlight

I sympathize, because I feel exactly the same way about Apple software on my Windows machines. Installing ITunes, Quicktime, Safari et al. on Windows is like intentionally infecting your computer with malware. You might as well just rip some memory out of your motherboard and replace your hard drive with a dead chipmunk.

Another stupid AC who thinks everyone buys a Mac because it's "trendy". Believe me, it has nothing to do with it. If they hadn't switched to a Unix core (or a BeOS core) I wouldn't use it. The classic Mac OS wasn't much better than Windows 98SE.

Plus, I couldn't afford a Prius to begin with, not to mention that most new diesel Volkswagen models have better kilometerage than a Prius. And they cost less.

At this point Unix-like design is a foundation of all general-purpose operating systems, EXCEPT ones developed by Microsoft. There is a good reason for it, however explanation would be a book on OS design in itself, and therefore beyond the scope of a response to some retard's offhand comment on Slashdot.

Saying VB.Net is dead is akin to saying that C# is dead. Which makes virtually no sense.

So long as Microsoft continues developing the.Net framework, there will be a VB.Net and C#, along with all the other.Net languages.

-Rick

Personally, I'm waiting for Android.net as that seems to be the new platform everyone is wanting to develop for. And, if that is true, that most new jobs being created will be Android related, then, actually VB.Net and C#.Net are dead, unless Microsoft is going to port.Net to Android.

Of course,.Net will be around for a long, long time. Look how long ago COBOL "died" and yet there is still a strong demand for COBOL programmers.

"the teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery. '"Edsger W. Dijkstra
Can we please let basic die? We don't need another book about a horrible language.

Mr Dickstrangler would fit in well with the hysterical language zealots on slashdot. BASIC gets people started with programming. If they are interested they will move on to other languages, only the most retarded/uninterested will get stuck with only being able to write BASIC for ever.

His comment is like saying "if you start by reading Janet and John books - here is Janet, here is John, here is the dog, see the dog run, etc.- then you will never be able to read adult literature."