The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Code inline or Code behind ?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paschal

Posts: 1621
Nickname: bigapple
Registered: Nov, 2003

Paschal is a .Net developer
Code inline or Code behind ? Posted: Jul 28, 2004 9:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Paschal.
Original Post: Code inline or Code behind ?
Feed Title: help.net
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/pleloup/Rss.aspx
Feed Description: .Net for mankind !
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Paschal
Latest Posts From help.net

Advertisement

Well this post is just my opinion, and I am sure this will not change Microsoft view on the subject.

I have some concerns on the choice made in ASP.Net 2.0 to set the code inline by default. I am ok with the new partial class feature, and I found this is a great idea.

But mixing the code and the HTML ring a bell in my mind about the old ASP time. Remember spaghetti code ?

So why this has to be the default ? You can expect that beginners (or lazy coders :-)) will jump on this new approach. I read this make the things easy to maintain with only one file, but are we sure it is so important ?

Just an example. Currently if a designer want to modify the ASPX page (with my authorisation of course), I don't have to worry too much about my code which is perfectly safe in its DLL.

Tomorrow if I use the 'by default' in Visual Studio, I  will be to scare that by accident someone change anything in my code. Indeed I can use master pages and templates, but if I don't want ?

It's also true that with code behind, I can change some of my code, compile a new DLL and deploy. No need to touch my webpages.

I can see this move as an attempt to seduce web developers scared by real code. Well if it's the case, this is really wrong. Nothing much cleaner than a good separation between code and presentation.

As I wrote at the start, no way I can change Microsoft's mind. But between the two camp, I know already where I stand up.

 

Read: Code inline or Code behind ?

Topic: I had no idea there is a sandbox over there! Previous Topic   Next Topic Topic: We are experiencing technical difficulties, please stand by...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use