Longhorn era, the end of the browser? - About Avalon and XAML

xiaoxiao2021-03-06  68

Longhorn era, the end of the browser?

- About Avalon and XAML

After reading the browser war, I can't calm down, maybe I haven't come out from the scene of the scene, but the peace of human beings, it is indeed a bit of bitterness, in this era of rapid development. We actually be killed for more than 2 years (exactly, it should be that IE5 came out later, so we should be close to 5 years), we need some fresh things to stimulate our gradually numb nerves.

When I heard Longhorn, I didn't know how special features of the guy called "the long-range". It is worthy of the Trinity to pay all the family. I have known as three innovative technologies, and there are some technologies. Quirky code: Avalon, Indigo, Winfs, I don't know if this stuff is not a future WINDOW .NET Server 2005 OR / 2006. We don't have to expect, maybe the date I will use the system name I predicted, maybe it is a code, just hope that the code can be so good, can read it, wait until I see XAML, I finally These codes are tossing, and it should be pronounced "Zammel" finally read "tortured".

Ok, the words come true, the next version of the next version of "Longhorn" is an important milestone. "Longhorn" is the first operating system built with a managed code, and the latest storage subsystem is first adopted ("Winfs"), this storage system is a revolution in the file system concept. It is also the first operating system that supports Natural Search Technology (Natural UI), which automatically solves a large number of polymity issues inherent in the query text. Longhorn contains 3 revolutionary technologies, the first is a graphic and presentation engine code "Avalon", the second is a new communication architecture of "Indigo", and the third is a new file system "Winfs". The graphic display engine code to be Avalon is displayed based on XML, while Longhorn-based applications can be written in addition to traditional VB.NET, C # can be written while introducing a new XAML language.

What is Avalon

Avalon is part of the next version of Windows (Cycord "longhorn"), mainly composed of a set of classes in the new .NET framework. Currently, the most important new namespace for Avalon has multiple names, for example, Msavalon.Windows, Msavalon.Windows.Media (these names will be changed). With AVALON, you can use C #, Visual Basic® .NET or any other language to support .NET Public Language Normative (CLS) to write applications. These programs are similar to the current WINDOWS form applications that are currently writable. That is, the standard part of Avalon.

What is XAML

Avalon will define a new tag language that can be used in Longhorn, which is called "XAML" (Extensible Application Markup). You can use XAML to define the layout of text, images, and controls, which is very similar to using HTML. Most writes Avalon applications may contain both program code and XAML. You will use XAML to define the initial visual interface of the application and write code used to implement other functions. You can embed the program code directly into XAML, or you can keep it in a separate file. All functions that can be implemented with XAML can be implemented by program code. Therefore, there is no need to write programs at all without using any XAML. However, it will not be possible; many tasks can only be completed by the program code, so only the simplest application will only include XAML. With the XAML element, you can control the layout of each page, including the display of text and images, insert buttons, text boxes, and the like interactive components. In summary, XAML is a language used to present a user interface that makes a page that makes an application in a declaration. Of course, in addition to using XAML, you can also use the process code to write longhorn applications. In general, a Longhorn successful application will have XAML pages and managed process code at the same time. You can combine them in your own way, but any combination of both is acceptable.

How does Avalon and XAML work?

Let's take a look at an XAML code, which is the most classic "Hello World" program. The following code is stored into helloworld.xaml.

Background = "blanchedalmond"

Fontfamily = "COMIC SANS MS"

FONTSIZE = "

36PT

"

Horizontalalignment = "center">

Hello, World!

Because there is no code, you can load the helloWorld.xaml file directly into the LONGHORN version of Microsoft Internet Explorer, and then you will see content similar to a web page. You can also use a program called MSBuild to compile HelloWorld.xaml. Two other short files are required for this compile time (not shown here). One of the extensions that extends Proj or MsProj will provide some information about the program and list all the required source files (XAML, and other files). Another XAML short file is also required to indicate which XAML page appears when executing the program. Run the executable of Hello World, you will see a content similar to the Windows program. Figure 1 shows these two versions.

In a sense, XAML and HTML pages are very similar, but because it is based on XML, it has a stricter specification, while the entire operating system of Longhorn has become its container because of the IE because it is executed under Avalon. It has a broader space.

1) layout option

You can use Windows traditional dot matrix layout while supporting flow layout of HTML style. FlowPanel, DockPanel, TextPanel, etc. Each element can meet most of your requirements.

2) Event processing

WINDOWS-based applications are not just to display web pages, they need to respond to user interface events in a very special manner. In this case, XAML must be supplemented by the actual programming code. You can put this code into a separate file or embed it directly into XAML. 3) Elements and objects

If there are multiple elements on the page, you can use a model similar to HTML to process .DHTML identifies multiple event sources, the same processing logic, and the same implementation in XAML via window.event.srcelement.

XAML VS HTML, browser disappears?

To do this is a bit not meaningful, because this is not a level and conceptual comparison, but familiar with web programming friends should also find that this and html page are so amazing, I don't even think that there is no time when I started. Too many differences, just the scorpion of Microsoft.

This time, I am failed, and the wrong outrageous, as for the reason, I will do a profound review in the back of the text, first to see the reason for misleading me.

1. The default HTML layout is Flow Layout, but the follow-up support of CSS can make most of the HTML element set Style = "Left: 50px; TOP: 30PX;" This attribute.

2. Event handling comparison classic ways is

转载请注明原文地址:https://www.9cbs.com/read-88320.html

New Post(0)