[英文]利用Visual Studio.NET 進行 ASP.NET的WEB開發 (轉)
Web Enabling .NET
If we go back and reflect over recent years, we know have been heavily promoting the Internet, often introducing somewhat confusing 'marketure' terms like (which is basically just COM) to reflect the fact that their technologies have been internet-enabled and/or refocused/revised to take the internet into account. Microsoft have involved the internet in just about everything they've done since 1996. Although late to enter the internet game, their vision was, and is, still pretty simple: one day soon we won't think twice about develo web-enabled applications, the Web is the future of just about everything so why treat it as anything other than a function of an application? If we start treating the Web as just another deployment platfoor feature of an application, and use the same tool set to develop both regular applications and web applications, life would be a lot easier.
Microsoft are getting very close to achieving their vision with Visual Studio.NET. At the moment tools like Visual InterDev are web-specific, and tools like and Visual C/C+ are more focused on traditional WIN32 application development. This means to create a web application we have to think differently, and typically learn different models, programming paradigms and use different toolsets. For example, today I typically use and/or script in ASP pages to create web applications. Furthermore I typically have to use Visual Interdev to create the HTML pages.
The fact that I have to use so many tools is a pain. I spend a lot of time developing non-web applications and web applications. Why can't I just use or C/++ in my ASP pages ? Why can't VB have the same features Visual Interdev uses so I can use it to design pages without using another app ? OK, I can use components to bridge some of these gaps, but I still have to use ASP script as the glue, and I'm still restricted in what I can do. For example, ASP pages have to use late binding (so COM's multiple interface paradigm is all but useless), and I can't use elementary features like events. This is a pain. The good news is that Visual Studio.NET and address these problems.
The release of the next version of Visual Studio (to be called Visual Studio.NET) has merged the development tools we use. For example, has all of the features of Visual Interdev (which will probably be depreciated) and can now be used to create ASP applications. Along with these unifications come lots of improvements too: ASP pages can be written in VB or C/C++, ASP pages can use server s events, the new IDE has lots of nice features such as HTML auto tag completion, more MSDN integration, loads more support, precise HTML page layout that maps into HTML 3.2, specific browser targeting with fuzzy red underlining logic for HTML tags that won't work with your targeted browser.
Microsoft are making it easier for us to use the web, and the net effect should be more people will embrace it as a standard platform and/or feature. Whilst the Visual Studio.NET toolset are some months away from being released, ASP.NET is probably one of the most signifcant changes. As ASP developers you'll finally be able to use the full power of Visual Studio to aid your development.
Probably the most significant change in ASP.NET is the focus on web forms. The basic idea is you'll design your forms for ASP.NET just as you do for VB or any other language. You'll visually drag and drop UI elements (web controls) and hook up event handlers. The clever bit in ASP.NET is that once the form is rendered in the client browser, interaction with the client form is fired back to the server side form as events, where your code is then executed. ASP.NET provides all the management for the event passing between the client and server. With ASP today, you have to write this routing code yourself.
As part of web forms, ASP.NET also introduces the ability to separate visual HTML/Script elements from code. The model is implemented pretty much as per VB, and greatly improves code management and navigation. The code can still manipulate the HTML page, and in many ways is similar to in that respect.
Web controls are in many ways very much like ActiveX controls today, except they are client server based, and they output HTML rather than drawing to the screen. VB.NET ships with a large number of web controls, which you can extend or write yourself. The data list control is one of the controls provided. It allows you to point it at a data , tell it what fields go where, what colours you want and ASP.NET will do the rest, outputting all the various table and row HTML elements. As the control could in theory be browser-aware, it can also take on the responsibility of generating output differently depending upon the client.
Now we've given you a feel for what's coming in Visual Studio.NET and ASP.NET, here are five that can get you preparing for it today.
Getting Ready for ASP+
T1 - Learn VB and/or C/C++/
ASP.NET allows you to develop pages using VB or C/C++/C#. What basically happens is that pages are compiled and executed on the server. This leads to a signifcant increase in page performances, and also means you can take advantage of COM features such as early binding and true interface based programming. If you don't already know VB and/or C/C++/C# very well, run out to your nearest book shop and start learning it over the next few months.
Tip 2 - Learn COM(+) and Use Components
One of ASP's main strengths is also its main weakness: ASP Script. Whilst inline script code is quick to write and can result in fairly rd development of a site, it is still script. Script is interpreted, it is for the most part typeless so you use variants everywhere, and scripting engines can't take advantage of early binding, so every method call you make results in an additional call to detene if the method you are calling actually exists. Those are serious overheads.
I strongly suggest you start using COM+ components today, primarily for your business logic. Components resolve all the problems of script, and also provide you with several additional benefits like improved deging tools. Use ASP script to interact with your business components and generate the UI.
There is some overhead in creating COM objects that does have to be considered, but component creation in IIS5/ASP 3.0 and especially IIS5/ASP.NET is much much quicker so the overheads are reduced.
If you need a primer on ASP components check out Beginning ASP components from Wrox Press. We've got a sample chapter from the book here: http://www.idevresource.com/asp/library/articles/begcom.asp.
Tip 3 - Learn XML
Visual Studio.NET and ASP.NET make far greater use of XML. You at least need to make sure you've got a basic understanding of the differences of XML and HTML, and you should ideally be comfortable with creating and reading XML files.
For an introduction to XML check out 'Professional XML' from Wrox Press ().
Tip 4 - Learn About Processes, Threads and General Concurrency Issues
Whenever you talk about components and the ASP session object you hear nightmares about threads being locked down and scalability dropping. VB.NET allows you to create components that are free threaded. These are basically the same as free-threaded components in C/C++ which can safely be put into the session object. To make sure of this new feature of ASP.NET you need to have a solid understanding of Threading.
Tip 5 - Make sure you have used Visual Interdev
If you've have not used Visual Interdev it is worth your while playing with it. A lot of the features of VI and the controls of things like WFC are likely to be present in Visual Studio.NET. The whole concept of visual development (web forms) is the way ASP.NET is heading.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752043/viewspace-988107/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 利用 Bootstrap 進行快速 Web開發bootWeb
- 建站教程:利用Bootstrap進行快速Web開發bootWeb
- Visual Studio.NET釋出會開心辭典試題 (轉)
- 利用ASP開發Web應用 (轉)Web
- Visual Studio.NET、asp.net和C#間的關係是怎樣的?ASP.NETC#
- Web | 淺談用Python進行Web開發WebPython
- 如何利用 github 進行多人協作開發Github
- 利用雙環 TDD 進行由外向內的開發
- win 環境使用easyswoole利用docker進行開發Docker
- 利用ASP+JMAIL進行郵件群發的新思路 (轉)AI
- 利用Visual Basic開發SAP介面程式初探-RFC
- Visual Studio “14”中的Web開發新技巧Web
- Visual Studio “14″中的Web開發新技巧Web
- 利用Git+GitHub進行團隊協作開發Github
- 使用MEAN進行現代化WEB開發Web
- ASP.NET Web Forms的改進ASP.NETWebORM
- 利用培訓教育原始碼進行教育app開發的難點原始碼APP
- Web 開發進階指南Web
- OLE程式開發利用(開發EXCEL) (轉)Excel
- 利用磁碟的序列號進行軟體加密 (轉)加密
- 利用電話線進行WindowsNT RAS(轉)Windows
- Gradle進階:1: 結合spring boot進行web開發GradleSpring BootWeb
- 《Visual Studio 2017 Web 開發》截圖Web
- 使用Lccwin32進行MySQL開發。 (轉)Win32MySql
- ASP.NET Core 1.0開發Web API程式ASP.NETWebAPI
- iOS開發中利用AFNetworking進行斷點下載iOS斷點
- Web開發中常用中文字型名稱的英文對應Web
- dotnet core使用開源元件FastHttpApi進行web應用開發元件ASTHTTPAPIWeb
- ASP.NET歷險(一)——利用ASP與ASP.NET發E-mail (轉)ASP.NETAI
- 為什麼要選擇Python進行Web開發?PythonWeb
- 利用LINUX進行遠端辦公(轉)Linux
- 想在 Visual Studio Code 裡進行 ABAP 開發,需要安裝的擴充套件列表套件
- 轉行web前端開發的人有沒有未來Web前端
- asp.net 利用多表聯合查詢進行彙總統計ASP.NET
- 利用IDEA進行JNI開發:生成Windows平臺下的dll檔案IdeaWindows
- asp.net web開發中使用的Web彈窗/層的Layer使用介紹ASP.NETWeb
- 在雲中利用開源軟體進行開發以提高創新能力
- 【視訊教學】如何利用高德地圖IOS SDK進行開發?地圖iOS