XHTML and CSS

One of the  great things in 2.0 .NET is that it supports XHTML compliance. For those who don't know XHTML is a newer w3c standard meant to replace HTML and, in a nutshell, is just a stricter version of HTML.

XHTML compliance is really just the first step towards compliance with the w3c Web Content Accessibility Guidelines (WCAG) and the US Government Section 508 guidelines. The big picture goal is to make the web site content accessible to the widest audience of people including those with handicaps that make web browsing difficult by supporting the widest variety of browsers and devices including everything from screen readers to electronic braille pads. The new standards and guidelines are desinged to do just that and I definitely want mojoPortal to comply with these guidelines wherever possible.

The biggest things to be aware of when trying to convert HTML to XHTML are that everything is lower case and eveything must comply with standard xml rules. Some of the HTML tags that did not require formal closing tags now do require them. <BR> for example must be <br /> so that it has and end tag.

The change in 2.0 ASP.NET is that the server controls like TextBox, Calendar, DataGrid, etc render XHTML compliant markup. You still have to make your own markup that wraps these controls compliant.

In mojoPortal I have had the forsight in most places to use <br /> and other XHTML compliant forms even before 2.0 .NET just to be prepared but there are some places where I had non-compliant markup. I am going through all the pages and controls now in the 2.1 branch and fixing these things, its really not that big a job. What is a big job is changing from html table driven layout to using div and span elements with css. This is fairly tedious work for me to go through the whole project and do this and these changes will likely require some effort to convert existing custom skins for those upgrading when I make the next release. if it seems like a lot of work to you just remember I did it for the included skins . When I'm done you should be able to tell what you need to do to upgrade your custom skin by looking at the included layout.Master files and style.css files

At first I thought I would wait and convert to web parts before making this change but I decided to do this first so that I will have cleaner markup when I get to that step. Best to get the skinning and layout really nailed down first. This will be a solid foundation for meeting our compliance goals.

more 2.0 progress and hosting change

I have been making major progress in the 2.1 branch and am happy to report that this site is now running on a build from the 2.1 svn branch and using these new 2.0 .NET features:

  • MasterPages, in place of Paul Wilson's MasterPages we used in 1.x
  • Themes (a very powerfull way to to control the look of server controls) I have put skeleton settings for all the major server controls in the theme.skin files so you can easily see and edit the wide range of properties available for each control.
  • ASP.NET Menu control, you will be able to use this, or TreeView or skmMenu
  • a custom SiteMapProvider
  • some conversion to the new configuration api but still more to convert

After running on mono for over a year, mostly at grokthis.net, it is with mixed feelings that I have moved for the time being back to windows hosting provided by Trendoid Internet Services.

While running this site on mono is a primary goal for the project, running on the latest version of mojoPortal software is even more important and to do that I need a 2.0 .NET environment. This is after all how I do testing, I run it on my sites before I make a release, you know, eating the dogfood and all that. I will be continually testing on mono and as soon as its possible to run with stability on the 2.0 mono stack this site will be moved back to mono hosting.

We will of course continue to support the 1.x branch of mojoPortal for mono users until the 2.0 stack is ready

I've started a page to list hosting companies that are hosting mojoPortal sites
http://www.mojoportal.com/hosting.aspx

I can personally recommend the ones listed there now. If you know of any more that you recommend let me know and I'll add them to the list.

Next up is work on a custom Providers for Personalization and Membership. After those are in place I can start to explore conversion to WebParts

More consistent creation of initial site data

I committed some stuff to svn today that will make it easier going forward to have consistent data initialisation accross the different supported dbs. It will no longer be needed to run the script to create initial site data during installation, only the table creation script and depending on the db maybe a stored procedure script will need to be run.

maintaining the different data creation scripts for each db as new features are added will no longer be needed

I encapsulated the data creation logic up in the business layer in a new class, mojoSetup.cs.

When the application starts it will check the count of rows in the mp_Sites table and if there are 0, it will create the initial site data by calling mojoSetup.CreateInitialData.

If you use the multiple sites on one installation feature of mojoPortal, it will call mojoSetup.CreateNewSiteData whenever you create a new site to populate the new site with the standard pages.

The content for the initial data and new site data comes from new files I added in the /Data/MessageTemplates folder

For example the intial home page content comes from en-US-InitialSiteHomeContent.config

You can localize these by creating your own files with a prefix matching the culture setting you have in the Web.config Culture key and dropping your files in the same folder.

For example a German translation of the same file would be named:
de-DE-InitialSiteHomeContent.config

If it can't find the file for the culture you have set in your Web.config file, it will fall back to using the english file.

As always any contributions of translated files is welcome and many thanks to all those who have contributed the culture files and translations already.

Will mojoPortal run on a Nokia 770?

Jospeh Hill recently added Sqlite support to mojoPortal mainly to make it easier to fit on the mono-live cd.

But Sqlite can also be embedded in a device and there seems to be a movement afoot to try and get mojoPortal running on the Nokia 770. The Nokia 770 is not a phone, I would be tempted to call it a PDA, but the branding used by Nokia calls it an Internet Tablet. Whatever you call it, it looks pretty cool to me!


I'll be following that story with interest!

The good stuff is happening in the 2.1 branch of svn

Those of you playing with mojoPortal from the Subversion repository using TortoiseSVN, if you are using VS 2005 I recommend you get:

svn+ssh://anonymous@forgesvn1.novell.com/svn/mojoportal/branches/2.1
rather than /branches/2.0
2.0 was the intial build against the 2.0 .NET runtime but it did not use any of the new 2.0 features.

All the fun stuff is happening in the 2.1 branch.

So far I've

  • Converted from Paul Wilson's MasterPages to the new intrinsic ASP.NET MasterPages. This was very easy thanks to Paul's version being very similar to the shipping 2.0 version from MS
  • Came up with a way to store the theme.skin file for the new Theme feature in ASP.NET in the site specific skin folder along with the other elements like layout.Master, style.css, and supporting images. This keeps everything together and keeps things private between sites when running multiple sites from one mojoPortal installation. Themes allow you to set all the visual properties for the built in server controls. Now its a tedious task of moving markup off the controls in the pages and modules into the theme.skin file but it will be well worth it to gain complete control of control presentation from the skin. I predict more interesting looking skins after this!
  • Implemented a SiteMapProvider, mojoSiteMapProvider on top of the mojoPortal SiteSettings object. This is used to bind to the new Menu or TreeView controls and also the new SiteMapPath control which provides Breadcrumbs and will probably replace our current breadcrumbs control soon.
  • I setup the new Menu control and styled it in the theme.skin fairly close to how the older skmMenu is styled in the current skins. I also moved the style for the blog calendar and events calendar into the theme.skin file. I plan to make the menu have 3 options you can set in to enable either the new Menu, the new TreeView, or the skmMenu for the menu. I still need to style the treeview at least a little


I will be working on implementing the membship api and trying out conversion to WebParts in the near future after I get some more of the theme grunt work done.

Note: the 2.x branch of mojoportal is Windows only at this point, it will not run on mono until the mono 2.0 implementation catches up. It will probably be a while before this happens so mono users should stick with the 1.x branch aka trunk