MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

master pages - is it just me not comfortable with them?

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet
Author Message
oliharvey



Joined: 08 Aug 2007
Posts: 1

PostPosted: Thu Dec 13, 2007 12:16 pm    Post subject: master pages - is it just me not comfortable with them? Reply with quote

I'm an experienced web developer - but haven't used master pages much.

I find that I'm not really comfortable with them - so perhaps I'm
missing something.....

When I first read about them I was shocked that the content
placeholder pages need knowledge of which master page they were in -
I'm happier now I understand they can be set dynamically - but I still
can't help thinking that they provide nothing on top of a reasonable
page/usercontrol design ....

....in fact I prefer a design where there's only ever *one* aspx page
per site - and everything else is written as UserControls (probably
loaded dynamically with LoadControl)... this gives nice
componentisation and ultimate flexibility.

I tend to work in Enterprise environments.

....I'd appreciate any comments on this.

thanks,
O.

Archived from group: microsoft>public>dotnet>framework>aspnet
Back to top
View user's profile Send private message
David Wier



Joined: 30 Oct 2007
Posts: 5

PostPosted: Thu Dec 13, 2007 2:36 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

I am very comfortable with them. In fact, I doubt that I would design
another site without them - - it's the quick and easy way for a consistent
look and feel - even nested, for, let's say, a company and it's departments
(especially since it's supported better with VS.Net 2008)

When you look at it - a Master page is pretty much the same as a
usercontrol - and it's referenced on each page, in the same way a user
control would be - and since, as you say, it can be set dynamically, just as
a user control would be, what's your root problem with them?

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


wrote in message @d4g2000prg.googlegroups.com...
>
> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....
>
> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.
>
> I tend to work in Enterprise environments.
>
> ...I'd appreciate any comments on this.
>
> thanks,
> O.
Back to top
View user's profile Send private message
Eliyahu Goldin



Joined: 08 Aug 2007
Posts: 39

PostPosted: Thu Dec 13, 2007 10:40 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

A common confusion about master pages is that they are thought of as a sort
of iframes rather than a sort of user controls. They are a sort of extension
of user control concept in a very convenient form.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


wrote in message @d4g2000prg.googlegroups.com...
>
> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....
>
> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.
>
> I tend to work in Enterprise environments.
>
> ...I'd appreciate any comments on this.
>
> thanks,
> O.
Back to top
View user's profile Send private message
Scott Roberts



Joined: 15 Nov 2007
Posts: 23

PostPosted: Thu Dec 13, 2007 2:50 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....

I tend to use them precisely for page design. IMO that's *is* their purpose.

> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.

I've had that thought too, but never pursued it. For something like a
web-mail client it might work.

It sounds like you might also be a fan of MVC. Check out the new MVC stuff
for asp.net.
http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx
Back to top
View user's profile Send private message
Mark Rae [MVP]



Joined: 08 Aug 2007
Posts: 29

PostPosted: Thu Dec 13, 2007 9:47 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

wrote in message @d4g2000prg.googlegroups.com...

I'm totally comfortable with them to the extent where I doubt I'd ever
consider designing another web app without them...

> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.

A MasterPage is a UserControl...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net
Back to top
View user's profile Send private message
George Ter-Saakov



Joined: 08 Aug 2007
Posts: 10

PostPosted: Thu Dec 13, 2007 5:02 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

Just my 2 cents.

1. Try to use master pages. You are going to love them. I have couple
internal rules for myself for any .NET project that I start and one of them
is "Always create and use MasterPage" even if it's empty...

2. Design when there is only one default.aspx page is workable. I actually
have developed E-commerce projects which has only on default.aspx (it's
completely functional and working, about 3 thousand visitors a day).

The only problem with this approach is that people love to have different
URLs. They like ability to add them to "My Favorites" or send a link to
their buddies in email...
So one page approach presents some challenges and usually needs a URL
rewriting.
Here is my site: http://www.mspiercing.com try to hit it. You will never
tell that in reality there is only one default.aspx page there.

But from my experience, unless you are developing "framework" like
DotNetNuke, the single page design is not worth all problems it creates in
most projects.
I do believe in nice structurization though. So forum aspx pages reside in
"forum" folder, picture gallery in "gallery" folder....


George.




wrote in message @d4g2000prg.googlegroups.com...
>
> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....
>
> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.
>
> I tend to work in Enterprise environments.
>
> ...I'd appreciate any comments on this.
>
> thanks,
> O.
Back to top
View user's profile Send private message
Peter Bromberg [C# MVP]



Joined: 31 Oct 2007
Posts: 22

PostPosted: Thu Dec 13, 2007 3:19 pm    Post subject: RE: master pages - is it just me not comfortable with them? Reply with quote

Another 2 cents: Master Pages are extremely useful and flexible, once you
get past the initial learning curve (which is well worth the effort).

I'd highly recommend spending some time with Scott's detailed post here:

http://www.odetocode.com/Articles/450.aspx

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"oliharvey@googlemail.com" wrote:

>
> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....
>
> ....in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.
>
> I tend to work in Enterprise environments.
>
> ....I'd appreciate any comments on this.
>
> thanks,
> O.
>
Back to top
View user's profile Send private message
zzzxtreme



Joined: 14 Dec 2007
Posts: 1

PostPosted: Thu Dec 13, 2007 10:36 pm    Post subject: Re: master pages - is it just me not comfortable with them? Reply with quote

i never use them
i have base page class, and some other class that inherits it
so if i want my aspx page to load some particular template, i inherit
a particular class
i always use dynamic loading of asxc file, one header, and one footer.
after my client login, the pages inherits a different class.
so in the actual aspx code, i don't set any masterpage or include any
header/footer file.

i guess there's no wrong in using masterpages, but like you, im
uncomfortable with it.


On Dec 13, 11:16 pm, olihar...@googlemail.com wrote:
> I'm an experienced web developer - but haven't used master pages much.
>
> I find that I'm not really comfortable with them - so perhaps I'm
> missing something.....
>
> When I first read about them I was shocked that the content
> placeholder pages need knowledge of which master page they were in -
> I'm happier now I understand they can be set dynamically - but I still
> can't help thinking that they provide nothing on top of a reasonable
> page/usercontrol design ....
>
> ...in fact I prefer a design where there's only ever *one* aspx page
> per site - and everything else is written as UserControls (probably
> loaded dynamically with LoadControl)... this gives nice
> componentisation and ultimate flexibility.
>
> I tend to work in Enterprise environments.
>
> ...I'd appreciate any comments on this.
>
> thanks,
> O.

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Custom control's events in master pages I have designed and written a custom 'menu like' server control. The control inherits from and implements and interfaces. The control uses only html mark-up as it’s UI, i.e. tables, table rows and

Master Details DataGrid Okay. Figured out how to better state my question. I want to create a form. I want to use a combo box or listbox as the master. I want to use a DataGrid as the details. How do I make the relationship. I figured out how to do it with 2 DataG

DataGridTableStyles for Master-Child Tables Hi, I've set up a datagrid to display a dataset which includes a Master-Child relation. I've defined two one for the Master Table and one for the Child table. I set the MappingName to the TableName of each. The DataGrid uses the DataG

Master/Detail form tableadapter update error.. Dear group, I have an invoice entry form, which is a simple Master fields / Detail grid. The main summary information of the invoice are stored in one table in a dataset, which is bound using a BindingSource The line details of eac

Cad/cae/cam=>autocad/adobe/artcam/arcgis/catia/lectra/master Our team provide different types of services such as: - proffessional cracking of any kind of software etc.) designed for any kind of operating Linux, FreeBSD, OS/2,
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> ASPNet All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group