<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Asp.net on A&#43; programming moments</title>
    <link>https://aplus.rs/tags/asp.net/</link>
    <description>Recent content in Asp.net on A&#43; programming moments</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 25 Jan 2004 14:56:14 +0000</lastBuildDate>
    
	<atom:link href="https://aplus.rs/tags/asp.net/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Importance of correct goals</title>
      <link>https://aplus.rs/2004/importance-of-correct-goals/</link>
      <pubDate>Sun, 25 Jan 2004 14:56:14 +0000</pubDate>
      
      <guid>https://aplus.rs/2004/importance-of-correct-goals/</guid>
      <description>&lt;p&gt;I have recently been asked to review particular ASP.NET application, written using Visual Studio.NET 2003 (what else&amp;hellip;). Each page is one huge form with dozens of various elements - drop-down lists, textboxes and checkboxes. And their labels.&lt;/p&gt;
&lt;p&gt;When you build the page in VS&amp;rsquo;s HTML Designer, default is that all controls are absolutely positioned. When you place a control - whether that is label or form field - it gets positioned.&lt;/p&gt;
&lt;p&gt;When I opened the source code for first page, I encountered 138 levels of &lt;code&gt;z-index&lt;/code&gt;. I looked sadly at multitude of &lt;code&gt;font&lt;/code&gt; tags, right next to style attributes. I was greeted with the web of HTML code like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Label5&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Z-INDEX: 108; LEFT: 3px; POSITION: absolute; TOP:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;    113px&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;font&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;face&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Microsoft Sans Serif&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;size&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;2&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Label&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;font&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is how terrible - for web purpose - one of Microsoft&amp;rsquo;s flagship product is, and it will be for unknown time in the future. It is basically the absolute evil of Front Page-like HTML output combined with very good (most likely excellent) server-side programming.&lt;/p&gt;
&lt;p&gt;Now, where does project goals fit into this?&lt;/p&gt;
&lt;p&gt;Microsoft&amp;rsquo;s project goals were obviously very clear: build mostly usable product that will showcase the strong points of their new framework. And they did - dealing with XML, databases and other various server-side stuff is very easy and almost without significant bugs. They left web part for future version. OK. when you know the rules, you can&amp;rsquo;t feel cheated (although I still do, since that kind of output is simply ridiculous in year 2003).&lt;/p&gt;
&lt;p&gt;However, for this particular web project, goal was simple: build a web app which was supposed to work in IE/Win. IE/Win holds overwhelming majority of users and it seemed like a good choice. Right until the moment when app was offered to the client that uses Mac. Then project goals suddenly seems very bad.&lt;/p&gt;
&lt;div class=&#34;postexample&#34; style=&#34;position:relative;&#34;&gt;
&lt;form action=&#34;&#34;&gt;
&lt;p&gt;&lt;span id=&#34;Label5&#34; style=&#34;Z-INDEX: 108; LEFT: 3px; POSITION: absolute; TOP: 3px&#34;&gt;&lt;font face=&#34;Microsoft Sans Serif&#34; size=&#34;2&#34;&gt;Signing&lt;/p&gt;
&lt;p&gt;Address&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;input type=&#34;text&#34; name=&#34;Field5&#34; value=&#34;&#34; style=&#34;Z-INDEX: 109; LEFT: 110px; POSITION: absolute; TOP: 3px&#34; /&gt;
&lt;p&gt;&lt;span id=&#34;Label6&#34; style=&#34;Z-INDEX: 110; LEFT: 270px; POSITION: absolute; TOP: 3px&#34;&gt;&lt;font face=&#34;Microsoft Sans Serif&#34; size=&#34;2&#34;&gt;Back&lt;/p&gt;
&lt;p&gt;Address&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;input type=&#34;text&#34; name=&#34;Field6&#34; value=&#34;&#34; style=&#34;Z-INDEX: 111; LEFT: 360px; POSITION: absolute; TOP: 3px&#34; /&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;p&gt;This example is mock-up of the problematic code. Problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When you use any other font-size but IE&amp;rsquo;s default (medium) labels and fields overlap.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In various browsers, form fields have slightly different sizes so they sometime overlap.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On various platforms, things almost always overlap, especially on Mac OSX Alpha interface.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As you can imagine, a client that uses Mac would not buy something like that. I was asked to propose an affordable solution. On another project done with ASP.NET, where I was in charge of HTML output, I went for XHTML compliance. The only solution was to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;ignore VS.NET HTML designer and code by hand in text editor&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;use VS only to work on server-side files&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;never, ever open .aspx files in VS, since it will deliberately rewrite your code, even when all options related to that are off&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this case, that is not acceptable, since it would cost like half the original project. Rewriting the pages to use tables would also take a lot of time (almost similar to the previous one). Also, there is matter of training and learning the stuff to hand-code stuff. Or to buy Dreamweaver. But nothing simple and cheap.&lt;/p&gt;
&lt;p&gt;The only solution I could come up to get somewhat acceptable layout was to fix the width and height of field elements, and to fix the text-size (although that is not entirely feasible). Accessibility and usability..? Oh, well&amp;hellip;next time. &lt;em&gt;(standing in the corner, ashamed)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I wonder if something else could be done&amp;hellip;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>