Re: newbie question
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Apr 2005 08:43:25 -0400
Hi Lisa,
I'll be glad to answer your questions.
> IIS is installed. I wish to use ASP.NET with C#.
> Now do I need Visual Studio .NET, or does notepad suffice?
ASP.Net is compiled, not scripted. However, you do have the option to use
code files rather than DLLs if you want, which are compiled at run-time. and
you can certainly write them in NotePad, if you have the time! The .Net
platform comes with all the command-line tools you need to do compiling
without Visual Studio, if that is your preference. However, I recommend
using Visual Studio, as it is the best darned programming IDE ever built,
period.
> What does Visual Studio.NET provide other than debugging and text
> coloring.. is it just like FrontPage is for HTML/ASP or does .NET code
> have to be compiled? If so, what is it compiled into? Portable Executable
> (PE)? What the hell is that? Intermediate code?
Visual Studio.Net provides you with all the latest debugging and compiling
tools, intellisense, auto-complete, a whole plethora of other functionality,
and is eminently extensible using VB.Net to extend it. It can be literally
anything you need it to be, in terms of debugging. It can create ASP.Net
applications, as well as any other type of application you may want to build
using .Net technology.
Managed code is ordinarily compiled into byte code similar to Java - MSIL
(Microsoft internediate language). This internediate language also has the
same drawback as Java, in that you can read it fairly easy (Visual
Studio.Net comes with a tool called IldAsm for viewing the byte code). It
also comes with an obfuscator, which can obfuscate the MSIL in the file. Or,
you can compile all the way to native machine language if you desire.
> What does an ASP.NET website consist of? .aspx files, that are like asp
> files, mix of HTML and C# (or whatever scripting is used).. and .dll's
> that work like CGI or IIS extensions?
Again, here you have some flexibility (MIcrosoft likes to accomodate as many
personality types as possible in their software). Visual Studio.Net uses
compiled DLLs with ASPX page templates. You can also use ASPX templates with
CodeBehind files (uncompiled), or simply ASPX files with embedded code in
them.
Now, as you're an experienced programmer, I'm going to go a bit more deeply
into the details of the ASP.Net programming model. If you remember what I
said yesterday, the .Net Framework has classes of all sorts, ranging from
high-level components that almost work right out of the box, to low-level
unmanaged code and pointers. Because the .Net platform is OOP, Microsoft has
done an amazing job of creating a class hierarchy that enables you to move
from one "level" to another easily.
With regards to ASP.Net, Microsoft has created a whole slew of classes in a
very well-organized hierarchy, that goes all the way from drag-n-drop
WebControls (UI elements that render HTML), to the Page class, down to the
HttpHandler level. In essence, the IHttpHandler interface is the key. When
IIS receives a Request, it passes it off the the HttpHandler for that type
of file, which is configured in IIS. The ASP.Net System.Web.UI.Page class is
an Httphandler, which is installed by default as the HttpHandler for ASPX
pages. It implements IHttpHandler. An ASPX page is a class. The Page
Template inherits the System.Web.UI.Page class. In the CodeBehind model,
which separates the business logic from the presentation layer, the
CodeBehind class inherits System.Web.UI.Page, and the Page Template inherits
the CodeBehind class.
However, this doesn't limit you to using the Microsoft System.Web.UI.Page
programming model. In fact, you can create your own custom HttpHandlers, and
assign them to handle requests for certain file extensions. In essence, the
system.Web.UI.Page programming model is a pre-built, robust set of classes
which allows the developer to concentrate on functionality rather than
re-inventing an HttpHandler with every page. It is event-driven, with
client-side events causing PostBacks (an ASPX page psts back to itself to
handle events). When the PostBack occurs, the server-side classes are
rebuilt, the event is re-wired to the handler, and the appropriate
server-side handler is invoked to respond to the client-side event. this
usually consists of performing some business logic, and adjusting the look
of the page when it returns to the client.
There's a lot more, but that's the essence of the matter.
Now, don't let the sheer size of the CLR bother you. Download the free .Net
SDK, which is an awesome and searchable reference. You will never use half
of the classes in there, so you don't need to know what they all are. There
are classes in there to perform virtually any type of action on a computer
or Network. But most of the time you'll be working with a small sub-set of
the CLR, a couple hundred classes, and you can look up others as needed.
Any other questions? :)
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Lisa Pearlson" <no@xxxxxxxx> wrote in message
news:ef%23GfDvOFHA.2728@xxxxxxxxxxxxxxxxxxxxxxx
>> You'll feel much better once you get into it. :)
>
> I doubt it, but I got nothing to lose except my sanity.
> *slowly takes the gun off her forehead*
>
> So, what do I need to get started?
>
> IIS is installed. I wish to use ASP.NET with C#.
> Now do I need Visual Studio .NET, or does notepad suffice?
> What does Visual Studio.NET provide other than debugging and text
> coloring.. is it just like FrontPage is for HTML/ASP or does .NET code
> have to be compiled? If so, what is it compiled into? Portable Executable
> (PE)? What the hell is that? Intermediate code? What does an ASP.NET
> website consist of? .aspx files, that are like asp files, mix of HTML and
> C# (or whatever scripting is used).. and .dll's that work like CGI or IIS
> extensions?
>
> It took me years to figure out what was such a big deal about XML, for
> them to write huge books about XML as the next big thing.. "Isn't it just
> storing data hierarchically in a format similar to HTML?" I wondered.. so
> what else is there to say about it? I guess I should've picked up one of
> those big books to find out. I use XML all the time, but till this day I
> still don't know what the big deal was. It seems we're not buying
> technology so much as we are buying marketing terminology.. I have to look
> up the meaning of it all.. I just looked up what "Assemblies" were.. the
> discriptions are so abstract, that it doesn't help you have a concrete
> idea unless you get to see actual code.. I don't even speak the world of
> .NET terminology yet, let alone program with it.
>
.
- Follow-Ups:
- Re: newbie question
- From: Lisa Pearlson
- Re: newbie question
- References:
- newbie question
- From: Lisa Pearlson
- Re: newbie question
- From: Scott M.
- Re: newbie question
- From: Lisa Pearlson
- Re: newbie question
- From: Dave Fancher
- Re: newbie question
- From: Lisa Pearlson
- Re: newbie question
- From: Kevin Spencer
- Re: newbie question
- From: Lisa Pearlson
- Re: newbie question
- From: Kevin Spencer
- Re: newbie question
- From: Lisa Pearlson
- Re: newbie question
- From: Kevin Spencer
- Re: newbie question
- From: Lisa Pearlson
- newbie question
- Prev by Date: Re: Calendar.SelectedDate
- Next by Date: Re: Changing controls after an event
- Previous by thread: Re: newbie question
- Next by thread: Re: newbie question
- Index(es):
Relevant Pages
|