New Features of. NET Framework 3.0

Source: Internet
Author: User
Tags msmq
Application Program The goal of development is to make the best software in the shortest time. However, as the performance of the Development Platform increases, the barriers to making software have also increased accordingly. Taking windows as an example, the original Win32 interface has been integrated into a more powerful. NET Framework. The Framework 2002 released in 1.0 and Framework 2005 released in 2.0 provide a better working environment and efficiency for developers who design and write Windows software.

. Net Framework 3.0 (formerly winfx) is our next goal on the way forward. Applications built on the new framework can be created through Visual Studio 2005. For most Windows developers, such applications will become more familiar .. Net Framework 3.0 evolved from version 2.0 and added many new features based on the original version .. Net Framework 3.0 is scheduled to be released by the end of 2006, applicable to Windows Vista, Windows Server 2003, and Windows XP.

This article gives a general description of. NET Framework 3.0 and its components, so that you can have a clear understanding of this new version, analyze the technology used, and give a brief description.

Creating modern applications: Major Challenges

Today, developing an outstanding application is not simple-you need to consider a lot of requirements. Traditional considerations, such as accessing data and surfing the Internet through Web browsers, are important, but these are obviously not enough. The following lists a series of new challenges facing modern applications:

Organizations are increasingly inclined to look at their work from a process-oriented perspective. Because most applications have partially automated business processesCodeIt is very important to clarify the steps in the process. To achieve this goal, the most effective way is to use workflow technology, which is a method that needs to support workflow-based applications.

Generally, applications need to communicate with other applications inside and outside the organization. Modern applications must also be applicable to service-oriented architectures (SOA) and implement some functions as interactive services accessible to other software. To achieve these goals, you must support service-oriented applications.

For people who use applications, there is usually a need to pass the identification information. Currently, the definition and use of digital identification technology are different, which is also the cause of problems such as phishing. With this in mind, modern applications and their users will benefit from consistent digital identity user controls.

People's requirements for Modern user interfaces have also been greatly improved. To provide real business value, you often need to process different types of documents, use 2D or 3D graphics, play videos, and so on, and ensure that the local Windows client and Web browser are compatible with these features. To meet these requirements, different user interfaces must adopt a unified approach.

In general, today's applications need to deal with the above part or all of the challenges. Therefore, the development platforms of these applications should adopt consistent and feasible methods to solve all relevant problems ...... Net Framework 3.0 is designed to solve these windows application problems.

Challenge:. NET Framework 3.0 features
As shown in figure 1,. NET Framework 3.0 is developed based on previous versions. In fact, version 3.0 retains all the functions of. NET Framework 2.0. Therefore, applications developed based on previous versions can still be used normally .. Net Framework 3.0 adds four new components: Windows Workflow Foundation, Windows Communication Foundation, Windows cardspace, and Windows Presentation Foundation. This section describes the functions of. NET Framework 2.0 and the four new components.

Figure 1

· Net Framework 2.0: general basis for Windows Applications

Although software can still be written directly on the Win32 interface, it is actually ,. NET framework has become the mainstream environment for writing new Windows applications. As shown in the following figure. Net Framework:

· ASP. NET, supporting the development of web-accessible applications.

· ADO. Net, which allows applications to access other types of data.

· Windows Forms: allows you to create graphical user interfaces (GUI) for Windows applications ).

· System. xml enables applications to use XML-defined data, including XSLT and XPath.

Framework 2.0 adds several practical functions based on previous versions, including the development of ASP. net web applications, supports 64-bit applications running on 64-bit windows, and adds a new way to process transactions. Although some components in. NET Framework 2.0 are replaced by new components in version 3.0, the technology of Version 2.0 is still the foundation of the new version 3.0. For details, see the following section.

Windows Workflow Foundation: supports workflow-based applications

Workflow is a simple idea: a series of steps executed in a specific order. You can even think that each application is executing a workflow, because each application executes some processes. However, when C #, Visual Basic, or otherProgramming LanguageIn applications developed using traditional methods, these processes are hidden in the code. This is fine, but these processes are deeply embedded into the program logic, making it increasingly difficult to execute or change them.

Using workflow technology to execute the process logic can effectively solve this problem. After the workflow technology is adopted, the logic and common code will not be entangled. each step in the process will be clearly defined and then executed by the workflow engine. The result is that the process is clearly implemented.

Workflow engines are not a new concept, and some have been applied in windows and other systems. Microsoft has embedded the workflow engine in some products. However, as workflows become the mainstream method for developing applications, it is imperative to provide a single workflow technology for Windows. This is exactly the original design intention of Windows Workflow Foundation (WF. Since it provides a general workflow technology for Windows, WF has become the basis for unified creation of All workflow applications. Microsoft's Microsoft Office 2007 system, Windows SharePoint Services, and many other company applications also use WF.

However, it is difficult to provide general workflow technologies. For example, how can we use one method to meet various requirements of different workflow applications? WF provides a global view of the workflow. 2. WF workflow is only a group of activities executed by the WF engine. An activity is a class that can contain any work that the workflow creator deems necessary. Activities can be reused in different workflows. Therefore, it is easier to create an automated solution for new problems.

Figure 2

Another difficulty facing the provision of general workflow technology is the traditional divergence between personnel-oriented workflows and system-oriented workflows. Generally, the workflow application used by the staff requires high flexibility and can be changed in real time. Generally, workflow applications used by systems, that is, software, are relatively more static, but they must be as efficient as possible. WF considers these two different usage situations, including not only personnel-oriented functions (such as changing the functions of running workflows), but also more system-oriented operations.

Using Windows universal workflow technology of WF ,. Net Framework 3.0 provides a very useful software development model for developers. As process-oriented software continues to become popular, workflow technology will also be promoted.

Windows Communication Foundation: supports service-oriented applications

Most applications need to communicate with other applications, whether developed through workflows or other methods. In recent years, the communication technology between applications has developed rapidly. After decades of inconsistency, major suppliers finally reached an agreed application communication protocol. According to the soap global web service protocol, it is based on J2EE and ,. The interoperability between applications developed by different technical platforms such as. NET Framework is much simpler than before. It also makes the idea of a service-oriented architecture accepted by more organizations.

Of course, there are already many communication methods. Take. NET Framework 2.0 as an example. You can select the following communication methods:

· ASP. NET web service, which provides soap-based interactive communication.

·. Net remoting is mainly used for communication between. NET applications.

· Enterprise Services, Supporting Scalable transactional applications.

· System. messaging: supports message queues through Microsoft Message Queuing (MSMQ.

· Web Services enhancements (WSE) is an extension of ASP. NET web services and supports new specifications such as WS-Security.

These technologies have their own values and have their respective positions in practical applications. However, since the problem is the same, why should we adopt several different solutions? Why not establish a single application communication basis based on interactive services?

This is exactly the original design intention of Windows Communication Foundation (WCF. With WCF, developers no longer need to use different application programming interface technologies to process each type of communication, just as before-WCF (originally named "Indigo ") provides common methods using common APIs. In the. NET Framework 3.0 environment, most applications that use one of the above technologies will use WCF instead.

WCF provides powerful interactive communication support through soap, which is the basic element of modern computer devices. It also supports multiple WS-* specifications, such as WS-Security, WS-reliablemessaging, and WS-AtomicTransaction.WCF that do not require soap, but may use other methods, this includes optimizing the binary protocol, MSMQ queue messages, and simple rest-based communication. WCF uses a clear service-oriented method for communication. Instead of transparent communication between objects, WCF provides a slightly different abstract service for communication parties. One of the results is to release some Close Coupling Relationships between distributed object systems, reducing interaction errors and making them easier to modify.

Application Communication is a basic function of modern software .. Net Framework 3.0 solves this problem with its WCF Service-oriented method.

Windows cardspace: a consistent digital user control

Think about how people express their identities on the Internet. In most cases, the personal digital identity is used as a simple user name. With the password added, you can use this identity to access email accounts, online stores, online banking, and other financial institutions. Although this method is simple and widely used now, the user name and password methods cannot be avoided. The two most important items are:

Remember the different user names and passwords used to log on to many websites. To reduce these troubles, many people use the same username and password on different websites, which increases security risks.

Usernames, passwords, and other personal information may be stolen by counterfeits. Web counterfeits send fraudulent emails to trick victims into logging on to a fake website, such as a counterfeit website that is extremely similar to the victim's bank. This website is actually controlled by counterfeits. Once a victim enters his/her username and password, the counterfeited person on the webpage uses the information to impersonate the user on a real website and seek improper benefits.

To reduce the dangers of these problems, we need to adopt a new method to manage digital identities. Windows cardspace (originally named "infocard") is an important part of this new method. To help people track their digital identifiers, cardspace uses different information cards to represent each digital identifier. If the website accepts cardspace logon, The cardspace selection screen is displayed when you try to log on to the website, as shown in 3. You can select a card, which is equivalent to the digital ID used to log on to the website. You don't have to bother remembering countless user names and passwords. You just need to remember the information card they want to use. Different information cards also contain other information, which allows you to control the information submitted when logging on to the website.

Figure 3

These identifiers are created by one or more identifiers. Organizations can have their own identity providers without relying on simple user names and passwords. Each identity Provider uses a more powerful encryption mechanism for users to verify their identity. Cardspace itself also contains a self-issued identity Provider that can run on the client computer. With this provider, you can create your own identity without relying on the password for authentication. The website accepts these self-issued cardspace identifiers, so that you do not have to rely on common password methods, which will naturally reduce many problems caused by passwords.

If you do not need a password to log on to the website, you can steal the website without a password! However, if the counterfeits of web pages successfully trick victims into accessing fake websites, they will still steal other user information, such as sensitive medical information. To prevent this situation, users are required to distinguish between fake websites and real websites. To help users identify websites, organizations with websites should obtain "high-validation certification ". Different from the current simple SSL authentication, the new authentication method involves more and more strict processes, including more rigorous methods to prove the identity of the organization applying for the authentication. The high-validation certification can also contain a company logo and other information to help users accurately identify whether the website using the certificate is legal. When a user accesses a new website, cardspace always displays the certificate information of the website on a standard screen. Based on the degree of acceptance of the certification, the screen will automatically show the degree of confirmation of the Website Logo. The purpose is to force users to clearly define whether the website is trusted and then help them make the right choices.

Windows cardspace is actually part of a larger metadata system. The metadata system is fully based on open public protocols. It defines a brand new way to enable different digital identification technologies on different platforms (including operating systems other than Windows) and applications (including web browsers other than Internet Explorer. Cardspace uses a common method to select the identity and other Windows information. Therefore, it plays an important role in the metadata system. Besides, cardspace has become an important part of. NET Framework 3.0 because it solves the basic identification problem.

Windows Presentation Foundation: a unified approach for different user interfaces

User interfaces are an important part of almost all applications. Now, users have higher and higher requirements on these interfaces. Of course, we still need the traditional menu-driven GUI, but in addition, many applications also need to be able to play videos, run animations, use 2D or 3D graphics, and call different documents. The above functions must be available to access applications through installed desktop clients or web browsers.

These user interface functions on windows have been provided in different ways. For example, developers can use.. NET Framework to create a Windows GUI, use HTML, Java applets or JavaScript code to create a web browser interface, or use software such as Windows Media Player and Adobe Flash Player to play videos, the document format is defined by Microsoft Word, Adobe PDF, or other software. Obviously, developers are facing a huge challenge: how to use different technologies to create consistent user interfaces for different clients. This is quite difficult.

Windows Presentation Foundation (WPF), originally codenamed "aveon", was designed to solve this problem. WPF provides a consistent technical basis for all these user interfaces, greatly simplifying the work of developers. WPF uses a more modern method that supports video, animation, 2D or 3D graphics, and various types of documents, allowing users to process information in a new way. In addition, WPF also provides a general foundation for desktop clients and browser clients, greatly simplifying the application development work of the two.

Let's take the interface in Figure 4 (including images, on-site images, 3D views, and so on) as an example to describe some functions of WPF. In the past, developers needed to understand various technologies before they could work. Now, with this more consistent method, developers can easily create user interfaces in similar examples.

Figure 4

Another problem that has long plagued User Interface developers is how to create different roles required for an efficient interface. Software developers need to write the corresponding interface logic, but they are not the best candidates for defining the interface perception. Generally, designers and experts in the human-computer interaction field are more suitable for this job. However, in the context of previous technologies (such as Windows Forms), these problems are entirely determined by developers. There is no effective collaboration between developers and designers. WPF solves this problem with the help of Extensible Application Markup Language (XAML. XAML is an XML-based language that allows you to specify the user interface in a declarative manner-rather than code. In this way, the development tool can easily generate and use interface specifications based on the visual display created by the designer. In fact, expression interactive designer, a new Microsoft product, is designed for this purpose. With this tool (other provided by third parties), designers can create an interface appearance and then generate the xaml definition of the interface they created. After you import these definitions to Visual Studio, you can start to build the logic required by the interface.

After a developer creates an installed WPF application that runs on Windows, all the functions provided by WPF can be used. However, to create a client program running inside a Web browser, developers should create a XAML browser application, which is usually called xbap. similar to the basic principle of the installed WPF application, xbap allows you to display the same style as the user interface in a downloadable browser application. The two applications can use the same code, which means that developers no longer need different technical sets for desktop and browser clients. In particular, running the xbap downloaded from the internet in the Security Sandbox will restrict the functions of the application according to the current situation of such rich Internet applications. However, a large subset of user interface functions provided by the installed WPF application can also be used in xbap.

Both the WPF installation application and xbap can utilize modern graphics support from WPF, including hardware acceleration, vector graphics, and more. By providing more powerful graphical support, WPF makes a series of data visualization options possible, which is impossible by using Windows forms or other early technologies. WPF also provides the basis for XML paper specification (XPS) to define standard formats for viewing, distributing, and printing fixed-Format documents.

User Interface is a complex and important part of modern applications. Through WPF ,. Net Framework 3.0 provides a complete and consistent solution to address user interface problems. The goal is to enable relevant personnel (including developers and designers) who build user interfaces to work more effectively.

Application. NET Framework 3.0: Assumptions
The best way to understand how a group of technologies work collaboratively is to view examples of how they are used. Assume that an application requires customers and agents to submit a policy. If you use. NET Framework 3.0 for execution, the workflow shown in Figure 5 is displayed.

Figure 5

The application business logic displayed in the upper-left corner of the chart is implemented using the WF workflow. Processing a policy is a multi-step process, including evaluating the policy based on the organization's insurance rules. It may be necessary to check the credit of the policyholder or even obtain approval from his supervisor. Workflows rely on other required software to implement every step of the process in an active manner. To access the stored data, you can use ADO. net.

Insurance companies can provide a call center that allows customers to insure by phone. The client software used by call center employees is displayed in the upper-right corner of the chart, which is implemented by the install WPF application. The client uses WCF to communicate with the application business logic, using a binary Protocol optimized by WCF-WCF communication ., Call center staff rely on Windows cardspace to select the ID they will use when logging on to the application.

Customers can also apply for insurance through the Internet, and insurance agencies can also submit insurance policies through the Internet. To facilitate network operations, the application uses ASP. NET to communicate with the web browser. As shown in the lower left corner of the table, customers can access the application through Internet Explorer. They can use the common HTML interface or cardspace to select their own set ID. Third parties can also implement the identification selection mechanism for other client operating systems and browsers, so that the identification meta system can be extended to non-Windows clients and web browsers.

An insurance agent may need more interfaces to access the application over the Internet. Therefore, they should use xbap instead of a simple HTML interface. As shown in the center at the bottom of the table, these customers can share most of the user interface functions provided by the WPF desktop application used by the call center. Because the two are built on the same basis, application developers can reuse the same code in two types of clients. For other types of clients, agents can use cardspace to select the IDs they set for the application.

Finally, this application may need to communicate with other applications. If a customer requires a credit review upon approval, it is most likely to be implemented by calling an external service. Or the application directly receives external software requests to provide services that can be called by these external applications. In these cases, as shown in the lower-right corner of the table, the application relies on WCF to communicate with standard Web Services. No matter what technology these applications are built on, WCF's support for soap makes interaction between these applications easy.

This solution illustrates how to use the most important components in. NET Framework 3.0 to build outstanding applications. The simple examples mentioned here omit a considerable number of options, so they cannot be considered as a complete description of all functions of the series of technologies. On the contrary, this example only provides an idea to explain how to use different parts of. NET Framework 3.0 to solve actual business problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.