Top Banner
Microsoft .NET 4 and Visual Studio 2010 for Enterprise Sudhanshu Hate Abstract Microsoft endeavors to address the evolving challenges in Enterprise Application Development through the release of .NET framework 4 and Visual Studio 2010 (VS2010). Microsoft .NET 4 comes with host of new features that makes enterprise application development more productive and manageable. The new efficient Common Language Runtime (CLR), multi core programming, functional and dynamic language programming support, ability to easily expose business logic and workflow as services; enhancements in REST and Object relational mapping framework, are some of the features that bring additional value to the platform.  Visual Studio 201 0 through new Windows Presentation Fou ndation (WPF) ba sed User Interface brings support for architecture modeling, parallel program debugging, Lab management and is a unified IDE for all Microsoft technologies through support for Windows Azure (Cloud) and SharePoint 2010 application development templates. Infosys’ Microsoft Te chnology Center has evaluated .NET 4 and VS2010. This paper presents Infosys’ perspective on the enhancements in .NET Framework 4 and Visual Studio 2010.  Jul 2010
17

Net Framework 4 Vs2010

Jan 07, 2016

Download

Documents

Shabana Begum

Microsoft .NET
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 1/16

Microsoft .NET 4 and Visual Studio 2010for Enterprise

Sudhanshu Hate

Abstract

Microsoft endeavors to address the evolving challenges in Enterprise Application

Development through the release of .NET framework 4 and Visual Studio 2010

(VS2010).

Microsoft .NET 4 comes with host of new features that makes enterprise application

development more productive and manageable. The new efficient Common

Language Runtime (CLR), multi core programming, functional and dynamic

language programming support, ability to easily expose business logic and workflow

as services; enhancements in REST and Object relational mapping framework, are

some of the features that bring additional value to the platform.

 Visual Studio 2010 through new Windows Presentation Foundation (WPF) based

User Interface brings support for architecture modeling, parallel program debugging,

Lab management and is a unified IDE for all Microsoft technologies through

support for Windows Azure (Cloud) and SharePoint 2010 application development

templates.Infosys’ Microsoft Technology Center has evaluated .NET 4 and VS2010. This paper

presents Infosys’ perspective on the enhancements in .NET Framework 4 and Visual

Studio 2010.

 Jul 2010

Page 2: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 2/16

2 | Infosys – View Point

Introduction

Innovation and, nonlinear growth are the key challenges of modern day enterprises. With mergers and acquisitions on the

rise enterprises are growing larger and more complex. The business application development paradigm has changed from

“built to last” to “built to change” with increasing complexity, increase in user base, ever increasing need for compliance

and interoperability. The applications of today, need to be socially aware, connected, inter operable, responsive and scalable

within the ecosystem and serve the diverse set of users without causing disruption in experience, or behavior.

It is observed that the bespoke application development is converging to more stable platforms like Java EnterpriseEdition (JEE) or Microsoft .NET [1]. In several enterprises both the platforms are adopted based on the needs of specific

organizations and strength of each platform [1]. Till a few years back, JEE platform was used to build scalable server side of

application or services where as Microsoft .NET was used for building rich presentation layers using ASP.NET, etc. However

such architectural arrangement in multiple platforms significantly increases total cost of ownership for enterprises. Microsoft

.NET through frequent releases with new features and improved functionality is trying to address the un-served part of the

enterprise needs.

Following figure 1.0 is a snapshot of .NET framework releases since its inception. Microsoft .NET first saw the light in year

2000 and RTM (release to manufacture) in 2002. Since then it has evolved rapidly and gaining adoption in enterprises [1].

During its evolution it has brought in features to address complex problems in enterprise bespoke application development.

N O T E

Each Base class library version depicted above corresponds to respective .NET framework

version. The CLR version has remained 2.0 for .NET framework 2.0, 3.0, 3.5 and 3.5 SP1

where as in other cases CLR version has kept pace with overall .NET Framework version.

.NET 4 comes with completely new CLR (CLR 4.0)

Page 3: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 3/16

Infosys – View Point | 3

To embrace any new product or framework is a challenge and to do so enterprises are required to have a strong business

case. The new framework adoption faces stiff resistance as it brings along challenges of compatibility, stability, migration, or

engineering / re-engineering techniques.

Choice of techniques have bearing on various attributes (functional and non-functional) needed in the new application,

feature set or pain points the new framework claims to solve, existing skill set within the enterprise and marketplace, vendor,

framework stability, and successful case studies.

It could also be due to any of operational, tactical and strategic reasons like need to get rid of unsupported platforms,enterprise licensing policy, adoption of architectural patterns or trends like Service Oriented Architecture (SOA), Web 2.0,

Cloud, etc.

This view point highlights some key drivers for .NET 4 and VS2010 adoption within an enterprise and is intended for

Technology Decision Makers, Architects, Senior Developers who have broad understanding of Microsoft .NET platform..

Challenges in Enterprise Application Development

 While developing and running with bespoke applications using Microsoft .NET platform, following are some of the common

challenges observed across enterprises, however it is not exhaustive.

Faster and efficient processing of complex algorithms and large data sets

Hardware manufacturers are no longer able to increase the speed of individual CPU instead they are increasing the coresto provide high speed. Due to this trend, multi core processors are becoming the order of the day. There is hardly an

enterprise where applications are not running on multi core servers, but still there is no direct correlation of improvement

in performance (throughput or response time) with the number of cores the application is running. Exploiting the power

of such multi core machines, writing complex threaded programs to enable parallel activities and avoid dead locks is a

challenging task for developer.

N O T E

Internally within Infosys Microsoft Technology Center, we did performance benchmarking

of same program on single core and then multi core system and found the application

performance did not increase significantly just by adding cores unless the underlying

program constructs are adapted to multi core architecture. We are in the process of

publishing our work on this and improvement from using parallel programming APIs.

Ease of Application extensibility to cater to changing business demands

 Applications need to be flexible to cater to changing business requirements. Flexibility is usually traded with time to build

applications quickly. As it takes huge amount of time to include changing business requirements, many times IT is found

catching up with the business requirements than driving it. A few examples to illustrate this are as follows.

 Applications rolled out in modular manner where new modules released over a period needs to work seamlessly with existing

system in plug and play manner (without recompiling of the entire system).

E.g. A customer may purchase enterprise application software with Finance, Manufacturing modules to begin with and may

want to add modules like HR, Customer Relations without recompiling the complete application software. Another scenario

could be due to change in regulations there are substantial changes into Finance module and they would like to rip and

replace the existing Finance module with the new one.

 Applications composed of various parts (components) where each part or component of the application can be replaced at

runtime without the need of recompiling the applications is one of the common scenarios in application architecture.

E.g. an application using specific logging application or data access (LINQ TO SQL) component would need a mechanism to

replace such components with better (Entity Framework) or evolved components at runtime without needing to recompile

the application.

Page 4: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 4/16

4 | Infosys – View Point

Implementing complex mathematical functional libraries

Business often demands functionality which need complex mathematical algorithm, simulation logic to be implemented.

E.g. In financial derivatives market, simulating contract pricing based on various conditions.

Efficiently solving Operation Research problems with objective functions to maximize profit or minimize cost having millions

of variables and constraints.

Addressing scenarios needing interactive web page generation at runtime

One of the common needs while building Web 2.0 sites is to build interactive pages on the basis of text entry, search criteria,

ecommerce online shops which responds to user entry, interactive blogs, etc.

 Another common example while building data access layer in .NET applications is generating C# classes that matches the

database schema and the associated challenges of maintaining object properties in synch with database table, column names.

Building such scenario needs programmatically generating new functionality at runtime and executing them as if it is part of

original program (Meta programming).

Exposing business functionality as REST services

Need of exposing REST interfaces is one of the key requirements in Enterprise application development scenario. To build

highly interoperable applications, REST [9] (Representational State Transfer) is becoming one of the most suitable solutions.

 Apart from social applications like Twitter, Facebook, business applications like Amazon exposes functionality as REST

services.

Microsoft Azure Cloud platform provides only REST interface which speaks volumes of the REST adoption and penetration

that we would witness in near future.

Addressing Scaling, Monitoring and Management of business logic

Enterprise wide SOA initiatives, large enterprise wide application deployment or internet facing website necessitates

highly scalable well monitored application architecture. However scaling, monitoring and management of hosted business

workflows and services has been challenge with Windows Communication and Windows Workflow 3.5 technologies due to

lack of out-of-box management features.

Some other findings of ours could be summarized as follows:• If workflow built using 3.5 is to be serialized [10]; it serializes the complete workflow activity tree increasing the size

of serialized information which in turn impacts performance, scalability of long running workflows.

• Lack of robust service or workflow host which can manage various important aspects like instancing, hydration,

dehydration, composition, caching, multiple protocol support, load balancing, transaction management, messaging

during complete service or workflow life cycle.

• Lack of reporting mechanism around services made it difficult to measure and monitor service usage based SLAs to

various business stakeholders.

Addressing Application Availability and Scalability

Globally distributed Enterprises have applications needing to run 24*7*365 and demands scale to erratic/elastic patterns

e.g. catering to increased sales during Christmas. To achieve such high availability and scale, it needs robust underlyingtechnology.

Adapting applications to multiple platform databases

Mergers, acquisitions bring disparate applications and, databases (ORACLE, DB2, SQL Server, Sybase, etc.) with them.

Existing or new common enterprise applications need to be ported and plugged to preferred or standardized native databases

in an acquired business. To cater to such database independent application architecture needs, applications need to be

developed in such a manner that data access code is independent of native databases and can easily work through pluggable

database providers.

Page 5: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 5/16

Infosys – View Point | 5

For domain centric applications in Banking, Insurance, Pharmaceuticals, Retail, Manufacturing, etc. mapping domain

concepts/models to relational concepts/entities in data access layer needs significant amount of custom mapping and

translation code.

Running new .NET applications alongside legacy .NET applications

 Within an Enterprise, often .NET framework based applications leverage various add-ins to realize desired functionality. .NET

and office applications using different versions of add-ins fail to work together creating a problem similar to DLL hell in VB

world (version compatibility). It’s a huge effort on application configuration, test, deployment and release team to ensure suchversion discrepancies are ironed out of every release made.

Effective application memory management

To optimize server usage, there is a need to run more and more applications (functionality) from within the available

resources (servers, memory), which means the application need to make efficient use of resources (memory) or “Do more

with less”.

High available memory is one of the key enabler for good application performance. Over the years, there has been a

significant increase in memory needed by Operating Systems, Databases and bespoke applications negating the advantage of

price reductions in RAM. Applications needing high memory footprint will not be effectively able to scale to increase in load

(users).

Challenges in modeling application architecture

 Ability to envision and model application functionality and quickly turn that into implementation is very common in

enterprise application development scenario. Often architects and developers switch tools to conduct these two key activities

during software development life cycle, which at times increases cost and decreases productivity. It is a challenge to ensure

synchronization between models and code in multiple distinct tools used during various stages of life cycle development.

Sometimes using multiple tools also increases the total cost of ownership.

Software Build, Test management

Creating and replication of application build and test environment takes enormous amount of resources, time and skills. Also

during application development and testing, it is usually challenging to reproduce/replicate bug occurred in development

environment in the test environment.Traceability

Ensuring traceability during application development life cycle is one of the biggest challenges. If traceability is not ensured

appropriately, over a period, incorporating change requests in application becomes impossible and maintenance a nightmare.

IDE support for multiple products, technology templates

Enterprises have a mix of .NET applications from SharePoint portals, Windows Forms thick clients, ASP.NET browser based

applications running on Cloud platform. Developing such varied applications stereotypes without any support of templates,

guidance can impact productivity.

Page 6: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 6/16

Page 7: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 7/16

Infosys – View Point | 7

Services: .NET framework provides a way to decouple and develop various logic into tiers and expose them as service using

SOA paradigm.

• Windows Communication Foundation (WCF): to build interoperable services based on WS-* standards.

• Windows Workflow Foundation (WF): to build process oriented business workflow and rule engines.

• WCF Data services (earlier ADO.NET Data services or Astoria): help in exposing relational or non-relational entities as

services (including REST based).

Data Access: .NET framework provides assemblies for querying and manipulating data access logic in data tier.•  ADO.NET  libraries provide a way to create a Data Access Layer (DAL) to query and manipulate data in underlying

database through inline SQL statements or stored procedures.

• LINQ to SQL provides a way to interact with Microsoft SQL Server database using C# or VB.NET, independent of a

specific database query language.

• Entity Framework provides object relational mapping capabilities to query any database that has ADO.NET provider

e.g. SQL Server, Oracle, Sybase, etc.

Multi core programming

.NET Framework 4 introduces a parallel library with new programming model that considerably simplifies development

and debugging of applications that can take advantage of the modern multi core hardware. The parallel library takes care

of various complexities related to multi-core programming like synchronization issues, locking, task division, etc. and canautomatically distribute work to multiple cores depending on their availability under the hood leaving the developers to

focus on the business processes.

Application Modularization

 With .NET Framework 4, Managed Extensibility Framework (MEF) provides on the fly extensibility to .NET applications and

truly brings in plug and play component/modules realization.

Functional Programming

F# [13] is a .NET programming language combining functional programming [12] and object oriented programming. F#

works alongside .NET languages like C# or VB.NET, which means part of the application logic, can be realized using C#

or VB.NET programming language. It is new addition in VS2010 and can be used to develop applications from .NET 2.0onwards.

Page 8: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 8/16

8 | Infosys – View Point

N O T E

Functional programming is a programming style in which operations are performed on the

input variables without storing the state in the form of temporary or global variables.

Functional programming is used to build highly available computational programs in

industries like telecom for building telecommunication switches or traffic control systems,

where the services/programs cannot be taken offline even for fraction of seconds. If written

using imperative languages like C#, VB.NET or Java, there are challenges in runtime system

updates as replacing imperative language program at runtime means capturing state of

objects in memory, resolving references, overhead in object creation/destruction. Functional

programs fare better as they don’t incur any of this.

Functional programs are easy to unit test and debug as each function works on inputs it

receives and don’t modify any data outside the scope of functions. Due to this, they are

always ready candidates for execution in parallel (concurrency) benefiting most from multi

core processor architectures and giving best performance.

They help in program optimization by adhering to the principle of Lazy evaluation, means

deferring

execution till really needed unlike serial execution in C#, VB.NET, or Java programs.

 Although data is not passed across functions but same can be achieved by passingfunctions as parameter to functions and the phenomenon is called “higher order functions”.

 Aggregated results can be delivered by wrapping functions around another function referred

as currying. Some complex navigation/brokering logic usually achieved in C#, etc. through

switch cases or if else statements can be simplified through pattern matching in functional

languages.

Leveraging some of the above highlighted principles, functional programming lets one build

highly complex algorithms rapidly in very simple, and error free manner.

• Microsoft through Windows Server AppFabric [5] is providing middle tier server class functionality for hosting,

instancing, transaction management, messaging, persistence, scaling, monitoring, and management of business logic

as services or workflows.

N O T E

 At this point, AppFabric is a separate download and installs over Windows Internet

Information Server (IIS) 7. AppFabric provides a dashboard view into business workflow

and services. One can dynamically increase/decrease the no. of executing services and

workflow instances, start or stop instances, trace and track to debug and report the message

flow in the system. This will be very useful in auto scaling and monitoring the SLAs agreed

for the system.

•Dynamic Language Runtime (DLR ) is a new runtime environment providing set of services for dynamic languages toCLR. DLR makes it easier to develop dynamic languages to run on .NET framework and to add dynamic features to

statistically typed languages.

Page 9: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 9/16

Infosys – View Point | 9

N O T E

Dynamic Languages are a class of high level programming languages that executes at

runtime many common behaviors such as

• type validation (declaring variables or operations without any particular type)

• method dispatch (late binding or polymorphism)

• type creation (creating new types on the fly)

parsing (runtime evaluation of source code)• inheritance lookup (looking up class inheritance tree)

• attribute lookup (looking up properties inheritance tree)

That other language might have performed during compilation.

Dynamic languages have strength in simplicity; easier to think, write, and change code

(maintainability); compact in terms of less Lines of Code (LoC). The weakness stems from

lack of intellisense and tooling support because of its dynamic nature. Some examples of

Dynamic languages are Smalltalk, LISP (List processing), JavaScript, Python, Ruby, Perl, etc

Microsoft Visual Studio 2010 [4] is an IDE (Integrated Development Environment) for developing, debugging, testing

applications for web, mobile, smart, and thick client using .NET CLR and DLR (Dynamic Language Runtime) managed

languages. It also provides complete end to end application life cycle (ALM) management support from requirements to

architecture to build and test management.

Addressing Challenges• .NET framework 4 introduces parallel library to help write programs that can automatically distribute work to

multiple cores depending on their availability. While using parallel library logic that needs to be run in parallel has

to be explicitly marked through “Parallel.For” or similar constructs. Depending on the logic that needs to be run in

parallel, we have observed the performance improvement achieved using parallel library can sometimes be in direct

proportion to the number of cores.

Importantly, programs written or targeted for multi-cores can also run on single core machines without any syntax or

configuration changes (subject to performance difference). However programs that are not written using parallel APIneeds to be changed/adapted to use parallel API if it is to get performance benefit from multi core architecture, though

the change in program is a very small.

Enterprises will find effective usage of multi core machines for application logic developed using .NET Framework 4

parallel APIs and see significant improvement in application performance. VS2010 also provides extensive support

for debugging and profiling .NET parallel programs which comes very handy for developers writing and testing such

programs.

•  With .NET Framework 4, Managed Extensibility Framework (MEF) provides on the fly extensibility to .NET

applications and truly brings in plug and play component/modules realization. The MEF based new component

assembly needs to be placed in container (OS folder) and the application will automatically pick up the new assembly

based on the Import and Export attributes set in the program. This happens without recompiling of the application or

any configuration changes and is really simple to use unlike patterns like Unity Application Block [2] for dependencyinjection. MEF has extensibility potential to the tune of “changing flight engine in the air” and is a perfect solution for

enterprise application software scenario described in the above challenges section.

• Languages like C# or VB.NET at times may not be best suitable to solve computational problems in Operations

Research, Artificial Intelligence, Bio Informatics, Energy trading or other domains. At the same time old generation

languages like FORTRAN, C etc., don’t match up in relevance with the current programming paradigms. F# is aimed

at solving complex mathematical algorithm, simulation, parallel programming problems in Operations Research,

 Artificial Intelligence, Bio Informatics, Energy trading, etc.

Page 10: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 10/16

10 | Infosys – View Point

• Generating web pages at runtime, tools/utility scripts, validation logic, web, test harnesses are best candidate for

Dynamic Languages [11] like Python, Ruby which was a void in Microsoft platform till .NET Framework 4

Traditionally Microsoft application developers had been dealing with these through combination of VB script, ActiveX,

C#, ASP.NET which made it complex to handle such scenarios. Third party dynamic languages like Perl for .NET or

Python for .NET have no deep integration with CLR and did not produce managed code (IL).

IronPython [15], and IronRuby [16] are open source implementation of Python and Ruby programming languages

respectively, targeting Microsoft .NET and Silverlight to address the above mentioned scenarios. With Silverlight it canbe used as one of the language to program scenarios in multi-media graphics, animations, gaming etc. DLR provides

a common framework and runtime to implement dynamic languages on top of it. Because DLR is built over CLR, the

dynamic languages can easily interoperate with CLR languages like C# or VB.NET and enterprise can benefit from

their respective unique characteristics.

• Until .NET framework 4, for building REST based applications there was no out of the box framework support, but

was possible primarily through WCF REST Starter kit.

Starting .NET 4, Out of box support to expose business logic as REST services without any custom implementation

is possible through WCF 4.0 REST support. Additionally WCF 4.0 Data services (earlier Astoria or ADO.NET Data

services) provide a way to expose relational and non-relational database entities and data as REST services providing

drill down access through user friendly URIs. This will help to open up business logic as REST services without much

effort and time in custom implementation. REST based business services means more diverse users can access and

benefit from usage of it.

• Exposing business workflow as services is made possible through Windows workflow 4.0. Business workflows can be

exposed as services without building any additional service wrappers or specialized endpoints. This feature can help

in seamlessly connecting partner, customer applications with enterprise applications.

E.g. Order management workflow system connecting seamlessly with suppliers/vendors system through workflow

services would significantly help improve service SLAs.

XAML based design of workflow brings in benefit of simplified design and hosting. There are significant performance

improvements with WF 4.0 as it is written from scratch. E.g. WF 4.0 provides performance improvement from

serialization of only current set of execution activities as against the complete activity tree in WF 3.5 [10].WF 4.0 also

has very efficient programming model for developer to work with.•  AppFabric helps in hosting of large scale complex service oriented applications. Henceforth, enterprises will have

.NET business services and workflow management server capabilities available Out of box through AppFabric.

• To cater better performance, scalability, availability for elastic distributed architecture scenarios, AppFabric also

provides functionality for in-memory distributed caching to cache reference data such as catalogs, profiles and

session data such as shopping cart. Earlier .NET architectures have to rely on third party components like memcache,

NCache to realize such functionality. Out of box support for distributed caching will help achieve high scalability and

availability through AppFabric at no extra cost. We believe this is much needed and most awaited functionality in the

platform and will help to run server class highly scalable applications on .NET platform.

• To map complex business domain model to structures in relational databases a very common programming pattern

is used called as “object relational mapping”. To implement object relational mapping, earlier Microsoft .NET based

bespoke applications needed significant amount of custom implementation or third party frameworks like NHibernateor iBatis. Entity Framework provides a way to map relational entities to domain entities. It helps in building

information or domain model independent of database technologies and is very useful in data access layer modeling in

domain centric applications.

In addition to Entity Framework, to further help generating CRUD (Create-Retrieve-Update-Delete) operations on top

of the Entity Model, VS 2010 supports development of WCF RIA Services (earlier ADO.NET RIA Services). WCF RIA

Services provides a platform to expose Entity Model as CRUD methods generated automatically as a uniform middle

tier for building ASP.NET / Silverlight / WPF / Winform clients. WCF RIA Services is available as a part of Silverlight

Tools for Visual Studio 2010 and provides templates and Data Source controls for Visual Studio 2010

Page 11: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 11/16

Infosys – View Point | 11

• Prior to .NET Framework 4, if .NET 3.5 (CLR 2.0) and .NET 1.1 (CLR 1.1) based component or office add-in is part

of one application, both the components used to run using single highest version of CLR that is launched for the

application. In this case the application will run with CLR 2.0 (.NET 3.5). Since .NET 1.1 based components needed

CLR 1.1 to run but are forced to run with CLR 2.0 as it hosted alongside .NET 3.5 (CLR 2.0) applications, at times

which used to create conflicts leading to application instability.

However starting .NET Framework 4, .NET 4 components can be hosted alongside legacy .NET 2.0, 3.0, 3.5

components without causing issues to each other. This is possible because .NET Framework 4 based components

launch CLR 4.0 for its execution whereas legacy .NET components launch the respective CLR version and both theCLR versions run within the same host without breaking the execution of one another. This is referred as in-process 

side by side execution. We feel this is an important feature for mix bag of .NET applications running in enterprises

and will save considerable testing and rollout effort on multiple version compatibility for Enterprise IT.

• The application performance with .NET Framework 4 has significantly increased because of the improvements in

garbage collector, better threading algorithm and thread pool optimizations. In earlier versions of .NET especially with

desktop applications, when GC (garbage collector) used to run for memory reclamation of large objects, it stopped

the execution of main thread at times. This used to have impact on responsiveness of UI. With .NET Framework 4,

the full GC, runs in the background, collecting large objects as well without stopping the main thread of execution

thus reducing the latency. We feel this is a very significant improvement in core framework for enterprise desktop

applications running on .NET Framework 4. However for server applications (server GC) this feature doesn’t exist but

expected in next release.•  VS2010 provides built in support for Architecture modeling using UML 2.1.2 diagram types like Use case, Sequence,

Class, Component, etc. It provides architecture layer dependency/coupling validation of .NET programs through

layer diagrams. This feature is extremely useful for code compliance with architecture at any stage during life cycle.

It also provides a way to explore code through architecture explorer and Directed Graph Markup Language (DGML)

diagrams. Architecture and code can be maintained in synchronization using forward and reverse engineering

techniques. With VS2010 enterprises don’t need to invest in independent architecture modeling tool for modeling

Microsoft .NET projects.

•  VS2010 lab management [14] helps to quickly create, destroy virtual test environment where application test can

be recorded by test analyst. Recorded tests can be reproduced for developer to view and fix the issue. The lab

management helps in creating the virtualized images of development, test environment which can be copied and

reproduced at different locations with ease. This helps in setting up various dev., test environments faster. Testing and

bug reproduction used to take huge amount of effort across development and testing teams which will be reduced

significantly through this feature.

•  VS2010 through the support of hierarchical work items provides a means to ensure traceability in the application.

Requirements can be recorded as work items and can be associated with any of the artifacts like UML use cases,

architecture models, C# code files. Once association is established, any changes made in the artifacts can be explored

by querying the associated work item and obtaining all linked/associated objects. Thus employment of improved

traceability techniques will help in ease of change management and maintenance.

• SharePoint 2010 and Windows Azure Cloud application development is possible through out of box templates in

 VS2010. Windows Phone 7 and Silverlight 4.0 development is possible by installing freely available add-ons in

 VS2010. All this together through Visual studio will provide developer a unified consistent interface for application

development. This in turn helps in improving the productivity for developing respective application stereotypes.

Page 12: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 12/16

12 | Infosys – View Point

Adoption Approach

 We recommend that enterprises should keep a close watch on the extended support dates of .NET 1.0, 1.1 and Visual Studio

2003. This will help in preparing an upgrade strategy with minimum one to two years in advance of main stream support

ending dates.

.NET Framework 4 and VS2010 can be adopted in Enterprise either through upgrading/migrating existing .NET applications

or re-engineering existing applications or for building completely new applications. The enterprise can evaluate the

application portfolio for the feasibility of suitable approach. On evaluation, the application engineering, re-engineering orupgrade should ideally be done in phased manner, avoiding a complete overall revamp at a go, unless absolutely justified

by a business need. .NET Framework 4 is in its early stages of adoption and there could be potential risks from big bang

approach especially if it is a large application portfolio (more than 50 applications). However consideration of Software

Factory [8] based approach can help in faster and design pattern based best practices implementation which can help in long

term application maintainability.

Engineering or Re-engineering legacy applications to .NET 4

Engineering or Re-engineering applications using .NET 4 would help in building high performing applications exploiting

the benefits of new efficient CLR and all other improvements in the framework. Leveraging multi-core hardware through

parallel programs giving performance benefits, addressing complex mathematical application needs with F#. Build highly

interoperable applications using REST. Expose business workflows as services to partners/ customers and in turn build

seamless connected systems. Build domain friendly applications, all this with high scalability and availability.

Engineering new applications could be considered on .NET 4 as against any of its predecessors due to the advantages listed

above. We strongly recommend this approach for green field applications. Within the enterprise, the .NET 4 re-engineered

applications can safely exist alongside legacy .NET applications.

Application Upgrade

For any enterprise application, Application upgrade from .NET 1.0, .NET 1.1 to .NET 4 would require considerable

reengineering effort, given that a lot of new features and improvements have happened over successive versions. Application

Upgrade from .NET 2.0, .NET 3.0 or .NET 3.5 to .NET 4 would require less effort and in many case simple upgrades

by opening the legacy .NET project in VS2010 may be good enough. The .NET APIs which are supported for backward

compatibility will continue to work, but to really exploit the benefit of .NET 4 for the application; developers may have to

explicitly make use of specific APIs in certain cases. It is recommended that where possible older workflows to be migrated

to WF 4.0, workflow migration guide [17] can be useful in this effort. If services are built using WCF 3.5 SP1 then it can

be moved to work in .NET Framework 4 without much rewrite. The features available in WCF REST starter kit with .NET

3.5 have been integrated into .NET 4 and would mostly function well with minimal amount of changes. Similarly Entity

Framework or WCF Data Services can be easily moved to work in .NET 4 and also can benefit from new features available.

.NET Framework 4 skills

Enterprises can look at building new applications in house or can outsource it. Though currently .NET 4 specific skills would

be limited but individuals who have worked on earlier version would be able to quickly and seamlessly learn the aspects of

the new version with help from internet webcasts, trainings, etc. Enterprises having substantial Microsoft technology platform

pie are recommended to get their folks trained on this technology to support adoption and application support needs.

Page 13: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 13/16

Infosys – View Point | 13

Implementation challenges: Limitations

Our initial study uncovered the following limitations in adoption of .NET 4 and VS2010 within an Enterprise.

Business Intelligence (BI) project development

 VS2010 do not have support for development of SQL Server Integration Services (SSIS), Analysis Services (AS) cubes or

Reporting Services (SSRS) [7]. For this, developer will have to rely on earlier version of Business Intelligence Development

Studio (BIDS). Similarly SQL Server Modeling (OSLO) platform is also not integrated in VS2010. Support for both of them isexpected to come in next release of Visual Studio or service packs.

.NET support for ORACLE database connectivity

From .NET 4 and onwards, Microsoft has stopped supporting out of the box provider for Oracle (System.Data.OracleClient).

This means enterprises will have to buy Oracle provider for .NET from third party vendors and will have to budget for its

license costs. There are several third party expert vendors who are providing Oracle providers for .NET like Datadirect,

ORACLE, etc. According to Microsoft the third party vendors have matured in this space and it doesn’t make much sense for

them to continue to build and support this provider under .NET framework. System.Data.OracleClient assembly however

exists in .NET Framework 4 for backward compatibility and usage of the same will give compiler warnings. From future

versions, the assembly won’t be shipped with .NET framework [18].

Workflow modelingThe VS 2010 workflow modeler for WF 4 is developer focused and is not business analyst friendly. To use the workflow

modeler one has to be aware of various .NET 4 modeling activities and how to use them to realize a specific business

workflow scenario.

 Additionally during requirements modeling phase, VS2010 UML (Unified Modeling Language) activity diagrams developed

cannot be reused as WF 4 models.

Modeling State machines

 While implementing state-full scenarios, state modeling is required. VS2010 UML architecture model do not have support

for modeling state machines hence enterprise scenarios needing to model state-full scenarios will have to rely on other third

party tools for state machine modeling.

Page 14: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 14/16

14 | Infosys – View Point

Summary

.NET 4 and Visual Studio 2010 is a major release from its predecessor and bring in several improvements that

enterprises can benefit from. The new framework can be used to build an array of application development scenarios

like:

• Build easily extensible composite applications (consisting of multiple modules) in plug and play manner

without recompiling the application using MEF• Build seamless partner integration, end to end order management scenario spanning multiple departments

using newly introduced workflow services

• Build highly interoperable and scalable applications like Twitter, Facebook, Amazon by exposing business

functionality as WCF REST services

• Expose database entities as drill down REST services through WCF Data Services

• Model easier, faster business domain models in pharmaceuticals, insurance, energy, etc. domains through

Entity framework’s object relational mapping capabilities

• Cache less volatile information like product catalogs, shopping basket, user profiles in middle tier using

distributed caching framework of AppFabric to achieve high availability and scale

• Build Web 2.0 kind of support through interactive dynamic web pages using AJAX, ASP.NET MVC, and

Silverlight by leveraging support of Dynamic languages like Iron Python, Iron Ruby

• Build complex mathematical libraries, simulation algorithms for financial derivatives contracts, solve operation

research problems around cost optimization, maximize sales, shortest path algorithms having millions of

constraints and variables by leveraging F# to build functional libraries

• Exploit the true power of multi core architecture to multiply gain on application performance through

employing parallel APIs

• Host disparate framework version based .NET applications/components side by side without any runtime

issues

 Visual Studio 2010 architecture modeling, lab management fills the gap in requirements, architecture and test stages

of application development cycle and helps to ensure better synch up, documentation and traceability between

various life cycle stages. Windows Server AppFabric brings in more robustness to business logic hosting, scalability, performance, availability,

monitoring, management and will help .NET adopt in mission critical areas of enterprise.

Together .NET 4 and VS2010 helps to build robust .NET applications by providing seamless support across stages of

application life cycle development; hence enterprises should start considering it for new application development or

migration/re-engineering of existing applications as appropriate.

Further Reading1. Infosys .NET Framework 4 blogs

http://www.infosysblogs.com/microsoft/net_40/ 2. VS2010 Architecture Modeling

http://www.infosys.com/microsoft/resource-center/Documents/architecture-modeling-visual-studio.pdf 

3. Dynamic Language runtime

http://www.infosys.com/microsoft/resource-center/Documents/dynamic-language-runtime.pdf 

4. Functional Programming on the .NET Platform

http://www.infosys.com/microsoft/resource-center/Documents/functional-programming-platform.pdf 

Page 15: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 15/16

Infosys – View Point | 15

Bibliography1. Forrester Research: Application platform adoption trends

http://blogs.forrester.com/application_development/2010/02/forrester-databyte-application-platform-adoption-trends.

html

2. Unity Application Block

http://msdn.microsoft.com/en-us/library/cc440954.aspx

3. .NET Framework 4http://msdn.microsoft.com/en-us/library/w0x726c2(v=VS.100).aspx

4. Visual Studio 2010

http://www.microsoft.com/visualstudio/en-us/products

5. Windows Server AppFabric

http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx

6. Team Foundation Server

http://www.microsoft.com/visualstudio/en-us/visual-studio-events

http://www.microsoft.com/downloads/details.aspx?FamilyID=8bb22356-7dfb-4999-9d76-

43abddcf6eec&displaylang=en

7. Business Intelligence support in VS2010

http://connect.microsoft.com/SQLServer/feedback/details/508552/ssis-vs2010-project-type8. Infosys Software Factory

http://www.infosys.com/microsoft/resource-center/Documents/blueprints-software-factories.pdf 

9. REST

http://www.infosysblogs.com/microsoft/2009/08/how_i_explained_rest_to_a_soap.html

10. Serialization improvements with WF 4.0

http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,707e4cb9-6111-4069-96b3-596e87f2e262.aspx

11. Dynamic Languages

http://tartley.com/?p=456

12. Functional programming

http://www.defmacro.org/ramblings/fp.html

13. Somasegar’s blog - F# and VS2010

http://blogs.msdn.com/somasegar/archive/2009/10/09/f-in-vs2010.aspx

14. Visual Studio Lab Management

http://blogs.msdn.com/lab_management/archive/2009/05/18/vsts-2010-lab-management-basic-concepts.aspx

15. Iron Python

http://ironpython.codeplex.com/ 

16. Iron Ruby

http://ironruby.codeplex.com/ 

17. Migration guide

http://www.microsoft.com/downloads/details.aspx?FamilyID=bd94c260-b5e0-4d12-93ec-

53567505e685&displaylang=en

18. Oracle Database connectivity

http://blogs.msdn.com/b/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx

Page 16: Net Framework 4 Vs2010

7/17/2019 Net Framework 4 Vs2010

http://slidepdf.com/reader/full/net-framework-4-vs2010 16/16

About the Author

Sudhanshu Hate ([email protected]) is Senior Architect with Microsoft Technology Center (MTC) in

Infosys. He has over 12 years of industry experience with last seven years on Microsoft .NET. For last several years,

Sudhanshu has consulted on Microsoft technology solutions to Fortune 500 customers in EMEA and US. Sudhanshu

has published papers and presented in external forums like Microsoft Virtual TechDays. He also blogs at http://www.

infosysblogs.com/microsoft/. Currently Sudhanshu is leading work on .Net 4 and Visual Studio 2010.

Acknowledgements

 Author would like to acknowledge the reviews and inputs from Bijoy Singhal ([email protected]), Srikantan

Sankaran ([email protected]), Harish Ranganathan ([email protected]), Sripriya Thothadri 

([email protected]), Naveen Kumar ([email protected]), Atul Gupta ( [email protected]),

Manish Srivastava ([email protected]) in getting this paper published.