ASP.NET/vNext + ng2

Andrei Tserakhau

PART 1: Look from back-side

LONG TIME AGO

ASP.NET

.net BCL

IIS

ASP.NET WEB FORMS

HTTP Modules

HTTP Handlers

Request pipeline

HTTP Context

Caching

Session state

18 year later

ASP.NET

.net BCL

IIS

ASP.NET 
WEB FORMS

HTTP Modules

HTTP Handlers

Request pipeline

HTTP Context

Caching

Session state

ASP.NET MVC

ASP.NET WEB API

WHY?

  • Fragmental
  • IIS centric
  • Windows specific
  • None cross plat
  • asp.net REALLY hate developers

This is not good enough

FUTURE

ASP.NET

.net BCL

IIS

ASP.NET 
WEB FORMS

HTTP Modules

HTTP Handlers

Request pipeline

HTTP Context

Caching

Session state

ASP.NET MVC

ASP.NET WEB API

SUMMARY

  • No dependency on System.Web
  • Cross platform
  • Open source (COMPLETELY)
  • Cloud Cloud Cloud Cloud and azure
  • OWIN
  • New run time (COMPLETELY)

DNX RUNTIME

OLD

NEW

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <Import Project="..\..\tools\EntityFramework.props" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{71415CEC-8111-4C73-8751-512D22F10602}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>Microsoft.Data.Entity</RootNamespace>
    <AssemblyName>EntityFramework.Core</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <NoWarn>1591</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>TRACE;DEBUG;CSPROJ</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <DocumentationFile>bin\Debug\EntityFramework.Core.XML</DocumentationFile>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE;CSPROJ</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <DocumentationFile>bin\Release\EntityFramework.Core.XML</DocumentationFile>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="..\..\tools\Resources.cs">
      <Link>Properties\Resources.cs</Link>
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.tt</DependentUpon>
    </Compile>
    <Compile Include="..\Shared\AsyncEnumerableExtensions.cs">
      <Link>Extensions\Internal\AsyncEnumerableExtensions.cs</Link>
    </Compile>
    <Compile Include="..\Shared\Check.cs">
      <Link>Utilities\Check.cs</Link>
    </Compile>
    <Compile Include="..\Shared\LoggingExtensions.cs">
      <Link>Extensions\Internal\LoggingExtensions.cs</Link>
    </Compile>
    <Compile Include="ChangeTracking\ChangeTrackerFactory.cs" />
    <Compile Include="ChangeTracking\IChangeTrackerFactory.cs" />
    <Compile Include="ChangeTracking\Internal\SimpleNullSentinelEntityKeyFactory.cs" />
    <Compile Include="DbUpdateConcurrencyException.cs" />
    <Compile Include="DbUpdateException.cs" />
    <Compile Include="Extensions\Internal\ExpressionExtensions.cs" />
    <Compile Include="Extensions\Internal\ListExtensions.cs" />
    <Compile Include="Extensions\Internal\PropertyInfoExtensions.cs" />
    <Compile Include="Infrastructure\AccessorExtensions.cs" />
    <Compile Include="Internal\DatabaseProviderSelector.cs" />
    <Compile Include="Internal\EnumerableExtensions.cs" />
    <Compile Include="Internal\Graph.cs" />
    <Compile Include="Internal\IDatabaseProviderSelector.cs" />
    <Compile Include="Internal\IndentedStringBuilder.cs" />
    <Compile Include="Internal\LazyRef.cs" />
    <Compile Include="Internal\ModelForeignKeyUndirectedGraphAdapter.cs" />
    <Compile Include="Internal\ModelNavigationsGraphAdapter.cs" />
    <Compile Include="Internal\Multigraph.cs" />
    <Compile Include="Internal\PropertyListComparer.cs" />
    <Compile Include="Internal\ReferenceEnumerableEqualityComparer.cs" />
    <Compile Include="Internal\ReferenceEqualityComparer.cs" />
    <Compile Include="Internal\ThreadSafeDictionaryCache.cs" />
    <Compile Include="Internal\ThreadSafeLazyRef.cs" />
    <Compile Include="Internal\TypeExtensions.cs" />
    <Compile Include="Metadata\Builders\CollectionNavigationBuilder.cs" />
    <Compile Include="Metadata\Builders\CollectionNavigationBuilder`.cs" />
    <Compile Include="Metadata\Builders\EntityTypeBuilder.cs" />
    <Compile Include="Metadata\Builders\EntityTypeBuilder`.cs" />
    <Compile Include="Metadata\Builders\IndexBuilder.cs" />
    <Compile Include="Metadata\Builders\KeyBuilder.cs" />
    <Compile Include="Metadata\Builders\PropertyBuilder`.cs" />
    <Compile Include="Metadata\Builders\ReferenceCollectionBuilder.cs" />
    <Compile Include="Metadata\Builders\ReferenceCollectionBuilder`.cs" />
    <Compile Include="Metadata\Builders\ReferenceReferenceBuilder.cs" />
    <Compile Include="Metadata\Builders\PropertyBuilder.cs" />
    <Compile Include="Metadata\Builders\ReferenceNavigationBuilder.cs" />
    <Compile Include="Metadata\Builders\ReferenceNavigationBuilder`.cs" />
    <Compile Include="ChangeTracking\Internal\ArraySidecar.cs" />
    <Compile Include="ChangeTracking\Internal\ChangeDetector.cs" />
    <Compile Include="ChangeTracking\Internal\IChangeDetector.cs" />
    <Compile Include="ChangeTracking\Internal\IEntityEntryGraphIterator.cs" />
    <Compile Include="ChangeTracking\Internal\IEntityEntryMetadataServices.cs" />
    <Compile Include="ChangeTracking\Internal\IEntityKeyFactorySource.cs" />
    <Compile Include="ChangeTracking\Internal\IInternalEntityEntryFactory.cs" />
    <Compile Include="ChangeTracking\Internal\IInternalEntityEntryNotifier.cs" />
    <Compile Include="ChangeTracking\Internal\IInternalEntityEntrySubscriber.cs" />
    <Compile Include="ChangeTracking\Internal\IKeyPropagator.cs" />
    <Compile Include="ChangeTracking\Internal\INavigationFixer.cs" />
    <Compile Include="ChangeTracking\Internal\IOriginalValuesFactory.cs" />
    <Compile Include="ChangeTracking\Internal\IRelationshipsSnapshotFactory.cs" />
    <Compile Include="ChangeTracking\Internal\IStateManager.cs" />
    <Compile Include="ChangeTracking\Internal\IStoreGeneratedValuesFactory.cs" />
    <Compile Include="ChangeTracking\Internal\IValueGenerationManager.cs" />
    <Compile Include="ChangeTracking\Internal\KeyPropagator.cs" />
    <Compile Include="ChangeTracking\Internal\IKeyListener.cs" />
    <Compile Include="ChangeTracking\Internal\INavigationListener.cs" />
    <Compile Include="ChangeTracking\Internal\InternalClrEntityEntry.cs" />
    <Compile Include="ChangeTracking\Internal\CompositeEntityKey.cs" />
    <Compile Include="ChangeTracking\Internal\CompositeEntityKeyFactory.cs" />
    <Compile Include="ChangeTracking\Internal\DictionarySidecar.cs" />
    <Compile Include="ChangeTracking\Internal\EntityEntryGraphIterator.cs" />
    <Compile Include="ChangeTracking\Internal\EntityKey.cs" />
    <Compile Include="ChangeTracking\Internal\EntityKeyFactory.cs" />
    <Compile Include="ChangeTracking\Internal\EntityKeyFactorySource.cs" />
    <Compile Include="ChangeTracking\Internal\IEntityStateListener.cs" />
    <Compile Include="ChangeTracking\Internal\IPropertyAccessor.cs" />
    <Compile Include="ChangeTracking\Internal\IPropertyListener.cs" />
    <Compile Include="ChangeTracking\Internal\IForeignKeyListener.cs" />
    <Compile Include="ChangeTracking\Internal\InternalMixedEntityEntry.cs" />
    <Compile Include="ChangeTracking\Internal\NavigationFixer.cs" />
    <Compile Include="ChangeTracking\Internal\OriginalValues.cs" />
    <Compile Include="ChangeTracking\Internal\OriginalValuesFactory.cs" />
    <Compile Include="ChangeTracking\Internal\PropertyAccessorExtensions.cs" />
    <Compile Include="ChangeTracking\Internal\RelationshipsSnapshot.cs" />
    <Compile Include="ChangeTracking\Internal\RelationshipsSnapshotFactory.cs" />
    <Compile Include="ChangeTracking\Internal\InternalShadowEntityEntry.cs" />
    <Compile Include="ChangeTracking\Internal\Sidecar.cs" />
    <Compile Include="ChangeTracking\Internal\SimpleEntityKey.cs" />
    <Compile Include="ChangeTracking\Internal\SimpleEntityKeyFactory.cs" />
    <Compile Include="ChangeTracking\Internal\StateData.cs" />
    <Compile Include="ChangeTracking\Internal\InternalEntityEntry.cs" />
    <Compile Include="ChangeTracking\Internal\InternalEntityEntryFactory.cs" />
    <Compile Include="ChangeTracking\Internal\EntityEntryMetadataServices.cs" />
    <Compile Include="ChangeTracking\Internal\InternalEntityEntryNotifier.cs" />
    <Compile Include="ChangeTracking\Internal\InternalEntityEntrySubscriber.cs" />
    <Compile Include="ChangeTracking\Internal\StateManager.cs" />
    <Compile Include="ChangeTracking\Internal\StoreGeneratedValues.cs" />
    <Compile Include="ChangeTracking\Internal\StoreGeneratedValuesFactory.cs" />
    <Compile Include="ChangeTracking\Internal\ValueGenerationManager.cs" />
    <Compile Include="DbContext.cs" />
    <Compile Include="DbContextOptionsBuilder.cs" />
    <Compile Include="DbContextOptionsBuilder`.cs" />
    <Compile Include="Metadata\Builders\ReferenceReferenceBuilder`.cs" />
    <Compile Include="Metadata\Conventions\ConventionSet.cs" />
    <Compile Include="Metadata\Conventions\Internal\INavigationConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\NotMappedPropertyAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\NavigationAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\NotMappedNavigationAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\RequiredNavigationAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\TimestampAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\StringLengthAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\MaxLengthAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\NotMappedEntityTypeAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\ConcurrencyCheckAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\ConventionDispatcher.cs" />
    <Compile Include="Metadata\Conventions\Internal\CoreConventionSetBuilder.cs" />
    <Compile Include="Metadata\Conventions\Internal\DatabaseGeneratedAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\EntityTypeAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\ForeignKeyPropertyDiscoveryConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IConventionSetBuilder.cs" />
    <Compile Include="Metadata\Conventions\Internal\ICoreConventionSetBuilder.cs" />
    <Compile Include="Metadata\Conventions\Internal\IEntityTypeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IForeignKeyConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IForeignKeyRemovedConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IKeyConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IModelConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\IPropertyConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\KeyAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\KeyConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\KeyDiscoveryConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\PropertyAttributeConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\PropertyDiscoveryConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\RelationshipDiscoveryConvention.cs" />
    <Compile Include="Metadata\Conventions\Internal\RequiredPropertyAttributeConvention.cs" />
    <Compile Include="Metadata\CoreAnnotationNames.cs" />
    <Compile Include="Metadata\Internal\InternalMetadataBuilder`.cs" />
    <Compile Include="Metadata\Internal\MetadataHelper.cs" />
    <Compile Include="Metadata\ValueGenerated.cs" />
    <Compile Include="Infrastructure\CoreOptionsExtension.cs" />
    <Compile Include="Infrastructure\DbContextOptions.cs" />
    <Compile Include="Infrastructure\DbContextOptions`.cs" />
    <Compile Include="Infrastructure\IDbContextOptions.cs" />
    <Compile Include="Infrastructure\IDbContextOptionsBuilderInfrastructure.cs" />
    <Compile Include="Infrastructure\EntityFrameworkServicesBuilder.cs" />
    <Compile Include="Infrastructure\IAccessor.cs" />
    <Compile Include="Internal\DbContextActivator.cs" />
    <Compile Include="Internal\DbContextServices.cs" />
    <Compile Include="Internal\DbSetFinder.cs" />
    <Compile Include="Internal\DbSetInitializer.cs" />
    <Compile Include="Internal\DbSetProperty.cs" />
    <Compile Include="Internal\DbSetSource.cs" />
    <Compile Include="Internal\IDbContextServices.cs" />
    <Compile Include="Internal\IDbSetFinder.cs" />
    <Compile Include="Internal\IDbSetInitializer.cs" />
    <Compile Include="Internal\IDbSetSource.cs" />
    <Compile Include="Internal\IModelValidator.cs" />
    <Compile Include="Internal\LoggingModelValidator.cs" />
    <Compile Include="Internal\ModelSource.cs" />
    <Compile Include="Internal\ModelValidator.cs" />
    <Compile Include="Internal\ServiceProviderSource.cs" />
    <Compile Include="Metadata\Internal\IClrAccessorSource.cs" />
    <Compile Include="Metadata\Internal\IClrCollectionAccessorSource.cs" />
    <Compile Include="Metadata\Internal\ICollectionTypeFactory.cs" />
    <Compile Include="Metadata\Internal\IEntityMaterializerSource.cs" />
    <Compile Include="Metadata\Internal\IFieldMatcher.cs" />
    <Compile Include="Metadata\Internal\IMemberMapper.cs" />
    <Compile Include="ModelBuilder.cs" />
    <Compile Include="Query\Annotations\QueryAnnotation.cs" />
    <Compile Include="Query\Annotations\IncludeQueryAnnotation.cs" />
    <Compile Include="EF.cs" />
    <Compile Include="Query\EntityLoadInfo.cs" />
    <Compile Include="Query\EntityTrackingInfo.cs" />
    <Compile Include="Query\ExpressionEvaluationHelpers.cs" />
    <Compile Include="Query\Expressions\MethodCallEvaluationPreventingExpression.cs" />
    <Compile Include="Query\Expressions\PropertyEvaluationPreventingExpression.cs" />
    <Compile Include="Query\ExpressionVisitors\ExpressionStringBuilder.cs" />
    <Compile Include="Query\ExpressionVisitors\ExpressionVisitorBase.cs" />
    <Compile Include="Query\ExpressionVisitors\FunctionEvaluationDisablingVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\ParameterExtractingExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\QueryAnnotatingExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\ReducingExpressionVisitor.cs" />
    <Compile Include="Query\IEntityQueryProvider.cs" />
    <Compile Include="Query\IIncludableQueryable.cs" />
    <Compile Include="Query\QueryableHelpers.cs" />
    <Compile Include="Query\QueryAnnotationMethodAttribute.cs" />
    <Compile Include="Query\SharedQueryExtensions.cs" />
    <Compile Include="DbSet`.cs" />
    <Compile Include="EntityState.cs" />
    <Compile Include="Internal\InternalDbSet.cs" />
    <Compile Include="Metadata\KeyExtensions.cs" />
    <Compile Include="Metadata\Internal\NullableEnumClrPropertySetter.cs" />
    <Compile Include="Metadata\Internal\CollectionTypeFactory.cs" />
    <Compile Include="Metadata\ForeignKeyExtensions.cs" />
    <Compile Include="Metadata\Internal\ConfigurationSource.cs" />
    <Compile Include="Metadata\Internal\ConfigurationSourceExtensions.cs" />
    <Compile Include="Metadata\Internal\InternalEntityTypeBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalIndexBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalKeyBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalMetadataBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalMetadataItemBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalModelBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalPropertyBuilder.cs" />
    <Compile Include="Metadata\Internal\InternalRelationshipBuilder.cs" />
    <Compile Include="Metadata\Internal\MetadataDictionary.cs" />
    <Compile Include="Metadata\TypedAnnotation.cs" />
    <Compile Include="Query\ExpressionVisitors\EntityQueryableExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\DefaultQueryExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\EntityResultFindingExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionPrinter.cs" />
    <Compile Include="Query\IAsyncEnumerableAccessor.cs" />
    <Compile Include="Query\ExpressionVisitors\MemberAccessBindingExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\ProjectionExpressionVisitor.cs" />
    <Compile Include="Query\ICompiledQueryCache.cs" />
    <Compile Include="Query\IncludeSpecification.cs" />
    <Compile Include="Query\IQueryContextFactory.cs" />
    <Compile Include="Query\Annotations\QueryAnnotationBase.cs" />
    <Compile Include="Internal\QueryAnnotationExtensions.cs" />
    <Compile Include="Query\QueryAnnotationExtractor.cs" />
    <Compile Include="Query\CompiledQueryCache.cs" />
    <Compile Include="Query\QueryContextFactory.cs" />
    <Compile Include="Query\QueryOptimizer.cs" />
    <Compile Include="Query\ExpressionVisitors\QuerySourceTracingExpressionVisitor.cs" />
    <Compile Include="Query\ExpressionVisitors\RequiresMaterializationExpressionVisitor.cs" />
    <Compile Include="Query\ResultOperators\IncludeExpressionNode.cs" />
    <Compile Include="Query\QueryBuffer.cs" />
    <Compile Include="Query\IQueryBuffer.cs" />
    <Compile Include="Query\ExpressionVisitors\TaskBlockingExpressionVisitor.cs" />
    <Compile Include="Query\ResultOperators\QueryAnnotationExpressionNode.cs" />
    <Compile Include="Query\ResultOperators\QueryAnnotationResultOperator.cs" />
    <Compile Include="Query\ResultOperators\ThenIncludeExpressionNode.cs" />
    <Compile Include="Query\ExpressionVisitors\SubQueryMemberPushDownExpressionVisitor.cs" />
    <Compile Include="Storage\DatabaseErrorLogState.cs" />
    <Compile Include="Storage\DatabaseProviderServices.cs" />
    <Compile Include="Storage\IDatabase.cs" />
    <Compile Include="Metadata\EntityTypeExtensions.cs" />
    <Compile Include="Metadata\IIndex.cs" />
    <Compile Include="Metadata\Index.cs" />
    <Compile Include="Metadata\NavigationExtensions.cs" />
    <Compile Include="Metadata\EntityTypeNameComparer.cs" />
    <Compile Include="Metadata\PropertyExtensions.cs" />
    <Compile Include="Query\IResultOperatorHandler.cs" />
    <Compile Include="Query\QueryCompilationContext.cs" />
    <Compile Include="Query\QueryResultScope`.cs" />
    <Compile Include="Query\ResultOperatorHandler.cs" />
    <Compile Include="Internal\ServiceProviderCache.cs" />
    <Compile Include="ChangeTracking\ChangeTracker.cs" />
    <Compile Include="ChangeTracking\EntityEntry.cs" />
    <Compile Include="ChangeTracking\EntityEntry`.cs" />
    <Compile Include="ChangeTracking\PropertyEntry.cs" />
    <Compile Include="ChangeTracking\PropertyEntry`.cs" />
    <Compile Include="EntityFrameworkServiceCollectionExtensions.cs" />
    <Compile Include="Extensions\EntityFrameworkQueryableExtensions.cs" />
    <Compile Include="Infrastructure\DatabaseFacade.cs" />
    <Compile Include="Infrastructure\IDbContextOptionsExtension.cs" />
    <Compile Include="Infrastructure\IModelSource.cs" />
    <Compile Include="Infrastructure\Annotation.cs" />
    <Compile Include="Metadata\Internal\ClrAccessorSource.cs" />
    <Compile Include="Metadata\Internal\ClrCollectionAccessorSource.cs" />
    <Compile Include="Metadata\Internal\ClrICollectionAccessor.cs" />
    <Compile Include="Metadata\Internal\ClrPropertyGetter.cs" />
    <Compile Include="Metadata\Internal\ClrPropertyGetterSource.cs" />
    <Compile Include="Metadata\Internal\ClrPropertySetter.cs" />
    <Compile Include="Metadata\Internal\ClrPropertySetterSource.cs" />
    <Compile Include="Metadata\Internal\EntityMaterializerSource.cs" />
    <Compile Include="Metadata\EntityType.cs" />
    <Compile Include="Metadata\Internal\FieldMatcher.cs" />
    <Compile Include="Metadata\ForeignKey.cs" />
    <Compile Include="Infrastructure\IAnnotation.cs" />
    <Compile Include="Metadata\Internal\IClrCollectionAccessor.cs" />
    <Compile Include="Metadata\Internal\IClrPropertyGetter.cs" />
    <Compile Include="Metadata\Internal\IClrPropertySetter.cs" />
    <Compile Include="Metadata\Internal\IEntityMaterializer.cs" />
    <Compile Include="Metadata\IEntityType.cs" />
    <Compile Include="Metadata\IForeignKey.cs" />
    <Compile Include="Metadata\IKey.cs" />
    <Compile Include="Infrastructure\IAnnotatable.cs" />
    <Compile Include="Metadata\IModel.cs" />
    <Compile Include="Metadata\INavigation.cs" />
    <Compile Include="Metadata\IProperty.cs" />
    <Compile Include="Metadata\IPropertyBase.cs" />
    <Compile Include="Storage\ValueBuffer.cs" />
    <Compile Include="Metadata\Key.cs" />
    <Compile Include="Metadata\Internal\MemberMapper.cs" />
    <Compile Include="Infrastructure\Annotatable.cs" />
    <Compile Include="Metadata\Model.cs" />
    <Compile Include="Metadata\ModelExtensions.cs" />
    <Compile Include="Metadata\ModelItemNotFoundException.cs" />
    <Compile Include="Metadata\PropertyBase.cs" />
    <Compile Include="Metadata\Navigation.cs" />
    <Compile Include="Metadata\Property.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Properties\InternalsVisibleTo.cs" />
    <Compile Include="Properties\Strings.Designer.cs">
      <DependentUpon>Strings.resx</DependentUpon>
    </Compile>
    <Compile Include="Query\AsyncLinqOperatorProvider.cs" />
    <Compile Include="Query\EntityQueryable`.cs" />
    <Compile Include="Query\EntityQueryModelVisitor.cs" />
    <Compile Include="Query\EntityQueryProvider.cs" />
    <Compile Include="Query\IAsyncQueryProvider.cs" />
    <Compile Include="Query\ILinqOperatorProvider.cs" />
    <Compile Include="Query\LinqOperatorProvider.cs" />
    <Compile Include="Query\QueryContext.cs" />
    <Compile Include="Query\QueryResultScope.cs" />
    <Compile Include="Query\TaskResultAsyncEnumerable.cs" />
    <Compile Include="Storage\Database.cs" />
    <Compile Include="Storage\IDatabaseCreator.cs" />
    <Compile Include="Storage\IDatabaseProviderServices.cs" />
    <Compile Include="Storage\IDatabaseProvider.cs" />
    <Compile Include="Storage\DatabaseProvider`.cs" />
    <Compile Include="..\Shared\CodeAnnotations.cs">
      <Link>Utilities\CodeAnnotations.cs</Link>
    </Compile>
    <Compile Include="..\Shared\StringBuilderExtensions.cs">
      <Link>Extensions\Internal\StringBuilderExtensions.cs</Link>
    </Compile>
    <Compile Include="..\Shared\SharedTypeExtensions.cs">
      <Link>Extensions\Internal\SharedTypeExtensions.cs</Link>
    </Compile>
    <Compile Include="ValueGeneration\GuidValueGenerator.cs" />
    <Compile Include="ValueGeneration\HiLoValueGeneratorState.cs" />
    <Compile Include="ValueGeneration\HiLoValueGenerator.cs" />
    <Compile Include="ValueGeneration\IValueGeneratorCache.cs" />
    <Compile Include="ValueGeneration\TemporaryDateTimeOffsetValueGenerator.cs" />
    <Compile Include="ValueGeneration\TemporaryDateTimeValueGenerator.cs" />
    <Compile Include="ValueGeneration\TemporaryGuidValueGenerator.cs" />
    <Compile Include="ValueGeneration\ValueGeneratorCache.cs" />
    <Compile Include="ValueGeneration\ValueGeneratorExtensions.cs" />
    <Compile Include="ValueGeneration\ValueGeneratorFactory`.cs" />
    <Compile Include="ValueGeneration\ValueGenerator.cs" />
    <Compile Include="ValueGeneration\ValueGeneratorFactory.cs" />
    <Compile Include="ValueGeneration\SequentialGuidValueGenerator.cs" />
    <Compile Include="ValueGeneration\TemporaryNumberValueGeneratorFactory.cs" />
    <Compile Include="ValueGeneration\TemporaryBinaryValueGenerator.cs" />
    <Compile Include="ValueGeneration\TemporaryNumberValueGenerator.cs" />
    <Compile Include="ValueGeneration\TemporaryStringValueGenerator.cs" />
    <Compile Include="ValueGeneration\ValueGeneratorSelector.cs" />
    <Compile Include="ValueGeneration\IValueGeneratorSelector.cs" />
    <Compile Include="ValueGeneration\ValueGenerator`.cs" />
    <EmbeddedResource Include="Properties\Strings.resx">
      <LogicalName>EntityFramework.Core.Strings.resources</LogicalName>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Content Include="..\..\tools\Resources.tt">
      <Link>Properties\Resources.tt</Link>
      <Generator>TextTemplatingFileGenerator</Generator>
      <LastGenOutput>Resources.cs</LastGenOutput>
      <CustomToolNamespace>Microsoft.Data.Entity.Internal</CustomToolNamespace>
    </Content>
    <None Include="project.json" />
  </ItemGroup>
  <ItemGroup>
    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
{
  "version": "7.0.0-*",
  "description": "Entity Framework is Microsoft's recommended data access technology for new applications.",
  "repository": {
    "type": "git",
    "url": "git://github.com/aspnet/entityframework"
  },
  "compilationOptions": {
    "warningsAsErrors": true
  },
  "dependencies": {
    "Ix-Async": "1.2.4",
    "Microsoft.Framework.Caching.Abstractions": "1.0.0-*",
    "Microsoft.Framework.Caching.Memory": "1.0.0-*",
    "Microsoft.Framework.DependencyInjection": "1.0.0-*",
    "Microsoft.Framework.DependencyInjection.Abstractions": "1.0.0-*",
    "Microsoft.Framework.Logging": "1.0.0-*",
    "Microsoft.Framework.Logging.Abstractions": "1.0.0-*",
    "Microsoft.Framework.OptionsModel": "1.0.0-*",
    "Remotion.Linq": "2.0.0-alpha-004",
    "System.Collections.Immutable": "1.1.37-*"
  },
  "compile": "..\\Shared\\*.cs",
  "namedResource": {
    "EntityFramework.Core.Strings": "Properties/Strings.resx"
  },
  "frameworks": {
    "net45": {
      "frameworkAssemblies": {
        "System.Collections": { "version": "4.0.0.0", "type": "build" },
        "System.ComponentModel.DataAnnotations" : "4.0.0.0",
        "System.Diagnostics.Debug": { "version": "4.0.0.0", "type": "build" },
        "System.Diagnostics.Tools": { "version": "4.0.0.0", "type": "build" },
        "System.Globalization": { "version": "4.0.0.0", "type": "build" },
        "System.Linq": { "version": "4.0.0.0", "type": "build" },
        "System.Linq.Expressions": { "version": "4.0.0.0", "type": "build" },
        "System.Linq.Queryable": { "version": "4.0.0.0", "type": "build" },
        "System.ObjectModel": { "version": "4.0.0.0", "type": "build" },
        "System.Reflection": { "version": "4.0.0.0", "type": "build" },
        "System.Reflection.Extensions": { "version": "4.0.0.0", "type": "build" },
        "System.Resources.ResourceManager": { "version": "4.0.0.0", "type": "build" },
        "System.Runtime": { "version": "4.0.0.0", "type": "build" },
        "System.Runtime.Extensions": { "version": "4.0.0.0", "type": "build" },
        "System.Threading": { "version": "4.0.0.0", "type": "build" }
      }
    },
    "dnx451": {
      "frameworkAssemblies": {
        "System.Collections": "4.0.0.0",
        "System.ComponentModel.DataAnnotations" : "4.0.0.0",
        "System.Diagnostics.Debug": "4.0.0.0",
        "System.Diagnostics.Tools": "4.0.0.0",
        "System.Globalization": "4.0.0.0",
        "System.Linq": "4.0.0.0",
        "System.Linq.Expressions": "4.0.0.0",
        "System.Linq.Queryable": "4.0.0.0",
        "System.ObjectModel": "4.0.0.0",
        "System.Reflection": "4.0.0.0",
        "System.Reflection.Extensions": "4.0.0.0",
        "System.Resources.ResourceManager": "4.0.0.0",
        "System.Runtime": "4.0.0.0",
        "System.Runtime.Extensions": "4.0.0.0",
        "System.Threading": "4.0.0.0"
      }
    },
    "dotnet": {
      "dependencies": {
        "System.Collections": "4.0.10-*",
        "System.Collections.Concurrent": "4.0.10-*",
        "System.ComponentModel": "4.0.0-*",
        "System.ComponentModel.Annotations": "4.0.10-*",
        "System.Diagnostics.Debug": "4.0.10-*",
        "System.Diagnostics.Tools": "4.0.0-*",
        "System.Linq": "4.0.0-*",
        "System.Linq.Queryable": "4.0.0-*",
        "System.ObjectModel": "4.0.10-*",
        "System.Reflection": "4.0.10-*",
        "System.Reflection.Extensions": "4.0.0-*",
        "System.Resources.ResourceManager": "4.0.0-*",
        "System.Runtime": "4.0.20-*",
        "System.Runtime.Extensions": "4.0.10-*",
        "System.Runtime.InteropServices": "4.0.20-*",
        "System.Threading": "4.0.10-*",
        "System.Threading.Tasks": "4.0.10-*"
      }
    }
  }
}

OWIN

Because simple is better.

public void Configure(IBuilder app)
    {
        var buildFunc = app.UseOwin();

        buildFunc(next => async env => {
            // Get some OWIN keys from the environment
            var responseHeaders = 
                (IDictionary<string, string[]>)env["owin.ResponseHeaders"];
            var responseBody = 
                (Stream)env["owin.ResponseBody"];

            // Set the content type and write some data
            responseHeaders["Content-Type"] = new[]{"text/plain"};
            var data = Encoding.UTF8.GetBytes("Hello world!");
            await responseBody.WriteAsync(data, 0, data.Length);
        });
    }

CONFIGURATION

Because **** you XML.

var config = new Configuration()  
    .AddIniFile("App_Data\\config.ini")
    .AddJsonFile("App_Data\\config.json")
    .AddXmlFile("App_Data\\config.xml")
    .AddEnvironmentVariables()
    .AddCommandLine(args);
{
    "display":{
        "font":{
            "color": "Yellow"
        }
    }
}
<config>  
    <display>
        <font background="Blue"/>
    </display>
</config>  
[Display]
Font:Size = 9pt  

SOLUTION STRUCTURE

Modern-web oriented.

NEW WAY TO DEVELOP

Not only visual studio

NEW ENTITY FRAMEWORK

WHAT ALL DEVELOPER WANT FROM EF?

Easy to use?

Awesome perfomance?

Scalability?

Open source?

Command line interface
with UNICORN!

SHOW TIME!

PART 2: Show me your face

WHAT WE HAVE TODAY?

WHY?

It's not good enough.

Javascript not good language at all.

SO HOW WE COULD MAKE IT BE BETTER

arrows (pretty much like lamda)

var odds = evens.map(v => v + 1);
var nums = evens.map((v, i) => v + i);
var pairs = evens.map(v => ({even: v, odd: v + 1}));

// Statement bodies
nums.forEach(v => {
  if (v % 5 === 0)
    fives.push(v);
});

// Lexical this
var bob = {
  _name: "Bob",
  _friends: [],
  printFriends() {
    this._friends.forEach(f =>
      console.log(this._name + " knows " + f));
  }
}

SO HOW WE COULD MAKE IT BE BETTER

Classes (FINALLY)

class SkinnedMesh extends THREE.Mesh {
  constructor(geometry, materials) {
    super(geometry, materials);

    this.idMatrix = SkinnedMesh.defaultMatrix();
    this.bones = [];
    this.boneMatrices = [];
    //...
  }
  update(camera) {
    //...
    super.update();
  }
  get boneCount() {
    return this.bones.length;
  }
  set matrixType(matrixType) {
    this.idMatrix = SkinnedMesh[matrixType]();
  }
  static defaultMatrix() {
    return new THREE.Matrix4();
  }
}

SO HOW WE COULD MAKE IT BE BETTER

Let + Const

function f() {
  {
    let x;
    {
      // okay, block scoped name
      const x = "sneaky";
      // error, const
      x = "foo";
    }
    // error, already declared in block
    let x = "inner";
  }
}

SO HOW WE COULD MAKE IT BE BETTER

Iterators + For..Of (OH MY GOSH SO INNOVATIVE  actually no)

let fibonacci = {
  [Symbol.iterator]() {
    let pre = 0, cur = 1;
    return {
      next() {
        [pre, cur] = [cur, pre + cur];
        return { done: false, value: cur }
      }
    }
  }
}

for (var n of fibonacci) {
  // truncate the sequence at 1000
  if (n > 1000)
    break;
  console.log(n);
}

SO HOW WE COULD MAKE IT BE BETTER

Modules

// lib/math.js
export function sum(x, y) {
  return x + y;
}
export var pi = 3.141593;
// app.js
import * as math from "lib/math";
alert("2π = " + math.sum(math.pi, math.pi));
// otherApp.js
import {sum, pi} from "lib/math";
alert("2π = " + sum(pi, pi));
// Dynamic loading – ‘System’ is default loader
System.import('lib/math').then(function(m) {
  alert("2π = " + m.sum(m.pi, m.pi));
});

BUT IT ALL IN FUTURE

How we could use it right NOW?

TYPESCRIPT

Angular (or any MVC framework) some times really bad

WHAT ABOUT FRONT-END FRAMEWORKS?

WHY NEW NG BETTER

DOM strategies

import {bind} from 'angular2/di';
import {ShadowDomStrategy, NativeShadowDomStrategy}
            from 'angular2/src/core/compiler/shadow_dom_strategy';
bootstrap(
    MyApp,
    [bind(ShadowDomStrategy).toClass(NativeShadowDomStrategy)]);

WHY NEW NG BETTER

Module loader

System.import('main');
import {bootstrap} from 'angular2/angular2';
import {App} from 'app';

bootstrap(App);

Components

@Component({
  selector: 'my-component'
})
@View({
  template: `<div>Hello, {{message}}</div>`
})
class MyComponent {
  constructor() {
    this.message = 'World';
  }
}

Directives

@Directive({
  selector: '[tooltip]',
  properties: [
    'text: tooltip'
  ],
  hostListeners: {
    mouseover: 'show()'
  }
})
class Tooltip {
  show() {
    console.log(this.text);
  }
}
import {Tooltip} from 'tooltip';

@Component({
  selector: 'my-component'
})
@View({
  template: `<div tooltip="foo">Hello, {{message}}</div>`,
  directives: [Tooltip]
})
class MyComponent {
  constructor() {
    this.message = 'World';
  }
}

New binding

<img [src]="myImage">
<div [hidden]="isHidden"></div>

Properties

@Directive({
  selector: '[tooltip]',
  properties: [
    'text: tooltip'
  ],
  hostListeners: {
    mouseover: 'show()',
  }
})
class Tooltip {
  show() {
    console.log(this.text);
  }
}
<div [tooltip]="foo">...</div>

New binding

<my-directive (select)="user.name(name)"></my-directive>

Events

<my-directive (click)="doSomething()"></my-directive>

References

<input type="text" #user>

local variables in views

<p (click)="user.focus()">
  Grab focus
</p>
<input type="text" #user (keyup)>
{{user.value}}

Services

class AwesomeService {
    getAwesomness() : string {
        return "I'm AWESOME"
    }
}
import {AwesomeService} from 'awesomeServiceLocation';

@Component({
  selector: 'my-component',
  appInjector: [AwesomeService]
})
class MyComponent{
    constructor(private awesomeSerivce: AwesomeService) {
        console.log(this.awesomeSerivce.GetAwesomness());
    }
}

ROOOOOOUTING

// We specify that this outlet will be called when the `loggedin-router-outlet` tag is used.
@Directive({selector: 'loggedin-router-outlet'})
// We inherit from the default RouterOutlet
export class LoggedInOutlet extends RouterOutlet {

  // We call the parent constructor
  constructor(viewContainer, compiler, router, injector) {
    super(viewContainer, compiler, router, injector);
  }

  canActivate(instruction) {
    var url = this._router.lastNavigationAttempt;
    // If the user is going to a URL that requires authentication and is not logged in (meaning we don't have the JWT saved in localStorage), we redirect the user to the login page.
    if (url !== '/login' && !localStorage.getItem('bearer')) {
      instruction.component = Login;
    }
    return PromiseWrapper.resolve(true);
  }
}

SHOW TIME

THX FOR YOUR ATTENTION

ASP.NET/vNext + ng2

By Andrei Tserakhau

ASP.NET/vNext + ng2

  • 715
Loading comments...

More from Andrei Tserakhau