Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > BOOK: Silverlight 1.0 ISBN 978-0-470-22840-1
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Silverlight 1.0 ISBN 978-0-470-22840-1
This is the forum to discuss the Wrox book Silverlight 1.0 by Devin Rader, Jason Beres, J. Ambrose Little, Grant Hinkson; ISBN: 9780470228401
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Silverlight 1.0 ISBN 978-0-470-22840-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2007, 03:43 PM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is Silverlight / ASP.NET really THIS Complex?

I've just about gone through chapter 5 where the authors tell us how to use Silverlight with an ASP.NET program. It is very surprising to me that it is involves so many different pieces, and that it is so difficult and complicated! The extra code that you add to your web programs makes the whole project much larger and harder to understand and maintain. Did Microsoft really come up with a tool that requires such an effort to integrate with ASP.NET?

I would be interested in finding out your reaction to this.
Reply With Quote
  #2 (permalink)  
Old December 6th, 2007, 05:57 PM
Wrox Author
 
Join Date: Oct 2007
Location: Princeton, NJ, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Gary,

I'd suggest that Microsoft often covers the simple/easy scenarios very well. But the problem tends to be that either the scenarios covered (made easy) don't meet your needs or that if you just take the "easy" route, you end up with a monster in the end.

In context of Silverlight, for example, as noted in Ch5, MS is doing a Media control, which is the #1 scenario for SL 1.0. It will be full-featured and will make it easy to embed SL media player in your ASP.NET apps. Similarly, the Xaml control will make it easy enough to just embed arbitrary XAML into your page, and this will be sufficient for some scenarios. Unfortunately, those have yet to be released, so we didn't want to rely on them, although we did make an effort to maintain public API and feature parity as it stood when the example code was written.

But even in basic scenarios that the MS controls meet, if you use them a lot and don't take the effort to design or at least refactor your code into custom controls, you could gradually end up with something that is very difficult to maintain and brittle (resistant to change). So while not everyone needs to write custom controls with ASP.NET (or ASP.NET AJAX), I caution devs in general about taking the easy way out because it usually causes more pain in the long run.

Now, if you want, you could just grab the Ch5 sample code and use the Xaml control there to quickly and easily embed Xaml into your app--you don't have to write a custom control. Or you can grab the latest ASP.NET 3.5 Extensions futures release (http://www.asp.net/downloads/futures/) and use the MS Xaml and/or Media control (note: they're going to release an update very soon). Using any of these will be just like using regular ASP.NET server controls, so there isn't a lot to learn for folks who are ASP.NET devs--just use those controls and apply the knowledge gained from the rest of the book on how to build Silverlight 1.0 stuff and you're there.

Ch 5 focuses in on the additional knowledge ASP.NET devs need to take Silverlight 1.0 usage to the next (pro) level. If you don't need that, then just use the provided server controls, create a XAML file, and add JS to your page to automate it as needed. If you want to follow general coding best practices, consider doing what's in Ch 5.

But I do take your point. We could have had a small section explaining this before diving into the custom control stuff. But I will share with you that the absolute best way to really learn ASP.NET is to dive into creating custom controls; there is nothing like it to really get a firm grasp of the platform. Similarly, Ch5 gives you that same level of advanced learning that should enable you to handle both the simple and the complex ASP.NET+SL1.0 scenarios with more competence.

Hope this helps.

J. Ambrose Little
Co-Author of Pro ADO.NET 2, ASP.NET 2.0 MVP Hacks, and Silverlight 1.0
UXG Group Lead at Infragistics
Reply With Quote
  #3 (permalink)  
Old December 7th, 2007, 01:24 PM
Authorized User
 
Join Date: Nov 2007
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for explaining your perspective on this, Ambrose. As I think of it now, all of the complicated code goes into building the controls, and then the controls are used by ASP.NET. So that should separate the added complexity from the other web pages, which will keep things maintainable. And it should also allow the program to be more cleanly upgraded when VS 2008 and Silverlight 1.1 become standard releases.

I guess I should also realize that Silverlight 1.1 and future upgrades will be integrated into Visual Studio, and a lightweight version of the CLR will become a plug-in. I would guess that will put the Silverlight controls on equal footing with ASP.NET server-side controls and it will become just a matter of dropping a Silverlight control onto the web page, sort of like how they are evolving AJAX. Therefore it won't increase complexity. The point of this book is for people like me who want to use it with VS2005 right now.

I picked up Microsoft's "Introducing Silverlight 1.0" yesterday in order to get the overlap between the 2 books. It's interesting that their section on ASP.NET is only 13 pages long. They use web services. Did you guys ever do that? I'd guess that their approach can't do what yours does, or else you preferred this control approach to their approach.

Anyway, at this point I need to start coding in order to get some feedback and a better understanding of this stuff. I'm sure some of my comments reflect that! BTW, hope you had good luck deer hunting last week.

Reply With Quote
  #4 (permalink)  
Old December 7th, 2007, 06:46 PM
Wrox Author
 
Join Date: Oct 2007
Location: Princeton, NJ, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Gary,

Absolutely we used Web services. Check out the sample app Lumos; we have both a 1.0 and a 1.1 (now known as 2.0) version w/ the online chapter.

I guess I don't think of Web services as synonymous with ASP.NET. In fact, with WCF, they're really not at all. I tend to think of ASP.NET more as Web forms, controls, and so forth--the GUI aspects, though of course you can validly argue it includes more.

Glad to hear the other book compliments this one. It's a shame when everyone does the same thing; reduces the level of combined knowledge. :D

J. Ambrose Little
Co-Author of Pro ADO.NET 2, ASP.NET 2.0 MVP Hacks, and Silverlight 1.0
UXG Group Lead at Infragistics
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET bug: Error reflecting complex object with Nul peterwood .NET Web Services 0 February 7th, 2008 11:35 AM
.net and c# complex bindgrid page KarmenC SQL Server 2000 1 January 16th, 2005 04:23 AM



All times are GMT -4. The time now is 05:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.