Whidbey PDC Questions (Answered)
Kevin Dente asked a few good Whidbey related questions (http://weblogs.asp.net/kdente/archive/2003/10/24/33370.aspx). Some answers inline below::
Although I sadly won't be attending the PDC, I do have a few specific questions about Whidbey - mostly around limitations or annoyances that I've encountered in the current framework, and whether they'll be fixed in 2.0. If any good-hearted soul runs across the answers to these questions and has time to post them, I would be most appreciative. Hopefully that answer to these questions isn't “you can already do that, dufus“. On the other hand, maybe that would be a good answer after all (except for the dufus part).
So here are the questions:
ASP.NET Server Controls:
- Is there better support for using style sheets in server controls? E.g. an easy way to register a stylesheet link, design-time support, support for stylesheets embedded in an assembly, etc.
ScottGu >> Yep. You can now programmatically register style-sheet links inside your server control (as well as control everything in the head tag on the page). You can also store your stylesheets as a resource embedded within an assembly -- ASP.NET now has built-in support for extracting these resources at both runtime and design-time.
- Is it possible to build more self-contained server controls? I dislike the whole “copy this directory of icons to your web server“ model that seems to be the standard. I'd like my entire control, with all of it's dependent elements, stored in one DLL.
Scottgu >> Yep. You can now store images as well as resourcs embedded in your assembly. We have a “WebResources.axd“ handler and control framework APIs that then allow you to make callbacks for these resources on a page. These APIs also work at design-time -- letting you display images within your control on a design surface like VS.
- Out-of-the-box support for linking to resources embedded in assemblies might be one solution to this problem. Any support for that in Whidbey?
ScottGu >> Yep. See Above -- this is exactly what we do.
- Using a custom http handler, you can write a control that generates dynamic images. However, as far as I know there's no good way to provide design-time support for this. Any improvements in that area? Scott Guthrie described a DynamicImage control in his blog posting - that sounds promising.
ScottGu >> Yep. We now have support for generating dynamic images both through http handlers (we now have an image generation base class that you can use -- and a custom file extension “.asix“ pre-registered for image generation). We also have a asp:DynamicImage server control that uses this service to enable you to create images within a page more easily (and not have to write an http handler).
- Any support for visual composition of server controls?
ScottGu >> Not entirely sure what you mean by this one -- although we will have much better support for User Controls. You'll get full WYSIWYG editing support in Visual Studio (unlike today). We'll also provide full tag intellisense, code intellisense and probably property grid editing for controls. Lastly, we've also added support for templates in user controls which makes them even more powerful.
ASMX Web Services
- Any improvements to the COM interop threading model for web services? Although ASP.NET web pages can be flagged as ASPCOMPAT to ensure apartment threading, ASMX web services don't currently support this attribute. Since large chunks of legacy code out there are written as VB6 COM objects, this limitation greatly hinders the application of the Web Service Facade pattern that Microsoft discusses here. Microsoft's recommended workaround of running the COM object as a COM+ library application is problematic - many COM objects don't play nice under COM+.
ScottGu >> I just pinged someone about this one. I don't think it was planned, but we'll try and get it on the schedule. Definitely agree we should do it.
- Any support in WSDL.EXE for generating properties rather than fields in web service proxies? Or, conversely, any support for databinding to fields in addition to properties?
This one drives me bonkers - it's a major impedance mismatch between these two parts of the framework. It annoyed me enough that I actually wrote a drop-in replacement for the MSDisco code generator (which I've been meaning to get around to posting) that generates properties. But I'm hoping Whidbey supports this out of the box.
ScottGu >> Yep, we'll generate properties by default now for .WSDL proxy generators. Not sure we do this yet in the Alpha -- but I know it is definitely planned by Beta.
OK, that's all I can think of for the moment. I'm sure I'll think of more immediately after I hit the “post“ button.