what’s new in visual studio 2005. .net framework 2.0 themes windows forms 2.0 asp.net 2.0.net...
TRANSCRIPT
What’s NewWhat’s New in Visual Studio 2005 in Visual Studio 2005
.NET Framework 2.0 Themes.NET Framework 2.0 Themes
Windows Forms 2.0Windows Forms 2.0Windows Forms 2.0Windows Forms 2.0 ASP.NET 2.0ASP.NET 2.0ASP.NET 2.0ASP.NET 2.0 .NET Compact .NET Compact Framework 2.0Framework 2.0.NET Compact .NET Compact Framework 2.0Framework 2.0
Set the bar in developer productivity
Focus on operational excellence
Enable new opportunities
Provide a path to the future
Common Language Runtime 2.0Common Language Runtime 2.0Common Language Runtime 2.0Common Language Runtime 2.0
Developer Productivity Generics Edit and Continue
Performance 64-bit Load Time Memory Footprint
CLR 2.0CLR 2.0
ASP.NET 2.0ASP.NET 2.0
Developer Productivity Dramatically reduce concepts, lines of code required Deliver an awesome Visual Studio web tool
experience Enable rich web scenarios not possible today
Totally Extensible Platform Replace/extend all built-in features + services Customize for any enterprise environment
Administration and Management Easiest platform to manage and administer
Performance and Scalability The world’s fastest web application server
Radically Improve Application Deployment ClickOnce deployment, update, rollback
Foundation for Longhorn deployment
Visually Stunning Look and Feel Toolstrips, transparency
Windows XP Themes
Cut the Code: Productivity Smart Tags
Document Outline view
SnapLines
Windows Forms 2.0Windows Forms 2.0
Productivity Integrated native and managed
development environment Increased developer productivity and
code portability Enhanced language support
Performance Code path tuning Execution engine tuning
Extensibility COM interop Enhanced marshalling
The PocketPC Notification Balloon
Mobility and NET Compact FrameworkMobility and NET Compact Framework
Expanding Visual StudioExpanding Visual Studio
IncreasedIncreasedReliabilityReliability
QualityQualityEarly & OftenEarly & Often
PredictabilityPredictability& Visibility& Visibility
Design forDesign forOperationsOperations
ProjectProjectManagerManager
SolutionSolutionArchitectArchitect
DeveloperDeveloperTesterTester
InfrastructureInfrastructureArchitectArchitect
Dynamic Systems InitiativeDynamic Systems Initiative
Integrated Suite of Tools by Microsoft & Partners Highly Extensible
Drag & Drop Design Surfaces Design Service-Oriented Architectures Design Operations Infrastructure Design Classes
Synchronize with Source Code
Validate / Test / Load-Test Applications Document Project Status through WSS
DSI: Development CycleDSI: Development Cycle
Distributed ApplicationDesigner
Logical Infrastructure Designer
Class Designer
InfrastructureManager
ArchitectDeveloper
Test Tools
Tester
Source Code Source Code ControlControl
Work Item Work Item TrackingTracking
Build Build AutomationAutomation
Project Project SiteSite
ReportingReporting
Visual Studio Team SystemVisual Studio Team System
Change Management
Work Item Tracking
Reporting
Project Site
Visual Studio
Team Foundation
Integration Services
Project Management
Pro
cess
an
d A
rch
itect
ure
G
uid
an
ce
Dynamic Code Analyzer
Visual Studio
Team Architect
Static Code Analyzer
Code Profiler
Unit Testing
Code Coverage
Visio and UML Modeling
Team Foundation Client
VS Pro
Class Modeling
Load Testing
Manual Testing
Test Case Management
Application Modeling
Logical Infra. Modeling
Deployment Modeling
Visual Studio
Team DeveloperVisual Studio
Team Test
Vis
ual S
tud
io In
du
stry
Part
ners
What’s New in System.Data: What’s New in System.Data: DataSet EnhancementsDataSet Enhancements
DataSet EnhancementsDataSet Enhancements
Performance and scalability improvements
Loading a DataSet, and the new LoadOption enumeration
Stand-alone DataTable instances Batched updates XML data type - usability and fidelity User-defined Types in a DataSet
Performance ImprovementsPerformance Improvements Internal Indexing of Rows
Inserts and deletes are log-n Updates almost constant
Binary Serialization of Contents V 1.x DataSet always serialized to XML
good for data interchange, bad for performance
Binary serialization an option in V 2.0 fast and compact, especially as row counts increase just set: DataSet.RemotingFormat =
SerializationFormat.Binary
Binary v XML SerializationBinary v XML Serialization
100 1000 10000 100000
Row s in DataSet
En
d-t
o-E
nd
Tim
e (l
ow
er is
bet
ter)
Xm l
Binary
Up to 80 x faster for large DataSets!Up to 80 x faster for large DataSets!
Loading a DataSetLoading a DataSet
DataAdapter.Fill(DataSet,"table-name") NEW: DataAdapter.FillLoadOption and
AcceptChangesDuringUpdate properties NEW: DataSet.Load method
Load(DataReader [, load-option] [, tables-array]) optionally can use FillErrorEventHandler to trap
errors
NEW: LoadOption enumeration PreserveCurrentValues | UpdateCurrentValues
| OverwriteRow
More New FeaturesMore New Features RowState values are now updateable
New methods: DataRow.SetAdded and
DataRow.SetModified
DataSet.GetDataReader method
returns a DataTableReader
you can specify which tables to include
Loading a DataSet with a DataReader, Loading a DataSet with a DataReader, Binary Serialization, Binary Serialization,
and using a DataTableReader.and using a DataTableReader.
Stand-alone DataTable InstancesStand-alone DataTable Instances Common DataSet operations now also
available on DataTable: ReadXml, ReadXmlSchema, WriteXml,
WriteXmlSchema, Clear, Clone, Copy, Merge, GetChanges
DataTable is now auto-serializable: return a DataTable instance from a Web
Service or via Remoting
DataAdapter.Fill(DataTable) DataAdapter.Fill(DataTable[ ])
and more, including subsets of rows DataAdapter.Update(DataTable) DataTable.Load(DataReader [, load-option]
[, FillErrorEventHandler]) new methods: BeginLoadData, Load,
EndLoadData DataTable.GetDataReader method
stream data from a DataTable
Loading and Using a DataTableLoading and Using a DataTable
1000 10000 100000 200000
Loaded Row s
Tim
e v1.x
v2.0
DataSet Load PerformanceDataSet Load Performance
3 times as fast for 100,000 rows - and even better with more!3 times as fast for 100,000 rows - and even better with more!
Using LoadDataRow APIUsing LoadDataRow API
Batched UpdatesBatched Updates DataSet updates are normally processed
one by one Batching reduces network round-trips DataAdapter.UpdateBatchSize =
batch_size Works inside transactions Works with SQL Server 7.0, 2000, 2005 Also available for OracleClient classes
The stand-alone DataTable and The stand-alone DataTable and the new Batched Updates featurethe new Batched Updates feature
New Features in System.Xml 2.0 New Features in System.Xml 2.0 and SQLXML 4.0 for SQL Server and SQLXML 4.0 for SQL Server 20052005
AgendaAgenda
Design Goals for System.Xml v2.0
XML in the Middle Tier
Reading, Writing and Validating XML
Enhancements to the XPathDocument
System.Xml v2.0 Design Goals System.Xml v2.0 Design Goals Improved Performance
Enhanced Security
Addition of Schema Support and Typing
A Range of Usability Enhancements
A More Efficient XSLT Processor
Changes to the XmlSerialization Classes
Improved XML PerformanceImproved XML Performance
• XSLT 400% faster (4x) – generates MSIL codeXSLT 400% faster (4x) – generates MSIL code• XmlTextReader 100% faster (2x)XmlTextReader 100% faster (2x)• XmlTextWriter 100% faster (2x) XmlTextWriter 100% faster (2x) • XML schema validation 20% fasterXML schema validation 20% faster
XML in the Middle TierXML in the Middle Tier
Increasingly, XML is used in the middle tier of applications can be easily serialized works well over all kinds of networks provides de-coupling between tiers can be cached in a DataSet or as an XML
document ideal for integration with Web Services now has full support in SQL Server 2005
XML in XML in nn-tier Applications-tier Applications
Data Tier
XMLDocument
XMLDocument
WebService
WebService
Middle Tier
DataSet
XPathDocument
BusinessRules
Presentationor Delivery
WebService
WebService
Client
AgendaAgenda
Design Goals for System.Xml v2.0
XML in the Middle Tier
Reading, Writing and Validating XML
Enhancements to the XPathDocument
Reading, Writing and ValidationReading, Writing and Validation
Topics are: Static Create Methods
XmlReaderSettings and XmlWriterSettings
Reading and Writing Typed XML
XmlSchemaSet and Schema Inference
Validation with an XmlReader
Resolving Entities
Static Create and SettingsStatic Create and Settings Why ?
Provides a single location to create XmlReaders and XmlWriters avoids the proliferation of specifically typed
readers/writers
Provides some internal optimizations
Allows pipelining of XmlReader instances
Static Create and SettingsStatic Create and Settings Create an XmlReader or XmlWriter with
predefined settings:XmlReaderSettings settings
= new XmlReaderSettings();
settings.Schemas.Add("books.xsd");
settings.XsdValidate = true;
XmlReader reader =
XmlReader.Create("books.xml",
settings);
while(reader.Read()) { }
Reading & Writing Typed XMLReading & Writing Typed XML For XmlReader, XmlWriter, XPathNavigator:
new methods that return CLR types, e.g.:Double p = reader.ReadValueAsDouble();
For XmlWriter: new method that accepts CLR types, e.g.:
DateTime date = new DateTime(2004,5,24);
writer.WriteStartAttribute("pubdate");
writer.WriteValue(d);
writer.WriteEndAttribute();
XmlSchemaSet and InferenceXmlSchemaSet and Inference New XmlSchemaSet class
stores schemas and correctly handles multiple references to inherited schemas
replaces XmlSchemaCollection System.Xml.Schema.Inference class
Can infer schema from an XML documentXmlSchemaSet xs = InferSchema(XmlReader[,
XmlSchemaSet
InferenceOption enumeration defines how data types and schema occurrences found in the document are interpreted values are: Relaxed or Restricted
Validation with an XmlReaderValidation with an XmlReader XmlReader can be used for validation
XmlValidatingReader is now obsolete create XmlReader that validates using static
Create technique specify schema(s) in the XmlReaderSettings:
settings.Schemas.Add("books.xsd");
Turn on validation:settings.XsdValidate = true;
Then use the reader
Resolving EntitiesResolving Entities XmlReader created with static Create
method can expand entities set the EntityHandling property:
ExpandCharEntities (the default): expands only character entities
ExpandEntities: expands all entities for example, <elem>A #</elem>
ExpandCharEntities gives: <elem>A #</elem>
ExpandEntities gives: <elem>A 123</elem>
Reading XML with static Create methods, Reading XML with static Create methods, reader settings, validation, reader settings, validation,
schema inference and resolving CLR typesschema inference and resolving CLR types
AgendaAgenda
Design Goals for System.Xml v2.0
XML in the Middle Tier
Reading, Writing and Validating XML
Enhancements to the XPathDocument
XML Document StoresXML Document Stores New Features of the XPathDocument
support for document editing with an XmlWriter and XPathEditableNavigator
full CLR data type support
new change tracking and edit events
new support for validation
richer support for XSLT
new serialization features
Will be in XmlDocument for Beta 2
Editing in an XPathDocumentEditing in an XPathDocument Editing contents of an XPathDocument:
CreateWriter( ) XmlWriter CreateEditor( ) XPathEditableNavigator
New CLR Type Support properties for the navigator classes:
ValueAsDouble ValueAsDateTime ValueAsList etc. methods for writer and editable navigator:
WriteValue(typedValue), SetValue(typedValue)
New Select methods for XPathNavigator SelectSingleNode("XPath" [, nsResolver ]) Select("XPath", nsResolver) Evaluate("XPath", nsResolver)
Change TrackingChange Tracking Turn on change tracking:
set EnableChangeTracking = true See if there are any changes:
call the HasChanges( ) method Manage change tracking state:
AcceptChanges( ) and RejectChanges( ) methods
React to Change Events: ItemDeleting, ItemDeleted, ItemUpdating,
ItemUpdated, ItemInserting, ItemInserted, ChangeRejected.
Validation and XSLT SupportValidation and XSLT Support Validate XPathDocument with Navigator
Schemas property XmlSchemaSet CheckValidity(schema-set, event-handler) raises validation event for each error found
"Validate directly" coming in Beta 2 no need for an XPathNavigator
Use XPathNavigator as the source for XSLT transformations using XsltCommand class
Serializing an XPathDocumentSerializing an XPathDocument Load and save XML with an
XPathDocument ReadXml, WriteXml, Save
... or through an XPathNavigator or an XPathEditableNavigator ReadSubtree( ), WriteSubtree(XmlWriter)
Specify the Encoding for an XPathDocument or XmlWriterSettings Encoding property System.Text.Encoding
instance
The IXmlSerializable Interface The IXmlSerializable Interface Originally "internal" and designed for use
by the ADO.NET DataSet
Now available for custom serialization ReadXml takes an XmlReader
WriteXml takes an XmlWriter
GetSchema is deprecated
Allows you to take full control of the wire format and schema of the data
Loading an XPathDocument, Loading an XPathDocument, validating the content, validating the content,
editing the content and saving the resultediting the content and saving the result
XML in Visual Studio 2005XML in Visual Studio 2005
Great new support for XML in VS 2005 New XML Editor
supports XML 1.0 conformance checking
allows the XML to be validated against a schema as it is being edited
Intellisense and element completion
XSLT debugging Single-step, run, view input/output
uses the new Inference engine to give more accurate schema representations
© 2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.