newbie question

L

Lisa Pearlson

I have a bit of past ASP experience, little bit of COM knowledge, no DCOM or
ActiveX and no .NET experience.
Setting up IIS is challenge enough. Like everthing else, it works, but no
sense of control or insight. Too much clutter for a newbie.

I'm a PHP/Apache guy. Setting up Apache works out of the box, configure some
options in a config file, which comments describing what they are for..
install PHP, puts some files at known locations, and off you go. Full
control.

Microsoft technology has many layers of abstraction, which is great for
rapid application development, and VB developers can live with that well. As
a C++ developer, I get frustrated with it. I need to know how everything is
wired up, where all the bits and pieces are stored. Lack of control causes
insecurity regarding security settings and troubleshooting when something
doesn't work right.. which means you have to dig through all layers of
abstraction and understand everything any how, making the abstractions quite
time consuming. If you're familiar with everything already, then I'm sure it
pays off.

I have 1 month to develop a web application.. retrieves and edits database
records. I can choose between PHP, ASP.NET (C#) or write a custom C++/MFC
windows application. Since web development and ASP.NET allows more rapid
application development than writing custom C++ windows application, it
seems better, however, since I have yet to learn ASP.NET and C#, is my time
not better spent using what I'm alaready familiar with? I've found learning
curve too steep. I can get ASP.NET books, but it's an abstraction interface
to other technologies like COM/DCOM/ActiveX or whatever more.. so I need to
learn that too, and learn C# too.. all traced back to win APIs to make sense
of it.. that's quite a long way to walk

So, can someone tell me what the advantages are of using ASP.NET over let's
say, PHP or classic ASP? My ONLY reason for even considering ASP.NET is some
uninformed hope that I can embed controls (restricting the use to windows
platforms?) that allow more efficient editing of server-side database
records, so that listing and editing these records don't have to be done
with <form> POST, which makes it slow.

In particularly, I wish to be able to fetch records from a database and be
able to scroll, add and update records without having to fetch and retrieve
entire web pages every time.

I could program a windows C++/MFC application that can use windows controls,
custom controls, to fetch records via ODBC over the internet (security?) and
display it and have performance much like any database application (like
Query Analyzer itself). Yet, webpage (HTML) development is faster and
easier. So is ASP.NET a little bit of both worlds? ASP.NET uses .NET
framework, a layer of abstraction, managed code, whatever.. it just doesn't
turn me on. So I'm trying to figure out what to choose and why, PHP, ASP.NET
or just custom windows client application, no webbrowser.

Can anyone tell me why ASP.NET is worth my time?

Lisa
 
S

Scott M.

See responses inline:

Lisa Pearlson said:
I have a bit of past ASP experience, little bit of COM knowledge, no DCOM
or ActiveX and no .NET experience.
Setting up IIS is challenge enough. Like everthing else, it works, but no
sense of control or insight. Too much clutter for a newbie.

While IIS certainly has configuration settings, there really isn't much you
need to do out of the box to build & test web appliations.
I'm a PHP/Apache guy. Setting up Apache works out of the box, configure
some options in a config file, which comments describing what they are
for.. install PHP, puts some files at known locations, and off you go.
Full control.

Microsoft technology has many layers of abstraction, which is great for
rapid application development, and VB developers can live with that well.
As a C++ developer, I get frustrated with it. I need to know how
everything is wired up, where all the bits and pieces are stored. Lack of
control causes insecurity regarding security settings and troubleshooting
when something doesn't work right.. which means you have to dig through
all layers of abstraction and understand everything any how, making the
abstractions quite time consuming. If you're familiar with everything
already, then I'm sure it pays off.

I have 1 month to develop a web application.. retrieves and edits database
records. I can choose between PHP, ASP.NET (C#) or write a custom C++/MFC
windows application.

I think that given your skill set, 1 month may not be a reasonable
expectation in the first place. No offense, but to learn ASP.NET, which is
in no way related to classic ASP, build, test and deploy an application in
one month doesn't sound like a win/win for anyone.
Since web development and ASP.NET allows more rapid application development
than writing custom C++ windows application, it seems better, however,
since I have yet to learn ASP.NET and C#, is my time not better spent using
what I'm alaready familiar with? I've found learning curve too steep. I can
get ASP.NET books, but it's an abstraction interface to other technologies
like COM/DCOM/ActiveX or whatever more.. so I need to learn that too, and
learn C# too.. all traced back to win APIs to make sense of it.. that's
quite a long way to walk

So, can someone tell me what the advantages are of using ASP.NET over
let's say, PHP or classic ASP? My ONLY reason for even considering ASP.NET
is some uninformed hope that I can embed controls (restricting the use to
windows platforms?) that allow more efficient editing of server-side
database records, so that listing and editing these records don't have to
be done with <form> POST, which makes it slow.

In particularly, I wish to be able to fetch records from a database and be
able to scroll, add and update records without having to fetch and
retrieve entire web pages every time.

I could program a windows C++/MFC application that can use windows
controls, custom controls, to fetch records via ODBC over the internet
(security?) and display it and have performance much like any database
application (like Query Analyzer itself). Yet, webpage (HTML) development
is faster and easier. So is ASP.NET a little bit of both worlds? ASP.NET
uses .NET framework, a layer of abstraction, managed code, whatever.. it
just doesn't turn me on. So I'm trying to figure out what to choose and
why, PHP, ASP.NET or just custom windows client application, no
webbrowser.

Can anyone tell me why ASP.NET is worth my time?

ASP.NET is, by far, much more robust and sacalable than PHP, JSP, or classic
ASP. The event driven model that ASP.NET is built upon and the vast set of
classes to program with in the .NET Framework are just 2 reasons to go with
ASP.NET. But again, to expect someone to learn a .NET language (C# in your
case), get familiar with a new development environment (VS.NET), work with
an architecture they are not used to (ASP.NET) and then build, test and
deploy a data-driven application in one month doesn't sound like a
reasonable prospect. If time is really a non-negotiable constraint here, I
would create the site in whatever language/platform you already know and
migrate to something better when you have more time to devote to it and have
already become familiar with the technologies that will be used.
 
L

Lisa Pearlson

Thank you for your response.

I find that most of my time learning new stuff is wasted on searching for
the right info.. and digging through 80% or more of useless chatter around
it, yet having to read it all to know what is chatter and what is not.

If you're a good programmer, you can make applications robust and scalable
without the .NET framework. But since .NET is advertised well and clueless
customers want it, I'm pretty much forced to swallow this new technology
which is yet again another wrapper around all these microsoft technologies,
that I frankly dislike. One reason why I never liked VB. To much behind the
screen wiring.

Anyway, I should be able to develop something within 1 month, and maybe fine
tune things later.. doing the project will be like following a tutorial,
where I have to search the net for clues as to how to take the next step.
Best way to learn.. But pretty stressful when you have a deadline too.

Away from my petty life, back to ASP.NET, you mention "event driven model"..
I'm sure all this info is available on the net, but like I said, 80% of my
time is wasted on searching for it, so this helps me alot..


Question:
How should I understand event driven model in web applications? on client
side, javascript can handle some events, everything else is usually done via
form POST and parsing on the server side, using ASP, PHP or whatever.
Do events on the client side get sent to the server? Via HTTP messages, or
via DCOM bloat?



I've found so many sources dealing with ASP.NET but none that just explain
some of the basics of what ASP.NET is really all about. I've read upon some
..NET stuff, and it seems little more than a thin wrapper around windows APIs
to handle some garbage collection and such.. (to use api's you have to
write your own wrappers sometimes.. reminds me of VB, where to do anything
useful, required you to import half the windows api's.. so then why not use
VC++ instead, I always wondered).

Lisa
 
D

Dave Fancher

For what you have described, ASP.NET doesn't sound like the tool for you.
You want a client side technology (ActiveX or Java?) that is able to create
and maintain a connection to a database. You don't need ASP.NET for what
you have described. I think a desktop application is better suited for this
application.

To fill you in, the way the event model works in ASP.NET is that each
control that triggers a server side event calls a client side JavaScript
function that sets the value of a couple of hidden fields then submits the
form (a standard HTML form with a runat="server" attribute). There is
another hidden field called ViewState that allows for persisting values
between server trips. Additionally, each page follows a specific life cycle
of events that handle code specific to intialization, loading, event
handling, rendering, and unloading.

For instance, if you have a Button WebControl (rendered as <input
type="button" ...>) that has a server side handler for onClick, the button
is also rendered with onclick="__doPostBack(...);" which sets the hidden
fields and submits the form. The .NET runtime (on the server) checks the
value of the hidden fields (including viewstate) to determine the status of
the page and executes the method that is specified to handle the event.

The model used by ASP.NET allows for much more managable code not to mention
that is succeeds in isolating the logic from the UI code (HTML) since, when
done properly with code behinds (VS.NET default), the HTML document (your
aspx file) forms the layout for a class ultimately derived from
System.Web.UI.Page. With a code behind, you define a class derived from
System.Web.UI.Page. When an ASPX is requested, the runtime instantiates a
class derived from the class defined in the code behind file.

If all your application needs to do is retrieve and edit database records,
you may be able to pull this off in a month but that entirely depends on the
actual complexity of the app. Overall, the WebControls and HtmlControls are
pretty straight forward. ADO.NET is also pretty straight forward.
Depending on your environment and application needs though, security
considerations (which it sounds like you'll have from your issues over
control) offer their own set of complications. Of course, there are nuances
to all of these topics about which you should educate yourself.

Agreeing with Scott M., IIS is easy to configure. I'm running six ASP.NET
apps and have development, testing, and production environments set up for
each of them. Very little configuration is needed to properly configure IIS
for an ASP.NET application. Granted, IIS configuration is not done through
config files but to argue your point about Apache working "out of the box",
you said it yourself, "configure some options in a config file, ..., install
PHP, ... and off you go." How much does that really differ from "install
the .NET Framework, click a button or two to configure some options, and off
you go." In either case, you must still create the application folder and
tell the HTTP server where the application is loaded.

As for learning the .NET technolgies, learning a .NET language shouldn't be
a big deal. If all else fails you could even use PerlASPX from ActiveState
to allow you to use Perl instead of C#. Sure, there are differences between
languages in that some languages offer features that other languages don't
but the overall concepts are the same and common constructs are only
syntactically different. No matter how it is written, a for loop is still a
for loop.

When push comes to shove and you're up against a wall, you need to choose
the best tool for the job. For your situation, it sounds like you should
stick with a tool with which you are already familiar. In fact, your posts
read as though you have already convinced yourself not to use the .NET
technologies for a variety of reasons that are applicable in some cases and
not in others. You seem to be dead-set against using the .NET technologies
and are looking for people working in completely different environments with
different needs to either validate your concerns (further proving that .NET
is not worth your time) or to give you some irrefutable argument as to why
you absolutely must use .NET as opposed to the other tools at your disposal.
To reiterate, you must evaluate the needs of the project and choose the tool
that you believe will best meet those needs. If you believe ASP.NET is the
best tool, great, use it, otherwise use something else.

On a side note, if you're dismissing at least 80% of what you read, it
sounds like you may want to refine your search techniques or perhaps you're
simply disregarding too much...

Good luck with your project.
 
K

Kevin Spencer

Hi Lisa,

I can certainly understand your position. But let me speak to you as a
C/C++/C# developer, and let me see if I can explain why I love ASP.Net from
an old low-level programmer's point of view.

It's all about the programming stack. I started out with C programming on
the DOS platform, what there was of it! C, as you know, was developed as a
higher-level language than Assembler, for the same reasons that other
higher-level languages were developed: productivity. It simply takes too
long to write a program in assembler. So, in a sense, Machine language is
the bottom of the programming stack, with Assembler on top of that, and the
higher-level languages like C on top of that, all for productivity's sake.

When I programmed in C, I was always on the lookout for good function
libraries (DLLs), as having these pre-built functions also enhanced
productivity. No need to re-invent the wheel every time you write an app,
eh? And of course I created my own, and eventually had a rather large
library of DLLs to work with.

C++ took the concept a bit farther. OOP is the next technology on the stack.
Now you could use encapsulation, abstraction, polymorphism, and inheritance,
to organize and make your coding more productive. And class libraries took
the place of function libraries.

Along comes Microsoft with the idea that reusable code was a good thing, and
they began to build their programming platforms, which were, in essence,
another layer of abstraction on the stack. Finally, Microsoft came out with
the .Net platform, and the Common Language Runtime Library, which houses
literally tens of thousands of classes.

Now, where I think you misunderstand all of this, is that although the
programming stack has grown quite high, a good programming technology should
allow one to work at a high level when it is convenient and enhances
productivity, but also to be able to go down in levels when the various
libraries reached their functional limit (couldn't do something, IOW). You
have the best of both worlds. High-level stack for productivity, and access
to the lower levels when you need it.

You may also be confused due to the fact that the higher-level programming
stack allows people with little knowledge of programming to put an app
together, and therefore, attracts many underqualified people to it, where a
system like Linux or Unix doesn't have that capability, and requires more of
the developer. However, it should also be noted that development on such a
system is more costly, due to the lack of ready-made classes and platform.
IOW, you do have to do a lot of re-inventing the wheel on such a platform.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
L

Lisa Pearlson

Thank you for your feedback. I really appreciate it, and I did not dismiss
anything.
I'm an experienced C++ programmer. I'm not worried about learning C#.

I do not expect people to support me in my .NET dislike or all other layers
of abstraction, starting with COM. I understand the advantages, but not sure
it needs to be that complex. If I wanted to to be affirmed in my dislike, I
wouldn't be posting on a microsoft news server, but on a linux website.

My sole purpose was to learn enough about .NET to know if it can be a better
tool for the job.. (not only technically, but also market acceptance.. if
customers want it, and maybe later want connectivity with other microsoft
products, then using microsoft products is a better choice, even if I hate
it.. I have to give what the customer wants. I'm accepting my miserable
fate).

At least I'm not dimissing .NET indefinitely.. For me to judge if it is the
right tool for the job or not, I need to know enough about it to be able to
make that judgement, and I don't know enough yet.

Your response has helped me quite a bit.. and I am leaning towards using PHP
has a draft, and then program a windows C++ application with ODBC. Perhaps
even embed HTMLView so I can use the ease of web as well as power,
flexibility and speed of C++.

I'm not done learning about .NET yet though.. If you can't beat them, join
them.. resistence is futile, we'll all be victimize by this monopoly. :)
owwwww
 
K

Kevin Spencer

Hi Lisa,

I think you would benefit from the freely downloadable .Net SDK:

http://www.microsoft.com/downloads/...A6-3647-4070-9F41-A333C6B9181D&displaylang=en

No, you won't have any trouble at all learning C#. With a few exceptions,
it's just like C++.

What you WILL take some time to do is to learn the CLR (Common Language
Runtime Library). This is arguably the hardest thing to get familiar with
regarding .Net. There are just so many classes in there. Of course, that's
actually a GOOD thing; as the classes already exist, you don't have to write
as much custom code. Fortunately, the namespaces and classes are organized
extremely well.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
L

Lisa Pearlson

Thank you for your perspective Kevin,

Of course abstraction has several benefits.. not only ease of use,
reusability, increased productivity.. using proven building blocks to build
new things, will benefit the overall stability too..

I don't have a problem with the concept of abstraction itself.. It's the
only way forward.. divide and conquor.
I do have a problem hoewever with the concrete form in which abstraction was
performed by M$. I mean, you can perform abstractions in different ways..

C is a great balance between power, flexibility and yet be human readable..
its efficiency and small code size makes it particularly of interest in
embedded systems.

I guess I value efficiency, not in the commercial sense but only
technological perfection sense (if driving a car is too expensive, you can
either make gas cheaper, that's what microsoft does, CPUs go faster, storage
space increases... or you can make cars more efficient by making them less
power hungry, more optimized, lean and mean).

OO development is definitely a great concept. C++ is that addition to C.
It's served us well for a very long time, and still does to this day..
that's proof that it's a well through through, effective tool.

Then came OLE, OLE2, ActiveX, .NET. Every year millions of dollars are made
on selling books, giving classes, re-educating personell, hiring and firing
people, and paying big bucks to get new certifications. This explains to me
why it's primarily done.. this is market push.. you create a demand that was
never there in the first palce.

The most frustrating part of all is just that with every new layer of
abstraction, which in M$ case seems to also have the benefit of covering up
their clunky bloatware, with a layer of abstraction, .. so the interface
looks clean, but only God (M$) knows what's underneath it all.

It just reminds me very much of the benefit of Chinese characters over latin
alphabet. All we need is to learn like 26 characters, and we can do
everything with them.. but if you use 1 symbol for an entire sentence or
object, like chinese, then you can write more stories efficiently.

Result? There are over 50,000 chinese characters.. great abstraction! You
can be so much more productive now.. you can write whole sentences with just
a few characters.. The only problem is, first you got to learn all those
characters. Calculating in all that extra time and effort, I'm not so sure
it's more efficient.

I much rather have standard storylines, on standard pages, from which you
can write books quicker, than to create a new language with more
abstraction. In other words, new C/C++ libraries, is great.. .NET is not.. I
guess I never liked OLE to begin with, and everything that's been built on
top of that..
 
L

Lisa Pearlson

Exactely.. it doesn't matter if it's C/C++/Java/PHP/ASP.. code is code.. no
matter how you write your for/next loops.. the logic is the same, the syntax
is different.

But like in my post I write just before I read yours, learning CLR is indeed
a very steep learning curve..
I don't want to have to know, but have to understand, and be able to figure
everything else out myself.

I compared .NET to chinese and C/C++ to the latin alphabet.. with only 26
characters to learn, we can write everything we want.. chinese have one or
more characters for whole words or sentences... which makes writing more
efficient.. but only after you've become familiar with at least 3,000
characters, up to 50,000 or more.. and that's just not the way to go in my
opinion.

I want reusable words, not new characters.
 
W

William F. Robertson, Jr.

That is what this forum is for. When you have trouble determine exactly
ISerializable does, or how a specific reflection technique works, you could
also post it here to get guidance.

I came from a C++ background and hesitated learning .NET because I was
concerned it was going to be another gloried VB6. "I don't know how it
works, but I found this code sample." Or my personal favorite, "What are
data types?" As I started looking into it, it really was an open framework,
it made sense, and was HIGHLY extensible. I could basically write an ISAPI
filter by overriding one method. Man, who can argue with that? With tools
like .NET Reflector, if you ever really, really wanted to know how Page
level events are handled you can look into the source code and find it.

..NET would be like Chinese with countless symbols if the language has had
your Latin alphabet. Before I became too familiar with the Framework, I
would write a helper method, only to find weeks, or even month later, there
is a single command (Chinese character) for it. It doesn't so any harm to
have my code, but I have since changed most of my handwritten algorithms to
..NET Framework method calls.

You don't have to know everything out of the box, you just should learn
enough to get by, tinker, experiment and read. There have been books
recommended on this forum to get started with, but since you have good
experience with C++, you probably could skip most of them.

In the two years of .NET I have only needed to import one API, the
QueryPerformanceCounter and Frequency from kernel32.dll. I needed a better,
more accurate timing mechanism for profiling algorithms. (They are
releasing a better object in .NET 2.0) I am not saying people don't, or
they wouldn't have added such great support to the framework for interop
calls.

bill

If you are going to be negative about the Framework, it will be a negative
experience for you, no matter what anyone here says.
 
K

Kevin Spencer

Hi Lisa,

Your persepective is skewed by your experience. The programming stack has
grown since nearly day 1, with the invention of Assembler. Every time the
programming stack grows, somebody has something bad to say about it. But
there is a good reason why this is so. Productivity.

As programming evolves (and it certainly DOES evolve), it becomes more and
more complex to do things which people ordinarily take for granted, such as
simply running more than one program at a time (which, as you and I both
know, is impossible). As no more than one program can run at a time, the one
program that runs all the time is the OS. It spawns threads in its execution
loop that make it look as if the OS is running many programs all at one
time. The complexity of this alone demands a programming stack, an OS API,
which Microsoft refers to as a "platform." But of course, this is at the OS
level. On top of this platform are running all kinds of applications.

The sheer size and complexity of this situation demands OOP. I once read a
book on Windows programming in C (not C++). Windows was originally written
in C, not C++, and was one big procedural app. Do you know how many lines of
C code it took to create a simple window? Hundreds. There are all kinds of
structures in there, and pointers, and messaging, etc., all of which had to
be programmed into a gigantic loop. Obviously, things were getting out of
hand with procedural programming. Hence, OOP was born.

Now we are living in the next generation of programming. Again, complexity
dictates that we build another layer on the programming stack. The .Net
platform is an attempt to sove these inherent problems, such as DLL Hell,
Memory Leaks overlooked by programmers, etc. it works much like Java, in
that it is patform-independent, compiles to byte code, and requires a JIT
compiler to run, and for the same reasons. But it has a significant
advantage over Java: you can go as low-level as you need to, when you need
to. IOW, it's the best of both worlds, just as C++ didn't REPLACE C; it
extended it. C# doesn't REPLACE C++; it extends it.

Now, all this talk about Microsoft bloatware is just old. Microsoft USED to
put out bloatware, and for reasons that I won't go ito here, but they were
temporary and legitimate. But Microsoft software hasn't been bloated for
years now; people in the Unix crowd are just not current regarding
Microsoft.

In fact, the .Net platform provides one other thing that I didn't mention:
code consistency. When you use the Microsoft .Net stack, you are using a
standard set of classes, which most .Net programmers are familiar with. This
means less time ramping up to modify or extend an application. And, as
programmer time is the single most expensive cost of software development,
that's a GOOD thing!

Microsoft has been underestimated since its inception. Come on in, the
water's fine!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
L

Lisa Pearlson

Thanks.. I guess the only problem is just the huge pile to dig through, so
that in a year or so, I can have my website finished ;-)
Now I have to figure out where the piles are and how to dig through them
most efficiently.

I think for this project, I'm going to stick to PHP/MySQL and possibly a C++
application.
 
L

Lisa Pearlson

Convincing....

"people in the Unix crowd are just not current regarding Microsoft."

It's kind of hard to do I guess. C++ is my primary tool, and in my eyes the
best thing ever for programmers. But I have programmed VB, Perl, PHP,
Assembler, Python, COM, Java, etc. I've developed some for unix, but mostly
M$ platforms, PocketPC, PalmOS, MySQL, T/SQL, Symbian.

I guess I might have to stick to becoming a "VB" programmer, or ".NET"
programmer and make one tool a career. Otherwise it's pretty damn hard to
keep up with M$. I spend half my year learning new technologies, and get to
apply it to 2 or 3 projects that year, and then I have to spend another 6
months learning the next thing that has come out.

Who's looking for VB, VC++ or Classic ASP programmers anymore? I'm forced to
keep up.. but I'm not getting enough time to earn back the investments. What
do you mean cost saving? I have lost more than gained trying to keep up with
all that's thrown at us, then marketed to customers so they all want it
because they heard "it's the next big thing", and so we have no choice but
to feed them what they ask for.

I guess I've just become tired of running around. Time to stop calling
myself a "programmer", but specialize into becoming a ".NET" programmer,
while it lasts.. (know more and more about less and less, until we know
everything about nothing).

Lisa
 
K

Kevin Spencer

I guess I've just become tired of running around. Time to stop calling
myself a "programmer", but specialize into becoming a ".NET" programmer,
while it lasts.. (know more and more about less and less, until we know
everything about nothing).

You'll feel much better once you get into it. :)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
L

Lisa Pearlson

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.
 
D

Dave Fancher

I hope you truly did find my previous post to be informative. After reading
your other posts though, I must go back to one of my original points and
state again that it sounds like you have already convinced yourself not to
use the .NET technologies. Nothing that anyone here can say will change
your mind and honestly, it makes no difference to me if you do or not; it's
your choice.

As much as I hate to quote a fortune cookie here, this discussion seems to
mandate it. The other day I ate lunch at a Chinese restaurant and. My
fortune said "Ignorance never solved any arguments." You have admitted that
you know very little about the technologies yet you are debating the merits
of using them?

I agree with Bill Patterson that these forums are here for getting questions
answered but I also disagree with him in that I believe that a forum such as
this is not the appropriate venue for learning the intracacies of any
technology let alone enough about a technology to determine if it is going
to be the best tool for your job. To determine that you will have to invest
time to actually learn the technology and if you're willing to throw away
'80%' of what you read/learn then so be it. Continuing education is part of
having a technical career and isn't limited to the IT field.

Learning any new technology requires starting from somewhere and while some
technologies directly build upon older technologies, many just utilize and
expand upon the old concepts. Along these lines I submit the question:
How does learning which namespaces to reference in a project differ from
learning which header files to include?

If you think back, I'm sure it took you a significant amount of time to
learn the standard header files in C++. I also bet that during the time you
were learning, you stumbled across something that you had just written code
for and realized "Hey! I wish I knew last week that I could use that!" In
the .NET world, you have the same thing as I just described. They may be
implemented in a different manner but the concept is the same. The same
issue is encountered in the Java world (packages). Is the framework huge?
Absolutely. There is no question that it takes time to learn but doing so
can only serve to help in the long run.

Returning to my original point though, you seem to be looking for someone to
convince you of a need to use the .NET technologies despite having already
concluded that you will not use them. No one here can convince you since
your mind seems to already be made up. If, in your studies, you have a
specific question, ask away but for something as nebulous as what you're
looking for a forum probably isn't your best bet.

Contrary to your closing [Slashdot-esque] statement referencing the Borg,
most people using the .NET technologies have done so not because they are
forced to but because they have evaluated their options and determined that
their needs are best met by what is offered by .NET. The only way that
determination can effectively be reached is through education and some
experimentation. That decision should not be reached just because someone
in a forum said so.

I again wish you luck on your project, no matter what technology you
ultimately choose.
 
L

Lisa Pearlson

This is the lion's den.. I'm not here to debate, rather question..
If I make a statement you find ignorant, then you can either respond by
telling me why I am ignorant, or you can focus on the subject of my
ignorance, not on me personally.

I know little to nothing about .NET other than that it is a framework for
managed code.
I have a project to complete in little over a month, and I can use C++ or
make it a web application. Having experience with PHP, I can go with what I
already know, or I can find out of ASP.NET has any benefits for me.

I mentioned I needed to read and update some database records.. using a web
interface versus a C++ client application, has the advantage of being able
to build applications pretty quickly, build graphic interfaces quickly and
make it look flashy easily.
The downsides are that retrieving and updating database records is slow and
requires form POSTs and GET, making it not very responsive and quite
inefficient.

Imagine I have a list of database records, I click one item to edit it, ..
form POST, brings up a form to edit the record, I submit the change (POST)
and then the complete list is displayed again.. especially when dealing with
a few hundred records, a web page builds slowly.. you click something, and
all records must be retrieved again to show them on the page.. because with
a webpage you deal with snapshots all the time, and every action causes the
page to be destroyed and completely rebuilt.
Using JavaScript can perform some things on client side, but with different
browser versions, it's no fun either.

So, I was wondering if ASP.NET had any benefits in this regard.. I was
thinking perhaps ASP.NET allowed easier embedding of windows controls,
easier than writing ActiveX controls that display a security warning and
become browser plugins or something, hosting a custom datagrid control of
some kind.

From what I understand, ASP.NET isn't really about that. I still don't know
what it is. It is ASP but uses .NET framework, has an event driven model so
controls can fire javascript that can post back stuff to server. But to
embed controls, you still have to program your own activex stuff? Are web
controls window controls you can embed in webpage, or just library
functions?

This isn't about convincing me of the benefits of .NET, but helping me
understand if this provides me with the tools of doing things I couldn't do
before, as opposed to doing the same things as I could before, but more
easily and rapidly.
 
D

Dave Fancher

No where in any of the response posts has anyone made a personally directed
statement. Responders (including me) have commented on the tone of your
posts demonstrating obvious bias against using ASP.NET.

Examples (all direct quotes):
* Can anyone tell me why ASP.NET is worth my time?
* My ONLY reason for even considering ASP.NET is some uninformed hope
that I can embed controls...
* Setting up IIS is challenge enough. Like everything else, it works,
but no sense of control or insight. Too much clutter for a newbie.
* ...is my time not better spent using what I'm already familiar with?
All of these quotes are all from your first post. Many of your other posts
are laced with similar statements.

As for the ignorance complaint, I quoted a fortune cookie that was quite
appropriate for the discussion! Since you seem to have taken offense at the
statement (none was intended), please allow me to explain. Ignorance is
defined as the condition of being uneducated, unaware, or uninformed. You
have repeatedly admitted to knowing nearly nothing about the .NET
technologies therefore, you are ignorant of them. Despite this, you seem to
automatically reject what has been said with comments about it being
impossible to keep up or how you don't like the way something has been
implemented so it must not be any good.

As technology professionals, part of our job is to evaluate what is
requested and determine the best course of action. If the customer wants a
particular technology and you can present a good business case indicating
why another technology choice is better, chances are that you'll be using
the alternate technology. As you well know, business is ultimately about
making money and IT is about increasing profit margins through reduced
operational costs. If technology A is going to save $500 TCO and technology
B is going to save $1000 TCO then technology B makes more business sense. I
think that in your case and with your skill set, technology A (.NET) is a
poor alternative to the other technologies you are considering. I do also
think though that as you learn .NET you will find a lot of areas where it
makes more business sense to use it instead of the others.

In the discussion of these technologies, ASP.NET being primary among them,
you have asked a number of questions regarding why you should use these as
opposed to others. Your questions have been answered by people knowledgable
about the .NET framework and all have given valid answers to some of your
questions. Many of your questions are answered in just about every intro to
..NET book on the market or by a quick Google search. Other questions are
much more complicated than can be explained in a newsgroup posting. Since I
have some time now, I will answer as many of the questions as I can.

Despite your being an experienced C++ programmer, I still suggest grabbing
an introduction to the .NET framework book. In your case I wouldn't
recommend one focused on any particular .NET language but one focused on the
framework itself...it will do you worlds of good as you try to understand
the environment. I have always been happy with the Wrox and MS Press books.

For many items I have included links that have worded the response better
than I would. I hope these answers (below the signature) at least point you
in the right direction. Once again, I wish you luck with your project.

-----------
Dave Fancher
http://davefancher.blogspot.com
-----------

Q: Do I need Visual Studio?
A: No, but the IDE sure does make life a lot easier, especially as solutions
grow in complexity. You may use Notepad or some other text editor but you
will have to familiarize yourself with the command line utilities included
with the SDK in order to compile the application. Other open source IDEs
are available as well. You may want to look into SharpDevelop which does a
great job mimicing the VS.NET interface
(http://www.icsharpcode.net/OpenSource/SD/)

Q: How should I understand the event driven model in Web applications?
A: Answered in my first post.

Q: What does Visual Studio provide other than debugging and text coloring?
A: Plenty. As .NET applications grow, compiling them becomes an
increasingly complex task. VS.NET greatly simplifies the build process and
automatically compiles all projects included in a solution in the correct
order based on project dependencies. It also allows for easy conversion of
the XML based resource file system. Deployment is also as easy as clicking
a single menu item and specifying the deployment target.

Other items of interest:
IntelliSense
Visual Source Safe integration
Data management
Wizards for creating strongly typed data sets (see ADO.NET below)
Drag/Drop form building

Q: What is Intermediate Code?
A: By "Intermediate Code" I believe you mean Intermediate Language (often
referred to as IL or MSIL). MSIL is an assembly type language with its
origins in Java byte code and makes the common language runtime possible.
..NET languages (C#, VB.NET) compile to MSIL which is later JIT compiled by
the host machine when the code is run.
http://www.developer.com/net/net/article.php/1756291#MSIL

Q: What is a portable executable?
A:
http://www.developer.com/net/net/article.php/1756291#Portable Executable

Q: What is an assembly?
A: http://www.developer.com/net/net/article.php/1756291#ASSEMBLY

Q: What does an ASP.NET Web site consist of?
A: This is one of those questions that can get quite complex. I'm going to
keep it simple because I'm not writing a book.

Despite its name, ASP.NET has nothing to do with traditional ASP. There are
some similarities between the two technologies in that the application and
pages follow a similar life-cycle, have some common object names, and
ASP.NET can use the <% %> syntax.

ASP.NET sites consist of ASPX files, images, and .NET assemblies along with
anything else that may be required. Other things that may be required (all
depending on your architecture) include (but are not limited to) style
sheets, config files (XML based), ASMX files (Web Services), and ASCX files
(User Controls). All of these types are XML based and, when requested, are
parsed and processed by the ASP.NET runtime.

Server side executable code may be contained in the AS*X file directly but
best practices dictate that server-side code should be contained in a
code-behind file that defines a class from which the ASPX, ASMX, or ASCX
files derive. The base class of the class defined in the code-behind file
is determined by the type of object you are trying to create.

Depending on your project, the ASCX files may not be necessary for
implementing a user control. User controls that must be accessed from a
code-behind must also use a code behind. When I create a user control, I
quite often don't define an ASCX because all of the functionality, including
the rendering, is handled in the .cs (CSharp) file instead.

When code-behinds are used (and/or other functionality is included in source
files), when the application is compiled, a DLL is placed in the
application's \BIN folder. Referenced assemblies must also be placed here
(unless they're located in the global assembly cache which is a whole other
topic). When a page is requested the runtime executes the appropriate code
from the assembly/ies.

Q: How would one manipulate data using .NET?
A: ADO.NET. Like ASP.NET, ADO.NET has nothing to do with traditional ADO.
ADO.NET extends on many of the concepts introducted in ADO but implements
them in entirely new ways. This is also another complex topic that I won't
go into with too much detail.

ADO.NET has a lot of advantages over traditional ADO in that it provides a
mechanism for disconnecting data from the database. Data can be loaded into
a DataTable object and filtered using a DataView. DataTables consist of
DataColumns that define the structure and DataRows that define the actual
data. Multiple DataTables can be housed inside of a DataSet which can also
hold DataRelations that act like relationships in a relational database.
DataAdapters can be used to "automagically" populate a DataTable.
DataTables also maintain state information regarding changes to the data
(inside the DataTable, not the database) and can be further mapped to
DataAdapters to allow for easy updating based on the RowState.

Data access can be performed through Command objects that may use strongly
typed Parameters.

DataReaders may be used for forward only retrieval.

As for building an ASP.NET page using data retrieved from a database,
ASP.NET includes a great number of databindable controls such as DataGrid
and Repeater. These controls only require the developer to specify the data
source, define the overall structure of the output and call DataBind().

ADO.NET is also extensible. System.Data.SqlClient and System.Data.OleDb are
two of the data providers used by ADO.NET. Other providers such as one for
Oracle have also been developed. These providers provide a generic
programming convention because their connection classes all implement common
interfaces and can be cast to and from the interface type.

Along the lines of extensibility, strongly typed data sets may also be
created. Strongly typed data sets allow business objects to be created
using the generic base classes (DataSet, DataTable, etc...) rather than
having to access the data as though everything is of type Object.

In an ASP.NET environment, there are plenty of techniques you can use to
prevent calls to the database for every postback. You can code your
application using DataSets, etc... and cache them on the server calling a
DataAdapter's Update() method only when needed. This does not circumvent
the need to rebuild the page on each post back but it does speed up
processing. I'm working on an ASP.NET app right now that is loading ~500
rows (from a Web Service) and building the page in under two seconds. The
application that this new one is replacing (a traditional ASP application)
takes 22 seconds to load the same data.

Q: Why else should you learn the .NET technologies?
A: Working in a Windows environment may eventually require it. In the mean
time, many Microsoft products are already using it. IE can host a Windows
Forms application. SQL Server 2005 provides its own .NET runtime that will
influence how a database solution is implemented by potentially moving some
application logic into the data layer. InfoPath (part of Office) allows for
executing .NET managed code.

Returning to other poster's points regarding the abstraction, the .NET
framework allows programmers to spend more time focusing on the problem to
be solved rather than the implementation technology. Theoretically, this
will result in better solutions.
 
K

Kevin Spencer

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.
 
L

Lisa Pearlson

Might nice of you to explain all this to me Kevin.
I have to take some time to absorb this and look at concrete code samples to
put it into perspective.

One last question though.. I see lots of webcontrols, like treeview controls
and such.
Now, I can build controls like treeview controls and other controls using
JavaScript and CSS.
Are these webcontrols embedded windows controls (CWnd inherited local
controls or ActiveX) or are they reusable JavaScript classes?

Thanks,
Lisa

P.S. I'm a Visual Studio 6 user.. and like it alot. When VisualStudio.NET
showed up, I heard quite some bad things about it.. at least from a C++
programmer's perspective, not using .NET, sticking to VS6 seemed better..
worked nicer with class wizard and such. I'm willing to use
VisualStudio.NET, but that'll take some time getting used to also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top