Groups | Blog | Home
all groups > asp.net > march 2007 >

asp.net : Re: n-layer approach


Peter Bradley
3/5/2007 11:38:48 AM
[quoted text, click to view]
I agree.

As long as your applications don't deal with sensitive data, there's no
reason why you should get too sophisticated. There is no, "One size fits
all" in application development.


Peter

Aidy
3/5/2007 12:04:17 PM
[quoted text, click to view]

I could do a website and not right a single line of code. I can drag
connections, tables etc on the form and have wizards do all my code. If you
don't want to learn how to code it is better than nothing....but the
resultant application won't be very robust or scalable. You can use
SqlDataSources to cut out a lot of the actual coding, but that doesn't mean
your solution is the "best" it can be. MS have just given you a range of
tools to use and you decide which one is best for you. If binding typeless
data direct to your controls is fine for you then fair enough. For people
who want strongly typed data it isn't fine.

Aidy
3/5/2007 2:51:24 PM
[quoted text, click to view]

Explains it all :D

What you're basically doing is doing ASP.net the ASP way. Quite common
really, but not the best way.

Dotnet
3/5/2007 3:47:57 PM

[quoted text, click to view]

And that says it all. I am still none the wiser for your contribution.


Peter Bradley
3/6/2007 12:00:00 AM
<rant>
Because they're selling to the PHBs who think that coding, "Is all
drag-and-drop these days". People like you, on the other hand, pick up that
what they're saying is self-contradictory nonsense.

Be-suited CTOs are apparently incapable of realising that solving difficult
problems is difficult. No amount of drag-and-drop can make it easy. But
all they can see is "applications ready for shipment in a matter of hours".
The fact that these applications are barely functional, flakey, insecure and
bloated - never mind the fact that much of the code is now hidden from
view - hardly makes it onto their radar.

It's like the use of tools to write HTML. Tools write dreadful HTML (never
mind XHTML). Every one of them. Including Dreamweaver. But will your boss
believe you that it's easier to hand code your pages? Oh dear no! So you
have to use the idiot tool he bought licenses for without consulting the
people who do the work, and then spend days de-moronising HTML pages. Then
he wonders why the project's late.

They swallow Microsoft's latest Kool-Aid and the poor practitioners are left
to pick up the pieces. The only winner in all this is, guess who? Correct.
Microsoft, who've sold another vapour-ware license for many times its worth.
</rant>

Peter

[quoted text, click to view]

Just to add to the confusion, I recently attended an MS workshop on
Windows Forms Technologies. There is nothing at all mentioned about
an n-layer approach. The use of controls such as the SQLDataSource is
noted as 'Best Practice'.
I can't understand this at all, since this is in direct contradiction
to the multi-tiered approach that MS has been pushing in other media
for years.

These controls are often used in MS presentations: "Look, I just
created an application in 10 seconds!". These controls also find
their way into the books that are written to coincide with new
releases. The result is a lot of wasted time on the part of
developers who try these things and then realize later that they would
have been better off if they had used code rather than these data
access controls.

Some of the "scorn poured on the SQLDataSource", is no doubt from
developers who have been burned before.



Peter Bradley
3/6/2007 12:00:00 AM
I think what he's saying (although not very kindly IMHO) is that you could
do with spending some time looking at some of the theories behind
programming in general, and good programming practices in particular. This
is not knowledge that one finds, usually, amongst people with your
programming background. In fact, many people would argue that the scripting
languages you mention mitigate against good programming practice.

This group can't supply you with a background knowledge of programming
theory and practice. You need to sit down with a few good books for that.
This one might do for a start:

http://www.compman.co.uk/scripts/browse.asp?ref=783974

(Since you're interested in an OO language, you'd might as well learn the
theory behind it)

Once you've got some basic background, you might like to look at books on
patterns and practices. Like this for example:

http://www.compman.co.uk/scripts/browse.asp?ref=801797

(Since you're intersted in an MS product, you'd might as well read MS' book)

Remember that most of us came by this knowledge through hard work. We're
happy to pass on the hints and tips that we picked up along the way, but a
newsgroup is not the place for a tutorial. For that you must either read
books or join a course. This is not trying to be unkind. It's just that
without a basic level of background knowledge, you aren't going to
understand what we say. We need to have a common vocabulary with you for us
to communicate and for you to understand.

What I'm suggesting is that you need to spend some time learning that
vocabulary. I'm sure you'll find it rewarding. I did.

Best of luck and HTH


Peter



[quoted text, click to view]

Dotnet
3/6/2007 10:51:49 AM
Thank you Peter.

Incidentally, I have had no formal training in any kind of programming. As I
said in my OP - I want to "do the right thing". I learnt ASP with VBScript
in my own time through hard work, and became very conscious of doing it as
well as possible. I'm going through the same process with ASP.NET. There
is so much to learn, and as cowznofsky pointed out, so much contradictory
stuff, I thought I'd come here and get a little help on focusing my
attention in the right areas, and trying to identify the red herrings.

Mike




[quoted text, click to view]

Peter Bradley
3/6/2007 4:57:14 PM
Best of luck, Mike. I hope the references I gave give you a start. There's
also a wealth of tutorial material on the net - but it's of varying quality,
so I'd not rely on it until you have enough knowledge to judge.

I came into IT very late in life, and one thing I did was to study night
school and part-time/distance learning classes. I finished up, somehow,
with an MSc in IT at Liverpool University. If you're in the UK (or even if
you're not, come to think of it), you might look at UK Open University
courses. They do some good stuff on OOA/D/P at both undergraduate and
post-graduate level. It's Java or Smalltalk based, depending on the course,
but once you have that background, you'll find C# comes naturally. Java,
especially, as it's very close to C#. You can just take whatever modules
you like with the OU. You don't have to study for a degree.

Remember that there's more to programming than just "getting something
working". It's a craft: a skill. Good programmers take a pride in a job
well done: in being able to look at some code and think, "Not many people
could have done that any better than I have". They worry about
architecture, good design, security, reusability, performance and many other
things (like whether to use vi or emacs :)).

Post again when you need some specific help. The problem with your OP was
that an answer requires that you understand a fair bit about application
architecture, design patterns and program security. Until you have that,
it's hard to answer your query without seeming either rude or patronising.
But you seem to be a determined guy. You'll probably come back and put our
problems right.

Cheers


Peter


[quoted text, click to view]

AddThis Social Bookmark Button