Issues and Strategies for Moving to Html 5

Primer on Html 5

There has been a lot of buzz in the blogosphere about HTML 5 lately, from google endorsing it as the future to the W3c dropping efforts on XHTML 2 to focus on HTML 5. The consensus seems to be that HTML 5 is the future and we should start planning on using it in the future and can even use it now. It should be noted however that HTML 5 is not a standard yet, but only a draft and is subject to change before it becomes a standard and current browser support is a mixed bag.

Some useful links:

23 Essential Resources for Html 5

Misunderstanding Markup - comic that explains HTML 5 vs XHTML.

Real World Issues for a Content Management Systems To Switch to Html 5

So from reading the above linked articles and others it seems like we can easily change to the HTML 5 DocType and things will be pretty much compatible at least as long as we don't use any of the new HTML 5 elements that might not be supported in all browsers yet. In mojoPortal the doctype is declared in the layout.master file of a skin so it can be a personal choice wheether to change to the Html 5 doctype now or not. Currently the doctype in our skins is XHTML 1.0 Transitional, so to switch to HTML 5 we would just change this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

to this:

<!DOCTYPE html>
<html>

In fact I've done that here on mojoPortal.com, though I'm running a newer build than the current release (dogfooding for the coming release), so you should probably wait for the next release to do this if you want to. One of the things I've added is an option on our validator link to configure it for HTML 5 instead of XHTML like this in layout.master:

<portal:XhtmlValidatorLink id="lnkw3cValidator" runat="server" UseImage="false" Html5="true" />

This Html5=true merely changes the label and/or image on the validator link to HTML 5. I've also added a property IncludeHtml5Script to our IEStyleIncludes control

<portal:IEStyleIncludes id="IEStyleIncludes1" runat="server" IncludeHtml5Script="true" />

if set to true we inject the javscript as mentioned in this article inside IE browser comments to make it possible to use some of the new HTML 5 elements in IE 8 (though I'm not actually using them yet to avoid compatibility issues you could use them in custom features). So it renders in the page like this:

<!--[if IE]>
<script type="text/javascript">
document.createElement("header");
document.createElement("footer");
document.createElement("nav");
document.createElement("article");
document.createElement("section");
</script>
<![endif]-->

 

Ok But Aren't There Any Gotchas?

I got kind of excited about changing the doctype to Html 5 just in preparation for the future even though we can't use the new Html 5 elements yet without breaking some browser compatibility, especially for IE 6. I'm sick of caring about IE 6 myself and admittedly some of our skins are a little funky in IE 6 today and I don't care enough to fix them though some of them work pretty well too. Its long overdue for users of IE 6 to upgrade. But its still in wide enough use that many web site owners do care and you can make skins that work well in IE 6 using mojoPortal its just more work tweaking the IESpecific.css file and testing in IE 6. Anyway after changing to HTML 5 doctype on mojoportal.com and testing in IE 6 and not seeing any major problems I thought I would change the included skins to HTML 5 for the next release. I did this yesterday but reverted it today. I had been testing using the wc3 validator using the direct input method, viewing the source of the page and pasting it into the validator and was happy because it was reporting it as valid HTML 5. However after testing some pages on mojoportal.com using the validator link or using the url input method I got different results. It seems there is a bug in the w3c validator where if you use direct input it passes things that should not pass but when you use the url it finds problems on the same page it validated as direct input.

Specifically what I ran into was border is not a valid attribute on img and frameborder and scrolling are not valid attributes on iframe, however the presence of these attributes does not seem to be detected correctly with the direct input validation but it is detected using url validation. I reported this bug to the w3c public mailing list tis morning. Fixing the border on img was fairly easy so I did that, you can easily set the border on img using css so its really not needed to use border="0" to remove a border for example. However the iframe issue is a lot more of a problem. If you remove frameborder="0" from an iframe there is no way to remove the 3d border that is rendered in current browsers using CSS. I don't think there is a working CSS alternative to scrolling="no" either. So for the moment I choose to just live with it that a few pages on mojoportal.com won't validate but for the skins included in mojoPortal I decided it was pre-mature for me to change the doctype to HTML 5 and changed it back and leave it up to users if they want to do that. 

As previously mentioned, HTML 5 is currently just a draft so I don't want to get too concerned with validation against it while its still draft. Who knows since current browsers don't work well look right with iframes that don't use frameborder=0 and scrolling=no, maybe they will change their minds about dropping these attributes or give us an HTML 5 Transitional to validate against that will allow these for backward compatibility.

So where does that leave us?

Well I think we have to proceed cautiously and very slowly toward HTML 5 but we are very limited in what we can do in mojoPortal without breaking compatibility especially for public facing features. If I were to start using new elements and attributes of HTML 5 it will break validation for those who choose to continue using the XHTML 1.0 Transitional doctype in their skins and it would probably break functionaility and visual layout in some browsers. Potentially we could move forward in the admin pages and other non public facing pages but the benefits would be minimal. The real value of HTML 5 will be when we can use it for public facing pages, the improved semantics available using the new elements like header, footer, section, nav, article, aside etc will be of most value in public facing pages, but we really can't move there yet because of the mixed browser support. Once HTML 5 graduates to a Standard instead of a draft and browser support for the new elements is more widespread it will be tempting but we will still be faced with that fact that many people use old browsers, perhaps even we will be waiting for the end of life of the current crop of browsers anxiously like we are waiting for IE 6 to go away today. The benefits of changing to HTML 5 doctype today are minimal and there is the minor downside of losing validation on some pages where we are using iframes and maybe other issues that I have not bumped into yet. HTML 5 does indeed look like the future but the future is not here yet unless you are willing to give up support for IE 6 and possibly even IE 7 as I'm not sure if the javascript trick for lighting up the new elements in IE works in IE 7 as it does in IE 8. (update it does work) I for one don't see the merit in building browser specific applications, the huge benefit of the web has been the ability to write apps that work in all browsers though of course there have been bumps along the way like supporting Netscape 4 was back in the day and like supporting IE 6 is today, it takes some extra work. I don't want to try and move forward too fast and find myself battling to get things working in all browsers. I'm tempted to change my doctype on this site back to Xhtml 1.0 Transitional since I'm not really getting any benefit from changing to HTML 5 doctype though I have not had any major problems other than some validation issues everything seems to work the same and nothing is visually different in any of the browsers I tested.

UPDATE 2009-08-03

I actually tried this javascript create element technique with IE 6 and it seems to work! So even though the article says IE 8, it seems it should also work for IE 6 and 7. So maybe it is possible to switch to Html 5 and use the new elements. So the remaining issues would be that there will be some things that don't validate like framborder=0 and scrolling=no that we would still need to use. And the problem still remains that if I were to start using the new html5 elements that would mean that all users of mojoPortal would need to change to the Html 5 doctype because the new html 5 elements are not valid for Xhtml.

 

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

Super Secret Meeting at Microsoft via Channel 9

Woot! I'm in a video on Channel 9

http://channel9.msdn.com/posts/Glucose/Hanselminutes-on-9-Inside-Secret-Microsoft-Meeting-Rooms-What-Laptop-do-Alpha-Geeks-Use/

Having fun in Redmond!

UPDATE 2009-07-09

Thought I should update this post since it was really more like a tweet than a blog post.

So as you see in the video I was invited out to Redmond for a meeting at Microsoft. I had thought maybe I would be able to talk about it when I got back but I can't talk about it yet. For sure I will be able to tell all about it but not yet, probably in a month but there is not a specific date so don't hold me to it. For now you can be sure that I will talk about it at some point and lets enjoy the mystery and suspense for a little while ;-), but don't expect something really earth shaking or you may be dissappointed. 

I think I can say this without getting into trouble. Microsoft wanted to talk with a number of people about something they thought might interest us, they wanted to know if it does interest us and they wanted input and feedback. There are others that were not in the video or the meeting that are providing their feedback as well so don't over interpret the combination of people in the video. This was during a restroom break so some people were out of the room as well. For my part I can say I am interested in it and indeed excited about it.

Other than that, for the moment I can only share how much I enjoyed this opportunity to meet some folks I've followed in the blogosphere like Scott Hanselman, Phil Haack, and Bertrand Le Roy, as well as some other Microsoft folks who are very brilliant but I had not known of them before. I also got to meet some great folks involved in the Web Application Gallery which was very nice.

You may also be interested in my impressions of the experience visiting the Redmond campus. It turns out they do not all ride around on jetpacks as I had supposed ;-) Nor do they all think with one hive mind, it seems they are all quite individual and have opinions in common with one another and also differing opinons among them just like most cases where there are lots of people. A meeting at Microsoft did not strike me as much different than meetings at other companies. I did not see the entire campus of course, the parts I saw were newer from what I understand. It seemed a lot like a nice college campus appended to a classy mall and food court. I saw the company store and even got to poke around on a Surface in the little museum they have.

I also got to meet Shaun Walker and Scott Willhite of DotNetNuke. You may wonder what was it like fraternising with the competition. While we acknowledged that we do compete I found them to be really nice guys who I have a lot in common with and I felt some sense of kinship with because of our common heritage in IBuySpy and because it was easy to talk with them about our experiences as open source developers in the .NET world. I have always admired and respected what DotNetNuke has accomplished as a succesful open source project and now that I know what nice guys they are I admire and respect them even more. I would even say that their success has been a model which gives me hopes that I can achieve my own aspirations for mojoPortal. They proved it was possible to build a business around open source in the Microsoft stack and I'm not sure I would have thought it possible enough to pursue it myself had they not done it first.  I was very glad to become friends with them. I have not yet achieved the business success that I'm hoping for with mojoPortal but I feel I am making progres and will get there.

dinner with Microsoft

Bottom row Bertrand Le Roy, Phil Haack, and Bradley Millington, top row myself and Shaun Walker, this was at dinner, not the greatest photo, my iPhone is not the new model so the camera is not so good especially in dark lighting. 

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

Next Release of mojoPortal WebStore Will Empower Musicians

Just a quick note to share some cool improvements I've been working on in the WebStore feature for the last couple of days. As a musician I've often thought I should make an mp3 store to make it easy for musicians to sell mp3 files on their own sites. For a while I figured I would implement this as a separate feature and possibly even make it a for sale add on feature so I could make a little money on it. But recently I thought why not just enhance the main web store to support this scenario since we already suport download products all that was really needed was the ability to have a teaser file and a media player to allow previewing a clip of an mp3 like in the iTunes store and other media stores. So I implemented the additional logic to have a teaser file and I also integrated the super simple Yahoo Media player. You can see it in action now on storedemo.mojoportal.com.

screensot of mp3 store with play buttons

So now you will be able to upload teaser clips for mp3 products and automatically have play buttons for them. You can easily make the clips using the free mp3splt, thats how I made them for the demo.

The teaser file implementation may also be useful for other scenarios like selling PDF files, you could have a free chapter or fragment of the full content to help encourage purchase of the full file.

Look for this in the next release of mojoPortal.

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal 2.3.1.0 Released

I'm happy to announce the release of mojoPortal 2.3.1.0 available now on our download page.

This is primarily a bug fix release.

Fixed Issues

Fixed an issue in the WebStore where using EURO currency with PayPal the amounts returned from PayPal were not being correctly parsed.

Fixed a bug in CryptoHelper that was causing an error in some environments when encrypting or decrypting data.

Fixed missing titles on some edit pages that were a side effect of our refactoring of page titles to give more control over them in the last release.

Downgraded YUI from 2.7.0 to 2.6.0 when using the Google CDN, because of a bug in YUI 2.7.0 where an FCKeditor inside a YUI tab sometimes was not visible in IE.

Added required field validators in the Content Style Template editor because leaving the element blank could cause the FCKeditor to throw an error.

Implemented a Content Delete Handler provider system to make a more consistent way of deleting related content when a module instance is deleted. Previously some features were not cleaning out their data when a content instance was deleted.

Last release we introduced support for search results highlighting. This brought with it a possibility for an information disclosure if the user had view permissions on the page but not the module. In the past only the page title was shown so there was no disclosure of the content but with fragments of the actual content now being shown in search results we needed to store the module view permissions in the search index in order to be able to filter search results based on those roles in addition to page view roles. In order to get the view roles into your search index requires rebuilding the search index. In order to not break existing search indexes I had to keep the default to not filter by the module view roles otherwise since the roles are not in the exisiting index all search results would be filtered out. In a new installation the preferred settings are in user.config.sample so that new installations should always filter by module view roles. Those who upgrade and rebuild their search index should add this to their user.config file: <add key="SearchIncludeModuleRoleFilters" value="true" />
This issue only affects those who have content on a page filtered by module view roles in addition to page view roles and only if you are using search results highlighting.

There is a corresponding minor update release for Event Calendar Pro to make it write module permissions also to the search index for events. Customers can download the new 0.0.1.5 version from their purchase history.

Fixed an issue where our App Keep Alive feature did not work in IIS 7 using Integrated Pipeline mode.

Fixed an issue in our SmartCombo dropdown when using Chinese characters.

Fixed an issue in the Image Gallery where the Greybox did not work if the caption had an apostrophy.

Fixed a similar issue in the blog where a script error would occur in IE in the blog if Odiogo was enabled and the blog title had an apostrophy.

Previously some skins had corner rounders surrounding the PageMenu control but if there were no child pages for the current page in the SiteMenu then the PageMenu would not be visible but the corner rounders would still be there. We solved this by moving the CornerRounders into the PageMenu control and out of the layout.master. This way if the menu is not visible neither are the corner rounders.

What Else?

We now force the use of a plain text editor in iPhone because none of the wysiwyg editors can work in iPhone due to the way they create png images of the page for zooming. So even though the editor rendered correctly because javascript is supported, there was no way to click in the editors. So now you can edit site content, make blog posts or anything you like using the iPhone though it does require knowledge of html.

Based on user feedback, I implemented additional CSS classes and and example skin showing how to layout forms with the labels above the form fields. Whereas most of the skins have the label on the left side of the input, andreasvicklund-02 now has forms with the labels above the inputs. Also I think now all the Cancel buttons have been changed to links which was also suggested as a usability improvement.

There was also a request to add a per instance unique CSS class on Html content instances so that it is easier when you want to style a particular content instance different that the others. I implemented this so that there is a wrapper div with class=modulex where x is the module id. This allows you to easily overrid ethe styles for particular instance. I did the same thing for blogs and links and a few other places.

Updated Italian resource files thanks to Diego Mora.

 

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

mojoPortal 2.3.0.8 Released

I'm very happy to announce the release of mojoPortal 2.3.0.8, available now on our download page.

What's New?

Search Engine Improvements

The mojoPortal search engine now supports filtering results by feature and results highlighting, as well as support for Open Search with automatic discovery. A number of changes were made to what we store in the search index, so to take advantage of the new features requires changing some config settings and rebuilding the search index which may or may not be trivial depending on the size and activity level of your site. For backward compatibility we have kept the default settings such that the exisiting search index should continue to work as it has, but to take advantage of the new features you should put this in your user.config for a new installation before doing a search or for an existing site you can add these settings to user.config and then rebuild the search index.

<add key="DisableSearchFeatureFilters" value="false" />
<add key="SearchUseBackwardCompatibilityMode" value="false" />
<add key="EnableSearchResultsHighlighting" value="true" />

SEO (Search Engine Optimization) Improvements

I did a lot of analysis using the new free IIS SEO Toolkit and made a number of small changes based on the results. Its now possible for you to control the default title format for pages and to use extensionless urls in IIS 7.

Content Template Editor

Now you can create and save custom content templates and they will show up in the FCKeditor.

Content Style Editor

Its now possible for you to create and save content style templates that appear in the Style dropdown list in FCKeditor.

Skin Improvements

We include about 30 good looking skins in mojoPortal, but a number of the skins were designed for 800x600 screen resolutions so even though they were good looking it seemed to me that some of them were not being used very much because they are too narrow. So I made most of the narrow skins wider. Also we needed good examples of suckerfish style menus. The mitchinson-earthy skin had something close but it did not work very well so I re-implemented it using the jQuery Superfish menu and I made the mitchinson-earthy-alt1 which uses a vertical superfish menu. So now I think we have a lot of skins that be can useful as a starting point for customization. There is also a new Preview/Browse link in the Administration Menu > Site Settings page to allow you to easily preview the available skins.

Other Updates

Upgraded to the newest version of NeatUpload and the newest version of the AjaxControlToolkit.

Upgrade Notes

Customers who have purchased Event Calendar Pro and/or Form Wizard Pro, will need to upgrade to new releases of those products which have corresponding changes partly due to the newer version of AjaxToolkit. You can download the latest version from your order history under the "My Account" link.

Be sure to read an understand the changes to the search index and consider rebuilding your search index. If you have a custom skin you will need to add a new css class that is used to highlight the search results, the included skins all have this new css class:

.searchterm { color:black; background-color:yellow; }

 

 

 

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.