Archive

Archive for November, 2006

Points of interest: ACM CareerNews: Tuesday, November 21, 2006

November 22nd, 2006

“Salary Survey 2006: Hot Skills, Hot Pay” Computerworld, November 13

According to the 20th annual salary survey conducted by Computerworld, the average IT worker received a 3.1% increase in pay over the past year. … network architects received average pay increases of 5.3%, while Web developers, Internet managers and directors of e-commerce saw average jumps of 4% or more. … Average starting salaries are expected to climb 3% this year, with greater increases for some specialized positions. … For certain in-demand skills, companies are willing to pay skills premiums in the form of signing bonuses or retention bonuses.
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=269951&source=NLT_CAR&nlid=5 

“Computer Science Still a Good Career” Stanford Report, November 6

According to a new study on the global migration of software jobs, worries about the impact of overseas IT outsourcing could be overstated. … there are more IT jobs now than there were six years ago at the height of the IT boom. While globalization will result in certain structural changes to the world economy, the changes will also lead to increased opportunities for students with computer science degrees.
http://news-service.stanford.edu/news/2006/november8/vardi-110806.html 

“India Now Exporting Jobs to US” Hindustan Times, November 5

India has started exporting jobs to the US to meet the demand generated by widespread growth in the Indian IT sector. In addition, India is now opening R&D and manufacturing facilities in the US as part of a broader strategy of creating a global IT footprint.
http://www.hindustantimes.com/news/181_1836466,0002.htm 

“West Not Supplying Enough IT Talent” CNN (via Reuters), November 8

As Bill Gates of Microsoft pointed out during a conference in Russia, a shortage of IT graduates from Western universities could lead Western companies to rely increasingly on developing countries to meet future demand for programmers, engineers and computer scientists. … Without a doubt, there is a shortage of IT skills on a worldwide basis. As a result, Russia is becoming more attractive, thanks to its highly-talented programmers and computer scientists.
http://news.bbc.co.uk/2/hi/technology/6155998.stm 

“Create Strong Alliances by Thinking like a Consultant” EETimesCareers.com, October 23

learning to think and act like an IT consultant can provide any worker with an edge in climbing the career ladder. For example, learning to think like a consultant keeps you customer-oriented and focused on the best ways to apply specific skills and experiences. In addition, since consultants tend to ask a lot of questions, you will be engaged in an ongoing conversation with colleagues, making you better able to forge strong alliances with partners. A consultant mindset can also help you in learning to continuously monitor the competitive landscape for new trends and developments that could impact your career.
http://www.eetimescareers.com/content/article.asp?articleID=193401463 

Original Source: http://www.acm.org/careernews/issues/v2_i20.html

Author: Adam Kahtava Categories: Career News Tags:

The Problems with Themes, Skins, and Cascading Style Sheets (CSS) in ASP.NET 2.0 – Defining a Media Type(s) (Work Around #2)

November 11th, 2006

ASP.NET 2.0′s Themes and Skins have a number of design flaws – Themes and Skins depend almost entirely on Cascading Stye Sheet (CSS), but don’t fully support CSS – I’ve listed some “Work Arounds” for a couple design flaws. I don’t recommend any of these “Work Arounds” since they contribute to software entropy before your application is even developed, instead I suggest sticking with CSS and perhaps using some default Skins that define CSS classes or IDs.

The Problem / Question:
Is it possible to define CSS Media types (like media=”print”) in the HTML Head tag? ASP.NET 2.0 automatically includes all my CSS files (from the active Theme directory) into the HTML Head tag, but Themes don’t allow me to specify any CSS Media types.

The Solutions / Work Arounds:
Sub class the HtmlHead class to enumerate through the child controls and add new Meta attributes to the child controls using the HtmlLink class. In order to use multiple Media types you would probably need to use more complex logic and resolve Media types to filenames (i.e. SomeFileName_Print.css could resolve to media=”print”) – for more information on manipulating the HtmlHead class read Phil Scott’s post titled: Accessing the Html Header in ASP.NET 2.0.

An example of the problem:
The HTML source automatically generated by ASP.NET 2.0 Themes (note the lack of media attributes):
<head>
<title>The Problems With Themes and Skins in ASP.NET 2.0 </title>
<link href=”App_Themes/Default/HandHeld.css”
type=”text/css” rel=”stylesheet” />
<link href=”App_Themes/Default/Print.css”
type=”text/css” rel=”stylesheet” />

<link href=”App_Themes/Default/Screen.css”
type=”text/css” rel=”stylesheet” />

</head>

My desired HTML source (note the media attributes in bold):
<head>
<title>The Problems With Themes and Skins in ASP.NET 2.0 </title>
<link href=”App_Themes/Default/Default.css”
type=”text/css” rel=”stylesheet” media=all />
<link href=”App_Themes/Default/HandHeld.css”
type=”text/css” rel=”stylesheet” media=handheld />
<link href=”App_Themes/Default/Print.css”
type=”text/css” rel=”stylesheet” media=print />
<link href=”App_Themes/Default/Screen.css”
type=”text/css” rel=”stylesheet” media=screen />
</head>

The Pros and Cons of this approach:

Cons:

  1. Can’t use Microsoft’s Conditional Comments
  2. Can’t use the CSS @Import rule
  3. Can’t use the CSS @Media rule
  4. Can’t easily use multiple CSS Media types
  5. Can’t easily control CSS preferred and alternate style sheets
  6. Can’t easily control the CSS load order (inheritance and cascading)
  7. Contributes to a fragile environment
  8. Not intuitive _ a maintenance programmers nightmare – “I know CSS, but Where are the Media types defined and How are they controlled?”

Pros:

  1. Can define a single Media type for all .css files relatively easy
  2. Could define multiple Media types – with more complex logic dependant on .css file naming
  3. Could control CSS preferred and alternate style sheets – with more complex logic dependant on .css file naming
  4. Compatible with Revision Control Systems (CVS, Subversion, Visual Source Safe, and so on)

In conclusion; CSS will continue to be the industry design standard – it has been the standard for well over 10 years. CSS is far more powerful than Themes and Skins, I suggest sticking with CSS and perhaps using some default Skins that define CSS classes or IDs.

Related posts:

Author: Adam Kahtava Categories: .NET, ASP.NET, CSS, Themes and Skins Tags:

The Problems with Themes, Skins, and Cascading Style Sheets (CSS) in ASP.NET 2.0 – Excluding a CSS folder (Work Around #1)

November 9th, 2006

ASP.NET 2.0′s Themes and Skins have a number of design flaws – Themes and Skins depend almost entirely on Cascading Stye Sheet (CSS), but don’t fully support CSS – I’ve listed some “Work Arounds” for a couple design flaws. I don’t recommend any of these “Work Arounds” since they contribute to software entropy before your application is even developed, instead I suggest sticking with CSS and perhaps using some default Skins that define CSS classes or IDs.

The Problem / Question:
How can I exclude a subdirectory (sub folder) containing Cascading Style Sheets (CSS) in a Theme (App_Theme) directory? ASP.NET 2.0 automatically includes all CSS files (.css) from the active Theme directory and sub directories into the rendered HTML page, but doesn’t allow me to exclude a folder of CSS files or a single CSS file.

The Solutions / Work Arounds:

  1. Create your CSS directory outside the App_Theme directory then map a Virtual Directory inside your Theme directory.
  2. Add a custom VirtualPathProvider to ignore the non-root level CSS files in sub directories  – See David Ebbo’s article titled: Overriding ASP.NET combine behavior using a VirtualPathProvider.

These “Work Arounds” are useful if you want to do something like this (note: Default.css is sitting in the root of the active Theme directory):

/* Default.css */
@ImportStyleSheets/Common.css “;
@ImportStyleSheets/Masterpage.css”;
<!–[if IE]>
@Import “StyleSheets/FixInternetExplorer_Quirks.css”;
<![endif]–>
<!–[if IE 7]>
@Import “StyleSheets/FixInternetExplorer7Quirks.css”;
<![endif]–>

Or if you wanted to use an Embedded CSS Statement like this:

<style type=”text/css”>
<!
@Import “StyleSheets/HideNavigation.css”;
@Import “StyleSheets/HideSearchBars.css”;
>
</style>

The Pros and Cons of this approach:

Cons:

  1. Can’t really define CSS media types, but we can now use the CSS @Media rule
  2. Can’t control CSS preferred and alternate style sheets
  3. Doesn’t scale well
  4. Contributes to a fragile development environment
  5. Not very compatible with Revision Control Systems (CVS, Subversion, Visual Source Safe, and so on)
  6. Not intuitive _ a maintenance programmer’s nightmare, “I know CSS, but Where is the CSS folder?” or “I know CSS, but Why and How are some CSS folders excluded?

Pros:

  1. Can control the load order (inheritance and cascading) through the CSS @Import rule
  2. Can exclude a folder containing CSS files
  3. Can use the CSS @Import rule
  4. Can use the CSS @Media rule
  5. Can use Microsoft’s conditional comments


In conclusion;
CSS will continue to be the industry design standard – it has been the standard for well over 10 years. CSS is far more powerful than Themes and Skins, I suggest sticking with CSS and perhaps using some default Skins that define CSS classes or IDs.

Related posts:

Author: Adam Kahtava Categories: .NET, ASP.NET, CSS, Themes and Skins Tags:

The Problems with Themes, Skins, and Cascading Style Sheets (CSS) – Where it all Falls Apart

November 8th, 2006

Themes and Skins are a promising addition to ASP.NET 2.0, but too immature for large web projects.

The problem with Themes and Skins begins with the way Cascading Style Sheets (CSS) are automatically included into the rendered page. Through compilation logic, ASP.NET 2.0 parses through the directory and sub directories of the active Theme. ASP.NET 2.0 automatically includes an external CSS file reference into the HTML Head tag of the rendered page for every CSS file encountered.

Here’s an example for a better understanding.

My directory structure:

The output generated by Themes from the preceding directory structure:

<head> 
 <title>The Problems With Themes and Skins in ASP.NET 2.0 </title> 
 <link href="App_Themes/Default/HandHeld.css"
   type="text/css" rel="stylesheet" /> 
 <link href="App_Themes/Default/Print.css" 
   type="text/css" rel="stylesheet" /> 
 <link href="App_Themes/Default/Screen.css" 
   type="text/css" rel="stylesheet" /> 
 <link href="App_Themes/Default/StyleSheets/FixInternetExplorer7Quirks.css"
   type="text/css" rel="stylesheet" /> 
 <link href="App_Themes/Default/StyleSheets/FixInternetExplorerQuirks.css" 
   type="text/css" rel="stylesheet" /> 
 <link href="App_Themes/Default/StyleSheets/HideAdvertisments.css" 
   type="text/css" rel="stylesheet" />
 <link href="App_Themes/Default/StyleSheets/HideBorders.css" 
   type="text/css" rel="stylesheet" />
 <link href="App_Themes/Default/StyleSheets/HideMenus.css" 
   type="text/css" rel="stylesheet" />
</head>

As you can see, the external CSS file references are automatically included in the rendered page – the load order of CSS files seems to depend on the directory and CSS file name. In this example the root directory is parsed alphabetically then the sub directory is parsed alphabetically.

It’s neat how ASP.NET 2.0 automatically includes .css files, but this behavior severely limits the use of CSS (see the list below), and encourages developers / designers to create many .css files which introduces new problems – Internet Explorer has a 30 style sheet limitation, see article Q262161.

Problems:

  • As the name implies Cascading Style Sheets (CSS) depend on the order in which files are loaded (cascades), in addition to other rules like the CSS @import and CSS @Media rule. By automatically loading all .css files into the header, Themes prevent cascades and loading order from being defined.
  • The automatic inclusion of .css files prevents the use of Microsoft’s Conditional Comments.
  • The automatic inclusion of CSS files omits the CSS Media type.

A rough list of CSS features compromised by Themes in ASP.NET 2.0:

  1. CSS media types
  2. The CSS @Import rule
  3. The CSS @Media rule
  4. Preferred and alternate style sheets
  5. Media-dependent cascades
  6. Inheritance and cascading
  7. The use of Microsoft’s Conditional Comments

An example of when these compromised features are useful:

<head>
  <title>The Problems With Themes and Skins in ASP.NET 2.0 </title>
  <link href="App_Themes/Default/HandHeld.css" 
    type="text/css" rel="stylesheet" media="handheld" />
  <link href="App_Themes/Default/Print.css" 
    type="text/css" rel="stylesheet" media="print" />
  <link href="App_Themes/Default/Screen.css" 
    type="text/css" rel="stylesheet" media="screen" />
  <!--[IF IE]>
    <link href="App_Themes/Default/StyleSheets/FixInternetExplorerQuirks.css" 
      type="text/css" rel="stylesheet" media="all" />
  <![endif]-->
  <!--[IF IE 7]>
    <link href="App_Themes/Default/StyleSheets/FixInternetExplorer7Quirks.css" 
      type="text/css" rel="stylesheet" media="all" />
  <![endif]-->
</head>

The contents of Print.css or HandHeld.css would generally look something like this:
/* Contents of Print.css or HandHeld.css*/

@Import “App_Themes/Default/StyleSheets/HideAdvertisments.css”;
@Import “App_Themes/Default/StyleSheets/HideBorders.css”;
@Import “App_Themes/Default/StyleSheets/HideMenus.css”;

In conclusion; Themes have a number of design flaws which limit a significant portion of CSS’s mature feature set. Themes are OK for small web applications, but not recommended for large / complex applications. While there are “work arounds” for some of the issues on my list, implementing each “work around” contributes to software entropy before your application is even developed. Since Skins and Themes are really based around CSS you might be better off sticking with CSS and a single default ASP.NET 2.0 Skin in which you define some default CSS classes or ID elements for some basic ASP.NET server controls.

Related notes:

Rick Strahl came to a similar conclusion:

theming is nice but really most of that can be accomplished with CSS and what Themes offers beyond that is really not that critical. [...] As it stands I don’t really see how I can utilize Themes in my apps in a meaningful way. – Playing around with ASP.NET Themes

Scott Allen makes a great point:

Web designers will be more comfortable with css files. If you put the design of your site into the hands of professionals than you should be asking them to use css wherever possible. – Themes In ASP.NET 2.0

Richard P makes a related comment:

there are so many flaws in Themes and how they use CSS I dont know where to begin! [...] The concept of CSS and the web skin has been around for some years, and we have been building great solutions despite Visual Studio and ASP.NET. – Themes and Skins Flawed in ASP.NET 2.0

Learn more about Themes and Skins here: A Quick Tour of Themes in ASP.NET 2.0.

Related posts:

Author: Adam Kahtava Categories: .NET, ASP.NET, CSS, Themes and Skins Tags:

Points of interest: ACM CareerNews: Tuesday, November 7, 2006

November 7th, 2006

“The Team at the Top” Computerworld, October 23

a strong, diversified IT leadership team can become a strong competitive advantage for companies. … IT leaders still rise through the technology ranks, but there has been increasing emphasis on those who can lead others and understand the business case for different technological solutions. Today, skilled specialists have been replaced by people who can lead not just internal workers but also external vendors and integrators to drive business objectives.
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=266072&source=NLT_CAR&nlid=5 

Original Source: http://www.acm.org/careernews/issues/v2_i19.html

Author: Adam Kahtava Categories: Career News Tags: