Ask the Experts: Atlas Talk with Shanku Niyogi

I decided to head up to the Ask the Experts to give my feedback to the Atlas team. Having all this nested markup for behaviors or bindings seems a little ridiculous. Shanku Niyogi (from the Atlas, Part 1 talk) pointed out it's easier for the parser to see elements, that this approach allows for multiple bindings/behaviors, and that in the future Atlas may adopt a XAML-like approach with dot elements (eg. <atlas:textbox.binding>).

We also talked about the need for strong security on the web service proxies that are autogenerated (on the part of both the developer and the atlas framework) so that we don't see some injection of malicious code into the XmlHttpRequest pipeline. I initially felt that obfuscating the client side atlas javascript would be helpful... but he may be right that the security the endpoints are more important.

Tags: []

ObjectDatasource Deep Dive @ 515AB

ObjectDataSource Events:

  • Creating, Created (can assign to ObjectInstance)
  • Selecting Filtering Updating, Deleting, Inserting (can validate and manipulate parameters)
  • Selected Updated Inserting, Deleted
  • Disposing

ObjectDatasource combines the DataAdapter, DataSet, and SqlCommands into one object(?). It supports automatic sorting, paging (in UI only) and custom sorting/paging (which is implemented in a middle-tier object which provides better performance).

Binding to Middle Tier Objects: Declaratively associate parameters (even custom parameters) to business objects methods. You can filter by QueryString or bound controls. Master-Detail binding works the same way.

New ObjectDataSource control supports multiple SQL parameters, unlike existing DataGrid control (huh?). Unfortunately, GridView just like a the DataGrid still does not support multi-row edit capabilities. We continue to have to build this in ourselves.

Demo uses multiple ObjectDataSources that separately support custom paging or custom sorting. I wonder if these HAVE to be SEPARATE controls?

Excuse me if these notes are my worst. I think I'm crashing off the DayQuil. My nose has certainly been running like crazy (hence why I started hiding in the back of the sessions).

Tags: []

XML Tools @ 409B

Tools Built on top of XML:

  • DataSet Designer
  • Managed Resource Editor
  • InfoPath
  • WPF
  • VSTS

No Code (Schema's and Snippets): XML is continuously reparsed in VSTS, and if the Schemas property is set (several are included out of the box)... it will have intellisense to know what elements are allowed. In addition to intellisense, when a schema is set the IDE can tell you via blue squiglies when you have invalid elements. Snippet expansions in VSTS can also dynamically build the right XML from the schema (Wootness!) for all REQUIRED elements - not optional ones. "Go To Definition" will take you into the schema for the selected element/attribute. She also shows us a Snippet Manager where she adds her custom snippet. Then ESC-TAB will expand the angle bracket shortcut name that you've typed.

Designers: There is an designer for Scalable Vector Graphics (SVG, is based on XML). So if you change anything in the designer is updated in the XML. You could also create your designer with the XML Text Buffer (implement IVsTextLines) which comes with the Visual Studio SDK. So anytime the graphical editor makes a change and event kicks off the event to update the source.

Goal: Integrate Core XML tools seemlessly into the picture, and provide hooks and support for custom designers.

Tags: []

Future Web Tools @ Petree Hall

They start by introducing the Quartz Web Designer. This designer looks to me as if it's FrontPage v.Next. Sure it's got a tag navigator (much like VS) and uses CSS-Positioning (basically a fully functional GridLayout) but what's nice is the Style Window allows you to modify existing object styles or create style classes (awesome!). Apparently this designer in Quartz is really just the Orcas designer (the next version of VS.NET - not 2005, the next version).

They move on to Visual Web Developer which can open up the design page from Quartz, set a few content regions and save it all as a Masterpage.theme.

I just wish that they had time to put these capabilities into VS2005. As it stands, Quartz will be released in 2006... which sounds an awful lot like the Longhorn timeframe... which is when I thought Orcas (VS.Next; .NET 2.1?) was going to be released.

Tags: []

IDE Tips and Tricks @ 502

Class View

  • CTL-W-C: Switches to Class View (all tabs have a CTL-W prefixed shortcut)
  • If you drag a base class from Project References Node in the Class View you can visualize the Framework. This is a good way to just explore.
  • New Search pane in Class View
  • F12 takes you to the definition of the selected class (either from the Class View or actually in code)

Navigation

  • CTL-M: Collapse regions, CTL-O: UnCollapse (open) all regions
  • CTL-M,CTL-M will expand or collapse the selected region
  • CTL-SHIFT-Minus, CTL-SHIFT-Plus goes to the beginning or end of a current bracketed area (CTL-& also does this)
  • SHIFT-F12: Find all references (F8 then moves you through the reference list brought up)

Modifying Code (in VSTS)

  • Right click a tab: close everything but this
  • How do you know when you should refactor? Right click project, select properties. On the Code Analysis Tab you will se Naming and maintainability. Then select Build|Run Code Analysis. The resultant list should give you some hints.
  • F2 in solution view to rename, and VS will notify you that that is different than the internal class name. It will automatically refactor that class name for you.
  • CTL-R,CTL-M: extract method from selected code.

Writing Code

  • Code Snippets. Once you write out the word and press tab the code is inserted.
  • New "dim" snippet helps you with declarations so you only have to type the type once (just like VB).
  • Snippet files follow a simple XML format
  • CTL-K,CTL-S for insertion expansion that surrounds selected code
  • CTL-. opens up the smart-tag menu that will allow you to create a method stub for methods that you call but haven't written yet.
  • Intellisense completion can be configured to ignored when you hit space.

Tags: []

Atlas, Part 2 @ Petree Hall

The great Nikhil Kothari leads the faithful in how to build (or extend existing) components and controls. Demo shows an app that grabs photos... and through transitions shows them - all without a postback. Not really that impressive. Basic CSS stuff happening here. The key is the fact that all images are grabbed over XmlHttpRequest via the Atlas Framework.

Another brief mention of JSON. This was also mentioned in the KeyNote, but I'm still confused as to "what" JSON is... Is it the client framework that gives JS the WebRequest, WebResponse, etc.?

Atlas Control classes (TextBox, ListView) derive from Web.UI.Control. Controls can manipulate the DOM to handle events and participate in validation (Atlas client-side validation).

Goal of Atlas Server controls: enhance server controls to generate "Atlas"-enabled pages while preserving server programming model. They are built on ASP.NET 2.0 (IScriptComponent, ScriptManager, RenderScript, and server-side representations of bindings, actions, behaviors). Atlas controls maintain support for postback scenarios.

Nikhil blitzkreig'd through the upcoming Atlas features (the slide was up maybe less than 3 seconds)... so no idea where they are going. They could already have my note below on-tap. I may attend the ask the experts tonight to find out.

His last demo talks about the DOM inspector, script debugger and http-logger that he will make available on his blog. He intends to incorporate this and richer script authoring components into Atlas in the future.

Summary: [NOTE TO SCOBLE, listen up buddy - and tell the right folks.] After going through both part 1 and 2 of the introduction to Atlas, I have to say that <atlas:controls&rt; are WAY too verbose today with their crazy xml angle-bracket bindings (bindings->binding; or even worse in the js: button->click->invokeMethod). It should be a property of the control, binding="datasource.field". Or like with behaviors it should be behavior="behaviorType" vs. angle-bracketed multiple sub-nested behaviors->add->behavior. Let's hope that this will be improved before it's official release as an add-on to VS2005/.NET 2.0 next year.

Tags: []

Adv Data Access Patterns @ 152/153

VS2005 (ADO.NET 2.0) introduces BCP (Bulk Copy). Using streaming they have improved performance significantly for bulk uploads.

DataSet has been greatly enhanced (better scalability, incremental index updates, low overhead) in ADO.NET 2.0.

SqlDependency for Caching: Allows you to track queries and fire an event when the results change; tracks whole result sets; change notifications help in caching; no need for cache expiration policies.

SqlDependency + DataSet: middle-tier cache (cache data in DataSet, track queries and change notifications). Demo shows (with an XSD declared DataSet) that you can subscribe to changes... so your cache can be updated. Sweet.

Controlling Granularity: Becuase it takes too long to kill large datasets (before an update when SqlDependency is fired), you want to assign the SqlDependency on more granular queries(/). Demo show's this coded. Now we can just update the when the data changes from the subset queries.

DataSet enhancements enable huge caches, so we can Query Over DataSet. Basically the demo shows that the DataSet can be indexed... thus speeding up large resultsets.

Tags: []

My Schedule for Thursday 9/15

For those that have expressed a desire to get together (and for all women - this is an open invitation to hang out), my schedule will be as follows:

TimeSessionLocation
10:00-11:15Adv Data Access Patterns152/153
11:30-12:45Atlas, Part 2Petree Hall
1:00-1:30C# IDE (2005) Tips and Tricks152/153
1:30-2:15LunchRight side meal line (near CommNet, not Labs/.NET Show)
2:15-3:30Future Directions of Web Dev ToolsPetree hall
3:45-5:00Adv XML Tools and Solutions409AB
5:15-6:30ObjectDataSource Deep Dive515AB

I'm wearing white sneakers, large red microsoft long-sleeve sweatshirt, blue jeans. I have blonde hair and blue eyes. I occasionally pull out my PowerBook (to make these posts) from a black rolling computer case. I may even look like I'm tripping on DayQuil.

Tags: []

Atlas, Part 1 @ Petree Hall

Client Framework

  • Atlas Client Script Library (Controls, script core, base classes)
  • Atlas Client Application Services (local store, browser integration)

Server Framework

  • Atlas Server Extensions (server controls, app services bridge, web services bridge)
  • ASP.NET 2.0 (page framework, server controls, application services)

Client Script Library

  • Atlas script Core- full type system for JavaScript (classes, interfaces, inheritance, virtual/abstract methods, enumerations, multi-cast event handlers)
  • Base class library - stringbuilder, seiralizers, debugging/tracing, networking

Atlas Networking

  • client networking stack layered on XmlHttp (WebRequest, WebResponse, MethodRequest classes)
  • Atlas Web Services Bridge (access to ASP.NET hosted/serviced components, auto client proxy generation [<script scr="MyService.asmx/js" />])
  • Wire format: javascript object notation

Atlas Behaviors

  • Behaviors (add interactivity to UI), easily attached to a DHTML element.
  • Built-in behaviors (drag & drop, tooltips, floating windows, animation)
  • Works on all browsers
  • Builtin ASP.NET Profile support to save Atlas form states for future user page hits.

Atlas Roadmap

  • Community site: atlas.asp.net
  • prototype release available now
  • updates, sampels, docs on a regular basis
  • go live beta release sometime in 2006
  • Atlas-based Wiki on the way... to show the power of Atlas. This will also be available as a starter kit.

Preparing for Atlas

  • Structure your application for reuse (separate UI functionality into web services, build UI components with user controls, use CSS to style web apps)
  • Use ASP.NET 2.0 (client callbacks with ICallbackEventHandler, UI personalization, application building-block services)
  • start thinking about richer web UI experiences

Works with IE and FireFox TODAY.

Tags: []

«September»
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678