say what you will say and listen to what you will listen to …

Download Say what you will say and listen to what you will listen to …

Post on 14-Jan-2016

35 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Say what you will say and listen to what you will listen to …. About the importance of contracts and metadata…. Clemens Vasters, newtelligence AG clemensv@newtelligence.com. This talk. Thinking about data Thinking about types Thinking about passing typed data Thinking about exchanging data - PowerPoint PPT Presentation

TRANSCRIPT

  • Say what you will say and listen to what you will listen to About the importance of contracts and metadataClemens Vasters, newtelligence AG clemensv@newtelligence.com

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Copyright Notice 2003 newtelligence Aktiengesellschaft newtelligence AG Gilleshtte 99 D-41352 Korschenbroich http://www.newtelligence.com info@newtelligence.com

    The presentation content is provided for your personal information only. Any commercial or non-commercial use of the presentation in full or of any text or graphics requires written permission from newtelligence AG. This presentation is protected by the German Copyright Act, EU copyright regulations and international treaties.

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    This talkThinking about dataThinking about typesThinking about passing typed dataThinking about exchanging dataThinking about behaviors around data

    How is this relevant to todays launch event?

  • Data

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    There FF FE 43 00 6C 00 65 00 6D 00 65 00 6E 00 73 0020 00 56 00 61 00 73 00 74 00 65 00 72 00 73 002C 00 20 00 47 00 69 00 6C 00 6C 00 65 00 73 0068 00 FC 00 74 00 74 00 65 00 20 00 39 00 39 002C 00 20 00 32 00 31 00 33 00 35 00 32 00 20 004B 00 6F 00 72 00 73 00 63 00 68 00 65 00 6E 0062 00 72 00 6F 00 69 00 63 00 68 00 2C 00 20 0047 00 65 00 72 00 6D 00 61 00 6E 00 79 00

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    are many Clemens Vasters, Gilleshtte 99, 41352 Korschenbroich, Germany

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    ways to NAM,Clemens Vasters STR,Gilleshtte 99CIT,Korschenbroich*41352CTY,Germany

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    represent

    Clemens Vasters Gilleshtte 99 Korschenbroich 41352 Germany

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    information and Address address = new Address( Clemens Vasters, Gilleshtte 99, Korschenbroich, 41352, Germany);

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    .none is wrong DataSet ds = GetDataSet(); DataTable dt = ds.Tables[Address];dt.Rows.Add( new object[]{ Clemens Vasters, Gilleshtte 99, Korschenbroich, 41352, Germany});

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    .or rightclemensv@newtelligence.com

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    A Billion ProblemMany ways to represent informationMany ways to turn information into dataMany ways to represent data

    The difficulty is not choice, its agreement.Agreement requires eliminating ambiguity.

    Agreement != Democracy

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Name and Locationvar FirstName;

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Name and typed Locationwchar_t * FirstName;

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Name, Location, Type and Implemented Behaviorstring FirstName;

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Location and DataClemens

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Name, Location and Data Clemens

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Attempting to agree:Name, Location, Type and Data Clemens

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Elements of Agreement (Step 1)Name: Common understanding of names for data elements and their interpretationLocation: Common understanding of (relative) location of data inside a contextType: Common understanding of persistent or transient representation of data elements

    Data: Representation of information under agreement on name, location and type.

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    How about implementation?Sorry, we can't reach agreement on that ...Implementation realizes requirements in the scope of a (sub-)system contextHow do you agree on implementation across applications, frameworks and languages; organizations and software suppliers?Impl. agreement contradicts modularitySame behavior of data for all tiers and layers?Same behavior of data for all modules?Same behavior of data for all applications?

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Where does that lead us?We can agree on data, types and location.We can't agree on implementation.

    Data can be exchangedImplementation cannot

    Conclusion: Trying to agree on data and implemen-tation (aka. "objects") might be a problem.

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    How good are your types?string FirstName = "Q?C&89/&%$$";

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    How good are your types?string FirstName = null;

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    How good are your types?string FirstName ="This is a very long string which will likely not fit into your database, because the database field for this element does only allow 40 characters to be stored and this is easily longer";

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Agreeing on types is hard (1/2)Data types describe storage and behavioral rules.Agreeable storage requirements:Strings: Bounded sequences of characters, Integers: Bounded, integral numbers, Floats: Bounded, floating point numbersAgreement on storage rules is still scoped: CLR, XML, JVM, SPARC, IA64, IA32

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Agreeing on types is hard (2/2)Can't agree on implemented behavior, but on rules for behavior1 + 1 = 2"1"+"1"="11"2003-02-29 bad, 2004-02-29 goodFirstName: minLength=1, maxLength=40, pattern="\p{L}+"Particular record may only appear once in a sequence (uniqueness)

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Common groundXML 1.0 provides storage rulesXML Schema provides extensible type setXML Schema provides ability to restrict

    XML Schema is a way to express (and impose) agreement on data!

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Restricting

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    Composing

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    VersioningThere's versioning built into XML Schema It's so useful that you shouldn't use it. How can users tell looking at instances?Proper use is:Import into new namespace and extension/restrictionReplacement with new schema with different namespaceDesign to extend using

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    DOM, DataSets and SerializationXmlDocument: Hierarchical prog. modelDataSet: Relational prog. modelSerialization: OO prog. Model

    All those map from and to the InfoSetType system for InfoSet is SchemaAllows validation of data for correctnessAllow generation of code enforcing rules

    2003 newtelligence Aktiengesellschaft, Microsoft Corporation No unauthorized reproduction or distribution permitted. All rights reserved

    XSD.EXEGenerates classes from SchemaTurns complexType into classes Translates enumeration restrictions into enumsDoesn't enforce other restriction facetsGenerates DataSets from SchemaTurns complexType into tablesTur