ASP.NET 2.0 Master Pages versus Skinning


The capability to skin DotNetNuke was introduced in version 2 of the application and was a much-anticipated addition. The term "skinning" refers to an application's ability to change the look of the design by a setting in the application. This allows for the separation of the application logic from the user interface or object abstraction. As you learned in previous chapters, DotNetNuke uses a three-tier object-oriented design approach, with the user interface segmented as its own tier. This is what enables skinning to work and what enables the framework to present a unique feel depending on the parameters passed to the page. This chapter looks at the finer points of skinning and provides you with the tools to start building your own skins for DotNetNuke.

An Introduction to DotNetNuke Skinning

DotNetNuke uses templates to accomplish skinning because they provide for the separation of the presentation and layout attributes from the application logic required to display content to the user. We studied various approaches to enable this functionality and have created a solution that will give both developers and designers independence when implementing DotNetNuke sites. This results in faster deployment times and, more importantly, reduced expense with getting your portal functional and performing its intended purpose.

The abstraction of the user interface elements from a page can be accomplished using different methodologies. The method chosen includes some degree of parsing to merge the presentation with the business logic. Therefore, defining where, when, and how this parsing will take place becomes critical to the success of the entire solution.

The use of tokens or identifiers in the user interface files to represent dynamic functionality is a popular technique employed in many skinning solutions. DotNetNuke uses this approach in its skinning engine solution: as the page is processed, the token is replaced to the proper skin object or control for the function the token identifies. Some of these tokens serve as what are referred to as Content Panes. Content Panes, simply put, are areas of HTML where dynamic content will be populated at runtime. The dynamic content is populated by the use of modules. Details of how this is accomplished will be discussed later.

DotNetNuke enables you to create skins using your favorite editor, which gives you as a skin developer a good amount of flexibility — you only need to follow the rules for creating a skin; the tool you use to create it is up to you. You can create either an .ascx or .html skin. The type you create depends on your choice of editor and the set of rules you choose to follow. Offering designers the ability to create the skins in HTML or ASP.NET was a conscious choice made to allow for the most flexibility with creating these skins and to help bridge the gap between designers and developers. The Core Team realizes there are still many more HTML developers in the world than ASP.NET developers, so allowing skins to be created in HTML enables many more individuals to use this functionality of the application without having to learn new skills other than how to place the tokens within your skin design. Now that you have a little history of why the engine was architected, the following section looks at why it is still being used despite the introduction of Master Pages.




Professional DotNetNuke 4.0 (c) Open Source Web Application Framework for ASP. NET 4.0
Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0 (Programmer to Programmer)
ISBN: 0471788163
EAN: 2147483647
Year: 2006
Pages: 182

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net