Professional Documents
Culture Documents
MonoX
2008 - 2013 Mono LLC
All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or
mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the
written permission of the publisher.
Products that are referred to in this document may be either trademarks and/or registered trademarks of the
respective owners. The publisher and the author make no claim to these trademarks.
While every precaution has been taken in the preparation of this document, the publisher and the author assume no
responsibility for errors or omissions, or for damages resulting from the use of information contained in this document
or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be
liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or
indirectly by this document.
Contents
Table of Contents
Foreword
Part I Introduction
1 Welcome
................................................................................................................................... 8
2 Web parts
................................................................................................................................... 9
3 Social networking
................................................................................................................................... 10
Part II Installation
12
1 Installation requirements
................................................................................................................................... 12
2 Using the setup
...................................................................................................................................
package
12
3 Installation wizard
................................................................................................................................... 13
4 Using Web Platform
...................................................................................................................................
Installer
16
5 Configuration
...................................................................................................................................
settings
20
Web.config settings
.......................................................................................................................................................... 21
URL rewriting
......................................................................................................................................................... 21
Page optimization
......................................................................................................................................................... 23
Important.........................................................................................................................................................
MonoX configuration settings
25
Provider models
.......................................................................................................................................................... 29
6 Licensing
................................................................................................................................... 32
35
1 Logging in ................................................................................................................................... 35
2 MonoX workspace
................................................................................................................................... 37
3 Web part menu
................................................................................................................................... 38
41
1 Portal views................................................................................................................................... 41
2 Page display...................................................................................................................................
modes
42
Browse mode.......................................................................................................................................................... 42
Design mode .......................................................................................................................................................... 42
Catalog mode.......................................................................................................................................................... 43
Connect mode
.......................................................................................................................................................... 45
Edit mode
.......................................................................................................................................................... 46
3 Content versioning
................................................................................................................................... 47
50
1 File management
................................................................................................................................... 50
2 Amazon S3 file
...................................................................................................................................
management
54
3 Page management
................................................................................................................................... 54
4 User management
................................................................................................................................... 60
5 Role management
................................................................................................................................... 62
2008 - 2013 Mono LLC
Contents
6 News management
................................................................................................................................... 62
7 Ad management
................................................................................................................................... 66
8 Poll management
................................................................................................................................... 68
9 List management
................................................................................................................................... 70
10 Newsletter management
................................................................................................................................... 71
11 Blog management
................................................................................................................................... 72
12 Custom administration
...................................................................................................................................
modules
74
77
1 Built-in Web...................................................................................................................................
parts
78
Ad Web part .......................................................................................................................................................... 78
Blog Web parts
.......................................................................................................................................................... 78
Captcha Web..........................................................................................................................................................
part
84
Contact form ..........................................................................................................................................................
Web part
84
Event calendar
..........................................................................................................................................................
Web part
85
File upload Web
..........................................................................................................................................................
part
86
HTML editor .......................................................................................................................................................... 87
Language changer
..........................................................................................................................................................
Web part
90
List Web part.......................................................................................................................................................... 90
Login Web part
.......................................................................................................................................................... 91
LoginSocial Web
..........................................................................................................................................................
part
91
Menu Web part
.......................................................................................................................................................... 93
News Web parts
.......................................................................................................................................................... 93
Password recovery
..........................................................................................................................................................
Web part
96
Poll Web part.......................................................................................................................................................... 96
RSS reader Web
..........................................................................................................................................................
part
97
Search Web part
.......................................................................................................................................................... 97
Social Networking
..........................................................................................................................................................
Web parts
100
Activity stream
.........................................................................................................................................................
Web part
100
Comments
.........................................................................................................................................................
Web part
101
Discussion
.........................................................................................................................................................
Web parts
101
File gallery
.........................................................................................................................................................
Web part
103
File view.........................................................................................................................................................
Web part
105
Flash video
.........................................................................................................................................................
player Web part
105
Followers
.........................................................................................................................................................
Web part
105
Friend list
.........................................................................................................................................................
Web part
106
Group Web
.........................................................................................................................................................
parts
107
Invitation.........................................................................................................................................................
list Web part
109
Messaging
.........................................................................................................................................................
Web parts
109
New users
.........................................................................................................................................................
list Web part
112
People search
.........................................................................................................................................................
Web part
112
Photo gallery
.........................................................................................................................................................
Web parts
113
Wall Web
.........................................................................................................................................................
part
116
User Profile ..........................................................................................................................................................
Web part
117
120
1 Anatomy of...................................................................................................................................
a MonoX page
120
126
2008 - 2013 Mono LLC
Contents
129
1 Built-in themes
................................................................................................................................... 131
2 Creating custom
...................................................................................................................................
master and template pages
133
Part X Personalization
137
1 Personalization
...................................................................................................................................
scope
137
Part XI Security
140
142
144
1 Managing localization
...................................................................................................................................
settings
145
148
152
1 Working with
...................................................................................................................................
MonoX projects
152
Creating new..........................................................................................................................................................
projects
153
2 Developing...................................................................................................................................
custom portal pages
155
3 Developing...................................................................................................................................
custom Web parts
155
"Hello world"
..........................................................................................................................................................
Web part
156
Basic development
..........................................................................................................................................................
guidelines
160
4 Data access
...................................................................................................................................
in MonoX
163
5 Using CSS ...................................................................................................................................
adapters
163
6 Themes, templates
...................................................................................................................................
and chromes
164
Creating and..........................................................................................................................................................
deploying a new theme
164
Working with
..........................................................................................................................................................
Web part chrome templates
164
Web part templates
.......................................................................................................................................................... 165
7 API calls
................................................................................................................................... 167
................................................................................................................................... 179
13 OpenSocial................................................................................................................................... 184
190
192
Contents
Index
193
Part
I
Introduction
Introduction
Introduction
This is a user manual for MonoX, a next generation portal development and social networking
framework for building advanced Web portals and applications. MonoX provides tools for quick and
intuitive construction of dynamic and fully editable portals and Web applications.
What You See Is What You Get (WYSIWYG) environment provided by MonoX engine allows users to
author advanced portals without coding. The first part of this manual is dedicated to explaining core
administrative concepts for all end user groups (administrators, designers, power users). The second
part - Portal development - describes advanced development tasks for users aiming to develop fully
customized solutions.
Important: the tilde character (~) that frequently appears in URLs in this manual is used in its usual
ASP.NET context and meaning: it is actually a shortcut notation for the HttpRuntime.
AppDomainAppVirtualPath property, which, according to the .NET documentation, "returns the
virtual path of the directory that contains the application hosted in the current application domain." If
your copy of MonoX is installed in http://localhost/MonoX, and the manual references the URL "~/
MonoX/SomePage.aspx", the page will be located at http://localhost/MonoX/MonoX/SomePage.aspx.
Additionally, screenshots in this manual were taken on various projects, skins and versions of the
package. Most of the screenshots are using the OldBlue MonoX skin. The functionality of the Web
parts is always the same, regardless of the front-end skin and template that is used on a particular
project.
1.1
Welcome
MonoX portal framework for ASP.NET allows you to create powerful Web applications and dynamic
Web portals with minimal effort.
MonoX features include:
interactive user interface compatible with any recent Web browser, allowing for intuitive, drag-anddrop interaction with the portal elements. MonoX uses Ajax-based user interface elements and all
the latest "Web 2.0" technologies to allow users to be as productive as possible.
full support for the ASP.NET Web parts framework: the Web Parts framework was one of the
most conspicuous and the most powerful new features in Microsoft's ASP.NET 2.0. Basically, it is a
set of controls and services that specifically target the growing demand for Web portal creation,
including support for personalization, membership, communication and other infrastructural tasks.
MonoX is built on top of the standard Web part API, so there is virtually no learning curve involved.
a fully featured set of components you need to build a advanced social environments:
profiles, groups, friend lists, wall, photo albums, activity streams (event lists), video sharing,
discussion lists, blogs, messaging, ...
W3C compliance: The W3C or World Wide Web Consortium is an international consortium
dedicated to creating Web standards and guidelines. MonoX renders XHTML compliant code and
enables users to develop fully standards-compliant portals that will work reliably on different
platforms.
SEO optimization: MonoX includes powerful Search Engine Optimization mechanisms that can
help users place their portals very high on all major search engines.
scalable and robust architecture: MonoX offers a scalable architecture that can satisfy the
requirements of both small workgroups and large enterprises.
standardized plug-and-play modules and open API: new modules can be developed and
plugged-in via standard Web part API.
high performance and flexible data layer: MonoX utilizes LLBLGen, a powerful object-relational
engine that generates highly optimized, robust and scalable database-related code.
unprecedented ease of use: non-technical users can administer most of the aspects of the working
portal. MonoX employs standard WYSIWYG editors, file manager mimics the look and feel of the
Introduction
standard Windows explorer, etc. It fully supports offline editing tools based on MetaWeblog API
(Microsoft Windows LiveWriter).
1.2
Web parts
Portal applications are very popular today and they often share some common characteristics. Useful
portals serve up large portions of content through a user interface that is modular, consistent, and
easy to navigate. More sophisticated portals go even further and allow site members to contribute
content, upload documents, and personalize portal pages.
The main idea of ASP.NET 2.0 Web Part Framework is to let end users create and configure Web
pages by dragging in functional blocks (called Web Parts) and setting properties on these blocks. This
configuration happens right inside the Web page, using nothing but a standard Web browser. To
change a page in the site, you browse to this page, switch to edit mode and change it. Non-technical
users can change the layout of their page by dragging and dropping the web parts to different zones
on the page. Each of the parts exposes a configuration user interface to change its behavior and
appearance.
Combining the Web part paradigm with personalization opens up a whole new world of possibilities.
With the personalization framework inside ASP.NET 2.0, the settings applied on the parts on a page
can be different per user. You can allow any user to make changes to the page and these changes will
be visible to that user alone. This does not require writing support code - developers can concentrate
on programming the parts and decide which properties the user will want to configure. The Web Part
framework of MonoX does all the heavy lifting of serializing, storing, and retrieving the data associated
with site customization and member personalization.
History
ASP.NET 2.0 is not the first Microsoft product featuring Web Parts technology. They were (and still
are) used in Microsoft SharePoint Portal Server (SPS) and Windows SharePoint Services (WSS).
Version 3 of WSS is built upon Web Part Infrastructure core, while remaining backward compatible
with the WSS2 style of web parts. This means that you can apply the skills learned using MonoX and
ASP.NET 2.0 to build parts for Windows SharePoint Services. Many enterprise level server
applications leverage WSS as their web platform (like MS Office SharePoint Server 2007, Team
Foundation Server, PerformancePoint). You can modify and extend these applications using your Web
part skills. The market for Web parts covers all types of Web applications. This means that more
developers will be able to use the concept of Web parts in their solutions and that the market for third
party Web parts is becoming commercially feasible.
Mono Software used a concept similar to Web parts in the first commercial release of MonoX portal
framework (published during 2004). It was based on a very popular IBuySpy portal application, and
introduced drag and drop and visual configuration features that are now accepted in the new Web part
framework. However, the initial version was not using the standard API, as it was not available at that
time.
This new version of MonoX fully supports all the features of ASP.NET 2.0 Web part framework. To the
best of our knowledge, it is the only commercially available product with this feature, as other portal
products use proprietary module architectures. In addition, MonoX fully support all other standard ASP.
NET 2.0 / 3.5 features, including personalization, master pages, themes and provider models, and
adds significant additional functionality described in this manual.
Definition
Web Parts are customizable plug and play components that empower information workers to create
personalized user interfaces by simply dragging and dropping them onto a Web page. Web parts allow
Introduction
10
customization at both design time and at run time. In fact, Web Parts blur the distinction between
design time and run time.
From the point of view of a developer, a Web part is simply an ASP.NET server control. To create a
new Web Part, you create an ASP.NET custom control. However, unlike standard ASP.NET controls,
which developers add to Web form pages at design time, Web Parts are intended to be added to Web
Part Pages either by authors at design time, or by users at run time.
The Web Part Framework in MonoX is used by three categories of users:
End users personalize a Web Part Page to simplify and focus on the information that is most
relevant to them. They do this by customizing Web part properties.
Web Page Authors use Web Parts to build custom solutions based on the existing functionality.
.NET developers extend MonoX by introducing new functionality or extending the existing parts.
1.3
Social networking
Over the last decade, social networking has become a driving force on the Web. Many people are part
of at least one social network; much more often, people are members of many different communities.
Recognizing this trend, we have started to incorporate some of the social networking features as an
addition to the core content management functionality of MonoX. As many of our users are trying to
capitalize on the social networking movement and are in a rush to put up their own social network
sites, it quickly became obvious that a full set of social marketing modules and APIs is needed to
enable the development of sites comparable to the majority of today's social networks or online
communities.
In addition to its core content management features, MonoX is now a fully featured social networking
framework that allows you to build any kind of online community. It includes:
customizable profiles with enhanced privacy control.
friendship modules with one-way ("Twitter-style", follower/following), or two-way ("Facebook-style")
friendship relations.
multiple login modules (MonoX, OpenID, RPX), signup and user validation functionality.
scalable blog engine with full support for multi-user work (each user can have unlimited number of
blogs, which in turn can have unlimited number of editors).
anti-spam features: Captcha and customizable, provider-based comment validation infrastructure
that supports services like Akimset and Defensio out of the box.
photo albums.
customizable group architecture with support for public and private groups, multiple administrators,
categories, photo albums, discussions, search and wall.
discussion boards.
Silverlight-based file upload and gallery, allowing for native multiple select and upload functionality.
support for activity streams.
scalable messaging module.
support for video conversion and sharing.
fully-featured wall module.
Part
II
Installation
Installation
12
Installation
This section describes the prerequisites and the steps that are necessary to completely install the
MonoX portal framework.
You can install MonoX in two ways:
using the standard setup package that can be downloaded from our site
using Microsoft's Web Platform Installer 16
2.1
12
Installation requirements
MonoX installation package requires:
Microsoft Windows 2003 Server or higher OR Microsoft XP Professional or higher, with IIS 6.0 or
higher
Microsoft .NET 3.5 or higher
Microsoft SQL Server 2005 or higher OR Microsoft SQL Express
All commonly used browsers are supported in the end-user mode: Internet Explorer 7.0 or higher;
Firefox 3.0 or higher; Opera 7.5 or higher; Safari 1.2 or higher.
Internet Explorer, Firefox and Google Chrome are also fully supported in the administration mode.
Web part drag-and-drop operation is currently not supported on Firefox by Microsoft's Web part
framework, but this does not limit the design functionality since there are another means to move Web
parts from one zone to another.
2.2
Installation
13
2.3
Installation wizard
MonoX Installation wizard is launched under two conditions:
- portal database (as configured in the LocalSqlServer setting of the Web.config) is present and
accessible, but does not contain any of the required tables
- InstallationDone setting of the User.config file is set to false
The first screen of the installation wizard lists the installation requirements and checks if all file system
privileges are correctly set. Note that there are separate installation packages for .NET frameworks 3.5
and 4.0.
Installation
14
You can specify the MonoX database name in the fourth step. Note that you can install unlimited
number of portal instances on a single database by choosing the "Setup a new MonoX instance under
Installation
15
the existing database" option. Portal installation files have to be manually copied to the separate folder
in this "multi-portal" scenario.
Installation
2.4
16
The Web PI will automatically start after it is installed - you can also run it in the IIS management
console. Locate MonoX under the Applications tab, or use the search box. Click on the "Add" button
next to it.
Installation
17
At this point you may want to configure the application feed to keep you up to date with all new
versions of the MonoX package and related tools. Note that there is a considerable delay between the
official MonoX release date and the publication date in the application gallery. The application feed
allows you to get a direct access to the newest versions of the installation package without any
problems.
If you want to set up the application feed, click on the Options link at the bottom of the screen. Enter
http://www.mono-software.com/Download/WebPi/MonoXFeed.xml under "Display additional
scenarios", and click on the "Add feed" button.
Installation
18
An additional MonoX tab will appear at the top of the screen, giving you a direct access to all current
releases of MonoX.
Installation
19
Once the MonoX setup has been initiated, you will be offered to set general site configuration settings
(Web site, application name, host name, etc.).
The last screen will ask for the database location and security information. After you click on the
"Continue" button, the installation utility will unpack and install MonoX at the location of your choice.
Installation
2.5
20
Configuration settings
MonoX uses a standard ASP.NET web.config file to hold all configuration settings.
If you are developing a project that needs custom programming (on top of the existing MonoX
functionality), it is recommended that you split the configuration settings in at least two files. Web.
config will still hold all common settings, but project-specific settings should go to a separate file, which
is being pointed to by an entry in the web.config:
<appSettings file="Configuration\Local\appSettings.config">
Most projects will have at two pairs of such configuration files, one for the local development, and one
for the production environment. Additionally, you can move the connection strings to its dedicated
configuration file, as well as some other sections. Here is how the configuration folder looks in many of
our custom projects:
Installation
2.5.1
21
Web.config settings
This file contains configuration settings and application-wide data, such as SQL Server connection
strings, provider settings, page optimization settings and culture settings. When you need to change
any of these settings, you only need to edit the Web.config file, you do not need to modify the code or
recompile your application.
The first line of the web.config file describes the document as XML-formatted and specifies the
character encoding type. The root element is always <configuration>. To describe the application
settings and control the behavior of the application various other tags are nested within this tag.
The <configSections> element specifies the configuration section and namespace declarations. The
<sectionGroup> tags are used for more detailed declarations of the specified sections.
Main database connection string is specified in the following section (note that the exact connection
string may be different in your case):
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data
Source=local;Trusted_Connection=true;database=MonoX2;" providerName="
System.Data.SqlClient"/>
</connectionStrings>
2.5.1.1
URL rewriting
URL rewriting is a well known Search Engine Optimization (SEO) technique. The basic premise is that
clean URLs containing highly relevant keywords and without query string parameters will place your
pages much higher in search engine rankings. MonoX URL rewriting engine is based on Seth Yates'
URLRewriter.NET, an open-source, light-weight, highly configurable URL rewriting component for
ASP.NET.
There are three sections related to URL rewriter in the Web.config file:
Configuration section handler in the following section group: <sectionGroup name="
MonoSoftware.Web">
<section name="UrlRewriter" requirePermission="false" type="
MonoSoftware.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,
MonoSoftware.UrlRewriter"/>
HttpModule section (IIS 6):
<add type="MonoSoftware.UrlRewriter.RewriterHttpModule,
MonoSoftware.UrlRewriter" name="UrlRewriter"/>
Note that you may need to set up a wildcard mapping (see below) for the MonoX application path in IIS
settings (using inetmgr utility) to maximize the rewriter's usefulness.
This section looks a little different in IIS 7 - you can hold settings for both versions in the same
web.config:
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true">
<add type="MonoSoftware.UrlRewriter.RewriterHttpModule,
MonoSoftware.UrlRewriter" name="UrlRewriter" />
Note that runAllManagedModulesForAllRequests="true" effectively applies the wildcard
mapping for IIS 7.
Installation
22
Rule section:
<rewriter>
<if url="^(.*)/language/(.*)/(.*).aspx(\?(.+))?$" rewrite="
$1/$3.aspx?language=$2&$5"/>
<if url="^(.*)/language/(.*)/(.*).aspx$" rewrite="
$1/$3.aspx?language=$2"/>
</rewriter>
This particular rule set is entered by default. It takes care of special URL formatting needed for the
localization purposes. As you may notice, it uses Regular Expression syntax to extract and replace the
appropriate URL segments.
Rewrite action is by far the most frequent action in the everyday work with the URL rewriter. It
contains that a pattern to be matched from URL to be rewritten (url) and the replacement pattern fro
the new location (rewrite). The patterns are standard .NET regular expressions.This action can
optionally contain a processing (stop|continue|restart) and a conditions parameter.
It is important to note that all relevant URL types must be mapped to the ASP.NET runtime so the URL
rewriting module could catch them. By default, only the .aspx and related files (.ashx, .asmx) are
mapped to the ASP.NET runtime. You can implement "wildcard mapping" using the IIS admin tool.
Right click on the Web site you want to administer, Properties, Home directory tab, Configuration
button. Copy the executable path from one of the existing ASP.NET extensions (.asax, for example).
Click on the insert button, paste the executable path you copied in the previous step, and uncheck
"Verify that file exists".
When using wildcard mapping and handling all web requests using ASP.NET, the default document
settings in IIS are lost. Heres a rule you can add at the bottom of your rule set which will give you back
default document handling:
<rewrite url="^(.*)/(\?.+)?$" to="$1/default.aspx$2?" />
Note that using processing=restart will rerun the URL back through the complete rule base in case
you have any earlier rules that depend on /default.aspx.
Support for multiple default documents is added via multiple rewrite entries:
<if url="^(.*)/(\?.+)?$">
<rewrite exists="$1/default.aspx" to="$1/default.aspx$2" />
<rewrite exists="$1/index.aspx" to="$1/index.aspx$2" />
</if>
Again, if you are using wildcard mapping and having ASP.NET handle every request, then you need to
add a rule to stop processing of file types that you do not want to handle (images, etc). A rule like the
following at the very top of your rule set will immediately stop rewriting anything with the extension .gif,
.png, .jpg, .ico, .pdf, .css or .js. Your situation may vary so you may want to add other extensions:
<rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$"
to="$1" processing="stop" />
Two regular expression characters that are typically included (but not required) are the ^ and the $. ^
means the beginning of the URL, while $ means the end of the URL.
Using the ~/ convention if you may install your application in different web application roots. This way,
you will not have to have different rules if your application is installed in a different virtual folder name
(or even in the root of the web site).
One very useful convention is to include an optional pattern to match query strings. If you dont do this,
then people could break your rewriting by adding a query string.
Installation
23
Page optimization
MonoX introduces a powerful mechanism for page optimization. The contents of the Web.config
section that is in charge of page optimization is as follows:
<sectionGroup name="MonoSoftware.Web.WAO">
<section name="ViewState" type="
MonoSoftware.Web.WAO.ViewState.Configuration.ViewStateConfiguration,
Installation
24
MonoSoftware.Web.WAO" requirePermission="false"/>
<section name="HttpCompress" type="
MonoSoftware.Web.WAO.HttpCompress.Configuration.HttpCompressConfiguration,
MonoSoftware.Web.WAO" requirePermission="false"/>
</sectionGroup>
Page optimizer consists of two separate modules:
HttpCompress: each page or related resource can be compressed on the fly, reducing the impact on
the bandwidth and page load times. The settings displayed below are tuning the performance and
the behavior of the compression module. As it can be seen, you can set the MIME types that should
not be processed (usually for the files that are compressed already), as well as the exact paths/
URLs.
<HttpCompress turnedOn="true" defaultProvider="Deflate" useCaching="true">
<providers>
<clear/>
<!--compressionLevel="high|normal|low|none"-->
<!--Note: If you use None as compression level you will turn
off the http compressions-->
<add name="Deflate" type="
MonoSoftware.Web.WAO.HttpCompress.Providers.DeflateProvider,
MonoSoftware.Web.WAO" customProperties="CompressionLevel=High;"/>
<add name="GZip" type="
MonoSoftware.Web.WAO.HttpCompress.Providers.GZipProvider,
MonoSoftware.Web.WAO" customProperties="CompressionLevel=High;"/>
</providers>
<ExcludedMimeTypes>
<clear/>
<add name="png" type="image/png"/>
<add name="jpeg" type="image/jpeg"/>
<add name="gif" type="image/gif"/>
<add name="zip" type="application/zip"/>
<add name="x-zip-compressed" type="application/x-zip-compressed
"/>
<add name="x-gzip-compressed" type="
application/x-gzip-compressed"/>
<add name="x-compressed" type="application/x-compressed"/>
<add name="octet-stream" type="application/octet-stream"/>
<add name="pdf" type="application/pdf"/>
</ExcludedMimeTypes>
<ExcludedPaths>
<clear/>
<!--Example-->
<!--<add name="WebResource" path="WebResource.axd"/>-->
</ExcludedPaths>
</HttpCompress>
ViewState optimizer: MonoX can completely remove the contents of the ViewState hidden form field.
It practically means that your page will be much "lighter" in terms of size and load times, as
ViewState hidden field can hold tens of kilobytes of data even in moderately complex applications.
As an added benefit, this will also make your pages more SEO friendly - all this is possible without
loosing any of the ViewState-related functionality. Instead of the hidden form field, the ViewState
data can be stored in a database, file system, or session. This is controled via the following Web.
config entries:
<ViewState turnedOn="true" defaultProvider="DiskProvider">
<providers>
<clear/>
Installation
25
roles -->
key="AdministratorRoles" value="Administrators" />
key="NewsPublisherRoleName" value="Publishers" />
key="AdManagerRoles" value="AdManager,Administrators" />
key="BlogAdministratorRoles" value="Administrators,Publishers" />
<add key="CalendarAdministratorRoles" value="
Administrators,Publishers" />
<add key="DiscussionAdministratorRoles" value="
Administrators,Publishers" />
<add key="PhotoGalleryAdministratorRoles" value="
Administrators,Publishers" />
<add key="NewsEditorRoles" value="NewsEditors" />
<add key="ShowAjaxPanelForRoles" value="Publishers" />
<!-- User is added to these roles when he registers on the site -->
<add key="DefaultUserRoles" value="Users" />
<!-- database type -->
<add key="DbType" value="Sql Server" />
<!-- navigation extensions to show in the file browser and similar
utilities -->
<add key="NavigationExtensions" value=".aspx;.htm;.html" />
<!-- system folders to hide in file browser and similar utilites -->
<add key="HideFoldersThatBeginWith" value="
App_Browsers,App_Code,App_GlobalResources,App_LocalResources,classes,contro
ls,.svn,_svn,bin,RssStorage,Cache,aspnet_client,obj,properties" />
<!-- virtual localization subfolder that will be prepended before the
locale-specific part of the path (example: /language/en-US) -->
<add key="localizationSubFolder" value="language" />
<!-- wheter to log failed login attempts -->
<add key="LogFailedLoginAttempts" value="true" />
<!-- wheter to log important user actions -->
<add key="LogUserLogins" value="false" />
<!-- wheter to log important admin actions -->
<add key="LogAdminActions" value="false" />
<!-- keyword splitter characters for the news module -->
Installation
26
Installation
27
Installation
28
Installation
29
2.5.2
Provider models
ASP.NET 2.0 includes a number of services that store state in databases and other storage media.
For example, the session state service manages per-user session state by storing it in-process (in
memory in the application domain of the host application), in memory in an external process (the "state
server process"), or in a Microsoft SQL Server database. The membership service stores user names,
passwords, and other data in Microsoft SQL Server databases or Active Directory. For the majority of
applications, the built-in storage options are sufficient. However, the need sometimes arises to store
state in other media.
ASP.NET 2.0 services that manage state do not interact directly with storage media - instead, they use
providers as intermediaries. A provider is a software module that provides a uniform interface between
a service and a data source. Providers abstract physical storage media, in much the same way that
device drivers abstract physical hardware devices. Because virtually all ASP.NET 2.0 statemanagement services are provider-based, storing session state or membership state in a different
type of database (rather than a Microsoft SQL Server database) or even a flat file is as simple as
plugging in a different state and membership providers. Code outside the provider layer needn't be
modified, and a simple configuration change, accomplished declaratively through Web.config,
connects the relevant services to the new providers.
An additional benefit of the provider model is that all ASP.NET applications that use it can be easily
integrated with MonoX. Integrating excellent third-party applications like BlogEngine.Net and
YetAnotherForum.NET is only a matter of few configuration changes in the Web.config files of these
applications (full examples can be downloaded from the support site).
Below are the examples of the membership, role, personalization and search engine providers in
MonoX:
<webParts enableExport="true" >
<personalization defaultProvider="SqlBlobPersonalizationProvider">
<providers>
<add connectionStringName="LocalSqlServer"
applicationName="MonoX" name="SqlBlobPersonalizationProvider" type="
MonoSoftware.MonoX.VersionedPersonalizationProvider" varyByParams="none"
varyByCustom="LanguageId" />
</providers>
<authorization>
<allow verbs="enterSharedScope, modifyState" roles="
Administrators,Users"/>
</authorization>
Installation
30
</personalization>
</webParts>
<membership defaultProvider="AspNetSqlMembershipProvider" hashAlgorithmType
="SHA1" >
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add connectionStringName="LocalSqlServer" enablePasswordRetrieval=
"true" enablePasswordReset="true" requiresQuestionAndAnswer="false"
applicationName="MonoX" requiresUniqueEmail="false"
passwordFormat="Clear" maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow
="10" passwordStrengthRegularExpression="" name="
AspNetSqlMembershipProvider"
type="MonoSoftware.MonoX.MonoXMembershipProvider, MonoX"/>
<!-- ActiveDirectoryMembershipProvider is turned off by default
<add name="ActiveDirectoryMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
attributeMapUsername="sAMAccountName" applicationName="MonoX"
connectionUsername="username@yourdomain"
connectionPassword="pwd" /> -->
</providers>
</membership>
<roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
<providers>
<remove name="AspNetSqlRoleProvider"/>
<add connectionStringName="LocalSqlServer" applicationName="
MonoX" name="AspNetSqlRoleProvider" type="
MonoSoftware.MonoX.MonoXRoleProvider, MonoX"/>
<!--<add applicationName="MonoX" name="ActiveDirectoryRoleProvider"
type="MonoSoftware.MonoX.ActiveDirectoryRoleProvider"
connectionStringName="ADConnectionString"
groupMode="Additive"
groupsToUse=""
groupsToIgnore=""
usersToIgnore=""
enableSqlCache="False"
sqlConnectionStringName=""
cacheTimeInMinutes="30"
domainName="mydomain.local"
userName="username@domain"
password="pwd"
/> -->
</providers>
</roleManager>
Apart from the "standard" providers that are presented above, MonoX utilizes provider-based
architecture for numerous different tasks and services, including:
Search engine:
<SearchEngine>
<providers>
<add name="PagesSearchProvider" type="
MonoSoftware.MonoX.SearchEngine.Providers.PagesSearchProvider, MonoX"
Version 4.7 - 03/01/2013
Installation
31
Installation
32
<AntiSpam>
<providers>
<add name="Akismet" type="
MonoSoftware.Web.AntiSpam.AntiSpamProviders.Akismet.AkismetAntiSpamProvider
, MonoSoftware.Web" apiKey="YourApiKey" />
<add name="Defensio" type="
MonoSoftware.Web.AntiSpam.AntiSpamProviders.Defensio.DefensioAntiSpamProvid
er, MonoSoftware.Web" apiKey="YourApiKey" />
</providers>
</AntiSpam>
Caching:
<Cache defaultProvider="AspNetCacheProvider" defaultSystemCacheDuration="
3600" defaultWebPartCacheDuration="0">
<providers>
<add name="AspNetCacheProvider" type="
MonoSoftware.MonoX.Caching.AspNetCacheProvider, MonoX" />
</providers>
</Cache>
File storage:
<FileContent defaultProvider="MonoXFileSystemContentProvider">
<providers>
<add name="MonoXFileSystemContentProvider" type="
MonoSoftware.MonoX.FileSystem.MonoXFileSystemContentProvider, MonoX" />
<!-- {0} in urlFormat parameter will be replaced by the bucket name.
Can be used if you want to use custom domain names via DNS alias entries.
-->
<add name="AmazonS3FileSystemContentProvider" type="
MonoSoftware.MonoX.FileSystem.AmazonS3FileSystemContentProvider, MonoX"
bucketLocation="us" accessKeyId="YourKeyId" secretAccessKey=
"YourSecretAccessKey" urlFormat="{0}.s3.amazonaws.com" />
</providers>
</FileContent>
Localization - used to support custom URL rewriting for localization scenarios. By default, localized
URLs have a string similar to "/language/en-US" embedded in it and MonoX extracts the culture
name from such strings. However, the end user can choose the custom rewriting scheme, in case of
which the the InitializeCulture in the BasePage has to be overriden to set Thread.
CurrentCulture and CurrentUICulture to the desired value, and then the
ILocalizationUrlRewriter can be implemented to reflect the custom rewriting rules.
<LocalizationHandler defaultProvider="MonoXLocalizationHandler">
<providers>
<add name="MonoXLocalizationHandler" type="
MonoSoftware.MonoX.Localization.LocalizationHandler, MonoX" />
</providers>
</LocalizationHandler>
2.6
Licensing
MonoX is available in two editions: Free and Source code edition. Regardless of the edition, it may be
used without limitations in both non-commercial and commercial projects. There are no hidden
limitations or complex licensing schemes.
We require that all users of the Free Edition include a backward link "Powered by MonoX" (either in
text or image, sample icons are available in the /App_Themes/Default/img folder) that points to our
Installation
33
Web site, http://monox.mono-software.com. This link may be localized and styled to "blend in" with the
target portal design.
Users of the Source Code edition do not have to display backward links on their pages and can modify
the source code as they need. All licensing information - domain names, license owner, version
numbers - are stored in a cryptographically signed license file (MonoX.lic) that is located in the main /
bin folder of the application. Users of the Source Edition can freely generate MonoX license files for
their domains using a module in the private administrative section of the Mono Software Web site.
Multiple domain names can be stored in a single license file, but each of the target domains must be
present in order for MonoX to work.
Part
III
Working with MonoX
35
3.1
Logging in
Each of the default portal templates in MonoX contains a login link/button that redirects the user to the
login.aspx page in the portal root directory. By default, this page contains the login Web part. All of its
aspects are configured in the membership section of the Web.config 21 file (maximum number of
login attempts, minimum password length, etc).
<membership>
<providers>
<remove name="AspNetSqlMembershipProvider"/>
<add connectionStringName="LocalSqlServer"
enablePasswordRetrieval="true" enablePasswordReset="true"
requiresQuestionAndAnswer="true" applicationName="MonoX"
requiresUniqueEmail="false" passwordFormat="Clear"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</providers>
</membership>
Login control by default contains only username and password fields; a checkbox "Remember me next
time" is used to leave a cookie on a client computer so the active user could be recognized on
subsequent visits without entering authentication data.
You can also login via third-party social networks like Facebook, Twitter, LinkedIn and Google+.
Please refer to the LoginSocial Werb part documentation for more details.
36
Important: RpxNow module is not a default "social login" provider anymore. It is left in the
default package for backward compatibility only. Please use new LoginSocial part that does
not have dependencies on external services and is completely free.
MonoX 3.0.651.35 and subsequent versions include support for OpenID, an open and decentralized
identity system that eliminates the need for multiple usernames across different websites, simplifying
your online experience.
Support for RpxNow service is added in version 3.0.1215.35. RPX helps users sign-in to your Web site
using an account they already have at numerous prominent social networking sites and services,
including Google, Yahoo, Facebook, LinkedIn, MySpace, Twitter, Microsoft Windows Live ID, AOL,
etc.
37
3.2
MonoX workspace
All administrative actions in MonoX can be performed only after you log in to an account with
administrator's privileges. By default, all members of the "Administrators" user role can perform all
such actions; the names of the roles and the level of privileges can be fully customized, as explained in
the User management 60 section.
Let's assume that you are now past the initial login screen, logged as the default admin user. There
are several subtle, but very important changes to the user interface that happen every time an
administrator access each of the pages in the portal. Compare the screenshots of the default portal
taken before and after the admin has logged in.
This is what an "ordinary" user can see:
Compare the picture above with the administrative view of the same page:
38
As you can see from these initial screens, MonoX fully supports the WYSIWYG (What You See Is
What You Get) philosophy. All changes to the look and the functionality of the active page or any of its
Web parts can be performed instantly and interactively.
Each page is composed of several Web parts 9 (modules). Web parts are basic building blocks for
MonoX portal pages. Pages can also contain static HTML text, but all user-configurable, dynamic
content should be placed inside a Web part.
Main administrative tools that can be seen on each and every portal page are:
main administrator's toolbar 41 - a collapsible panel displayed at the top of each portal page. It holds
controls that enable you to change page display modes 42 and views 41 .All visual aspects of a
page and Web parts placed on it can be changed using this toolbar. Additionally, it displays a link to
the portal administration section 50 ; all back-end administrative tasks (page management, file
management, user management, etc.) can be performed there.
Web part menus 38 - each Web part has a menu with several options enabling administrators to
copy, export and minimize parts, or view and change Web part properties. This menu items are
called verbs. The Web part menu can be extended with your own verbs, and can be placed
anywhere inside the part, depending on the currently active chrome (see below).
Each Web part can have a different look & feel. One of the most important concepts related to the
Web part user interface customization, skinning and templating 129 is a Web part chrome 164 . It refers
to the peripheral user interface (UI) elements that frame each Web part control or server control. The
chrome for a control includes its border, its title bar, and the icons, title text, and verbs menu that
appear within the title bar. The appearance of the chrome is set at the Web part zone level, and
applies to all the server controls in the zone.
3.3
39
menu differently in IE and all other browsers). The location of Web part verbs can be easily changed
by using Web chrome template 164 , and its <# WebPartVerbs #> placeholder. The customization of
default Web part chrome is often performed to minimize clutter and to enhance the visual appeal of the
page: many Web parts have very limited screen space at their disposal. That's the reason why in
newer versions, verbs menu is visible only while the mouse pointer is hovering over the Web part. This
behavior can be changed by setting the initial visibility of the attached CSS class to "block" in the
Common.css file:
.web-part-container .web-part-menu-button
{
/* change display to block if you want Web part verbs menu to be
always visible, and not only on mouse hover */
display: none;
The Web part verbs menu is displayed in the upper right corner while the mouse pointer is placed over
the Web part
The list of verbs is displayed when a Web part verb menu is clicked
There are standard verbs for opening, closing, editing, and minimizing a control, and other verbs for
exporting a definition for the control or loading a Help file. Other custom verbs are often included to
perform part-specific tasks - for example, HTML editor includes an "Edit" verb to switch the display
mode to design mode and show HTML editors on the page. Additionally, some of the verbs are
dynamically shown and hidden depending on the page context and currently active display mode:
connect verb is shown only in the connect mode; delete verb is shown in the design mode if the part is
dynamically added to the page (static, "hardcoded" parts do not display this verb); close verb is shown
only if the AllowCloseVerb switch in the user.config file is set to true.
Part
IV
Using the administrator's
toolbar
41
4.1
Portal views
Portal can be in one of the two basic views (states, or scopes): user and shared. Any changes that
are made to Web parts when the page is in shared view apply to all users of a site (even
unauthenticated ones). The ability to make changes while in shared scope mode is therefore a feature
that can be normally used only by portal users who have administrative privileges.
Changes made to Web parts when a page is in the user view only apply to the user who made them.
Also, when Web parts are exported on a web part and the page is in shared view, then all of the
properties of that part will be exported, whereas if the page is in per-user view, then only non-sensitive
properties are persisted.
It is important to note that MonoX framework relies heavily on the ASP.NET personalization system for
storing the personal preferences for a page. It reads the configuration settings from the main
Web.config file; see the example below for a typical entry:
<webParts enableExport="true">
<personalization defaultProvider="SqlBlobPersonalizationProvider">
<providers>
<add connectionStringName="LocalSqlServer"
applicationName="MonoX" name="SqlBlobPersonalizationProvider" type="
MonoSoftware.MonoX.VersionedPersonalizationProvider" varyByParams="none"/>
</providers>
<authorization>
<allow verbs="enterSharedScope" roles="Administrators"/>
</authorization>
</personalization>
</webParts>
Configuring the authorization for personalization in this way allows only the users in administrators role
to switch the personalization view (scope) of Web pages into shared view (scope). Using the star (*)
for the users attribute (and removing the roles attribute) would allow that all users can set the scope of
Web pages into shared scope.
4.2
42
Administrative toolbar in the design mode. Note the short description and the Part Catalog icon. It also
features an additional tab (Module catalog) displaying all available portal modules from the module
gallery.
4.2.1
Browse mode
Browse mode is the default state of a MonoX portal page. In this state users can view the Web parts
on the page in the "end user" mode.
4.2.2
Design mode
The design mode is similar to browse display mode, except that it allows users to drag Web parts
between zones and to delete dynamically added parts from a zone. Additionally, HTML editors are
activated in this mode, allowing users to interactively enter their content into HTML editor parts.
43
Portal page in the design mode. Note the HTML editor toolbar that appears on a mouse click in the
editable area.
4.2.3
Catalog mode
In this mode the user can drag Web parts between the zones (same behavior as in the design mode).
More importantly, this mode allows users to browse Web part catalogs (galleries), and to add them to
the page.
An additional tab - Module catalog - is displayed in this mode. Below is a screenshot of this tab with the
default catalog active:
44
imported Web parts: displays the parts that are imported via "Import Web parts" module that is
displayed in the bottom section of this tab. This is a useful utility that allows users to share Web
parts across portals. Parts can be exported to a local disk by clicking on the "Export" verb of each
part (if the export is enabled in the <webParts> section of the main Web.config file).
declarative Web part catalog: displays the parts that are hardcoded in the Catalog zone of the main
MonoX master page. Here is an example from the MonoX.master:
<asp:DeclarativeCatalogPart ID="declarativeCatalogPart" runat="server" meta
:resourcekey="declarativeCatalogPart">
<WebPartsTemplate>
<MonoX:Editor ID="htmlEditor" runat="server" Title="Html
Editor" />
</WebPartsTemplate>
</asp:DeclarativeCatalogPart>
main Web part catalog: dynamically loads and displays all Web parts from the
ModuleGalleryPath configuration property in the root web.config file (by default it is located at
~/MonoX/ModuleGallery). You can put multiple, comma separated paths in this property and
MonoX will enumerate and list all of the Web parts stored there (as a prerequisite, Web parts that
are to be shown in the main catalog have to inherit from the BaseAutoRegisterPart class).
Web part clipboard: displays parts that are copied to the clipboard by clicking on the "Copy" verb of
each part. This option is very useful if you want to copy a Web part to another page inside the same
portal.
page catalog: parts that are minimized or hidden are placed in this catalog, so they could be restored
later.
To add a Web part to the current page, just check a checkbox next to the part's title and select the
Web part zone in the lower right portion of the toolbar and click on the "Add" button. Alternatively, you
can drag the part from the catalog to the target Web part zone. Starting from version 4.5, drag and
drop functionality is available in all major browsers.
4.2.4
45
Connect mode
This mode is used to allow users to connect Web parts together and exchange information.
Additionally, a "Module connections" tab is added to the toolbar with the configuration parameters for
each connection. There is also a connect verb
added to all Web parts that are capable of being connected (more details on this topic can be found in
the developer's section 168 ).
This is a very simple connection, so after clicking on a link "Create a connection to a Consumer" you
will be able to define a consumer module (there is only one such module on this page, and it is
appropriately called "RSS consumer"). Click on the "Connect" button and the connection is created.
46
That's all! You are now able to exchange information between modules, and this technique can be
scaled out to very complex scenarios. In this example the provider mode expects an URL of the RSS
feed. After you click the "OK" button in the provider module, this information will be sent to the
consumer module which will display a list of news from the RSS feed at the specified URL.
4.2.5
Edit mode
Edit mode allows users to edit the properties and attributes of Web parts.In this mode users can also
drag Web parts between zones.
There are no separate buttons for the edit mode in the administrative toolbar since this mode can be
initiated from each of the active Web parts and the portal engine has to know which Web part has
initiated the mode change (so the appropriate edit fields could be shown). The edit mode is therefore
activated by clicking the "Properties" verb in a Web part.
An additional tab - Module properties - is added to the administrative toolbar when the edit mode is
activated.
47
4.3
Content versioning
MonoX includes a powerful and easy to use content versioning system, allowing users to keep
different versions of each portal page in a repository. Many of the changes to the content and/or layout
of the page don't need to be published immediately - either a page needs additional testing, or has to
wait for a specific moment in time before the changes should be made public. This is where content
versions comes in: before a change is to be made, "Revise content" has to be clicked: it will change its
look and caption to "End revision".
You can proceed with the work as usual, changing display modes and editing content. When the initial
change is made, an additional button will show up: Approve changes.
48
As you can see by starting a browser on another computer and accessing the page without logging in
as an administrator, the changes you made are not yet visible to the "ordinary" users. The "Approve
changes" button has to be clicked before the changes are published. "End revision" is clicked when a
user wants to exit the content versioning mode, and continue to work in the default, immediate mode.
Content versioning infrastructure is currently used by the portal personalization / layout engine and
HTML editor Web part. Other Web parts (blog engine) currently do not support the content versioning
functionality. HTML editor additionally includes support for the backup history logging.
Part
V
Portal administration
Portal administration
50
Portal administration
As it can be seen from the previous section of this tutorial, MonoX administration is divided into two
equally important section:
main administrative toolbar, Web part menus and other administrative elements that are injected
into every portal page when the active user has administrative privileges
main administrative panel that holds and groups common back-end portal functionality: file
management, page management, user management, role management, and other similar back-end
tasks
Main administrative panel can be accessed by clicking on the link "Go to the portal administration
area" that is displayed at the top of each portal page when the currently active user had administrative
privileges.
The following sections will explain the functionality of the standard back-end administration modules.
Note that customized portals can have additional administration sections. Development of such
custom administration modules is explained in the development section 173 .
5.1
File management
File management panel allows administrators to easily perform all actions related to the file and folder
structure - create, rename, delete, move... files and folders using an intuitive and interactive interface
that closely resembles the look and feel of Microsoft Windows Explorer.
Portal administration
51
The left pane (Portal folders) displays the folder structure starting from the root portal folder. Right
mouse click on any of the folders will display a context menu with the relevant, self-explanatory folder
management options:
The right pane displays all files and subfolders of the selected folder. Again, right mouse click on any
of the displayed items displays a context menu with file-related options:
Portal administration
52
Most file management options in this menu are self-explanatory. Portal-specific operation are:
new page: portal engine reads all page templates from the file system and presents them in this
submenu. Each template is prefixed with the theme name. Page templates are contained in the
PageTemplates folder of each theme folder in the App_Templates root folder (note that each theme
in the App_Themes folder has accompanying App_Templates folder):
File structure of the App_Templates folder, showing PageTemplates for two separate themes, Arctic
and Default
Page template usage is explained in detail in the development section: it is important to remember that
a page template is an ordinary ASPX page without codebehind. Page templates can inherit from an
arbitrary page in the portal. You can use existing templates to create your customized versions; place
a new page template in appropriate PageTemplates folder and it will be automatically recognized by
the portal engine.
upload: this option is used to introduce new portal pages or files to the existing portal(s). Page can
be created by copying an existing page, or by using the New page option described above. However,
if you need to add a new page (one that is completely different from the existing pages and
templates), this is a recommended way to do it. The same holds for addition of other resources
(images and media files).
Portal administration
53
IMPORTANT: there is a significant difference between portal pages and "ordinary" files. A portal PAGE
has to have the ".aspx" extension and follow the standard .NET coding standards (syntax error will
cause an exception when the page is displayed). It also has to be a child of the MonoSoftware.MonoX.
BasePage base class. Portal pages are dynamic, "runnable" resources that provide a foundation for
most of the MonoX features.
A portal FILE can be anything - HTML file, image file, or any other "static" resource.
page properties: this option is used to enter or edit portal page properties: page title, META
description and keywords, and user roles that are authorized to view the selected page. If none of
the roles is selected, the page is considered to be public and is shown to all users, even the nonauthenticated ones. Page properties screen is shown only for portal pages.
Portal administration
5.2
54
5.3
Page management
Page management administration page is used to manage page properties and navigational structure
of the MonoX portal.
Portal administration
55
Left pane of this screen (Site map) is used to manage the portal navigation. Dragging a page from the
right pane to the desired place in the left pane's hierarchical structure is the easiest way to include a
page in the portal navigation menu. In the screenshot above, only "Home" and "News" pages are
shown in the main navigation; you can add any other pages by simply dragging them to the left.
Reordering of navigation items is also achieved by dragging them to the desired place in the
navigation. Dropping a navigation item on top of another item will create a hierarchical structure, where
a dropped item becomes a child of the item that it was dropped to. Dropping a navigation item between
two navigation items will simply reorder the existing structure.
Right mouse click on the site map will display a context menu show below:
New container page option creates a "container" item in the navigation - it is used to group several
navigation items together; clicking on the container item in the navigation menu just opens a list of
"child" navigation items in the dropdown menu without actually redirecting the user to another page.
New external page option creates a link to the "outside" page that does not necessarily has to be a
part of the local portal. It also allows users to create several alternative links to the same page.
Roles option allows users to define additional security privileges on the navigation items. Note that
Portal administration
56
navigation items inherit the security settings from the target pages, but it is possible to override these
settings using the role checklist on this screen.
Right mouse click in the right pane will initiate a context menu shown below:
New page option is used to create a new portal page based on the existing page template. The New
page pane shown here is very similar to the one used at the File management screen 50 . In addition
to fields used to specify template, page title, META description and keyword tags and role checklist,
user is able to explicitly specify a path that will be used to save a newly created page. Additionally, this
pane allows you to specify page output cache settings.
Portal administration
57
Page properties pane is very similar to the New page pane described above. It is used to edit the
properties of an existing page, and as such it doesn't allow changing the URL of the page. In addition,
it allows you to set page theme and master page.
Portal administration
58
Manage Web parts option offers a very powerful mechanism for managing personalization settings on
each page.
Portal administration
59
This module lists all Web parts on the selected page. User can copy or delete specific Web parts and
reset the personalization state, removing all dynamically added part and their settings.
Manage page templates pane allows users to preview all registered page templates grouped by site
theme (skin) and to upload new page templates in the selected theme.
Portal administration
60
Register portal page option allows administrators to select, import and register a page that was
created outside of the MonoX framework (in Visual Studio or any other development tool).
5.4
User management
User management utility allows portal administrators to manage all user-related data and to assign
users to various roles.
Portal administration
61
This screen features a grid-based administration interface that lists all users and their basic properties.
New user can be added by clicking on the "Add" button; properties of an existing user can be viewed
and edited by selecting the desired row in the grid (by clicking on it) and choosing "Edit" button. User is
removed from the database by clicking on the "Delete" link button.
User can be quickly located by using the "Find" field, entering user's full or partial name or e-mail
address, and clicking on the "Filter" button - only the records that match the search criteria will be
shown. Sorting is performed by clicking on the grid header columns.
Detailed user view is shown below:
Portal administration
5.5
62
Role management
Role management utility allows portal administrators to manage user roles that are used to group
users together and precisely define security privileges to the various sections of a MonoX portal.
This screen features a grid-based administration interface that lists all roles and their basic properties.
New role can be added by clicking on the "Add new" button; properties of an existing role can be
viewed and edited by selecting the desired row in the grid (by clicking on it) and choosing "Edit" button.
Role is removed from the database by clicking on the "Delete" button.
Role can be quickly located by using the "Find" field, entering it's full name, and clicking on the "Filter"
button - only the records that match the search criteria will be shown. Sorting is performed by clicking
on the grid header columns.
Detailed view is shown below:
5.6
News management
News management administration section allows user to manage news articles and categories. Note
that the functionality included in the news management and display modules is not limited to the
Portal administration
63
standard news articles: all time-dependant content items can be easily published using the modules
described in this section.
This back-end section is used to service front-end news modules that can be found in the Web part
gallery and used on the every portal page. Front-end modules are in charge of displaying the news to
the portal users and can do it in a very flexible way due to the templating techniques 165 that are
explained in the development section of this guide. Developers can also create new and fully
customized versions of the existing news modules.
News management pane includes three separate sub-sections:
news category administration allows users to create and maintain a hierarchy of news categories.
Every news category has a list of attributes that can be viewed and changed in the right pane. Note
that the category view and edit roles are assigned separately. Left pane displays the structure of the
news hierarchy; standard drag and drop actions can be used to change this structure.
news articles management is the most heavily used section of the news administration system.
This is the place where users actually enter news articles and assign them to categories.
Portal administration
64
Left pane shows news category hierarchy. Clicking on any of the category nodes in this pane will
present all news articles in the selected category in the right pane grid view. Users can add new or edit
the existing articles there, as well as deleting the selected articles.
Click on the "Add new" or "Edit" button will result in the popup displayed below. This screen contains
four tabs/sections.
"Edit" section allows users to enter news article title, short and full content.
Portal administration
65
"Publication" section contains checkbox that indicates if the article is currently published and three
related date fields: visible publish date that will be displayed in the front end module (if the date is
included in the news template), as well as start and end publishing dates.
"Display properties" section contains a checklist that allows users to modify the displayed content for
the selected article.
"Tags" section allows users to view and change META description tags for each article.
news publication section allows users to publish news articles. This feature is optional only if the
portal news system is in the advanced mode (NewsWorkingMode switch in user.config is set to
true): in this scenario, users in NewsEditorRoles (see user.config) are not able to directly publish the
articles they are entering. Instead, only users in the NewsPublisherRoleName (see user.config) or
top-level administrators are able to publish news. News publication section allows them to preview
all unpublished articles and to publish any of them by selecting the "Publish news" checkbox(es) and
clicking on the "Publish selected items" button.
Portal administration
66
After everything is set up correctly in the back-end, one of the front-end news modules can be picked
from the part catalog and placed on the page. Below is an example of the customized front end news
part.
5.7
Ad management
Ad management section allows administrators to create and manage an unlimited number of ad
campaigns. Each campaign can in turn hold an unlimited number of ads and related resources
(images, Google Ads, flash movies, etc.)
Portal administration
67
This screen features a "master-detail" grid-based administration interface that lists all campaigns and
their basic properties, along with the list of all resources in the selected campaign. New campaign can
be added by clicking on the "Add new" button; properties of an existing campaign can be viewed and
edited by selecting the desired row in the grid (by clicking on it) and choosing the "Edit" button.
Campaigns is removed from the database by clicking on the "Delete" button.
A specific campaign can be quickly located by using the "Find" field, entering it's title, and clicking on
the "Filter" button - only the records that match the search criteria will be shown. Sorting is performed
by clicking on the grid header columns.
Ads are managed using the grid view at the bottom of the screen.
Detailed campaign view is shown below:
Only the ads from the active campaigns are shown on the portal pages. A campaign can be explicitly
activated by clicking on the "Is campaign active" checkbox, even if the campaign start and end date
fields are empty.
Detailed ad view is shown below:
Portal administration
5.8
68
Poll management
Poll management section allows portal administrators to create and manage unlimited number of
simple polls and surveys in their portals.
This screen features a master-detail grid-based administration interface that lists all polls and their
basic properties. New poll can be added by clicking on the "Add" button; properties of an existing poll
can be viewed and edited by selecting the desired row in the grid (by clicking on it) and choosing the
"Edit" button. Poll is removed from the database by clicking on the "Delete" button.
A specific poll can be quickly located by using the "Find" field, entering it's title, and clicking on the
"Filter" button - only the records that match the search criteria will be shown. Sorting is performed by
clicking on the grid header columns.
Version 4.7 - 03/01/2013
Portal administration
69
Detailed view is shown below. New answer is added by clicking on the "Add poll answer" link at the
bottom. Answers can be reordered by using Move up and Move down links.
Portal administrators can easily define poll title, question, UI texts and the unlimited number of
answers with colors that will be used to draw the answer chard after the user clicks on a Vote button.
Here is the final look of the front-end module after it is picked from the part catalog and placed on the
page
Portal administration
70
Front-end poll module after the user vote has been submitted
5.9
List management
List management section allows portal administrators to manage all list-based portal content: FAQs,
link lists, testimonials, resources and similar lists.
This screen features a grid-based administration interface that lists all lists and their basic properties.
New list can be added by clicking on the "Add new" button; properties of an existing list can be viewed
and edited by selecting the desired row in the grid (by clicking on it) and choosing the "Edit" button. List
is removed from the database by clicking on the "Delete" button.
A specific list can be quickly located by using the "Find" field, entering it's title, and clicking on the
"Filter" button - only the records that match the search criteria will be shown. Sorting is performed by
clicking on the grid header columns.
Detailed view is shown below. Unlimited number of list items can be added to the list by clicking on the
"Add list item" link at the bottom of the screen. List item content can be edited by clicking on "Edit",
entering changes, and clicking on the "Update" link button to confirm the changes.
Below is an example of a custom front-end list Web part in action (the default list module can be
Version 4.7 - 03/01/2013
Portal administration
71
5.10
Newsletter management
Newsletter management section allows portal administrators to create and asynchronously send
newsletters to target groups of subscribers.
This screen features a grid-based administration interface that lists all newsletters and their basic
properties. New newsletter can be added by clicking on the "Add new" button; properties of an existing
newsletter can be viewed and edited by selecting the desired row in the grid (by clicking on it) and
choosing the "Edit" button. Newsletter is removed from the database by clicking on the "Delete" button.
Before a newsletter is sent to all subscribers it can be tested by sending it to a single address as
entered in the detailed view.
A specific newsletter can be quickly located by using the "Find" field, entering it's title, and clicking on
the "Filter" button - only the records that match the search criteria will be shown. Sorting is performed
by clicking on the grid header columns.
Detailed view is shown below. Note how you can define the target subscriber groups (roles) and
separate text and HTML content of the newsletter mail message. Also note that newsletter are sent
asynchronously, so administrator doesn't have to wait until the whole process finishes.
Portal administration
5.11
72
Blog management
Blog management section allows portal administrators to manage blogs, blog posts and categories.
Blog settings screen allows administrators to add, edit and delete existing blogs. Note that MonoX blog
system supports multi-user scenarios, so there can be an unlimited number of separate blogs per
each portal.
Portal administration
73
Blog posts screen features a grid-based administration interface that lists all blog posts and their basic
properties. New blog post can be added by clicking on the "Add" button; an existing post can be
viewed and edited by selecting the desired row in the grid (by clicking on it) and choosing the "Edit"
button. Blog post is removed from the database by clicking on the "Delete" button.
A specific post can be quickly located by using the "Find" field, entering it's title, and clicking on the
"Filter" button - only the records that match the search criteria will be shown. Sorting is performed by
clicking on the grid header columns.
Portal administration
74
This panel allows you to insert or change a blog post and all its properties, including title, categories,
content, description, categories, roles and tags.
Note that the blog post entry and administration is usually done through the front end blog
parts; the back end screens described in this section are used only by the system
administrators.
5.12
Portal administration
75
Part
VI
Working with Web parts
77
Module can be added to the portal page by choosing a Web part zone from the "Add to" dropdown in
the lower right portion of the toolbar and clicking on the "Add" button. Modules that are already present
on the page can be dragged and dropped to other zones when the page is in the design mode 42 .
Module can be removed from the page by using a "Delete" menu option from the Web part menu 38 .If
a user needs to copy a module to all portal pages with the same layout, or to delete a module from a
page that cannot be accessed directly (due to the run time error or some other reason), Page
management 54 - Manage Web parts option should be used.
Each Web part has a set of properties that can be edited interactively to change their appearance and
behavior. This is done by choosing a "Properties" menu option from the Web part menu; page mode
automatically transfers to edit mode, and all part properties are available in the Module properties tab.
78
As all Web parts inherit from the common parent part (MonoSoftware.MonoX.BasePart), they share a
set of common properties:
6.1
Edit roles - defines a set of roles that are able to edit the part
View roles - defines a set of roles that are able to view the part
Template - used for specifying a template for the part
Header HTML - HTML that will be rendered in the header of the part
Footer HTML - HTML that will be rendered in the footer of the part
CSS class - CSS class that is applied to the part
Cache duration - value that specifies cache time (in seconds). If this value is equal to zero, the part
is not cached.
6.1.1
Ad Web part
Ad Web part serves as a front-end for the functionality described in ad management 66 section. It is
basically wrapper for a Ad Rotator control with advanced functionality that allows for displaying multiple
content types (images, Flash, other media, Google AdWords).
This part publicly exposes multiple properties that enable changes in width, height, navigation URL,
alternate text, etc. AdKeyword filter property enables users to enter additional filter criteria (only the
ads containing keywords entered in the back-end admin panel will appear), while AdTarget property is
used to specify a target navigation window (_self, _blank, _parent, _search, _top - standard values for
opening a pop-up window).
6.1.2
79
their blogs directly, using the front-end blog Web parts. Blog parts are located in the ~/
ModuleGallery/Blog/ folder:
The most common usage scenarios involve placing only a BlogContainer Web part to a page - all
necessary linking and redirecting will be done automatically. The standard blog post page layout is
displayed below. The largest part holding the actual post is BlogContainer.
When a blog is accessed with editor privileges, all editing options are displayed at the top of the page.
You can set the blog settings and manage categories, add new blog post and manage comments, all
from a single front-end module.
80
Blog settings allow you to change blog name and dewcription; add, edit and delete blog categories;
and manage blog editors.
Blog editors are easily administered using this simple autocomplete dropdown box.
Blog edit interface offers our standard WYSIWYG editor and can be used instantly - all articles have a
link to the edit interface that is visible only to the users with appropriate privileges. It also offers other
neat features like automatic tag extraction and delayed publishing.
81
By default, MonoX anti-spam protection automatically checks all incoming comments with services like
Akismet and Defensio and does not display possible spam comments until they are manually
approved. All spam comments can be easily identified:
Advanced scenarios may involve placing separate blog parts on separate pages. In most of the
82
scenarios, blog parts use two-way URL rewriting 21 to support several common properties that are
used when you need to link the blog pages, or to achieve full search engine optimization. These are:
UrlSingleBlogPost - holds the URL of the blog post display page.
UrlEditBlogPost - holds the URL of the blog editor.
UrlListBlogPosts - holds the URL of the blog post list page.
UrlAddBlogPost - holds the URL for the blog post insert page.
UrlSearch - holds the URL of the blog search page.
UrlTag - holds the URL of the page displaying the blog posts filtered by a tag.
Note that all parameters in curly braces are dynamically parsed and replaced with actual values at
runtime. As explained in the URL rewriting section, {PageName} is a special placeholder that is
replaced by the name of the page that is calling the rule, without the .aspx extension, allowing for
"relative" URL rewriting. Although it may appear to the end user that blog system uses a lot of different
URLs and needs a complex navigation logic, for a developer everything is very simple: our default blog
implementation actually uses a single page: ~/Blog.aspx. Of course, the URL rewriting section in
the web.config file needs to be changed if you plan to create a different URL configuration, although
the default configuration should cover all but the most specific scenarios. Here is how it looks:
<!-- dynamic blog post rules, can be used regardless of the actual
name of the page that holds blog parts -->
<rewrite url="^(.*)/(.*)/post/(.*)/(.*)/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&BlogPostId=$4&$7" name="BlogPost"
defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/post/{Blog.Slug}/{IdentityId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/posts/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&$5" name="BlogPosts" defaultPage="~/Blog.aspx"
urlPattern="~/{PageName}/posts/{Slug}/" />
<rewrite url="^(.*)/(.*)/search/(.*)/(.*)/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&SearchAction=$4&SearchValue=$5&$7" name=
"BlogSearch" defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/search/{Slug}/{SearchAction}/{SearchValue}/" />
<rewrite url="^(.*)/(.*)/tag/(.*)/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&SearchAction=tag&SearchValue=$4&$6" name
="BlogTag" defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/tag/{Slug}/{Tag}/" />
<rewrite url="^(.*)/(.*)/settings/(.*)/(\?(.+))?$" to="
$1/$2.aspx?ShowBlogSettings=true&BlogSlug=$3&$5" name="BlogSettings
" defaultPage="~/Blog.aspx" urlPattern="~/{PageName}/settings/{Slug}/" />
<rewrite url="^(.*)/(.*)/comments/(.*)/(\?(.+))?$" to="
$1/$2.aspx?ShowBlogCommentsAdmin=true&BlogSlug=$3&$5" name="
BlogCommentsAdmin" defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/comments/{Slug}/" />
<rewrite url="^(.*)/(.*)/edit/(.*)/(.*)/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&BlogPostId=$4&BlogEditMode=true&$7" name
="BlogPostEdit" defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/edit/{Blog.Slug}/{IdentityId}/{Slug}/" />
<rewrite url="^(.*)/(.*)/insert/(.*)/(\?(.+))?$" to="
$1/$2.aspx?BlogSlug=$3&BlogInsertMode=true&$5" name="BlogPostInsert
" defaultPage="~/Blog.aspx" urlPattern="~/{PageName}/insert/{Slug}/" />
<!-- shows all blog posts regardless of the blog they were posted to
-->
<rewrite url="^(.*)/(.*)/posts/(\?(.+))?$" to="$1/$2.aspx$3" name="
AllBlogPosts" defaultPage="~/Blog.aspx" urlPattern="
~/{PageName}/posts/{Slug}/" />
<rewrite url="^(.*)/(.*)/posts/(.*)/wlwmanifest.xml(\?(.+))?$" to="
$1/wlwmanifest.xml" name="WlwManifest" urlPattern="~/wlwmanifest.xml" />
Blog modules support templating
Version 4.7 - 03/01/2013
165
83
(Theme Name)/BlogTemplates folder, where Theme Name is the currently active theme name. This
folder contains separate templates for blog comments, blog list, single blog post view, and all other
related parts.
The supported template tags are:
Comment tags:
<#
<#
<#
<#
<#
<#
<#
<#
<#
<#
6.1.3
84
Captcha module
6.1.4
85
Web site owner (or any other e-mail address set in the module custom properties). This module is
protected by the Captcha module.
WebSiteName - Web site name shown on top of the module (Mono Ltd.)
Address - Address of the contact entity
City - City of the contact entity
ZipCode - Zip Code of the contact entity
Country - Country of the contact entity
Phone - Phone of the contact entity
Fax - Fax of the contact entity
EMail - E-mail of the contact entity (Address where to send contact
messages)
ValidationGroup - Validation group
6.1.5
86
EventSimpleView.ascx: a templated 165 part used to show user events in a simple, flat view, which
can be totally different than a default calendar view in the main EventModule. HTML templates should
be placed in the ~/App_Templates/(Theme Name)/EventModuleTemplates folder, where Theme
Name is the currently active theme name.
The supported template tags are:
<#
<#
<#
<#
<#
<#
<#
<#
<#
<#
6.1.6
87
MonoX also includes an improved SIlverlight-based upload control that allows users select and upload
multiple files in one step. It can also autogenerate thumbnails and convert video files to the FLV
format.
Both upload parts can work with various file system providers (see the ContentProviderTypeName
property), so they can store files not only on your local system, but also on various could-based
storage services like Amazon S3.
6.1.7
HTML editor
HTML editor is one of the most-often used Web parts. It allow users to interactively edit the contents of
the portal, and to immediately see the results in the WYSIWYG fashion. HTML editor exposes an
additional action verb in its menu: Edit. When the user clicks on that verb, page is switched to the
design mode, and each mouse click in the editable area initializes editor toolbar that is by default
shown in the top portion of the screen.
88
HTML editor part with Edit verb selected from the Web part menu. After the Edit verb is clicked...
...the page switches to the design mode and the HTML editor content is ready to be edited. Click inside
the editable area of the editor...
89
...and the editor toolbar pops down in the top portion of the page.
HTML editor toolbar includes standard tools, allowing even inexperienced users to start using it
efficiently in a very short time. Apart from the standard formatting tools, HTML editor includes:
save button in the top left corner that allows users to save their work
several media managers (image manager, flash manager, document manager) that allow users to
easily manage their media collections and add links to images, documents, and other media
HTML-specific tools (hyperlink manager, image map editor, template manager)
backup history: a portal can be set-up to "remember" all changes made through HTML editors
(SaveDocumentBackups configuration switch in user.config). Backup history dropdown box in the
bottom right corner of the editor toolbar allows users to replace the currently active content in the
editor area with any of the previous versions (NumberOfBackupItems configuration switch defines
how many of these versions will be displayed in the dropdown).
content versioning, as described in a separate section 47 .
Editor can be used in various toolbar modes, depending on the user's preferences (EditorToolbarMode
switch in the user.config file): PageTop (default), ShowOnFocus (toolbar is contained inside the editor
part and shown on focus) and Floating (editor toolbar is shown on focus, but floating outside the
bounds of the editor part).
6.1.8
90
6.1.9
70
section.
List supports templating 165 ; HTML templates should be placed in the ~/App_Templates/(Theme
Name)/ListTemplates folder, where Theme Name is the currently active theme name.
The supported template tags are:
<# Title #> : title of the list item
<# Content #> : list item content
91
92
You must open your own application at all social networks you want to use with this part. By default,
MonoX is using Facebook, Twitter, LinkedIn, and Google.
Apps are configured at:
https://dev.twitter.com/apps
https://accounts.google.com/ManageDomains (http://code.google.com/apis/accounts/docs/
RegistrationForWebAppsAuto.html)
https://www.linkedin.com/secure/developer
https://developers.facebook.com/apps
After that, you will have to modify the following section of the web.config file by entering your public and
secret keys.
<SocialAuthConfiguration>
<Providers>
<!--DEFAULT-->
<add WrapperName="FacebookWrapper" ConsumerKey="YourConsumerKeyGoesHere"
ConsumerSecret="YourSecretKeyGoesHere" AdditionalScopes="
user_photos,read_stream,publish_stream" />
<add WrapperName="GoogleWrapper" ConsumerKey="YourConsumerKeyGoesHere"
ConsumerSecret="YourSecretKeyGoesHere" AdditionalScopes="
https://www.googleapis.com/auth/userinfo.profile" />
<add WrapperName="TwitterWrapper" ConsumerKey="YourConsumerKeyGoesHere"
ConsumerSecret="YourSecretKeyGoesHere" />
<add WrapperName="LinkedInWrapper" ConsumerKey="YourConsumerKeyGoesHere"
ConsumerSecret="YourSecretKeyGoesHere" AdditionalScopes="
r_fullprofile,r_emailaddress" />
</Providers>
<Allow Files="GetToken.aspx|Login.aspx" />
<IconFolder Path="~/App_Themes/Default/Sn/" />
<Authentication Enabled="false" LoginUrl="Login.aspx" DefaultUrl="Login.aspx"
/>
</SocialAuthConfiguration>
93
MonoX navigation menus are rendered via Telerik RadMenu ASP.NET server control. The instructions
for styling this control can be found at http://demos.telerik.com/aspnet-ajax/menu/examples/
functionality/templates/defaultcs.aspx.
An alternative navigation module is contained in the MonoXMenuSimple.ascx Web part. It produces
simpler HTML based on the <ul>/<li> elements hierarchy, as most designers have experience in
styling such HTML code, so the skinning process should be rather straightforward. The rendered code
looks like this:
<ul>
<li><a href='http://localhost/MonoX/FirstPage.aspx'>First page</
a><ul></ul></li>
</ul>
<ul>
<li><a href='http://localhost/MonoX/SecondPage.aspx'>Second page</a>
<ul>
<li><a href='http://localhost/MonoX/ChildPage.aspx'
class="dropdown_bg">Child page</a></li>
</ul>
</li>
</ul>
The exact structure of the rendered HTML can be changed directly in the ASCX file, as templates are
fully supported in the hierarchical repeater control that is a foundation for the navigation menu control.
Some of the custom properties for the menu controls are:
ParentFilterItemId - Id of the parent menu item if the menu should not be rendered from the
root item.
MenuFlow - flow of the menu, horizontal or vertical.
MenuSkin - name of the menu skin, list of available skins is browsed from ~/MonoX/Templates/
RadControls/Menu.
RadControlsFolder - if the RadControlsFolder is not placed at ~/MonoX/Templates/
RadControls, you should specify the new location in this parameter.
RootMenuSeparatorString - root level separator character or string.
ShowRootItemsOnly - specifies if the menu control should render the root-level items only, used
mainly in footers and other secondary-level menus.
94
NewsTemplates folder, where Theme Name is the currently active theme name.
The supported template tags are:
<# NewsTitle #>
<# NewsUsernameTitle #>
<# NewsUsername #>
<# NewsCategoryTitle #>
<# NewsCategory #>
<# NewsContent #>
<# NewsShortContent #>
<# NewsReadMoreLink #>
<# NewsReadMoreTitle #>
<# NewsCreateDateTitle #>
<# NewsCreateDate #>
<# NewsModificationDateTitle #>
<# NewsModificationDate #>
<# NewsVisibleDateTitle #>
<# NewsVisibleDate #>
<# NewsRevisionTitle #>
<# NewsRevision #>
<# NewsViewCountTitle #>
<# NewsViewCount #>
<# NewsCustomDateToolTip #>
<# NewsCustomDate #>
<# NewsCreateDateToolTip #>
<# NewsModificationDateToolTip #>
News security system (built on top of the MonoX user management system) allows you to manage
view and edit permissions for news categories.
95
also include news articles from the child categories of the chosen category.
Main news module (MainNewsModule.ascx)
Main news module allows users to gain access to news content with almost no effort. Main news
module has all the settings pre-configured, so administrators can modify only few optional settings
such as read more page, category filter, etc.
Archive news module (ArchiveNewsModule.ascx)
Archive news module allows users to gain access to archived news content. This news module has all
settings pre-configured for filter out non-archived news content.
Customizable news module (CustomizableNewsModule.ascx)
This news module has all the settings exposed to user so he can fully customize the news content.
The following properties can be customized:
NewsRepeatDirection
NewsRepeatColumns
NumberOfNewsItemsToShow
PagerPageSize
ShowRevision
ShowAllItems (shows all news articles regardless of whether they are
expired or not)
ShowTitle
ShowShortContent
ShowCategoryTitle
ShowCategoryTitleAsLink
ShowCategoryTitleAsLink
ShowFullCategoryPathway
ShowUsername
ShowCreateDate
ShowModificationDate
ShowVisibleDate
ShowRating
ShowViewCount
ShowIfEmpty (determines if the part is shown even if there are no active
news articles)
96
68
section.
97
<#
<#
<#
<#
98
and the results page with a list of items that meet the search criteria. However, in the most common
scenario, MonoXSearchBox.ascx is used to provide a front end for the search box, while
MonoXSearch.ascx displays the search results.
99
to be performed
DisplayMode - ShowSearchPanel displaysfront-end panel only,
ShowSearchResults displays search results only, while Both displays both
front-end and a search results list on the same page
ResultsPageId - ID of the page holding search results
PagerPageSize - search results page size
ImageUrl - URL of the image for the search button
ShowImageButton - true if the image button is displayed, false when only
a text button or link is to be displayed
SearchProviderItems - list of SearchProviderItem values, specifying which
search providers are to be used and which templates they should use
(different templates may be specified for different providers).
SearchByProviderNames - equivalent to the above, intended to be used from
the code. String array of provider names by which search engine will
perform search in the form of:
ProviderName1=ProviderTemplateName1,ProviderName2=ProviderTemplateName2
Search Web part relies on the ASP.NET provider model 29 . A provider is a software module that
provides a uniform interface between a service and a data source. In this case, portal search engine is
the service, but the data source can vary. Providers abstract physical storage media, so the common
functionality can be developed without regard for the differences in various storage models.
By default, the following providers are supplied with the MonoX installation: PageSearchProviders,
NewsSearchProvider, BlogsSearchProvider, GroupSearchProviders, UserProfileSearchProvider,
LuceneFileSystemSearchProvider and IndexingServiceSearchProvider.
In the example below, search engine can search and index portal pages and news articles, but users
can develop totally customized search engines and register them with MonoX. <SearchEngine>
section in the web.config file performs the registration of search providers:
<SearchEngine>
<providers>
<add name="PagesSearchProvider" type="
MonoSoftware.MonoX.SearchEngine.Providers.PagesSearchProvider, MonoX"
PagesDescriptionContentLenght="255" BoldSearchPhrases="true" FullTextSearch
="false"/>
<add name="NewsSearchProvider" type="
MonoSoftware.MonoX.SearchEngine.Providers.NewsSearchProvider, MonoX"
NewsReadPagePath="~/MonoX/Pages/NewsDetails.aspx" NewsContentLenght="255"
BoldSearchPhrases="true"/>
</providers>
</SearchEngine>
Note that full text search can be initiated if the FullTextSearch parameter is set to true AND full text
indexes are created on the target tables in the MonoX database using SQL Server Management studio
or other similar tool. More information on the development of the custom search providers can be
found in the second part of this manual.
By default, all registered providers are used on the search results page. To use only a subset of all
registered providers, use the following syntax in the Web part or page that holds the search box:
<%@ Register TagPrefix="MonoX" TagName="Search" Src
="~/MonoX/ModuleGallery/MonoXSearchBox.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.SearchEngine"
TagPrefix="Search" %>
...
<MonoX:Search runat="server" ID="ctlSearchBlogs" ButtonCssClass="button"
ButtonText="Search" SearchButtonType="LinkButton" DefaultSearchText="Enter
search terms" >
Version 4.7 - 03/01/2013
100
<SearchProviders>
<Search:SearchProviderItem Name="BlogSearchProvider" Template
="Default" />
</SearchProviders>
</MonoX:Search>
Besides various properties that define the display URL for each of the event categories, this part
introduces a EventsToDisplay "flagged enum" property that is used to defined which event types
are displayed.
Activity streams part supports templating
165
101
Although a simple module, comments can add a lot of interactivity to your community resources.
Configuration of this module is easy: it primarily depends on a ParentEntityId /
ParentEntityType pair of properties, where the first one defines the Id of the entity your are
commenting, and the second one is used to specify the type of the parent entity (SnEntityType
enum can hold values for Album, Message, Note, BlogPost, ...). You can use Custom entity types for
linking comments for other types of content.
Comments Web part supports templating 165 ; HTML template file should be placed in the following
location: ~/App_Templates/(Theme Name)/SocialNetworkingTemplates/Comments.htm (or
Comments.ascx), where Theme Name is the currently active theme name.
The supported template tags are:
<# Date #> - displays the comment creation date.
<# Content #> - displays the comment's content.
<# Avatar #> - shows the comment author's avatar or gravatar.
<# Author #> - author's user name.
<# Delete #> - places a delete button that is visible to system administators and comment
authors.
<# Url #> - URL to the comment author's profile.
102
scenarios and features like voting, closing, moderation, reputation, reporting, syntax highlighting and
mail alerting.
MonoX discussion system consists of several independent Web parts that are located under ~/
ModuleGallery/SocialNetworking/Discussion:
DiscussionBoard.ascx is a "home" control that displays discussion boards in a single item view.
It also contains an edit form that is used for adding new discussion boards, or editing the properties
of an existing board.
DiscussionContainer.ascx holds together individual discussion parts and switches between
active modules based on user's actions.
DiscussionTopicMessages.ascx displays a list of all messages inside a single discussion
topic.
DiscussionTopics.ascx holds a list of all topics in a single discussion board.
103
Discussion Web parts are self-contained and work out-of-the-box: you can modify their behavior
programmatically or via exposed properties that are described in the MonoX API documentation - for
example, forums can be public or private, message can be edited using simple text area or advanced
HTML editor, etc.
6.1.18.4 File gallery Web part
File gallery can be used whenever you need to display a list of files attached to a blog post, album, wall
note, comment, or another custom entity. This module is aware of the most file types, and uses
thumbnails generated by the attached upload module (the most common image or video file types),
OR displays a static, file type-specific icon for file types for which a thumbnail is not generated by
default (MS Office, PDF, ...)
File gallery is often used in conjunction with the file upload module (Silverlight upload module is
displayed in the images below):
Silverlight file upload module allows users to select multiple files that are uploaded in a single step
104
File gallery displays three files (a video file, a Word and a PDF document) in admin mode. The "trash"
icon allows administrators to remove the file from the gallery.
As all other "child" modules (Comments...), File gallery primarily depends on a ParentEntityId /
ParentEntityType pair of properties, where the first one defines the Id of the entity your are
commenting, and the second one is used to specify the type of the parent entity ( SnEntityType
enum can hold values for Album, Message, Note, BlogPost, ...). You can use Custom entity types for
linking comments for other types of content.
File gallery can store files using various file content providers (classes that implement the
IFileContentProvider interface). MonoX provides the default
MonoXFileSystemContentProvider and AmazonS3FileSystemContentProvider, an
advanced cloud-based storage mechanism.
If you need to use a file gallery in "static" scenarios, and specify list of files in the source of the page
when dynamic management is not necessary, use a FileList inner property.
Additionally, you may choose between standard and "PrettyPhoto" image click handling: in a standard
mode, a full size image or document is shown in a separate browser window, while PrettyPhoto
displays a nicely-formatted slideshow, but is not compatible with all document types.
<#
<#
<#
<#
<#
<#
<#
<#
105
106
<#
<#
<#
<#
<#
107
108
Group home, displaying wall, group info and group member modules
Group discussion
Modules that inherit from GroupListBasePart - GroupList and NewGroupList - support
templating 165 ; HTML template file should be placed in the following location: ~/App_Templates/
(Theme Name)/SocialNetworkingTemplates/ControlName.htm (or ascx), where Theme Name is the
currently active theme name.
The supported template tags are:
<# Date #> - displays the group creation date.
109
<#
<#
<#
<#
<#
110
MessageCreate.ascx: contains the input form for creating a new message. A separate popup
page MessageFriendListAdmin.aspx is used to manage message lists that can be created by
each user.
MessageDetails.ascx: displays a single message and associated replies.
MessageList.ascx: presents a list of all sent of received messages.
MessageCenter.ascx: wraps all of the parts described above and dynamically selects and
displays the active massaging module, depending on the currently active mode.
The most common usage scenarios involve placing only a MessageCenter Web part to a page - all
necessary linking and redirecting will be done automatically. Below are displayed some of the
messaging Web parts in action.
Message center displaying a list of sent messages for currently active user
111
User picker control in action - autocomplete functionality allows users to easily find a right person at
the receiving end. If you need to enter multiple persons just use a comma to separate individual
entries.
112
You can easily create and manage unlimited number of friend lists, so there is no need to type long
lists of message recipients
Messaging parts in MonoX are totally self contained and virtually no administration is required to plug
in the messaging system to your portal. A handful of properties allows administrators to tweak the
behavior of individual Web parts:
DisplaysUsersOnly property in UserPicker,ascx defines if only a list of friends for the currently
active user will be displayed, as opposed to the full list of friends, messaging lists and group
members of the groups that currently active user also joined
ShowSendMailCheckbox shows or hides the "Send mail" checkbox from the MessageCreate
panel
AllowFileUpload defines is file attachments are allowed; file repository location is controlled by
the FileUpload property. The following special strings can be used in this property and will be
replaced by the appropriate values: {username}, {userid}, {id}.
ContentProviderTypeName can be used to switch to another content provider (for example,
Amazon S3 storage service could be used instead of the default file system provider).
UserAddressFormat defines what is displayed in the UserPicker control - username, full name,
username and the full name, or a custom expression that can be defined via
MessageAddressTemplate property.
6.1.18.12 New users list Web part
This Web part displays new portal users and is commonly used in various dashboard pages. It can
sort users by their registration date or the date of last login. Additionally, users can be sorted randomly.
The sort order is controlled by the UserSortCriteria property. Additionally,
ShowValidAvatarsOnly propery is used to display only valid avatar images, to avoid large quantity
of "dummy" avatars being displayed.
All other aspects are identical to the Friend list
106
Web part.
113
users to start typing user name (or first name, last name, e-mail) of the users they want to locate and
immediately get a list of all users that match the entered text.
114
This is how the album looks when the user clicks on the starting (cover) photo
115
165
116
117
118
Part
VII
Working with MonoX pages
120
54
MonoX heavily relies on the ASP.NET master page infrastructure. Master pages allow users to create
a consistent layout for the pages in their portals and other Web applications. A single master page
defines the look and feel and standard behavior for all of the pages (or a group of pages) in the portal.
When users request the content pages, they merge with the master page to produce output that
combines the layout of the master page with the content from the content page.
7.1
121
mode. If you need to set the Ajax-enabled mode in a page regardless of the user privileges, set the
AjaxifiedPage property of a BasePage to true. If you don't want to use the Ajax features at all,
set the AjaxedWebPartManager property in web.config to false. All administrative actions will
cause a postback in this mode, which can slow you down, but is useful if you need to avoid Ajax
callbacks for some reason.
MonoX.master - contains portal administrator toolbar and does all the work related to it. All
customized master pages should have this page as a parent.
Default.master - this page specifies the layout of portal pages. There can be unlimited number of
master pages at this level.
Here is a screenshot of a typical home page for the site built on top of MonoX.
This page illustrates usage of the Web part zones for the page layout. Zones are simply regions on a
page that contain Web Parts controls. Zones exist to lay out Web Parts controls on a page, and to
provide a common UI for the controls. There can be one or many zones on a page, each zone can
contain one or many Web Parts controls, and each zone can have a vertical or horizontal orientation
for page layout. There can be static or dynamic content outside the Web part zones, but such content
cannot be dynamically personalized.
Looking at this example you may notice that Web part zones are mixed at several levels of the master
page hierarchy. Search and navigation elements are usually placed in the Default.master page:
<%@ Master
Language="C#"
AutoEventWireup="true"
EnableTheming="true"
Inherits="MonoSoftware.MonoX.MasterPages.Default"
MasterPageFile="~/MonoX/MasterPages/MonoX.master"
Codebehind="Default.master.cs" %>
122
123
<%@ Page
Language="C#"
AutoEventWireup="true"
MasterPageFile="~/MonoX/MasterPages/Default.master"
Theme="Default"
Inherits="MonoSoftware.MonoX.Pages.Default"
Title="MonoX - Portal Framework for ASP.NET"
Codebehind="Default.aspx.cs" %>
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>
<%@ Register TagPrefix="MonoX" TagName="Editor" Src
="~/MonoX/ModuleGallery/MonoXHtmlEditor.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix
="portal" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX.ModuleGallery"
TagPrefix="ModuleGallery" %>
<%@ Register TagPrefix="MonoX" TagName="SlideShow" Src
="~/MonoX/ModuleGallery/SlideShow.ascx" %>
<%@ Import Namespace="MonoSoftware.MonoX.Resources" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cp" runat="server">
<div class="main">
<table cellpadding="0" cellspacing="0" class="two-columns">
<tr>
<td class="left-column">
<portal:PortalWebPartZone ID="leftWebPartZone" runat="server"
Width="100%" ChromeTemplateFile="Standard.htm" HeaderText='<%$ Code:
PageResources.Zone_LeftPartZone %>'>
<ZoneTemplate>
<MonoX:Editor runat="server" ID="editor1" Title='<%
$ Code: PageResources.Title_LeftSection %>' DefaultDocumentTitle='<%$ Code:
PageResources.Title_LeftSection %>' >
<DefaultContent>
Default eidtor text goes here...
</DefaultContent>
</MonoX:Editor>
</ZoneTemplate>
</portal:PortalWebPartZone>
</td>
<td class="right-column">
<portal:PortalWebPartZone ID="rightPartZone" runat="server"
Width="100%" ChromeTemplateFile="Standard.htm" HeaderText='<%$ Code:
PageResources.Zone_RightPartZone %>'>
<ZoneTemplate>
<MonoX:Editor runat="server" ID="editor2" Title='<%$
Code: PageResources.Title_RightSection %>' DefaultDocumentTitle='<%$ Code:
PageResources.Title_RightSection %>'>
<DefaultContent>
Default eidtor text goes here...
</DefaultContent>
</MonoX:Editor>
</ZoneTemplate>
</portal:PortalWebPartZone>
</td>
</tr>
</table>
</div>
<div class="light-blue-wrapper">
124
<div class="light-blue-bg">
<table cellpadding="0" cellspacing="0" class="featured-project">
<tr>
<td class="project-container">
<MonoX:SlideShow runat="server" ID="ctlSlideShow">
<SlideShowItems>
<ModuleGallery:SlideShowItem runat="server"
ImageUrl="~/App_Themes/Default/img/Projects/project-jobs-market.jpg" Url
="http://www.jobsmarket.ie" Title="Jobs Market"></ModuleGallery:
SlideShowItem>
More slideshow items...
</SlideShowItems>
</MonoX:SlideShow>
</td>
<td class="project-description">
<portal:PortalWebPartZone ID="featuredProjectPartZone"
runat="server" Width="100%" ChromeTemplateFile="Standard.htm" HeaderText='
<%$ Code: PageResources.Zone_FeaturedProjectsZone %>'>
<ZoneTemplate>
<MonoX:Editor runat="server" ID="editor3" Title='<%
$ Code: PageResources.Title_FeaturedProjects %>' DefaultDocumentTitle='<%$
Code: PageResources.Title_FeaturedProjects %>'>
<DefaultContent>
Default eidtor text goes here...
</DefaultContent>
</MonoX:Editor>
</ZoneTemplate>
</portal:PortalWebPartZone>
</td>
</tr>
</table>
</div>
</div>
</asp:Content>
Left and right part zones are specified at this level. Note that all static content that is to be included into
some of the Web part zones must be wrapped in a server control.
Part
VIII
Using Windows Live Writer
with MonoX
126
3. Enter the address of the homepage URL and username/password combination. Home page URL
MUST point to the MetaWeblog.aspx page in the root of your portal installation.
127
4. Choose Metaweblog API and enter the remote posting URL. It is almost identical as the Weblog
home page URL entered in the previous step - the URL point to the MetaWeblog.ashx in the root of
your portal installation (only the extension is different, ashx instead of the usual aspx).
6. The next screen will only show a confirmation, and you are ready to start publishing with Windows
Live Writer.
Part
IX
Portal themes
Portal themes
129
Portal themes
By Microsoft's definition, an ASP.NET theme is a "collection of property settings that allow you to
define the look of pages and controls, and then apply the look consistently across pages in a Web
application, across an entire Web application, or across all Web applications on a server." It is
important to note that this technique is not specific to portals and Web parts: it is a universal
mechanism introduced in version 2 of ASP.NET framework to support easier and more solid, scalable
and consistent Web site styling.
Themes are made up of a set of elements: skins, cascading style sheets (CSS), images, and other
resources. At a minimum, a theme will contain skins. Themes are defined in a special folder of your
portal: it is called App_Themes and is always placed in the root portal folder.
NOTE: it is very important to distinguish standard ASP.NET themes and MonoX theme sets (or skins,
as they are somewhat called in other CMS products). When we are talking about MonoX skins, we are
taking into account all elements that are needed to change the look and feel of an application. This
typically involves:
- a theme folder (~/App_Themes), holds application CSS(es), ASP.NET skin(s) (see below) and
associated image and media files
- a template folder (~/App_Templates), holds Web part templates (see below)
- one or many master pages 120 that define the layout of application pages
Please download a sample template from our template gallery to study a structure and content of a
typical MonoX theme set.
ASP.NET Skins
A skin file has the file name extension .skin and contains property settings for individual controls such
as buttons, labels, and so on. Control skin settings are like the control markup itself, but contain only
the properties you want to set as part of the theme. For example, the following is a section of the
Default.skin file that define the default look and feel of the Web part zone:
<portal:PortalWebPartZone runat="server" BorderColor="#CCCCCC" BorderWidth
="0" Spacing="0" Padding="0" MenuLabelText="Menu">
<PartChromeStyle BorderColor="#D1DDF1" />
<PartStyle CellPadding="0" />
<SelectedPartChromeStyle BorderStyle="Dashed" BorderWidth="2"
BorderColor="#da8b32" />
<MenuLabelHoverStyle ForeColor="Gray" />
<MenuLabelStyle ForeColor="Black" Font-Size="9px" Font-Names="Arial"
/>
<MenuVerbHoverStyle BackColor="#EFF3FB" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" ForeColor="#333333" />
<HeaderStyle Font-Size="10px" ForeColor="#CCCCCC" HorizontalAlign
="Center" />
<MenuVerbStyle BorderColor="#507CD1" BorderStyle="Solid" BorderWidth
="1px" ForeColor="Black" />
<TitleBarVerbStyle Font-Underline="False" ForeColor="Black" Font-Size
="10px" Font-Names="Arial" />
<MenuPopupStyle BackColor="#507CD1" BorderColor="#CCCCCC" BorderWidth
="1px" Font-Names="Arial" Font-Size="9px" />
<PartTitleStyle BackColor="#507CD1" Font-Bold="True" Font-Size="10px"
ForeColor="White" Font-Names="Arial" />
</portal:PortalWebPartZone>
You create .skin files in the Theme folder. A .skin file can contain one or more control skins for one or
more control types. You can define skins in a separate file for each control or define all the skins for a
theme in a single file.
Portal themes
130
There are two types of control skins, default skins and named skins.
A default skin automatically applies to all controls of the same type when a theme is applied to a
page. A control skin is a default skin if it does not have a SkinID attribute. For example, if you create a
default skin for a WebPartZone control as in the example above, the control skin applies to all
WebPartZone controls on pages that use the theme. (Default skins are matched exactly by control
type, so that a Button control skin applies to all Button controls, but not to LinkButton controls or to
controls that derive from the Button object.)
A named skin is a control skin with a SkinID property set. Named skins do not automatically apply to
controls by type. Instead, you explicitly apply a named skin to a control by setting the control's SkinID
property. Creating named skins allows you to set different skins for different instances of the same
control in an application.
Cascading Style Sheets
A theme can also include one or more cascading style sheet (.css) files. When you put a .css file in the
theme folder, the style sheet is applied automatically as part of the theme. You define a style sheet
using the file name extension .css in the theme folder. Note that you cannot exclude individual .css
files from a theme once they are placed in the theme folder.
You can define themes for a single Web application, or as global themes that can be used by all
applications on a Web server. After a theme is defined, it can be placed on individual pages using the
Theme or StyleSheetTheme attribute of the @Page directive, or it can be applied to all pages in an
application by setting the <pages> element in the application configuration (Web.config) file. If the
<pages> element is defined in the Machine.config file, the theme will apply to all pages in Web
applications on the server.
Templating
In addition to the theming mechanism, MonoX employs a powerful templating technology that allows
users to control all visual aspects of individual Web parts. Most of the default Web parts (list, menu,
news, RSS reader, search engine) are template-aware and can be easily customized this way.
Template folders also holds chrome and page templates that are not Web part specific.
Portal themes
131
The structure of the individual template folders is even more simpler than the structure of the
corresponding theme folders. They contain only the templates (plain old HTML or ASCX files with
specific placeholders) and images or any other accompanying resources. The list of the standard
template placeholders and a short template development tutorial can be found in the developer's
section 165 .
9.1
Built-in themes
MonoX comes with a default portal theme. Other themes are available in our Template Gallery.
Default theme is used at a default portal and can be used as a template for all further customizations.
Portal themes
132
Portal themes
133
9.2
Portal themes
134
</asp:Content>
4. put the HTML and ASP.NET markup INSIDE the content control.
5. you may add unlimited number of Web part zones in the ASP.NET code and fill them with Web
parts:
<portal:PortalWebPartZone HeaderText="Search zone" ID="SearchZone"
HeaderStyle-Height="0" HeaderStyle-ForeColor="black" PartChromeType="None"
runat="server" Width="100%">
<ZoneTemplate>
<MonoX:Editor runat="server" ID="editor1" Title="About this
site" DefaultContent="This is my first monoX master page" />
</ZoneTemplate>
</portal:PortalWebPartZone>
Creating a custom template page is very similar to the procedure described above.
1. Create a new ASPX page with the page title of your choice. We will use the name
MyTemplate.aspx. This page will use previously created MyMaster.master as the master page. Put it
in the PageTemplates folder of the currently active theme (~/MonoX/App_Templates/(Theme
Name)/PageTemplates/).
2. Put the following markup in the header of the page:
<%@ Page
Language="C#"
MasterPageFile="~/MonoX/MasterPages/MyMaster.master"
AutoEventWireup="true"
Inherits="MonoSoftware.MonoX.BasePage"
Theme="Default"
Title=""
%>
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>
<%@ Register TagPrefix="MonoX" TagName="Editor" Src
="~/MonoX/ModuleGallery/MonoXHtmlEditor.ascx" %>
<%@ Register Assembly="MonoX" Namespace="MonoSoftware.MonoX" TagPrefix
="portal" %>
3. put the content control below the header:
<asp:Content ContentPlaceHolderID="cp" runat="server">
</asp:Content>
4. put the HTML and ASP.NET markup INSIDE the content control.
5. you may add unlimited number of Web part zones in the ASP.NET code and fill them with Web
parts:
<portal:PortalWebPartZone HeaderText="Search zone" ID="SearchZone"
HeaderStyle-Height="0" HeaderStyle-ForeColor="black" PartChromeType="None"
runat="server" Width="100%">
<ZoneTemplate>
<MonoX:Editor runat="server" ID="editor1" Title="About this
site" DefaultContent="This is my first monoX master page" />
</ZoneTemplate>
</portal:PortalWebPartZone>
6. you new template page will appear in the New page menu option of the Page management
administration pane and you will be able to dynamically create new pages based on it.
54
Portal themes
135
edit the header declaration of the page and change the MasterPageFile and Theme attributes:
<%@ Page
Language="C#"
AutoEventWireup="true"
MasterPageFile="~/MonoX/MasterPages/Default.master"
Theme="Default"
Inherits="MonoSoftware.MonoX.Pages.Default"
Title="MonoX - Portal Framework for ASP.NET"
Codebehind="Default.aspx.cs" %>
use the "Page properties" dialog (right click on the page in the Page management section). You will
be able to choose the theme name and enter the path to the master page that is to be used for the
selected page. Note that the portal engine will not allow you to enter the non-existing master page,
or master page that is not compatible with the selected content page (due to different number of
placeholders or any other errors).
Part
X
Personalization
Personalization
10
137
Personalization
Personalization is an ASP.NET application service responsible for saving, retrieving and reapplying
data that represents customizations which have been made to controls on a Web page. This service
can be made available to the selected users (typically administrators), selected groups of users or
even all portal users.
The personalization service "knows" how to store the customization data for a page and then retrieve it
when a user requests the page again. When a page with saved personalization data is re-requested,
the personalization service fetches the data so the page can be recreated for the user making the
request. However, personalization cannot be used by itself. To use personalization, you must use
controls within a WebPartZone so they will have Web Parts functionality.
WebPartManager is the key component of the Web parts control set that is responsible for the most of
the advanced features built into the MonoX portal framework. It acts as the hub or control center of a
Web Parts application. There must be one - and only one - WebPartManager control instance on every
page that uses Web Parts controls. MonoX always includes a WebPartManager in one of the built-in
master pages (MonoX.master), so there is no need to add it manually to any of the pages that inherit
from the MonoSoftware.MonoX.BasePage.
Most of the MonoX application services are built upon the ASP.NET personalization system and
require personalization to recreate the state of web pages after user customizations have been
applied. Some of the actions that affect the personalization state of the portal and as such are saved
by the personalization system are:
Advanced topics related to this subject are covered in Microsoft's Web Parts Personalization Overview
.
10.1
Personalization scope
There are two personalization scopes or views in MonoX (or ASP.NET Web part framework, for that
matter): shared scope and per-user scope. Changes made to data while a page is in shared scope
mode will be visible to all users within the portal. On the other hand, any changes made to the portal
while a page is in user scope mode will only be visible to the user making the change. It is obvious
that the ability to make changes while in shared scope mode is a feature that is normally used only by
users with administrative privileges.
Web Parts personalization is enabled by default, and authenticated users of a Web Parts page are
able to personalize pages for themselves without any special configuration. However, individual or
user-scoped personalization changes are visible only to the user who made them. If you want to
provide a selected user (such as a site manager) or users with the ability to make personalization
changes in shared scope so that the changes to a page are visible to all users, you must add a setting
to the Web site's configuration file.
Within the <system.web> section of the Web.config file, add an <authorization> section (if it doesn't
exists already), and within that, add an <allow> element to specify which user or users have access to
shared personalization scope. See below for an example - of course, you should assign a valid portal
user account, or a group account, to the users/roles attribute. The user or users specified will have the
ability to edit a page in shared personalization scope, so that the changes they make will be visible to
all users.
Personalization
138
<authorization>
<allow verbs="enterSharedScope" users="SomeUserAccount" roles="admin"
</authorization>
/>
Part
XI
Security
Security
11
140
Security
MonoX works in conjunction with IIS, the .NET Framework, and the underlying security services
provided by the operating system, to provide a range of authentication and authorization mechanisms.
It closely follows ASP.NET security models and best practices to deliver solutions based on widely
accepted standards. Listed below are the resources that present detailed discussions on securityrelated topics:
ASP.NET Security Overview: flow of security with a request, configuration settings, authentication,
authorization, role-based security
Building Secure ASP.NET Applications: authentication, authorization, and secure communication
Security Practices: ASP.NET 2.0 Security Practices at a Glance: a set of consolidated practices
designed to address ASP.NET version 2.0 security issues. The answers and recommendations
presented in this module are designed to supplement the companion modules and additional
guidance.
From the administrator's point of view, MonoX allows users to create security roles and to assign users
to appropriate roles using the User management 60 and the Role management 62 administration
panes. Access roles can be set on a page level (using the Page management 54 pane), and/or a Web
part level (using the Web part verbs menu 38 ). Web part allows users to specify both view and edit
roles.
Developers can also use the functionality from the System.Web.Security namespace that contains
classes that are used to implement ASP.NET security in Web server applications. Additionally, MonoX
provides a set of helper methods in a SecurityHelper class, while both BasePage and BasePart
classes automatically perform basic security checks.
Part
XII
Search engine optimization
12
142
Part
XIII
Localization
Localization
13
144
Localization
All localization aspects are fully supported in MonoX due to its very flexible architecture. It is very easy
to localize portal contents, as well as all administration and support utilities. A single portal instance
can support unlimited number of localized sites, where each site has the same structure, but different
(localized) content.
Here is a screenshot of the MonoX home page in default (English) language. The URL for this page is
~/Default.aspx.
Here is what happens after the administrator changes the language in the administrative toolbar to
Croatian (the URL is ~/language/hr-HR/Default.aspx):
Note that everything is localized - from the administrative interface to the navigation links and HTML
editor's content. However, this is not where localization support ends in MonoX: portal administrators
are allowed to localize even the built-in texts without recompilation or any other additional tasks.
Note that all localized instances (other than the default instance) has URL's of the following format: ~/
Localization
145
13.1
Localization
146
This pane allows administrators to localize each and every localizable resource in the portal. Note that
MonoX uses translation engines to suggest a correct translation for each text, as it can be seen in the
screenshot above.
Regardless of the active resource provider model, administrators can dynamically add or remove
languages from a list of supported portal languages in the Language manager administration section:
Note that it is possible to have only one default language. Pages in all other languages will have URLs
of the form ~/language/LocaleName/PageName.aspx. The "language" part of this URL is configurable
and can be changed - of course, you don't have to create a physical folder structure of this type for the
localization tasks, as MonoX URL rewriting engine will take care of everything. The format of the
localized URL is not fixed, and can be controlled by developing a custom localization handler - this task
requires implementing the ILocalizationHandler interface. You can always switch the active
language using the language dropdown in the administrative toolbar on top of each page.
It is important to understand the types of content that is held in resource files, as opposed to content
that is also language-dependant, but localized using other tools. For example, a localized version of
the site will initially have all administrative interfaces translated to the appropriate language. However,
text in HTML editor Web parts will initially hold default (English) versions, and you will be able to
change it using the familiar editing interface. Each localized site will hold its own version of the content.
The same hold for the navigation links, as each localized site can have totally independent navigation
hierarchy - you can create it in the Page management 54 administration section. Blogs, groups, and
other social networking resources are also language-aware, so you are expected to open a separate
blog (or multiple blogs) for each localization instance of the site.
Part
XIV
Support for mobile devices
14
148
Home page of the MonoX mobile section. You can find it in the installation package at the following
path: ~/MonoX/Mobile/Default.aspx
Since MonoX allows developers to easily inherit from the existing parts and override the functionality
they need, it requires a minimal effort to develop the mobile versions of MonoX Web parts.
All mobile pages in your application should inherit from the MonoSoftware.MonoX.BaseMobilePage, as
it sets up the neccessary infrastructure (CSS and javascript references and jQuery mobile
configuration code). After that, you can use any of the existing mobile Web parts, modify the existing
"desktop" parts, or start building your own modules from scratch. The first two scenarios are more
common, and they allow you to have a practically identical code base for both desktop and mobile
versions of your parts. Let's take a look at one of the simple Web part to see how it works. The
"Comments" Web part consists of a simple paged list view that needs a few adjustments in both front
end (ascx) and back end (ascx.cs) to be 100% compatible with jQuery syntax and GUI design practice
for mobile devices.
Version 4.7 - 03/01/2013
149
150
Part
XV
Portal development
Portal development
15
152
Portal development
This is a second part of the MonoX user manual, describing the basic development tools and
techniques.
The accompanying MonoX API documentation will be your main reference for a complete description
of the API contained inside MonoSoftware.MonoX and related namespaces.
15.1
The MonoX folder holds most of the CMS files (except skins, templates, and DLL files which are
placed in App_Themes, App_Templates and bin folders). You should also include at least a default
ASPX page to the root folder, while all other pages may go to any other folder. Note that the URL
rewriter gives you the absolute control on how and where the files will be stored - the physical storage
paths very often do not map directly to the corresponding virtual paths due to better SEO rankings and
page organization issues.
Version 4.7 - 03/01/2013
Portal development
153
Along with a code for several HTTP handlers, MonoX folder includes various system subfolders:
Portal development
154
As it can be seen from the structure above, new versions of MonoX use the Web Application Project
(WAP), instead of the Web Site project (WSP) model. Although it introduced some controversy when it
initially appeared (in VS 2005), MonoX initially adopted the WSP model as it was the recommended
approach. It quickly turned out that WSP projects are suitable for Web developers building sites with
only a minor level of application functionality included, while the WAP model is more suitable for
application developers focusing on more complex applications. Build and deploy times in WSP
projects were incredibly long, so we adopted WAP model for all future versions.
Additionally, we strongly support the usage of Web Deployment projects add-in (VS 2005 and 2008
versions), that provide additional functionality to build and deploy Web sites and Web applications.
This add-in includes a tool to merge the assemblies created during ASP.NET pre-compilation, and
provides a comprehensive UI within Visual Studio to manage build configurations, merging, and using
pre-build and post-build tasks with MSBuild. In this way, MonoX can be easily integrated with
continuous integration servers like CruiseControl or other similar agile development tools.
Here is a screenshot of the complete custom solution:
MonoX custom solutions typically include three or more projects: main Web application project, Web
deployment project, and data access layer project(s) - LLBLGen typically includes two projects in the
Version 4.7 - 03/01/2013
Portal development
155
adapter scenario, DAL and DALDBSpecific. Of course, this depends on the data access tool of your
choice, and any custom projects that you may want to include.
15.2
15.3
Portal development
156
Using the Web Parts control set, you as a developer can enable end users to:
Personalize page content. Users can add new Web Parts controls to a page, remove them, hide
them, or minimize them like ordinary windows. Users can also type-in textual content using a
standard editor interface, without any previous experience with HTML or other server-side tools and
technologies.
Personalize page layout. Users can drag a Web Parts control to a different zone on a page, or
change its appearance, properties, and behavior.
Export and import controls. Users can import or export Web Parts control settings for use in other
pages or sites, retaining the properties, appearance, and even the data in the controls. This reduces
data entry and configuration demands on end users.
Create connections. Users can establish connections between controls so that, for example, a chart
control could display a graph for the data in a stock ticker control. Users could personalize not only
the connection itself, but the appearance and details of how the chart control displays the data.
Manage and personalize part, page and site-level settings. Authorized users can configure settings
at all levels, determine who can access a site or page, set role-based access to controls, and so on.
For example, a user in an administrative role could set a Web Parts control to be shared by all
users, and prevent users who are not administrators from personalizing the shared control.
Note that you are not forced to "pack" all the functionality of your application in various Web parts. You
can still have parts of the business or presentation logic on each page or user control, business layer
code, or anywhere else. MonoX does not impose a specific development standard or practice, so may
get up to speed very quickly.
All Web parts in the MonoX framework inherit from MonoSoftware.MonoX.BasePart. If you want
to develop distributable, self-registering parts, you should inherit from a class that is higher in the
object hierarchy, MonoSoftware.MonoX.BaseAutoRegisterPart. Detailed code sample is
available in the next section.
Please refer to the following tutorial article for more details: Building a custom Web part in MonoX.
Portal development
157
Portal development
158
System;
System.ComponentModel;
System.Web.UI;
System.Web.UI.WebControls;
Telerik.Web.UI;
Portal development
159
namespace MonoSoftware.MonoX
{
/// <summary>
/// HTML editor part, used in part editor zones.
/// </summary>
public class HtmlEditorPart : WebControl, INamingContainer, IWebEditor
{
private RadEditor htmlEditor = new RadEditor();
/// <summary>
/// Constructor.
/// </summary>
public HtmlEditorPart()
{
htmlEditor.ToolsFile =
"~/MonoX/ModuleGallery/MonoXHtmlEditorSmallToolsFile.xml";
htmlEditor.Skin = "Vista";
htmlEditor.BackColor = System.Drawing.Color.White;
htmlEditor.ToolbarMode = EditorToolbarMode.Default;
}
#region IWebEditor Members
/// <summary>
/// Editor value.
/// </summary>
public object EditorValue
{
get
{
return htmlEditor.Content;
}
set
{
if ((value != null) && (!String.IsNullOrEmpty(value
.ToString())))
htmlEditor.Content = value.ToString();
}
}
/// <summary>
/// Gets controls.
/// </summary>
public override ControlCollection Controls
{
get
{
EnsureChildControls();
return base.Controls;
}
}
/// <summary>
/// Creates child control.
/// </summary>
protected override void CreateChildControls()
{
this.Controls.Clear();
this.Controls.Add(this.htmlEditor);
}
Portal development
160
Portal development
161
System;
System.Collections.Generic;
System.Linq;
System.Web;
MonoSoftware.LLBLGen;
SD.LLBLGen.Pro.ORMSupportClasses;
MonoSoftware.MonoX;
MyProject.DAL.DatabaseSpecific;
namespace MyProject.Repositories
{
public class BaseRepositoryMyProject : RepositoryExtender, IDisposable
{
#region Constructor
/// <summary>
/// Constructor.
/// </summary>
protected BaseRepositoryMyProject()
: base()
{
}
/// <summary>
/// Returns an instance of the repository class, wraps the
constructor to allow for encapsulated instantiation, so the logic in he
constructor can be changed without changing the client code.
/// Reference:
http://www.netobjectives.com/ezines/ez0405NetObj_PerspectivesOfUseVsCreatio
nInOODesign.pdf
/// </summary>
/// <returns>Instance of the base repository.</returns>
public static BaseRepositoryMyProject GetInstance()
{
return new BaseJobsMarketMyProject();
}
#endregion
#region Methods
/// <summary>
/// Creates the LLBLGen IDataAccessAdapter.
/// </summary>
/// <returns>LLBLGen IDataAccessAdapter</returns>
public override IDataAccessAdapter GetAdapter()
{
return CreateAdapter();
}
/// Used to create database-independant LLBLGen DataAdapter.
/// </summary>
/// <param name="connectionString">Connection string to use</param>
/// <returns>IDataAccessAdapter for MonoX DAL</returns>
public virtual IDataAccessAdapter GetAdapter(string
connectionString)
{
return CreateAdapter(connectionString);
}
Portal development
162
/// <summary>
/// Used to create database-independant LLBLGen DataAdapter.
/// </summary>
/// <returns>IDataAccessAdapter for project's DAL</returns>
private IDataAccessAdapter CreateAdapter()
{
IDataAccessAdapter toReturn = null;
try
{
toReturn = CreateAdapter(ApplicationSettings
.LocalSqlServer);
}
catch { }
return toReturn;
}
/// <summary>
/// Used to create database-independant LLBLGen DataAdapter.
/// </summary>
/// <param name="connectionString">Connection string to use</param>
/// <returns>IDataAccessAdapter for MonoX DAL</returns>
private IDataAccessAdapter CreateAdapter(string connectionString)
{
return new DataAccessAdapter(connectionString, false,
SD.LLBLGen.Pro.ORMSupportClasses.CatalogNameUsage.Clear, null);
}
#endregion
#region IDisposable Members
public void Dispose()
{
}
#endregion
}
}
Implementation of a BaseBLL service is equally simple:
using
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Web;
MonoSoftware.MonoX.BusinessLayer;
namespace MyProject.Layers
{
public class BaseBLLMyProject : BaseMonoXBLL
{
protected BaseBLLMyProject()
: base()
{ }
public new static BaseBLLMyProject GetInstance()
{
return new BaseBLLMyProject();
}
Portal development
163
}
}
15.4
15.5
Portal development
15.6
164
120
. Please study
Portal development
165
allow for changing themes, and is therefore not used when this feature is required.
The content of a typical chrome template is very simple:
<div class="box">
<div id='<# WebPartDragSurfaceId #>' class="box_hed"><# WebPartTitle
#></div>
<div class="box_content">
<# WebPartBody #>
</div>
<div class="box_footer"><# WebPartVerbs #></div>
</div>
Here is a list of available placeholder tags:
<# WebPartDragSurfaceId #> will be replaced by a Web part drag surface, used in the design
and catalog modes to drag and drop Web parts
<# WebPartTitle #> will be replaced by a Web part title
<# WebPartBody #> is used to hold the content of the rendered Web part
<# WebPartVerbs #> will be replaced by Web part verb menu
If you plan to use the Web part's Chrome Type property (available in code or in the part's Properties Appearance section of the administrative toolbar, and can be set to Default, Border only, None, Title
and border, Title only), you will have to use the following section tags:
<# header #><# /header #> marks the header/title section of a Web part.
<# border #><# /border #> marks the border area(s) of a Web part.
<# body #><# /body #> marks the body/content area of a Web part.
Instead of the rather rigid default implementation of Web part chromes in the ASP.NET 2.0, MonoX
allows you to use chromes wherever you want. Some Web portals are chrome-less, but administrators
need to have some sort of chrome to show at least Web part title and a verb menu. Other portals use
chromes with all Web parts. MonoX gives you a total control of this aspect; you can declaratively set
which chrome template to use and when to show it:
<portal:PortalWebPartZone HeaderText="Left part zone" ID="leftWebPartZone"
runat="server" Width="100%" ChromeTemplateFile="LeftColumn.htm"
ShowChromeForNonAdmins="true">
MonoX uses template-based Web part chromes out of the box. If you want to disable this functionality
and use the basic ASP.NET functionality, please set the UseTemplates property of the
PortalWebPartZone to false.
Portal development
166
public RssReader()
{
...
ControlSpecificTemplateSubPath = "RssReaderTemplates";
IsTemplated = true;
...
}
This means that the portal will look for templates for this part in the ~/App_Templates/(Theme name)/
RssReaderTemplates folder.
Render the templated part:
protected void dlRss_OnItemDataBound(object sender, DataListItemEventArgs
e)
{
...
Hashtable tags = new Hashtable();
RSSFeed currentFeed = e.Item.DataItem as RSSFeed;
tags.Add("<# Link #>", currentFeed.Link);
tags.Add("<# Title #>", currentFeed.Title);
tags.Add("<# Description #>", currentFeed.Description);
tags.Add("<# PubDate #>", currentFeed.PubDate.ToString());
RenderTemplatedPart(pnlContainer, CurrentTemplate, tags);
...
}
The hashtable tags is used to hold a list of all part-specific tags with accompanying values that will be
rendered in the template. RenderTemplatedPart method is available in the BasePart class.
Save the template file in the specified folder. The default template for the RssReader (Default.htm)
part is very simple:
<div class="news_box">
<p class="newsTitle"><# Title #></p>
<p><# Description #></p>
<a href="<# Link #>" class="x">read more</a>
</div>
As you can see, you can produce unlimited number of such HTML templates and change the look and
feel of the templated Web part in seconds. Even faster way that works well for simpler templates is to
specify the templates inline, without an external HTML (or ascx) file, using the
CurrentTemplateHtml inner property:
<MonoX:FileGallery runat="server" ID="fgScreenshots" UsePrettyPhoto="true"
Title="Screen Gallery">
<CurrentTemplateHtml>
<div class="image-effect">
<# FileIcon #>
</div>
</CurrentTemplateHtml>
</MonoX:FileGallery>
Notes: you don't have to put all the tags in the template file, as shown above (PubDate tag is not
used). Also, <% TemplateImagefolder %> is supported by default in all templated Web parts.It
maps to the following path format: ~/App_Templates/ThemeName/
ControlSpecificTemplateSubPathName/TemplateNameImages - in our case that is ~/App_Templates/
Default/RssReaderTemplates/DefaultImages.
Version 4.7 - 03/01/2013
Portal development
167
IMPORTANT: if you don't need all of the templating features as described above, you could still use
the "standard" ASP.NET templating mechanisms in MonoX Web parts via another "inner" property:
TemplatedControl. It allows you to access the repeatable control that is used to render the Web
part (it is actually a standard ASP.NET ListView control in the majority of built-in controls). All of the
properties of the repeatable controls will become available (ItemTemplate,
AlternatingItemTemplate, ...).
<MonoX:FileGallery runat="server" ID="fgScreenshots" UsePrettyPhoto="true"
Title="Screen Gallery">
<TemplatedControl>
<ItemTemplate>
<asp:LinkButton ID="lnkMoveDown" runat="server"
CommandArgument='<%# Eval("Id") %>' OnCommand="lnkMoveDown_Click"></asp:
LinkButton>
</ItemTemplate>
</TemplatedControl>
</MonoX:FileGallery>
15.7
API calls
MonoX API is built on the top of existing MonoX code repository and adds another layer of abstraction
between a developer and the core MonoX engine. At the core of the API are adapters: CRUD API
access points used to access and update all MonoX objects. Note that these are POCO objects and
are striped down of any unnecessary functionality usually found in more complex frameworks. All
adapters implements IQueryable interface, meaning that you can access MonoX objects using
standard LINQ. Since our API is built on the top of the LLBLGen Pro ORM framework, all of our LINQ
providers are basically wrappers around LLBLGen LINQ provider. They take care of the subtle details
and all of the complexity behind the LLBLGen framework and MonoX architecture.
Some restrictions were imposed on API LINQ calls. Most importantly, at this moment you cannot issue
selects directly in the API query, and all API calls are expected to return MonoX API objects. We have
focused on the most common scenarios like filtering (where, first), sorting (orderby) and paging
(take, skip). GroupBy statements are not supported in this version.
User information can be easily retrieved using the API calls. MonoX user objects are built upon
ASP.NET membership framework. The user data is stored accross several database tables, and you
need to get familiar with it to load the full object graph. MonoX already comes with repositories that will
take care of it, but inexperienced users can find accessing user object data somewhat complex. User
API model comes to the rescue as it exposes "flattened" data that is easy to understand and use.
Below are a few practical examples:
// Get all users
var allUsers = UserAdapter.GetInstance().ToList();
// Prepare query to get common users that registreted in the last 30 days
var commonUsersQuery = UserAdapter.GetInstance()
.Where(p => (p.Name.FirstName == "John"
|| p.Email.EndsWith(".com"))
&& p.DateEntered > DateTime.Now.AddDays(-30));
// ToList will execute linq expression and we'll get the list of common
users
var commonUsers = commonUsersQuery.ToList();
// this will return a list of common users sorted by date they were created
var orderedCommonUsers = commonUsersQuery.OrderBy(p =>
p.DateEntered).ToList();
We can also use skip and take to control how many users are fetched from the data store. By
Portal development
168
combining these statements we can page our way through the user collection:
int pageSize = 10;
int pageNumber = 2;
var pagedcommonUsers = commonUsersQuery
.Skip(pageNumber * pageSize)
.Take(pageSize).ToList();
int recordCount = commonUsersQuery.Count()
This will fetch 10 users on page 2.
Earlier we mentioned that a select expression cannot be directly used on a query. Here is how you can
still get the desired functionality:
List<Guid> allUsersId;
// This query will throw exception
allUsersId = UserAdapter.GetInstance().Select(p => p.Id).ToList();
// This query will return list of users id
allUsersId = UserAdapter.GetInstance().ToList().Select(p => p.Id).ToList();
As you can see the trick is to first call the API provider by calling GetEnumerator(ToArray and
ToList will execute GetEnumerator) and then run select expression on an in-memory collection. It's
not the most efficient way for getting large lists but in most cases it will work well.
User adapter can similarly be used to fetch the "friends" collections for the specific user:
var user = UserAdapter.GetInstance().First();
var userFriends = UserAdapter.GetInstance().GetFriends(user.Id).ToList();
Calling GetFriends will return IQueryable object that can be used to enumerate the friends
collection. You can access the friend requests in a similar fashion.
Here is how to create, update and delete portal users:
var user = UserAdapter.GetInstance().CreateUser("newuser", "newpassword",
"email@domain.net");
user.MyStatus = "New user";
user = UserAdapter.GetInstance().UpdateUser(user);
UserAdapter.GetInstance().DeleteUser(user.Id);
All methods will throw exceptions on all errors. Note that user adapters hold several methods that can
be used to manage user relations and requests - please check MonoX documentation for more details.
There are additional adapters for managing user roles, groups and events.
15.8
Portal development
169
The mechanism for establishing a connection is a special callback method: one in the consumer and
one in the provider. However, the Web parts control set handles all the callback and communication
details, so the steps required of developers are minimal. As a developer, if you want to use the
simplest approach, all you have to do is select a method in the provider to use as the callback method,
and mark it in the source code with a ConnectionProvider attribute. Then within that method, return the
interface instance containing the data to pass to the consumer. The interface instance can be very
simple (for example, a single property that contains a string value such as a postal code). A provider
can implement one of the provided interfaces (IWebPartField, IWebPartRow, or IWebPartTable), but
in most cases it is preferable to create a simple, custom interface with one or more properties or
methods containing the data you want to share with a consumer, and implement that interface in the
provider. The consumer's callback method retrieves the instance of the interface from the provider.
Again, all that is required of a developer is to identify which method in the consumer (using a
ConnectionConsumer attribute) will retrieve the interface instance, and assign it to some internal
variable for processing and rendering. Note that the data from the provider is passed during the prerendering phase of the page and control cycle, so you should plan to process the data and update any
logic in the consumer after pre-rendering is complete.
MonoX includes a very simple example that can be used to learn how to develop and modify Web part
connections. It is available at the following URL: ~/MonoX/Samples/ConnectionSampleSample/
ConnectionSample.aspx. More details on its front-end is available in the connection mode section 45 .
RssUrlProvider Web part (placed in the same sample folder) provides a RSS URL that is consumed by
the RssConsumer Web part and used to fetch the RSS feeds from the specified URL.
Here is the code for the RssUrlProvider.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile
="RssUrlProvider.ascx.cs" Inherits
="MonoSoftware.MonoX.Samples.RssUrlProvider" %>
URL: <asp:TextBox runat="server" ID="txtUrl" CssClass="borderlessInput"></
asp:TextBox> <asp:Button runat="server" ID="btnOk" Text="OK" CssClass
="SilverButton" />
RssUrlProvider.ascx.cs:
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
MonoSoftware.MonoX;
namespace MonoSoftware.MonoX.Samples
{
public partial class RssUrlProvider : BasePart,
IStringConnectionInterface
{
[ConnectionProvider("Rss URL Provider", "Default connection")]
public IStringConnectionInterface GetProviderData()
{
return this;
}
Version 4.7 - 03/01/2013
Portal development
170
System;
System.Data;
System.Configuration;
System.Collections;
System.Collections.Generic;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
MonoSoftware.MonoX;
namespace MonoSoftware.MonoX.Samples
{
Version 4.7 - 03/01/2013
Portal development
171
}
protected void Page_PreRender(object sender, EventArgs e)
{
List<RSSFeed> FeedList = null;
Portal development
172
try
{
FeedList = (List<RSSFeed>)GetFeeds(this.MaxItems, 0);
}
catch { }
dlRss.DataSource = FeedList;
dlRss.DataBind();
}
public ICollection<RSSFeed> GetFeeds(int maxRows, int
startRowIndex)
{
List<RSSFeed> list = null;
list = new List<RSSFeed>();
DataSet ds = new DataSet();
ds.ReadXml(this.Url);
DataTable dt = null;
foreach (DataTable tbl in ds.Tables)
{
if (tbl.TableName.ToLower() == "item")
dt = tbl;
}
if (dt == null)
return null;
foreach (DataRow row in dt.Rows)
{
string title = (string)row["title"];
string description = (string)row["description"];
string link = (string)row["link"];
DateTime pubDate = DateTime.Now;
try
{
pubDate = Convert.ToDateTime(row["pubDate"]);
}
catch { }
list.Add(new RSSFeed(title, description, link, pubDate));
}
List<RSSFeed> retList;
if (maxRows > 0)
{
if (list.Count < maxRows) maxRows = list.Count;
retList = new List<RSSFeed>();
for (int i = startRowIndex; i < maxRows; i++)
{
retList.Add(list[i]);
}
}
else
{
retList = list;
}
return retList;
}
}
public class RSSFeed
Portal development
173
{
private string _title;
public string Title
{
get { return _title; }
set { _title = value; }
}
private string _description;
public string Description
{
get { return _description; }
set { _description = value; }
}
private string _link;
public string Link
{
get { return _link; }
set { _link = value; }
}
private DateTime _pubDate;
public DateTime PubDate
{
get { return _pubDate; }
set { _pubDate = value; }
}
public RSSFeed(string title, string description, string link,
DateTime pubDate)
{
this._title = title;
this._description = description;
this._link = link;
this._pubDate = pubDate;
}
}
}
15.9
Portal development
174
Implement the IRssWebPart interface. The implementation assumes only one public method that
returns a RssChannel class:
public abstract class MyRssModule : BasePart, IRssWebPart
...
private RssChannel rssChannel = null;
...
#region IRssWebPart Members
/// <summary>
/// Gets a rss channel.
/// </summary>
/// <returns>Rss channel for web part</returns>
public RssChannel GetRssChannel()
{
return rssChannel;
}
#endregion
Apart from this, you should fill in the appropriate title and description in the RssChannel object and
attach a list of RssChannelItems to it (adding the RssChannel object to cache is highly
recommended):
rssChannel = new RssChannel();
rssChannel.Title = this.Title;
rssChannel.Description = this.Description;
...
foreach (NewsItemEntity newsItem in collection)
{
newsItem.LocalizedNewsItem = (NewsItemLocalizationEntity)
LocalizationTextHandler.GetLocalizedObject(newsItem.NewsItemLocalizations,
NewsItemLocalizationFields.LanguageId);
RssChannelItem item = new RssChannelItem();
item.Title = newsItem.LocalizedNewsItem.Title;
item.Description = Helper.GetSubString(HTMLParseHelper
.StripTags(newsItem.LocalizedNewsItem.ShortContent), 0, 255);
item.Link = Request.Url.ToString();
rssChannel.Items.Add(item);
}
AddToCache(internalCacheRssKey, rssChannel);
...
Portal development
175
MonoSoftware.MonoX;
MonoSoftware.MonoX.Utilities;
SD.LLBLGen.Pro.ORMSupportClasses;
MonoSoftware.MonoX.DAL.DatabaseSpecific;
MonoSoftware.MonoX.DAL.HelperClasses;
MonoSoftware.MonoX.DAL.EntityClasses;
MonoSoftware.MonoX.DAL.FactoryClasses;
MonoSoftware.MonoX.DAL;
MonoSoftware.MonoX.Repositories;
System.Linq;
MonoSoftware.Web;
namespace MonoSoftware.MonoX.SearchEngine.Providers
{
/// <summary>
/// Pages search provider - searches pages and document portal tables.
/// </summary>
public class PagesSearchProvider : ISearchEngineProvider
{
#region Fields
/// <summary>
/// Content of the description text for each search result items.
/// </summary>
public static readonly string PagesDescriptionContentLenght =
"PagesDescriptionContentLenght";
/// <summary>
/// Indicates if search phrases will be bolded in the search
results.
/// </summary>
public static readonly string BoldSearchPhrasesParam =
"BoldSearchPhrases";
/// <summary>
/// Indicates if the provider should use full text search (CONTAINS
operator) or "ordinary" search (LIKE parameter). Full text requires
Version 4.7 - 03/01/2013
Portal development
176
creation of full text search catalog on the Document table and related
tables.
/// </summary>
public static readonly string FullTextSearchParam =
"FullTextSearch";
/// <summary>
/// Maximum number of results to return.
/// </summary>
public static readonly string MaxNoOfResults = "MaxNoOfResults";
#endregion
#region ISearchEngineProvider Members
/// <summary>
/// Gets provider name.
/// </summary>
public string ProviderName
{
get { return "PagesSearchProvider"; }
}
/// <summary>
/// Gets localized provider name.
/// </summary>
public string ProviderLocalizedTitle
{
get { return MonoSoftware.MonoX.Resources.Search
.PagesProviderTitle; }
}
private string _searchPhrase = String.Empty;
/// <summary>
/// Gets or sets search phrase.
/// </summary>
public string SearchPhrase
{
get
{
return _searchPhrase;
}
set
{
_searchPhrase = value;
}
}
private System.Collections.Hashtable _searchParams;
/// <summary>
/// Gets or sets search parameters.
/// </summary>
public System.Collections.Hashtable SearchParams
{
get
{
if (_searchParams == null)
_searchParams = new System.Collections.Hashtable();
return _searchParams;
}
set
Portal development
177
{
_searchParams = value;
}
}
private System.Collections.Specialized.NameValueCollection
_providerAttributes;
/// <summary>
/// Gets or sets provider attributes.
/// </summary>
public System.Collections.Specialized.NameValueCollection
ProviderAttributes
{
get
{
if (_providerAttributes == null)
_providerAttributes = new
System.Collections.Specialized.NameValueCollection();
return _providerAttributes;
}
set
{
_providerAttributes = value;
}
}
private string _templateFileName = String.Empty;
/// <summary>
/// Gets or sets a template file name.
/// </summary>
public string TemplateFileName
{
get
{
return _templateFileName;
}
set
{
_templateFileName = value;
}
}
/// <summary>
/// Gets an entity collection of document/pages search results.
/// </summary>
/// <returns></returns>
public EntityCollection<DocumentEntity> GetResultCollection()
{
int maxNoOfResults = 1000;
if (ProviderAttributes[MaxNoOfResults] != null)
Int32.TryParse(ProviderAttributes[MaxNoOfResults], out
maxNoOfResults);
using (DocumentRepository rep = DocumentRepository
.GetInstance())
{
return rep.GetSearchResult(SearchPhrase,
!(ProviderAttributes[FullTextSearchParam] == null || !bool
.Parse(ProviderAttributes[FullTextSearchParam])), maxNoOfResults);
}
Portal development
178
}
/// <summary>
/// Implementation of the search method. Searches through all
documents and returns only the pages that contain documents with the
requested search term.
/// </summary>
/// <returns>List of ISearchEngineResultItem</returns>
public List<ISearchEngineResultItem> Search()
{
EntityCollection<DocumentEntity> collection =
GetResultCollection();
List<ISearchEngineResultItem> results = new List<
ISearchEngineResultItem>();
List<Guid> resultPages = new List<Guid>();
foreach (DocumentEntity doc in collection)
{
//remove duplicate search results
if (resultPages.Contains(doc.Id)) continue;
//remove pages that user is not allowed to see
if (!IsAccessAllowed(doc.Page)) continue;
resultPages.Add(doc.PageId);
PagesSearchResultItem item = new PagesSearchResultItem();
int descriptionContentLen = 255;
if (ProviderAttributes[PagesDescriptionContentLenght] !=
null)
descriptionContentLen = Convert
.ToInt32(ProviderAttributes[PagesDescriptionContentLenght]);
string text = doc.TextContent;
string descriptionTxt = MonoXUtility.GetSubString(
HtmlFormatter.StripTags(text), 0, descriptionContentLen);
if (ProviderAttributes[BoldSearchPhrasesParam] != null)
if (bool
.Parse(ProviderAttributes[BoldSearchPhrasesParam]))
SearchEngineCore.BoldSearchPhrases(SearchPhrase,
ref descriptionTxt);
string url = String.Empty;
using (DocumentRepository rep = DocumentRepository
.GetInstance())
{
url = rep.GetDocumentUrl(doc);
item.Title = String.Format("<a href='{0}'>{1}</a>",
url, rep.GetDocumentTitle(doc));
}
item.Description = String.Format("{0} ...",
descriptionTxt);
item.Date = doc.DateModified.ToShortDateString();
item.Related = String.Empty;
item.Url = String.Empty;
results.Add(item);
}
return results;
}
Portal development
179
/// <summary>
/// Checks if the user is allowed to see the page.
/// </summary>
/// <param name="page"></param>
/// <returns></returns>
private bool IsAccessAllowed(PageEntity page)
{
if (page != null && page.PageRoles != null &&
page.PageRoles.Count > 0)
{
foreach (PageRoleEntity role in page.PageRoles)
{
if (SecurityUtility.IsUserInRole(role.RoleId))
return true;
}
return false;
}
return true;
}
/// <summary>
/// Gets page search result template.
/// </summary>
/// <returns></returns>
public ISearchEngineResultTemplate GetTemplate()
{
MonoXSearchTemplate mTemplate = new MonoXSearchTemplate();
mTemplate.TemplateFileName = TemplateFileName;
return mTemplate;
}
#endregion
}
}
15.12 Caching
MonoX engine provides excellent performance and scalability for your applications. However,
sometimes you will need to squeeze out every bit of performance from your server, and no matter how
solid the base engine is, and how good your coding skills are, you may hit the machine limits.The
critical parts of your application will typically include database access and page rendering. To help you
deal with issues caused by situations that demand significant processor time or other resources,
MonoX provides a powerful caching infrastructure, that allows you to use a number of techniques to
store page output or application data across HTTP requests and reuse it. Thus, the server does not
have to recreate information on each subsequent request, saving time and resources.
To illustrate the importance of proper caching strategies in high availability applications, we performed
a series of tests using a very common server hardware: 4-core Intel Pentium III Xeon processor, 4Gb
RAM, 7200 SATA HDDs, 100 Mb NIC with Windows 2003 / IIS 6. SQL Server 2008 was installed on
the same machine. Note that numbers would be much higher on a more powerful hardware, not to
mention separating Web and database server and various Web farm configurations, but we were
trying to simulate a typical real-world hosting scenarios. The tests were performed using Microsoft's
WCAT performance testing tool, with a total of 500 virtual clients running on a separate client
machines.
Since different results will be achieved in different environments, we started by measuring the
response for 10 different static HTML pages taken from a demo MonoX site. Pages vary in size from
30-60 Kb - note that much larger throughput could be achieved with smaller pages, but again, we
wanted to simulate a standard scenario.
Version 4.7 - 03/01/2013
Portal development
180
Portal development
181
Since demo sites uses moderately complex modules (blogs, groups, photo albums, friend lists) that
require interaction with database and powerful rendering capabilities, the effective number of requests
was cut down to one third of the starting number. Additionally, the CPU time spiked up to almost 80%.
Additionally, average time to first byte rised up to almost 3 seconds. This time we had enough
bandwidth, but the server was not able to push more than 150 transactions per second.
Portal development
182
% Processor Time
16.11
MBits/sec
94.42
This test clearly illustrates the power of full page caching. The performance measured in transactions/
sec is identical to the static benchmark scenario, due to the fact that pages are served from fast output
cache and all of the page lifecycle events, database calls and other resource intensive operations are
executed only at the initial page hit. Once again, the network interface is fully saturated, and there is a
possibility of significant improvement by adding a faster NIC.
Portal development
183
MonoX automatically invalidates the cached version of a page on POST requests. Administrators can
always track the caching status of the page in the administrative toolbar and force it to refresh if
needed:
Note that MonoX by default caches different versions of a page based on four criteria: user roles array,
raw URL, current application and language. This ensures that users in different roles (for example,
"ordinary" users and administrators) do not get the same version of the page. Additionally, each
physical page can hold multiple versions for different URL rewriting rules, applications and localization
settings.
Of course, you can add your own VaryBy criteria interactively (see the screenshot above) or using the
markup.
More advanced scenarios require the usage of dependencies: for example, blog page can be
Version 4.7 - 03/01/2013
Portal development
184
invalidated from several external page (back end administration). To achieve this, we could use
something similar to the following code that is already present in the Blog.aspx:
if (this.CacheDuration > 0)
{
if (UrlParams.Blog.BlogSlug.HasValue)
this.CacheDependencyKeys =
GetPageCacheKey(MonoSoftware.MonoX.Repositories.BlogRepository
.CacheParamMonoXBlog, UrlParams.Blog.BlogSlug.Value);
}
Now when an external page needs to invalidate the cached copy of the page, all you have to do is:
this.InvalidateCacheKey(BlogRepository.CacheParamMonoXBlog,
post.Blog.Slug);
Note that by default caching is turned off for administrators - set the
EnablePageOutputCacheInAdminMode setting to true if you want to enable it.
Also note that VaryByCustom feature relies on overriding the GetVaryByCustomString(...)
method in Global.asax. If you are going to use the Global.asax functionality in your custom projects,
please create your Global.asax in the root of the application (it must inherit from MonoSoftware.
MonoX.Global) and remove the following files from the default installation, if present:
PrecompiledApp.config, bin/App_global.asax.compiled and bin/App_global.asax.dll.
15.13 OpenSocial
The number of social networking platforms has been growing at a steady rate over the last couple of
years, and developers need to keep up with a growing list of site-specific APIs. To overcome this
problem, the OpenSocial group was formed in 2007 to define a common API for social applications
across multiple websites. MonoX includes the support for the OpenSocial Server API 1.1 from version
4. To the best of our knowledge, it is the first downloadable ASP.NET CMS application with such level
of support for the OpenSocial standard.
Below is a brief technical overview of the OpenSocial server implementation.
OpenSocial server is standalone library that handles oAuth authentication plus REST and OpenSocial
protocol details. To enable OpenSocial server you will need to add the server configuration section in
the web.config:
<configSections>
<section name="openSocial" type="OpenSocial.Configuration.
OpenSocialConfiguration, OpenSocial"
requirePermission="false" />
</configSections>
Additionally, you have to specify MonoX-specific implementation details:
<openSocial tokenManager="MonoSoftware.MonoX.BusinessLayer.
OAuthTokenManagerBLL, MonoX"
authorizationEndpoint="/MonoX/OpenSocial/OAuth.ashx"
authenticationPage="/MonoX/OpenSocial/OpenSocialAuthorizationPage.aspx"
dataAccessAdapter="MonoSoftware.MonoX.OpenSocial.
MonoXOpenSocialDataAccessAdpater, MonoX" />
All configuration attributes displayed above are required.
tokenManager points to the class that implements the oAuth token manager that subsequently
requires implementation of the two interfaces: DotNetOpenAuth.OAuth.ChannelElements.
ITokenManager and DotNetOpenAuth.OAuth.ChannelElements.
IServiceProviderTokenManager. Both interfaces are a part of the dotnetOpenAuth thrid party
Version 4.7 - 03/01/2013
Portal development
185
System;
System.Security;
DotNetOpenAuth.OAuth.Messages;
MonoSoftware.MonoX.DAL.EntityClasses;
OpenSocial.Service;
namespace MonoSoftware.MonoX.OpenSocial
{
public partial class OpenSocialAuthorizationPage : BasePage
{
#region Properties
private OaTokenEntity _currentToken = null;
protected OaTokenEntity CurrentToken
{
get
{
if (_currentToken == null)
{
ITokenContainingMessage requestTokenMessage =
OpenSocialOAuthServiceProvider.PendingAuthorizationRequest;
_currentToken =
(OaTokenEntity)
Portal development
186
OpenSocialOAuthServiceProvider.ServiceProvider.TokenManager.GetRequestToken
(requestTokenMessage.Token);
}
return _currentToken;
}
}
#endregion
#region Page Events
protected void Page_Init(object sender, EventArgs e)
{
if (!Page.User.Identity.IsAuthenticated)
{
throw new SecurityException();
}
btnAllow.Text = MonoSoftware.MonoX.Resources.DefaultResources.
OpenSocial_Allow;
btnDeny.Text = MonoSoftware.MonoX.Resources.DefaultResources.
OpenSocial_Deny;
btnAllow.Click += new EventHandler(btnAllow_Click);
btnDeny.Click += new EventHandler(btnDeny_Click);
}
protected void Page_Load(object sender, EventArgs e)
{
}
#endregion
#region UI Events
protected virtual void btnDeny_Click(object sender, EventArgs e)
{
OpenSocialOAuthServiceProvider.PendingAuthorizationRequest =
null;
}
protected virtual void btnAllow_Click(object sender, EventArgs e)
{
// Use OpenSocialOAuthServiceProvider for handling OAuth
tokens
var tokenManager = OpenSocialOAuthServiceProvider.
ServiceProvider.TokenManager;
// Pending authorization request is passed through session
var pendingRequest = OpenSocialOAuthServiceProvider.
PendingAuthorizationRequest;
var requestToken = CurrentToken;
requestToken.UserId = MonoSoftware.MonoX.Utilities.
SecurityUtility.GetUserId();
// You can set token expiration date using requestToken.
ExpirationDate
// e.g. requestToken.ExpirationDate = DateTime.UtcNow.AddHours
(3);
// Use requestToken.Scope for a scope of permissions requested
tokenManager.UpdateToken(requestToken);
var response = OpenSocialOAuthServiceProvider.
Portal development
187
AuthorizePendingRequestTokenAsWebResponse();
if (response != null)
{
// The consumer provided a callback URL that can take care
of everything else.
response.Send();
}
}
#endregion
}
}
OpenSocialOAuthServiceProvider is a static class inside OpenSocial server library that provides
methods for handling OAuth authorization tasks. When a service recevie user authorization request
token it will store this request in a session and transfer execution to the authentication page. Using this
token we can access OaTokenEntity, a MonoX object representing OAuth token, and set all required
parameters before authorizing it. In this case we expect consumer to provide a callback URL in its
request parameters; a scenario where callback url is known to the server in advance is not currently
covered in MonoX.
Now that we have covered the OpenSocial server configuration we can proceed to the server
implementation. OpenSocial server is implemented using WCF and requires .NET framework 3.5 to
run. Currently it implements three OpenSocial services - people, groups and activites - and supports
JSON and XML output formats, while JSON is the only supported input format at this moment.
The OpenSocial server is running inside the same process as MonoX CMS. This allows for the easy
creation of the authentication page as we can use all the goodies MonoX offers. On the other hand, all
service requests are pushed through asp .net request lifecycle and this can affect the behavior of the
service. We have experienced several problems when Forms authentication is activated. One of the
features of the FormsAuthentication module is that it will redirect all responses with 401-unauthorized
status to the login page. As a result, the client will see 301-moved status instead of 401-unauthorized.
To avoid this we had to add another module that disables FormsAuthentication module when service
request is processed. In order for OpenSocial server to work correctly with Forms authentication, you
have to add the OpenSocialModule in your cofiguration:
<httpModules>
<add name="OpenSocialModule" type="MonoSoftware.MonoX.OpenSocial.
OpenSocialHttpModule, MonoX" />
</httpModules>
This setting will disable FormsAuthentication module for a default location. Subsequently, it is not
possible to move the OpenSocial server to a different location without changing the the module. The
server will work correctly with default MonoX settings, but you should be careful if you're adding new
modules to the pipeline and you want to use the OpenSocial server.
The default location of the OpenSocial server is "/MonoX/OpenSocial/OpenSocial.svc". To test if the
server component is running, you can type this address in your browser (for example, http://
yourdomain/MonoX/OpenSocial/OpenSocial.svc) and you should get the XRDS discovery
response with list of supported services and their endpoints:
<XRDS xmlns="xri://$xrds">
<XRD version="2.0" xmlns="xri://$XRD*($v*2.0)" xmlns:simple="http://
xrds-simple.net/core/1.0">
<Type>xri://$xrds*simple</Type>
<Service>
<Type>http://ns.opensocial.org/2008/opensocial/people</Type>
<URI>http://yourdomain/MonoX/OpenSocial/OpenSocial.svc/people</URI>
</Service>
<Service>
Portal development
188
<Type>http://ns.opensocial.org/2008/opensocial/groups</Type>
<URI>http://yourdomain/MonoX/OpenSocial/OpenSocial.svc/groups</URI>
</Service>
<Service>
<Type>http://ns.opensocial.org/2008/opensocial/activities</Type>
<URI>http://yourdomain/MonoX/OpenSocial/OpenSocial.svc/activities</URI>
</Service>
</XRD>
</XRDS>
If you get a similar response your OpenSocial server is up and running. By default, all resources are
protected and you have to authenticate to access them through OpenSocial server. To setup client
oAuth provider set all endpoints - authorizeUrl, accessTokenUrl and requestTokenUrl - to
OAuth.ashx handler (its default address is http://yourdomain/MonoX/OpenSocial/OAuth.
ashx).
OpenSocial server is currently in a test phase and at the moment you can't register applications with
MonoX. You will need to use a test consumer to authenticate with OpenSocial server - use
"Ud4IhqeyIEmEHEmApOWN-A" as the applicationKey and "anonymous" as the secret value. You can
find all consumer details in the OaConsumer table inside the MonoX database. Application key is
constructed from the consumer id as its ShortGuid string representation, while secret is a column in
the DB table and can be of any value.
Part
XVI
Resources
Resources
16
190
Resources
MonoX is built upon standard ASP.NET tools and techniques, so there are many additional resources
that will help you learn how to use it efficiently in the shortest amount of time. Listed below are just a
few excellent resources on ASP.NET and Web part programming. Please do not hesitate to contact us
if you need more information on these topics.
Books
ASP.NET 2.0 Web Parts in Action: Building Dynamic Web Portals (by Darren Neimke)
The Web Part Infrastructure Uncovered (by Teun Duynstee)
ASP.NET 2.0 Website Programming: Problem - Design - Solution (by Marco Bellinaso)
Professional Web Parts and Custom Controls with ASP.NET 2.0 (by Peter Vogel)
Articles
Webcasts
MSDN Events Reloaded - Microsoft ASP.NET 2.0 Overview (Level 200)
MSDN Webcast: ASP.NET Soup to Nuts: Web Part Controls (Level 200)
MSDN Architecture Webcast: Introduction to ASP.NET Web Part Framework (Level 200)
MSDN Webcast: Enabling Customizable User Interfaces in ASP.NET 2.0 Web Applications (Level
200)
MSDN Webcast: Applying ASP.NET Web Parts: Building an RSS Aggregation Web Site (Level 200)
MSDN Webcast: Introduction to ASP.NET 2.0 Web Part Framework (Level 300)
People
David Barkol
Teun Duynstee
Mike Harder
Scott Guthrie
Darren Neimke
Part
XVII
Credits
Credits
17
192
Credits
MonoX project was partially funded by the European Union's PHARE programme.
Mono Ltd. wishes the acknowledge the usage of the following high-quality open source and third-party
software libraries:
XML-RPC.NET
DotNetOpenId
Apache log4net
Lucene.Net
LLBLGen Pro
RadControls for ASP.NET Ajax
SharpZipLib
Smart Thread Pool
NVelocity
SocialAuth-net
Index
Index
-A-
-E-
Edit mode
-BBlog management 72
Blog Web parts 78
Browse mode 42
Built-in themes 131
Business rules 160
Groups
107
-H-
Caching 179
Captcha Web part 84
Catalog mode 43
Chrome 37
Chrome templates 164
Comments 101
Connect mode 45
Contact form Web part 84
Content versioning 47
Creating new MonoX projects 153
Creating new portal pages 155
CSS adapters 163
Custom administration controls 173
Custom administration modules 74
Custom master pages 133
Custom themes 164
46
-G-
-C-
155
163
-IInstallation 12
Installation requirements 12
Installation wizard 13
Integration with third-party software
Invitation list 109
-JjQuery Mobile
148
90
29
193
Index
Provider model
Repositories 160
Role management 62
Role provider 29
RSS providers 173
RSS reader Web part 97
-MMain workspace 37
Master pages 120
Membership provider 29
messaging 109
Microsoft SharePoint 9
Mobile development 148
MonoX Configuration 20
MonoX features 8
MonoX page structure 120
MonoX pages 120
MonoX project structure 152
-N-
-TTheme 129
Themes, templates, chromes
71
URL Rewriting 21
User management 60
User profile Web part 117
User view 41
126
-PPage compression 23
Page management 54
Password recovery Web part
People search 112
Personalization 137
Personalization provider 29
Personalization scope 137
Photo gallery 113
Poll management 68
Poll Web part 96
Portal administration 50
Portal development 152
Portal views 41
164
-U-
-OOffline editing
29
-R-
145
Navigation menu 93
New users list 112
News management 62
News Web parts 93
Newsletter management
194
-V96
Verbs 37, 38
Video player 105
ViewState optimization
23
-WWall 116
Web part basics 77
Web part connections 168
Web part framework 9
Web part menu 37, 38
2008 - 2013 Mono LLC
Index
195