Re: an old geezer running visual studio for the first time
- From: "Sergio Pereira" <nonono@xxxxxxxxxxx>
- Date: Sun, 12 Jun 2005 16:56:34 -0500
TB,
Maybe your idea of OOP is not as complete as it can be. What you mentioned,
sounds more like componentization than OOP in general. Componentization is
indeed one characteristic of OOP, but does not represent the whole thing.
The real challenge when moving to an object oriented platform is learning
how things are organized/designed, then learn how to design those things
yourself.
When you're starting with ASP.NET, you should become familiar with the
hierarchy chain of the important classes, like, Page derives from
TemplateControl which derives from Control which implements IComponent, etc.
After a while you will creating your own classes and base classes for (for
example) your pages, so instead of placing common functionality in utility
classes, you'll discover that the best place for some of the common
functionality is in a common base class. It just takes a little time and
practice (books can help too).
You can still use your inline code, especially when you are in a hurry, but
you'll learn that the recommended way of using a code behind file is much
more maintainable and less error-prone.
In ASP 3.0, the page runs fromt he top to the bottom, in a single pass. In
ASP.NET the runtime will call different parts of your code in the
appropriate moment. These moments are the phases in what I called the page
life cycle.
A book will help you for sure and I'd be happy to recommend Frits Onion's
"Essential ASP.NET", which is not necessarily for beginners, but helps you
tie the concepts together after you started writing your own pages but still
don't feel like you are understanding what is going on behind the scenes.
What I meant by ADO.NET being annoying is that it introduces a whole bunch
of new objects that you have to learn how to use and how to decide which
ones to use in each situation. Your SQL skills will be very valuable for you
going forward.
- Sergio
"TB" <tbpostbox-googlegroups@xxxxxxxxx> wrote in message
news:eOx8QE4bFHA.3660@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks for replying:
>
> My idea of OOP is basically to make little collections of useful stuff:
> subs, functions, etc and give them a meanful name so that you can actually
> remember afterwards why you bothered lump them together in the first
place.
> Is that too simplistic / old-fashioned? As I understand from the replies
to
> this thread, VS.NET turns this practice into a kind of required religion
and
> frowns upon excessive inline coding (which sometimes is suuuuch a
temptation
> when you are in a hurry....).
>
> "Page life cycle" still doesn't mean a thing to me, but I guess I can read
a
> book on that topic.
>
> ADO.NET: In classic ASP I have gotten pretty good at using disconnected
> models (open a connection, dumping all the stuff into strings / arrays,
and
> closing rapidly the connetion again) and only change data by way of SQL
> (insert, update, delete instructions). Now that ADO.NET generally seems to
> operating on a disconnected level, does that mean all my hard-won SQL
skills
> are now obsolete? ( I really like to write my own SQL lines).
>
> TB
>
> "Sergio Pereira" <nonono@xxxxxxxxxxx> wrote in message
> news:OSqNhTsbFHA.2664@xxxxxxxxxxxxxxxxxxxxxxx
> > Hi TB. WE have all gone through this very same stage that you are facing
> > right now.
> > I remember when I was going through this transition myself... Feeling
> > overwhelmed by VS.NET and not knowing what was the "best new way" of
doing
> > the things I did in the previous platform.
> > Sit tight! You're in for a extremely thrilling ride with ASP.NET. The
more
> > you understand the ASP.NET infrastructure the more amazed you get and
the
> > more you want to learn.
> > Yes, it can be frustrating not finding the usual functionality in the
> > usual
> > places, but I can ensure you all the functionality was kept and
enhanced.
> > The first thing you should keep in mind and learn how to apply is object
> > oriented design and programming. When you start "getting" the spirit of
> > the
> > platform (like "the ASPX file produce a class at runtime that inheritd
> > from
> > the code-behind class), then you'll start to walk on your own.
> > Another very important thing to master is the page life cycle (the order
> > on
> > which the events and methods are fired/called).
> > Another thing that can be annoying in the begining is ADO.NET.
> >
> > But for any question you may have, the newsgroups is here and google
> > groups
> > is your best friend.
> >
> > Hope I can be of help
> >
> > - Sergio
> >
> >
> > "TB" <tbpostbox-googlegroups@xxxxxxxxx> wrote in message
> > news:eTCWZ3qbFHA.2212@xxxxxxxxxxxxxxxxxxxxxxx
> >> Hi all:
> >>
> >> If you think that the following comments are absolute amateurish, then
> >> please bear with me, or simply skip this thread.
> >>
> >> A couple of months back I made the decision to initiate a gradual
upgrade
> > of
> >> my web programming skills from Classic ASP / VBS to ASP.NET / VB.NET.
> >>
> >> While the study of the language differences and all the new features in
> > .NET
> >> has so far not been a traumatic experience, I am a bit shell-schocked
> > after
> >> installing and running for the first time Visual Studio .Net (2003
> > edition).
> >>
> >> Until now I have programmed everything in the old-fashioned way, i.e.
> >> with
> > a
> >> bare minimum of tools: a simple editor for coding, a bit of Frontpage
for
> >> page layout, and my browser to see the results when running the page
> > against
> >> a local instance of IIS.
> >>
> >> I have done quite a bit web programming, developing anything from
yellow
> >> pages to accounting programs.
> >>
> >> But when I ran VS.NET for the first time, I simply didn't know where to
> >> start.
> >>
> >> The program appears to be a sort of Swiss-knife approach to
programming,
> >> eliminating the need for external apps. During the past couple of years
I
> >> have developed my own little collection of helpers which I use during
> >> development.
> >>
> >> VS.NET creates files for "project mangement". My project management
> > normally
> >> consists notes and diagrams. My reusable code (subs and functions) is
> >> kept
> >> in separate files, which I either reference to or cut/paste - depending
> >> on
> >> the situation.
> >>
> >> I normally use a GUI tool (Frontpage for example) to generate a page
> > layout.
> >> In VS.NET I am met with the question whether I want the designed to be
> >> grid-based or flow-based.
> >>
> >> Finally, I discovered that VS.NET saves code and html in different
files.
> > I
> >> am used to keeping everything together, grouping functions, subs etc
> >> above
> >> the <head> tag, and then insert code snippets between <% %> tags. This
> >> approach seems to be frowned upon by VS.NET.
> >>
> >> Am I an old-fashioned guy? No, because I have made the desicion to move
> >> to
> >> .NET, although a bit late perhaps. But I would like to find a book, a
> >> tutorial, anything that can teach this old geezer to use a new toy
which
> >> apparently could improve my productivity.
> >>
> >> Any advice / comments from people who may or may not have been through
> >> the
> >> same process would be most welcome.
> >>
> >> Thanks
> >>
> >> TB
> >>
> >>
> >>
> >
> >
>
>
.
- Follow-Ups:
- References:
- Prev by Date: Enum to represent string??
- Next by Date: Re: an old geezer running visual studio for the first time
- Previous by thread: Re: an old geezer running visual studio for the first time
- Next by thread: Re: an old geezer running visual studio for the first time
- Index(es):
Relevant Pages
|