Why Dreamweaver MX development asp.net not very adaptable

Source: Internet
Author: User
Tags contains current time html page variables web services access database dreamweaver visual studio
Asp.net|dreamweaver

Recently I saw on the forum, many people asked about the use of DW development asp.net many problems, such as the inability to compile files, DW contains server behavior errors, and so on. Now I'll explain some of the questions about how to use development tools to write asp.net:

  1. DW-MX develops asp.net applications.

DW's approach to developing dynamic Web pages has evolved from Ultradev. It turns out that dw4.0 is good at developing static HTML pages by adding HTML code directly to the. html file, and just as ASP is adding server-side operations code directly in HTML (using the VBScript-JavaScript language), and the object that the ASP uses (the server-side allows you to manipulate Project), there are only 6 large objects. such as Request,response,server and so on. MM Company on the development of ASP Web pages are often used in some functions, such as reading the database, paging display, user login functions such as Code MO board. Users can use the method of developing HTML to add these already written code directly by command. In this way, UD can write ASP dynamic page, the same reason, write cf,jsp,php, etc., are in the HTML page to add server-side code, so UD can also write these pages.
MX upgrades the UD functionality and adds functionality that can be used to develop asp.net dynamic pages, but MX uses the same approach as developing an ASP page to add code directly to the ASPX file.

  2. ASP. NET's development pattern

asp.net development of Dynamic Web pages, and ASP completely different.

First, the ASP writes the server-side code into the HTML code, only the file name extension is. asp. and asp.net completely different. Its presentation layer (HTML code) is completely detached from the business layer (the background code). That is, if you have a asp.net file aaa.aspx, this file only holds the server control code that represents the code HTML and asp.net, and the background control code is stored in the name Aaa.aspx.vb (using vb.net development, if it is C #, File is Aaa.aspx.cs) in the background code file. After the program is written, you can compile this. vb file to make it a. dll file, which not only runs fast, but also protects the developer's labor results.

Second, the ASP is interpreted code, when the ASP is running, the server temporarily compiles the backstage code into executable code, and then executes it, and ASP.net is writing the program, the background code compiled, run without compiling this process, so run faster than the ASP page.

Again, the ASP's development language is VBScript and JavaScript, they are interpreted scripting language, language itself is very weak, in addition to the basic functions of a language such as defining variables, judgments, loops and so on, there is no other function. The asp.net uses a sophisticated, full-featured language that has all the capabilities of object-oriented programming, such as method overloading, class inheritance, interfaces, delegates, and so on. These are not available to the ASP.

Again, the ASP uses very few functions, only a small number of six major objects can be used. such as Request,response,server,fso and so on. ASP.net has a. NET class library support, as long as the class library supports the functionality, ASP.net support, such as the support of the convection, the Win2K directory services, send mail, FTP, and so on. function is very powerful.

  3. The shortcomings of DW development asp.net

According to the above ASP.net development model, you can see that DW is not a good tool to develop asp.net.

First of all, it does not support code separation, his development model is still in the development model of ASP, that is, it generated asp.net is not compiled, so, the development of the ASP.net Web page must be run when the compile run, the speed of the ASP is not fast.

Then there is no compile function, DW is not for the development of asp.net use, so even if you manually implement the separation of code, you must manually in the DOS alchemists under the command to invoke the compiler to compile, so if you have errors in the code, then run will fail, You must modify the code to recompile. Until the code runs successfully. If you have many aspx and. vb files, this work will be very, very cumbersome.

Finally, it is also one of the most important content, DW does not have debugging function. This feature is most important when writing a program and is designed to prevent logical errors from occurring. The error is that there is no syntax error in the code you are writing, the program is running normally, but the program is not running as you imagined.

Suppose you write a Web page that displays news, you specify the expiration time of the news in the display news, and keep it in a field in the news datasheet, so that if you want to exclude outdated news, just add one condition: The current time is less than the expiration time. As the following SELECT statement:

Select * from Newstable Where # nowdate # < Newstable.stopdate

However, if in the development, the Code "<" written in the ">", so that the display of news items are all outdated news, so that there is trouble.

Because the program is not wrong, there is no error message that the Web page appears normal. And you don't remember what it is. In addition to the problem, there is no database connection? Is the query statement wrong or does it show errors? You have no idea what's wrong. This is the time to use the program debugging function.

The main function of the program debugging function is that you can set breakpoints in your code to suspend execution in the code where the breakpoint is running, and maintain the state. You can also step through the program, you click the mouse to execute a line of code, at the same time, you can always monitor the content of the variables you define.

If this function is available, the logic errors mentioned above can be found and corrected immediately. This debugging function is not the DW.

  4. What is the development of asp.net?

Answer: Microsoft Visual Studio.NET

5. Benefits

Fully support asp.net development.

Background code: Vs.net directly support asp.net background code, you do not need any special operations can directly enter the background code.

Automatic compilation: Once you click the mouse, all the code files will be packaged into one or several (designated by you). dll files.

Debugging support: Currently the most complete asp.net debugger, you can debug background code, SQL Server stored procedures, JavaScript scripts, HTML code. You can automatically monitor all variable contents and calls to classes. You can step through the code and run the code on a per-procedure basis.

Many types of development: ASP.net not only includes ASPX form pages, but also includes class libraries, custom server controls, Web services, and many other types, and these types of DW are absolutely impossible to develop. And vs.net can be developed.

Server feature support: Automatically contains SQL Server Enterprise Manager in Vs.net, you can directly build SQL Server database, tables, stored procedures, functions, and everything. You can even contact the Access database, create tables and queries, and so on. Don't need SQL Server's own Enterprise Manager. So when you develop asp.net, you can use SQL Server's development version, no Standard Edition is required. This greatly reduces the pressure on the server.

Perfect help: ASP.net is a new thing after all, the development of the time is sure to help support. Because the. NET class library includes hundreds of classes and methods, you can't write them down, so if you don't remember which of the classes to develop, then Vs.net has a perfect class library to help you see them anytime. If you don't understand a statement about vb.net or C #, you can view their help or reference. If you have questions about how to use the DataGrid control in ASP.net. Vs.net's help contains all the examples and references of the DataGrid.



Related Article

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: info-contact@alibabacloud.com 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.