Saturday, March 31, 2012

What is preferred layout method of forms

I've built some web sites using asp.net and have used flow layout and grid layout but wonder whether there is a standard technique (like flow layout and then embedding everything in a table) that most exeperienced asp.net programmers use.

When I tried the flow layout with the table, I found that the cell sizes of the table rather awkward to try to size/resize to fit specific contents as I built the page up (adding text and labels and images).

It seems to me that grid layout is simple and straight forward but I believe that the web page can get all jumbled up if viewed on a significantly different resolution screen (at least my friends said their displays were jumbled).

Thanks,

MikePersonally, I use flowlayout and I rely heavily on tables to do the layout control. To accomodate multiple resolutions, I use percentages in combination with "fixed width" specifications on columns/cells to accomodate width variations. Generally I will try to do a minimum target (readable on a single page) of 800x600, an optimal target(intended look and layout) of 1024x768, and all other higher res receive a full window of contents... I will look over them all to make sure its functional on any level though.

You might want to do something similar. A lot of developers I see target a specific resolution and fix their sites width/layout to this. This forum does more of what I am using (resize your window to see the percentage-based controls "move" with your window), and something like cnn (http://www.cnn.com) actually targets a fixed (800x600) window.

So basically, neither layout setting will really fix your display problems, you'd be better going through and fixing it specifically for how you would like it to appear to a client.
Thanks for the quick response.

The flow layout with tables seems to essentially be a grid for controls but why is it any better than the grid layout provided in ASP.NET?

Using tables works OK for me but then I have another control to deal (the underlying table container).

I have noticed problems with (at least in the visual development environment of VS.NET) moving the cell borders in lower rows after some controls have been placed in the first row seems to move cell widths in the first row and others in the same row and also usually doen't permit a cell to be set to a much smaller width (say only 20%) of the cell above it (which has an image that spans 3 or 4 columns).

I guess that I don't understand how and why the cells in a table interact from row to row (at least in the visual development environment ). I can see that there is some type of relationship embedded into the table definition. Is there some documentation regarding tables that I am ignoring?

Mike
When I first started with .NET (late Beta1), I used Grid Layout for my first project. It was just like VB6, and I felt right at home.. After a few projects, I found that what looked good on one screen, didnt look to hot on others when I used grid layout.. i also found that VS.NET IDE really screwed up a lot when I used grid layout (for other than non-trivial interfaces). I am sure by now its been fixed, but I just got used to working in Flow Layout.

2 years (omg already?!) later, I am still using flow layout.. using Tables for my layout. Before, I had to create complex table layouts in Dreamweaver and copy/paste the HTML.. nowadays, I do it with my eyes closed.

I guess you just get used to something and keep using it.
Generally if you resize a row the rows above/below will inherit the maximum value property (width) you specified for the same columns, regardless of which row and what width properties each cell contains. Are you using the 'colspan' property on the cell(s) that contain the image you are talking about? If so, if you are using the first cell in both rows (the image row and the underlying row) then chances arethe width property of the cell below is inheriting the width you specified for the image cell or the width of the image itself...
Exactly. Grid Layout was made so that VB developers feel at home. It's ok if you're doing a form-type application. But flow layout is really what you should use for a web site.
Yes, I think that you've identified the issue that I'm seeing. The rows above/below inherit the maximum value property (width) specified for the same columns, regardless of which row and what properties each cell contains.

I do use the 'colspan' property but not on the images. I'll give that a try. It makes sense that it would allow the cell widths in the columns to then remain stable.

Thanks everyone for your responses.

Mike

0 comments:

Post a Comment