Compile / Tianxing Keywords Visual Studio J # Mobile Device This article describes the support, improved debugging, and other functions of visiting development, improved development, and other functions of the Visual Studio .Net 2003.
There is a compatibility, version, and relevant methodological changes. The release of Visual Studio .NET 2003 is no exception. But you can rest assured that Visual Studio .NET 2003 has kept changing to minimize, and it can also find that it has added new features like Visual J #. Some new features of .NET Framework 1.1 and Visual Studio .NET 2003 will be discussed, including mobile support and improvement debugging. If you ask developers how the Visual Studio.Net 2003 and Microsoft .NET Framework 1.1 may get a cold reply. They are very disappointed with the lack of features like Break, Edit, and Continue in the debugger. If this is this, don't be discouraged. If you think there is no new or important thing in this new version, then please take a look. In fact, there is a lot of new exciting features. If you are not so sure if you need to study in depth, you can gradually understand it. You can still run Visual Studio .NET 2002 after installation of Visual Studio .NET 2003.
Code Compatibility Change Framework's largest "compatibility" change (will cause existing code to have problems during upgrade) in its XML compatibility. In System.xml.xsl.xsltransform, the Load and Transform methods need to use the XMLResolver variable. The only other change is the system.environment.hasshutdownStarted property is now static, and the System.Security.cryptography.dsacryptoServiceProvider class is now sealed (or in Visual Basic .NET is not inherited). In fact, there are seven other changes to cause compatibility issues, but they are in internal library IEHOST and IIEHOST. The remaining changes will not affect the code at all. In addition, there is a multi-version support for .NET Framework. You can create a installer (Installers) for .NET Framework specific versions using the start condition. Start condition detection version correctness, then redirect the user to the corresponding network location download weight release content. New Language: Visual J # .NET 2003 Perhaps the 1.1 version .NET Framework's biggest feature is to support Visual J # .NET 2003, Visual J # .NET 2003 is a managed version of the Java language. It is not a Java platform, but Java developers will feel very comfortable when using it. Visual J # .NET also supports Visual J 6.0, including Microsoft Extensions. In addition, some Java binary code can be converted in the CLR. For Java developers, Visual J # .NET is a fairly small and exquisite development package. Since Visual J # .NET is just another language for the CLR, you can also develop C # and Visual Basic .NET developers can develop applications (such as Web Services, ASP.NET, etc.). You can also fully enjoy the security, cross-language, deployment features of .NET Framework. Visual J # binary Converter Tool will convert Java binary code to Microsoft Intermediate Language (MSIL). However, it should be noted that it adapts to most Java Development Kit (JDK) Level 1.1.4 libraries and applications, but not all for all. The preferred method of transplantation is to pre-compiled Java language source code as Visual J # .NET, this tool is just the final selection method. Visual J # .NET is used to provide class library support, which is most equivalent to the JDK Level 1.1.4 development package included in Visual J 6.0. It also provides the various classes specified in the computer scientific course in the COLLEGE BOARD'S Advanced Placement. Visual J # .NET also supports Windows Foundation Classes (WFC) libraries and COM.ms. Packages: com.ms.lang, com.ms.dll, com.ms.com, com.ms.win32, com.ms.util , And com.ms.jdbc.odbc. The Visual J # .NET compiler cannot compile the source code of the Java language into a Java language binary code, but instead can be compiled into MSIL. Visual J # .NET does not support Applets development, you cannot accept Applets in your browser, and cannot create an application running on Java VW.
However, you can create a Windows Forms control, which can be very good in the Client machine browser with a 1.1 version .NET Framework running and version 1.1 J # Renewal Package. Visual J # .NET also does not support Java Native Interface (JNI), RAW Native Interface (RNI), and Remote Method Call (RMI). Figure 1 shows the relationship between java binary code, source code, JDK, and .NET Framework. Java binary code can be converted to MSIL, although this is not a recommendation. Again, the best practice is to convert Java language source code to Visual J # .NET, then, the final result is a pure Visual J # .NET source code. Even the best solution is to completely delete JDK support, re-encode it directly to .NET Framework. In that case, you can turn to the code for the CLR without the need for some unreasonable efforts in the legacy binary code or JDK reservoir. You will notice that Visual J # .NET can fully support JDK-Level 1.1.4 managers and .NET Framework. Now let's take a look at Visual J # .NET and compare it as C #. Code 1 shows a simple Hello World application developed in Visual Studio .NET 2003. Code 2 shows the same item, but the language is Visual J # .NET. Code 1:
Using system.drawing; using system.collections; using system.componentmodel;
Namespace Hellocs {///
/// summary description for form1. ///
Public Class Form1: System.Windows.Forms.form
{
Private system.windows.Forms.Button button1;
///
/// Required designer variable. ///
Private system.componentmodel.Container Components = NULL;
Public form1 () {/// Required for Windows Form Designer Support // InitializationComponent ();
// // Todo: add any constructor code after // InitializationComponent call //}
......
}
Code 2:
Package hellojs;
Import system.drawing. *; import system.collections. *; import system.componentmodel. *;
. / ** * Summary description for Form1 * / public class Form1 extends System.Windows.Forms.Form {private System.Windows.Forms.Button button1;. / ** * Required designer variable * / private System.ComponentModel.Container components = NULL; Public Form1 () {/// Required for Windows Form Designer Support // InitializationComponent ();
// // Todo: add any constructor code after initializationcomponent call //}
......
}
As you can see, these two programs are very similar. The using statement is an IMPORT statement. C # Bool data type is Boolean in Visual J # .NET. A method of derived a class using a clon in C #, as follows: public class form1: system.windows.Forms.Formvisual J # .NET uses Extends Keywords: public class form1 extends system.windows.forms.form exists in two obvious Differences. It is important to remember that Visual J # .NET is a Java language instead of a Java development platform. It allows Java developers (especially developers using J ) to make full use of their skills and improve existing code quality.
Mobile devices support, although it looks not important at this moment, because the development of the Pocket PC and equipment driven by Windows CE is in full swing, support for mobile devices is still unlimited. It is easy to imagine that all procedures have been developed for these devices. They are very convenient, no matter where you walk, you can bring your data, you can modify it, or bring it back to your desktop. If you have noticed the Beta version of Smart Device Extensions for the development of mobile device binary clients, or the Beta version of Microsoft Mobile Internet Toolkit for developing a web application for mobile devices, you may have discovered There are a small number of names. You will never use Mobile Internet Toolkit. Now you create a mobile web application and place the mobile web control on the mobile Web Forms. As for Compact Framework, you can still create smart device applications. Generally speaking, developing mobile applications is more smooth than the Beta version used in the final version. For example, as far as it is, the emulator runs in most cases seem good. Let me explain the situation of mobile clients and web applications.
Mobile client application as the name suggests, .NET compact framework is a subset of 1.1 version .NET Framework. In the .NET compact framework, there is no technical support in Windows CE, like Active Directory (R) or Enterprise Services; but there is no support that may already contain some of the features, such as .NET remote (transing) and Configuration. However, it contains all basic tools, including sockets, data access, calling Web Services support, and graphics. I can write a quick utility to download the image from the URL and immediately display it in the PictureBox. You can easily get a bitmap object from the stream, or you can return a stream from the HTTPWebResponse object. Combined with these two points, you can dynamically load images from the URL, and the code 3 is shown. Imports System.Netimports System.io
Private Sub LoadPictureFromURL (ByVal pb As PictureBox, _ ByVal URL As String) Dim MyStream As Stream Try '- Create request and response objects Dim Request As HttpWebRequest = _ CType (WebRequest.Create (URL), HttpWebRequest) Dim Response As HttpWebResponse = _ CType (Request.GetResponse (), HttpWebResponse) '- Get the response back as a Stream MyStream = Response.GetResponseStream ()' - Create a bitmap from that Stream Dim Bm As Bitmap = New Bitmap (MyStream) '- Set the bitmap into the Picturebox pb.Image = Bm '- Close the stream MyStream.Close () Catch ex As Exception If Not MyStream Is Nothing Then MyStream.Close () End If MsgBox (ex.Message) End TryEnd Sub
From the Beta1, the Compact Framework team adds the DataGrid control, although it is more difficult to find the DataGrid control. In some cases, DataGrid is not displayed in the Visual Studio .NET toolbox. Select the toolbox, select Add / Delete item, and then press the reset button in the Add / Remove dialog box, you can display the control. Other Cooling controls in Windows CE can also be obtained, such as TreeView, Toolbar, InputPanel, ListView, ProgressBar, TabControl, Statusbar, and TrackBar. For mobile applications, there is a feature I really like it. That is, you can return to a .NET compact framework compiling version (mobile app) in the .NET Framework's desktop version, without Preciation translation. To this end, Microsoft provides a Retargetable enumeration keyword in the assembly list (Manifest). I don't know if this is a good initiative, but it does very convenient to know that a mobile app can run on the desktop. This feature is irreversible, that is, you can't copy a device for desktop .NET Framework on a device, and then run without pre-transmissions. Be sure should be careful not to design the mobile application too complicated. The interface of the application must be simple. Input pen (STYLUS) and software keyboard restriction factors, the total goal of mobile applications is to allow users to use the fastest input data with the simplest interface. You can use the hardware and software Pocket PC emulator with Visual Studio .NET 2003 with the PC to debug mobile applications. Pay attention to the use of hardware devices when writing code. When you are ready to deploy, you can deploy directly to your device or create a CAB file, which can be used to install an application on your device. I have written a small mobile app called FnetSchedule, which visits the website http://www.franklins.net/fnservice/schedule.asmx Web Service and returns a DataSet. This data set contains a Visual Basic .NET, that is, the time schedule of the Hands-ON class, and is also included in this location, as shown in Figure 2. You can access the site: http://www.franklins.net/dotnet gets this information.
Mobile Web Application Mobile Web Application is an ASP.NET application, mainly for devices that are compatible with WAP compatible phones. Smaller pages, a small amount of generated HTML and code, the narrowed user interface is just one start. Like their boss ASNET applications, mobile web applications utilize server-side controls to submit device-specific content. The best news about mobile web applications is that you can write an application to access any devices, including your phone. System.Mobile.Web.ui.MobileControls supports various equipment supported by more than 200, and this number has been rising. All device functions are stored in a Machine.config file of the web server. You can download the device upgrade at the site http://asp.neet/mobile/deviceupdate.aspx. Mobile Web Form controls are varied and include: AdRotator, Calendar, Command (button), CompareValidator, CustomValidator, DeviceSpecific, Image, Label, Link, List, ObjectList, Panel, PhoneCall, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, SelectionList, StyleSheet, TextBox, Textview, and Validationsummary. As with standard ASP.NET applications, browser-based HTML controls can also be accessed by similar JavaScript and VBScript client scripting languages. In each control, I need to point out the SelectionList control, which can be a list, drop-down list, or combo box. You can choose multiple items and do not cause the form to post back when you choose. Moreover, SelectionList does not support paging, so it is ideal for small lists. The DEVICESPECIFIC control provides a simple way of self-service related content. You can also submit different code and HTML according to the type of client device. The TextView control displays any number of text with an optional tag tag. The format of the text in the TextView control is no different from the text of the text in the text. However, unlike the text text text, you can set the text in the TextView control. The TextView control supports the internal page. The PhoneCall control is a simple and easy-to-use control, which is based on the text, which can be used to represent a telephone number. For devices like mobile phones that can be used to call, the PhoneCall control represents interactive elements. You can call when activated. On the other hand, the phone number is displayed as a text with optional hyperlink. Finally, the ObjectList control provides a list of functional data objects. The ObjectList control inherits its most of its lines by using the internal pages of the device template set and the list control, including support template, but functions are more powerful. I can use my FnetSchedule application as a mobile web application and simply make a small amount of modification. You can access it in your mobile device in your site http://www.franklins.neet/mobile/schedule.
C Check the new version of the new version of Visual Studio .Net 2003 may be the most important upgrade. Now C programmers can access the same Windows Forms engine with C #. This feature includes full support for the toolbox and server browser, which allows you to drag and drop the controls and components directly in the Windows Forms application. In addition, you can simply manipulate controls and build properties through the property table. Visual C .Net is also more in line with ANSI than the previous version. This version has a large number of interrupt changes, many changes take the form of compiler, but they are ignored in the previous version. However, there are also a large number of silent or runtime errors. Due to this consistency, C code developed for other platforms can be compiled in many cases. Compiler changes include: U a function option. Allows you to create a value type method of the U / Arch (Minimum CPU Architecture) compiler option. Adding this option can utilize the mobile SIMD extension (SSE) and SSE2 instructions U / G7 (processor optimization) compiler options. Tell the compiler to generate an optimized code U enhance / GS compiler option for a specific processor. It helps prevent local variables directly buffer U / ZM compiler options for the Direct BufferRuns. Specifies that the precompiled head file memory allocation limit U / NOBOOL option has been deleted U / GF is not important, and will be removed in the next version of Visual C . Internal _interlockedCompareExchange, _interlockedDecrement, _interlockedExchange, _interlockedExchangeAdd, and _interlockedIncrement have been filed, and internal _ReadwriteBarrier has also been added. This effectively blocks the read and write optimization of the overall memory, ensuring that the multi-threaded application code's global variable state is very useful. Also add a few link options: / askMBLYDEBUG issues a debuggable property, track debugging information, disable JIT optimization; / askSEMBLYLINKRESOURCE Create a link to the .NET Framework resource; / delaySign allows you to put the public key (public key) The program is concentrated; / keyfile specifies a strong name key file; / keycontainer specifies the key container; / saseh tells the connector if it can also generate an image security exception processor table, only one image is generated. Visual C .NET provides new attributes. Pages, a large number of new objects, as well as new attributes and methods for existing objects. Existing objects enhance project build model. Properties page includes managed resource properties page, XML data generator tool, managed wrapper, initial interop page, and auxiliary hosting Package properties page.
Oracle and ODBC new data providers may have the second largest new feature (depending on Oracle and ODBC development to your importance), add these two new ADO.NET data providers, I don't want to evaluate how they are. Ok; I just want to say, so far, any report to access DB2 using ODBC is coming. Now you can avoid COM layers (OLE DB) and directly encode to ODBC API (ODBC.DLL) and / or hosting code Oracle providers, and you only need to use ADO.NET objects you are already familiar with and love. Another change is the HASROWS attribute value of System.DataTqlclient.sqldataReader to determine if the reader returns data. This makes it easier when handling empty results. IPv6Internet is used to run the current version 255.255.255.255 format IP address. The demand for static IP addresses is ongoing. Similar network address transfer (NAT) complex hardware and web sites are indispensable when solving only 2554 or about 4, 300, 000, and 000 unique numbers are essential to use as an IP address. This has become a problem. In 1995, Internet Engineering Task Force, IETF issued the Basic Specification for Internet Protocol Version 6 (IPv6). Now, most of the Internet still uses IPv4 in nearly 20 years. IPv6 is expected to replace IPv4 gradually, while in the transition, these two protocols have to coexist for several years. The IPv6 address is 128 bits, while IPv4 is only 32 digits. According to the WIDE project, if the total number of IPv4 addresses is represented as millimeters, the total space of IPv6 address will be 80 times the diameter of the Milky Way. This is enough to use it, do you think? In addition to adding more IP addresses, IPv6 has improved IPv4 in terms of routing and stateless network autoconfiguration. The router can dynamically manage and assign IP addresses and do not need to help dynamically host configuration protocol (DHCP). You can read all information about automatic configuration in IPv6 Stateless Address AutoConfiguration (URL: http://www.normos.org/ietf/rfc2462.txt). Another great feature of IPv6 is to achieve true multicast. This allows the router to send the same packet to a plurality of routers, and the client can also access the data packet flow with the unique target IP address, so it is not necessary to get their own data streams without each client. The Webcast, which is used to use IPv4, looks like a regular website broadcast. However, it is actually sent to multiple clients to multiple clients. It is a bit similar to radio broadcast technology, but only single-band segment. The client can raise an antenna to capture the data. This reduces many burden on the infrastructure, and each person is almost simultaneously received the same data. .NET Framework1.1 includes IPv6 support in System.NET namespace. In the near future, you can hear more information about IPv6.
Visual Studio .NET changes I will go back to the .NET Framework 1.1 this topic, but let me introduce what new things in Visual Studio .NET 2003. Design Visual Studio .NET 2003 is basically the same, but a little gorgeous. I found that it is easier when the start page is rotated. Unfortunately, you may still lose the direction in this maze, which will not change in the short term. Just remember, double-click the mouse at the window title bar, then double-click to reope with, so you can escape the worst situation. Also remember, you can also solve this problem in the Environment | General Tab In the Tools | Options dialog box. Auto-completion feature in Visual Basic .NET is now now, Visual Basic .NET automatically adds a catch statement and end try when you type in TRY. This is a very satisfactory feature (should always be reserved), but what is the automatic implementation of the interface? In Visual Basic .NET, when you type an Implements statement, the interface is immediately generated. Try it, create a new class with the following statement: Public Class Foo Implements Idisposable
END CLASS
As long as you knock the key in my idisposable, immediately appear below: Public Class Foo Implements Idisposable
Public Sub Dispose () IMPLEments System.idisposable.dispose
End Subend Class
Adding a web reference in Figure 3, the "Start Browsing for Web Services" pane in the Add Web Reference dialog provides a web link available to Web Service on the Internet and Internet. Interestingly, browsing the local machine for web references can be used under beta1. But in the end, it is still deleted. I am very happy to use this feature. Before you add a web reference, you can rename it, as shown in Figure 4.
New debugger features now, we can remotely debug through pipelines, the pipeline has a safe advantage, and this benefit can be found in TCP / IP. Using pipes for debugging requires Remote Debug Manager, the manager is only available to C . The debugger also supports SOS, which is a very gainful managed code dump pool, which can be hung from the Command window. The error message has been improved, especially when debugging the ASP.NET application. The debug symbol can now reside in a separate symbol server, which can be your own server, or a Microsoft's public symbol server. If an exception occurs, it can download it automatically. In addition, some new debug safety settings can also be made, for example, you can specify who has debugged permissions and who doesn't have this permission.
Primating from Visual Studio .NET 2002 You can copy Visual Studio .NET Previous versions in some options to a new version. If you install different versions of the program on the same machine, first, you start Visual Studio .NET 2003, a dialog appears, where you can choose whether you have been existing. At this time, click the confirmation button to select your choice and settings. The change in Visual Studio in the Program Explorer is the use of the underlying source code synchronization designer. This idea is further deepened. There is a new option tells Visual Studio .NET Whenever you call up a specific designer, the designer will automatically select in the Solution Explorer. Open the Projects and Solutions | Environment | Options dialog box, select the TRACK ACTIVE check item. Enterprise Services can now use the low registration services in Enterprise Services. That is, you can use the business service directly without inheritance from the servicedcomponent. ASP.NET features The biggest change here is System.Web.ui.page.viewStateUserKey property. You may have this experience before, and asp.net isas you might be uncertain when you manage ViewState. There is a good article in "ViewState Optimization Strategy in ASP.NET, summarizes some of this defect. Not only should I pay attention to scalability issues, but also pay attention to security issues. __ViewState variables can be black (HACK), one-click attacks, can be used to open your ASP.NET application. Setting the ViewStateUserKey property to help your application accounts to avoid a click attack. It completes this feature by allowing you to complete this feature for a __viewstate variable assignment identifier for a single user. You can set this property to any value, such as a user session ID, but it should be aware that you must set this property in the page_init phase of the page processing. Setting this property in the Page_Load phase will result in an exception thrown. After ASP.NET makes some new changes, Checkbox, ListBox, ListControl, RadiobuttonList, and Dropdown ListBox controls now support the SelectedValue property. Enterprise Instrumentation Framework Enterprise Instrumentation Framework (EIF) with event log, tracking, and performance counters. EIF can reduce business development and maintenance costs, helping customers perform effective monitoring and troubleshooting in a high-volume production environment. In order to unify existing event logs and tracking mechanisms in Windows, EIF provides a consistent, low-profile API and configuration layer. Developers can use this feature to publish technical support group audits, errors, warnings, business events, and diagnostic events for monitoring and analysis. In short, you have gained better instrumentation in a wider range of environments. It is international standard time when supporting the world, and all other times are calculated according to it. Adjusting the World Time (Coordinated Universal Time, UTC) is previously referred to as Greenwich Time (GMT). Several classes in .NET Framework have been upgraded to support the time value represented by UTC. The date and time in Windows Management Instrumentation (WMI) is represented in the DMTF DateTime format.
This format already explains in the WMI SDK document (SDK can be obtained from Windows Management Instrumentation (WMI) Tools). The lowest accuracy in the DMPT is milliseconds, and it is a drop in DateTime (Tick), one tick is equal to 100 nanoseconds. From the tick conversion, the time value is round to the closest millisecond value. There is also a new System.Management.ManagementDateTimeConvertDDateTimeConverter class, which can be converted between the DMTF DateTime format and the CLR-Compliant DateTime format. SMP thread synchronization .NET Framework 1.1 adds a function of multiprocessor thread synchronization (easy to read or write or memory refresh). Of course, it should be careful when handling these threads. Summatches this article will be introduced here. In addition to Windows Forms, this paper summarizes all major changes in .NET Framework 1.1 and Visual Studio .NET 2003. It's hard to imagine that installing a new application in .NET does not destroy or replace the agricultural program. Of course, understand what I am familiar with .NET Framework should not be very strange, because deleting version issues are still a major problem. However, in the past, I often spend hours, my hourly spare time to restore a liar installer in my system, "Hu Zuo is not"; I don't know, after using these "new discovery", how will my spare time? Over.