技术开发 频道

SQL Server 2008及微软数据平台开发-英文

Improved Productivity

Microsoft SQL Server 2008 and development technologies from the Microsoft Data Platform improve developer productivity by providing seamless integration between frameworks, data connectivity technologies, programming languages, Web services, development tools, and data.

ADO.NET Entity Framework

Developers often spend countless hours deciphering database schemas and writing complex queries to retrieve the data that they need in their applications. The ADO.NET Entity Framework simplifies these tasks and enables developers to focus on the business logic of their applications.

Enterprise systems often use data from multiple disparate sources that use different schemas and naming conventions. In addition, these data sources often use varying levels of normalization, which results in information for a particular business item being spread across multiple tables and rows. This results in developers needing to write a large amount of application logic to manage these complex database relations.

The ADO.NET Entity Framework, which is based on the Entity Data Model, enables developers to transform the relational data in database schemas into conceptual entities that can be used directly in applications. For example, the customer data in your application may be stored across multiple tables in a database. By using the ADO.NET Entity Framework, architects and developers can define a single conceptual customer entity that neatly abstracts the complex relations that are required to access and update customer data from an application. This layer of abstraction isolates the data access logic into a set of well defined entities that can be used in an application and the abstraction helps developers to concentrate on developing the application logic.

The ADO.NET Entity Framework provides a data programming interface that makes it:

Easy to understand the conceptual data model. By using the Entity Data Model, you can work with data in terms of the business logic in your application, as opposed to the logical schema in the data source.

Easy to design and develop applications. By developing applications that align business logic with data access logic it is significantly easier for architects to design applications and for developers to write code.

Easy to maintain applications. By using a conceptual data model, developers can concentrate on the business logic in an application, as opposed to the data storage logic. Furthermore, the ADO.NET Entity Framework shields applications from changes to the underlying data schema, so minimizes the maintenance effort.

Because the Entity Data Model uses entities as opposed to tables and rows, developers need a query language that interacts with those objects. Entity SQL is a new language that enables the execution of set-oriented declarative queries and updates for the entities and relationships in the Entity Data Model. Entity SQL is virtually data provider agnostic, so you can reuse queries against different database providers, which saves you coding time.

Most developers use object oriented programming languages such as C# and Visual Basic for writing new code in their business applications. These languages model entities as classes and their behaviors as code, in contrast to ADO.NET which exposes data as values. This introduces an impedance mismatch between the data and the application. The ADO.NET Entity Framework provides an object services layer that reduces this mismatch. Developers can use Object Services to build typed queries and to return, manipulate, and update results as business objects. The ADO.NET Entity Framework
generates .NET classes from the Entity Data Model entities in a schema. These classes are partial classes so developers can extend them with custom business logic without affecting the generated code. These business objects can be queried by
using Entity SQL or Language Integrated Query (LINQ).

LINQ

Today’s data access code is embedded in string literals in an application and written in a database-specific SQL dialect.
Because of this, developers must be conversant in a SQL dialect as well as their chosen programming language. This raises the knowledge requirements for data-centric solution developers. Embedding queries in string literals means that the code cannot be type-checked at compile time and so developers must wait until the query code is sent to the database server to determine success. This runtime debugging often results in a more complex debugging process.

LINQ is a set of extensions to the Microsoft .NET Framework libraries and to C# and Visual Basic .NET that enables these languages to treat data as a first-class object. LINQ enables developers to write queries in their native programming language, which can then be type and syntax checked at compile time. Because it is an integral part of the .NET language, LINQ can also take advantage of Microsoft IntelliSense in the Microsoft Visual Studio development system.

LINQ can be used against a variety of data sources including in-memory data structures, XML documents, databases, entity models, and data sets. For example, LINQ can be used to access data from three different sources, manipulate the data, and then output it to a fourth data store. This functionality greatly simplifies working with data from disparate sources.
There are five implementations of LINQ that enable you to access data:

LINQ to SQL supports rapid development of applications that query all editions of Microsoft SQL Server by using programmatic objects that map directly to database objects in SQL Server schemas, for example, tables, views, stored procedures, and user defined functions.

LINQ to Entities supports a more flexible mapping of objects to relational tables, views, stored procedures, and user defined functions. You can use LINQ to Entities to access data from SQL Server and other relational databases through extended ADO.NET data providers.

LINQ to DataSet introduces rich query capabilities on top of both regular and typed DataSets. This enables you to create and query joins between DataTables in a DataSet.

LINQ to XML is an in-memory XML programming application programming interface (API) that is designed to take advantage of the latest .NET Framework language innovations.

LINQ to Object empowers you to run LINQ queries against in-memory objects. This enables you to use in-memory data in the same way that you use data from any other source.

Visual Studio

Visual Studio combines all of these data platform technologies into a powerful, yet highly productive and easy-to-use environment. Visual Studio is a comprehensive development environment that enables architects and developers to easily design and develop both client and server code.

Visual Studio provides developers with tools that can automatically create entities for existing and new data sources. Partial classes can be generated that take advantage of the new object services layer. After the Entity Data Model has been generated, developers can use Entity SQL and LINQ to program against it in a new and productive manner.

Visual Studio provides developers with IntelliSense information as they write code. Because the ADO.NET Entity Framework and LINQ are fully integrated into C# and Visual Basic .NET, developers can use the powerful IntelliSense feature when using these features to build applications. This results in a more productive development environment for designing and developing database applications, higher quality code and a system that is easier to maintain.

Visual Studio Team System helps you to improve the efficiency of your entire development process by providing features such as source code control, tracking, and deployment tools that the whole team can use, from Project Managers through to Testers.
 

0
相关文章