Re: TRICK: methods in ASPX pages with <%%> code blocks
- From: tom pester <Tom.PesterDELETETHISSS@xxxxxxxxxx>
- Date: Tue, 23 Aug 2005 13:58:40 -0700
Hi Marina,
I find the 2 arguments you listed more then enough to support the reasons for doing it. Except with the change, that it more the promotes thinking about these 2 things as separate. There is a lot to be said from separating your UI from the business logic.
I am all for the seperation of logic and presentation and business logic should defenetily go into its own space regardless of how small the project is.
But the little code you write for wiring things up, ie that are specific to the GUI, don't need seperation cause its specific and thus not reasuable.
A function that gets all orders from a database should be in a class library (and I mean not code behind).
IMO A function that wires up the result to a datagrid doesn't have to be in a class.
BTW Everything in ASP.NET is a class. The aspx file too. It gets transformed by a parser to a plain class :
http://dotnetdan.com/articles/aspnet/FirstPrinciples.htm http://dotnetdan.com/articles/aspnet/DataBinding.htm
So by that rational I do everything in a class file so I must be doing it right ;)
And sorry, but your reasons for not doing just don't make sense to me. I don't care if I have 100 files or 50 files. You still just see one icon in VS, and you can either go to design view, or you can go to code. You don't see twice as many files - so who cares if in reality there are?
I hear you but I like to keep everything KISS. So there must be a _good_ reason if I have to double the project in files.
In any case, microsoft didn't limit anyone to any one model of how things should be done. If this way works for you, go ahead.
The arguments you make are all solid but for me the separation between markup and wire up code (not Business Logic) is a logical one.
You can make it a physical separition by splitting the file in 2. But what does it give you? IMO not more power, except for the 2 reasons that are only a consequence of making it physical.
Cheers, Tom Pester
.
- Follow-Ups:
- Re: TRICK: methods in ASPX pages with <%%> code blocks
- From: John Harcourt
- Re: TRICK: methods in ASPX pages with <%%> code blocks
- References:
- Prev by Date: Re: VS.NET is 10 times slower than VB6
- Next by Date: Datagrid Question
- Previous by thread: Re: TRICK: methods in ASPX pages with <%%> code blocks
- Next by thread: Re: TRICK: methods in ASPX pages with <%%> code blocks
- Index(es):
Relevant Pages
|
Loading