Archive

Archive for October, 2006

A Reflection on Themes, Skins, and Cascading Style Sheets (CSS) in ASP.NET 2.0 (Part 2)

October 30th, 2006

Themes and Skins depend on Cascading Style Sheets (CSS) and HTML / XHTML, but Themes and Skins don’t fully support CSS – now that’s a paradox.

HTML, XHTML, XML, and other related Markup Languages can all be manipulated through CSS – ASP.NET generates most of these languages. If your not yet familair with ASP.NET 2.0 Themes and Skins: Skins give developers and designers a little more precision to manipulate server side controls like datagrids, and calendars, but Skins fundamentally depend on CSS. Themes allow us to group our Skins, CSS files, graphics / images, and so on into logical groups or directories, but Themes really depend on CSS through Skins and CSS (.css) file references.

Both ASP.NET Themes and Skins are directly dependent on Cascading Style Sheets (CSS). However; Themes and Skins prohibit a good deal of CSS’s functionality – I’ll discuss this is my next post. CSS has been with us for over a decade, it’s a pretty powerful display mechanism for web applications. CSS can manipulate HTML, XHTML, XML, SVG, XUL and other common Markup Languages.

I’ve come up with a number Theme and Skin related questions that I have yet to answer.

Questions:

If Themes and Skins rely on CSS why not just use CSS?
Answer: Default Skins are good, they provide hooks (class and ID selectors) for defining CSS. Themes are OK they let us logically group images and design related files, but fall short in a number of areas and are not recommended for large web applications. 

If it’s possible to accomplish all that Skins and Themes offers through CSS why should I make the switch?
Answer: Skins can make life easier for your web designers, when used to hook into CSS classes and ID selectors.

CSS is a mature, robust language, it’s been around for over 10 years so more designers / developers are familiar with it, why should I switch to a a technology that is unfamiliar to most of the people that will be maintaining the application?
Answer: It’s not a clear case of CSS vs Themes since you really can’t have Themes without CSS. If used properly Themes can augment CSS.

Are Themes and Skins really scalable for a large enterprise level web application?
Answer: Not really, having a seperate server or Content Delivery Network for site resources like images, stylesheets, etc… is probably the best approach. Themes and Skins do prove uesful for small web applications.

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

A Reflection on Themes, Skins, and Cascading Style Sheets (CSS) in ASP.NET 2.0 (Part 1)

October 29th, 2006

While Themes and Skins are new to ASP.NET 2.0, the underlying concepts have been around for a long time. For those unfamiliar with Themes and Skins, skins give web designers greater flexibility to manipulating ASP.NET server side controls (calendars, datagrids, etc…) through Styles / Cascading Style Sheets (CSS). Themes logically group the design tier of an application into a common folder or directory (a Theme folder(s)), giving developers the ability to programmatically change (swap), or expose these Themes to the user.

Learn more: ASP.NET Themes and Skins Overview.
See a live example here: ASP.NET 2.0 Colorful Web Site Starter Kit.

The concept of interchanging layout and changing design styles (Themes) has been around for quite some time. The W3C Recommendation for Style Sheets in HTML documents outlines the “alternate stylesheet” that should be interchanged through the browsers menu; unfortunately Internet Explorer (IE) fails to support this method.

An example: changing style sheets with a Mozilla based browser (Firefox).


See the live example (if you’re not using IE) at: www.damowmow.com.

Other methods for changing design layouts (Themes) range from Client Side Scripts (JavaScript) to Server Side Scripts (ASP, PHP, ASP.NET, and so on).

Learn more about style interchanging scripts and more here: Style Switching – css-discuss.

Themes and Skins are a welcome addition to ASP.NET 2.0, they offer a simple solution for grouping design specific files, and a nice way to programmatically change these Themes. However; this simplistic approach significantly hampers the power of Cascading Style Sheets _ I’ll discuss my difficulties / problems in subsequent posts.

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

Notes on Software Estimation: Demystifying the Black Art

October 23rd, 2006

I started reading Steve McConnell’s latest book (Software Estimation: Demystifying the Black Art), as the first chapter comes to a close McConnell points out that companies with higher Capability Maturity Model (CMM) levels have a much higher rate of project success _ higher CMM levels are usually associated with mature companies that use historical data for project estimates, it’s interesting to note that these companies often work within a common domain. I found Steve’s little point quite intuitive, and thought it flowed nicely with Fact 17 from Robert L. Glass’s book titled Facts and Fallacies of Software Engineering.

Fact 17

Reuse-in-the-large works best in families of related systems and thus is domain-dependent. This narrows the potential applicability of reuse-in-the-large.

It makes perfect sense that companies working within a common domain make use of reuse-in-the-large and often make better project estimations.

On a similar note I found the Level 1 definition of a CMM from Wikipedia quite amusing.

Level 1 software project success depends on having quality people.

Related posts:
Notes on Software Reuse from the book titled “Facts and Fallacies of Software Engineering”

Author: Adam Kahtava Categories: Musings, Software Tags:

Notes on Software Reuse from the book titled “Facts and Fallacies of Software Engineering”

October 22nd, 2006

The following has been taken from the book Facts and Fallacies of Software Engineering by Robert L. Glass.

Fact 15

Reuse-in-the-small (libraries of subroutines) began nearly 50 years ago and is a well-solved problem. 

Discussion:
There is a tendency in the computing world to assume that any good idea that comes along must be a new idea. … there is enormous (and often hyped) enthusiasm for this concept, an enthusiasm that would be more realistic if people understood its history and its failure to grow over the years.

Fact 16

Reuse-in-the-large (components) remains a mostly unsolved problem, even though everyone agrees it is important and desirable. 

Discussion:
… we solved the reuse-in-the-small problem as far back as more than 40-something years ago. But the reuse-in-the-large problem has remained unsolved over those same intervening years.

Fact 17

Reuse-in-the-large works best in families of related systems and thus is domain-dependent. This narrows the potential applicability of reuse-in-the-large. 

Fact 18

There are two “rules of three” in reuse: (a) It is three times as difficult to build reusable components as single use components, and (b) a reusable component should be tried out in three different applications before it will be sufficiently general to accept into a reuse library. 

Related links:
Read the entire chapter on Reuse here.
Learn more about this book on Amazon.

Author: Adam Kahtava Categories: Musings, Software Tags:

A reflection on Cascading Style Sheets (CSS)

October 12th, 2006

I’ve been using Cascading Style Sheets (CSS) since the mid 90′s. The lack of consistent support across browsers had always impeded my shift from table based design to CSS design. When I did make the transition, I can clearly recall the frustration, and confusion that preceded. Lately I’ve been using Themes and Master Pages (ASP.NET 2.0) with CSS. Personally I don’t like how .NET automagically inserts the CSS file references into the header. Much of CSS’s power is determined by the loading order, and the ability to define separate CSS files for Internet Explorer (IE).

I’ve compiled a list of techniques I find useful when developing CSS:

When designing my CSS I try to use a browser that is W3C compliant (Firefox, Opera), I then apply fixes for the many quirks found in IE.
I find it easier to develop CSS in a text editor, rather than a WYSIWIG editor – perhaps I’m a bit of a standards geek, but I like to thoroughly understand a technology rather than rely on wizards, etc…

By inserting the code below into a webpage’s header you define a CSS file that will only be loaded by IE, this is great for fixing display issues in IE by overloading the effected CSS elements.
<!–[if IE]>
       <link href=”IEQuirkFixFile.css” rel=”stylesheet”
            type=”text/css” media=”all” />

<![endif]–>

You can also define different CSS files for different media types like a printer, letting us hide content (like navigation menus) that you don’t want printed.
<link href=“HideAllNavigationalContent.css” rel=“stylesheet” type=“text/css” media=“print” />

You can specify other media types like: Braille, handheld, projection, tv, and so on. See more media types here: http://www.w3.org/TR/REC-CSS2/media.html#media-types

CSS can be applied in 3 different ways: Inline, Embedded, and External (Linked or Imported). It’s nice to keep everything in external files as this method promotes a more n-tier approach even in the presentation level, but I also find it convenient to override classes through CSS Embedded blocks.

An example:
The following Embedded CSS will hide a Navigation menu, and increase the Content pane to 100% when inserted into webpage. Using a combination of Embedded and External CSS can allow us to use a single Master Page.

<style type=“text/css”>
<!–
    #Navigation
    {
        display: none;
    }
    #MainContent
    {
       max-width: 100%;
       width: 100%;
    }
–>
</ style>

CSS coupled with SVG (Scalable Vector Graphics) and Extensible Markup Language (XML) is becoming an increasingly powerful technology, and most web applications under the Web 2.0 (alternatively known as Chmod 777 web or the Read / Write Web) use CSS, XHTML, AJAX, Clean and meaningful URLs (URL Rewriting), and so on.

View a SVG example: http://www.w3schools.com/svg/svg_examples.asp

Related links:
Cascading Style Sheets Home Page
CSS Zen Garden

Author: Adam Kahtava Categories: .NET, ASP.NET, CSS Tags:

Points of interest: ACM CareerNews: Tuesday, October 10, 2006

October 12th, 2006

“How Not To Get Left Behind In the IT Manager Boom” Information Week, October 2

job descriptions used to be 90% technology-related, now they are 10% technology-related and 90% business-related. As a result, IT professionals must be on the lookout for opportunities to embrace management responsibilities when they come along.
http://www.informationweek.com/management/showArticle.jhtml?articleID=193100560&subSection=Career+Development 

“Strike Halts Work At Outsourcing Tech Hub in India” Information Week, October 4

A strike in an IT outsourcing hub like Bangalore, India would obviously have serious ramifications for Western firms. While many IT organizations have business contingency plans that can deal with short-term work stoppages, a long-term strike would present a number of significant problems. That is exactly what Western firms found out on October 4 http://www.informationweek.com/news/showArticle.jhtml;jsessionid=32QVJ5VRH2CN4QSNDLRSKH0CJUNN2JVN?articleID=193104360 

“Seven Deadly Career Sins” InfoWorld, September 18

avoid accepting an expanding array of job requirements if you are unable to fulfill them. When project requirements keep changing, inexperienced managers often agree to the impossible. However, you need to push back with realistic adjustments as to the time or resources required for these new job requirements. http://www.infoworld.com/article/06/09/18/38FEjobspitfall_1.html 

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

Author: Adam Kahtava Categories: Career News Tags: