Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: Question ???


Message #1 by "Roger M. Taylor" <rogertaylor@f...> on Mon, 01 Jan 2001 14:18:32 -0500
--=====================_16462521==_.ALT

Content-Type: text/plain; charset="us-ascii"; format=flowed



At 03:55 PM 12/27/2000 -0800, you wrote:

>Does anybody know the difference between Microsoft .NET Framework package

>and Visual Studio .NET



.NET framework is the "runtime engine" and "essential utility kit" so you 

can write

=> ASP.net (web applications)

      http://www.aspng.com/quickstart/aspplus/default.htm

      using the ASP object frameworks*

=> WinForms (windows GUI applications)

      http://www.aspng.com/quickstart/winforms/default.htm

      using the WinForm object frameworks

=> Console based applications

      http://www.aspng.com/quickstart/howto/default.htm

      using any Frameworks needed



with any editor you feel like and compile them/debug them. Even traditional 

window apps can be now be written declaratively and utilize object-oriented 

programming within ASCII files, and extremely simple utilities compile them 

to assemblies (components as opposed to EXEs or DLLs). In fact in VB6 when 

you wrote several lines of code behind a button, it simply made an EXE that 

had a "magical" (hence undocumented) relationship with the VB runtime. 

Loading said file in an ASCII would reveal little more than the 3 lines of 

code. As a result C++ apps had no relationship with the very developed VB 

runtime and required hundreds of lines of explicit code for same task even 

if a wizard helped build it.



Prior to the NET SDK many binary files (typelibs, dialog resources, dlls) 

must be linked together with complex tools and their relationship was 

complex and cross-language interoperation was through COM/COM+ and interfaces.

A TYPICAL WINFORM APP IN  C#:



public class HelloWorldForm : Form {



     private Button button1 = new Button() ;



     public HelloWorldForm() {



         this.Text = "Hello Windows Forms World";

         this.AutoScaleBaseSize = new Size(5, 13);

         this.ClientSize = new Size(392, 117);



         button1.Location = new Point(256, 64);

         button1.Size = new Size(120, 40);

         button1.TabIndex = 1;

         button1.Text = "Click Me!";



         this.Controls.Add(button1);

     }





     public static int Main(string[] args) {

         Application.Run(new HelloWorldForm()); return 0;

     }



}



SAME APP IN VB.net :



Public Class HelloWorldForm

     Inherits Form



     Private button1 As New Button



     Public Sub New()



         MyBase.New



         Me.Text = "Hello WinForms World"

         Me.AutoScaleBaseSize = new Size(5, 13)

         Me.ClientSize = new Size(392, 117)



         button1.Location = new Point(256, 64)

         button1.Size = new Size(120, 40)

         button1.TabIndex = 2

         button1.Text = "Click Me!"



         Me.Controls.Add(button1)



     End Sub



     'When the application is started show the Form

     Shared Sub Main()

         System.WinForms.Application.Run(New HelloWorldForm())

     End Sub



End Class



Notice that the GUI elements are declared in the ASCII files (as opposed to 

VS6 days where creating binary resources was needed to make 

Windows/Dialogs) and that C# and VB both rely on a common Framework/object 

library to do the "heavy lifting".



The command line compilers, many documents explaining the tools, plus a 

huge Object Framework* comprise the .NET SDK. C#, VB.net, Jscript are three 

bundled languages. These are command line versions so while you can "write" 

apps with your favorite editor, you cannot draw them. 20+ more languages 

(Cobol, Smalltak, Ada, Perl) are coming within months that will 

interoperate with C#, VB.net and Jscript.net seamlessly. All these 

languages will agree on data types and object layout structures so strongly 

typed and object-oriented operation can be done at full-speed and 

efficiency without need for runtime data conversion (no more Iunknown, 

Idispatch, Variants, etc.) because all languages agree what strings, ints, 

arrays, collections and data types are assembled as.



Visual Studio .NET is a GUI tool for drawing Windows Applications and 

drawing ASP applications. Compared to prior versions, the IDE is now 

identical whether building MS C++ 7, C# or Visual Basic applications. C# 

and VB.net can draw GUIs and interact with properties, events and methods 

and compile to identical code. Because C++ is constrained by ANSI C++ it 

still has no easy way to interface to Win properties, events, methods so 

merely has a few more features.



Visual Studio NET had to depart from VB6 so that VB7 code could inherit 

objects built with C# and other languages built with the Framework.

http://home.earthlink.net/~butlerbob/VBNet.htm

http://www.asptoday.com/articles/20000914.htm

http://www.4guysfromrolla.com/webtech/091500-1.shtml

http://www.asptoday.com/articles/20000712.htm

http://www.plusasp.com/plusasp/converting.aspx

summarizes some of the changes.



For example VB1 - VB6 had a RND function to generate a random number. C++ 

had a function that worked differently. Instead of "grandfathering" VB's 

rand statement they just used a framework object, i.e.



dim randomnum

randomnum=int(rnd*9)+1



(becomes .aspx VB NET)



Dim RandomGenerator As Random

RandomGenerator = New Random(DateTime.Now.Millisecond)

Dim RandomNum As Integer

RandomNum = RandomGenerator.Next(0, 8)



The random framework object could be invoked by C# or any other language 

built with Common Language Runtime Framework (CLRF) with slightly different 

syntax but once the Framework is mastered multi-language programming is easy.



It doesn't have to be done that way. VB7 could have just mapped their RND 

function to the equivalent Framework compiled code but Microsoft felt VB7 

programmers could benefit by not having the framework hidden from them as 

the API was in the past.







---

http://www.asptoday.com - the leading site for timely,

in-depth information for ASP developers everywhere.

---

You are currently subscribed to aspx as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-aspx-$subst('Recip.MemberIDChar')@p2p.wrox.com









  Return to Index