Posts From March, 2005

A New Release this Sunday

I'm planning a new release this sunday. 

New things to look forward to include support for PostgreSQL thanks to Joseph Hill of GotMono.com.  Also with much thanks to Joseph Hill, a new RSS Feed Aggregation module to allow you to show one or many feeds on a page.  Joseph sent me the code he is currently using on GotMono.com for the bloggers page and I turned it into a module that can be plugged into any page in a mojoPortal site.  You can configure the cache time, the maximum age of posts to show and a maximum number of posts to show per feed and a few other settings.

Also a few bug fixes and improvements.

Release 20050320 alpha

Well I didn't think I would make a new release one day after my last release but I was able to complete 2 important features yesterday and also found out about a bug in the data layer for MS SQL.

The new release includes the ability to move content modules between pages and also to create "pages" in the menu hierarchy that are just links to other pages which can be either on site or off site.  You can also configure whether to open the page in a new window.  There is a new page setting to Show Child Pages Menu, but this feature is not implemented yet and checking the box will have no effect.

If you installed yesterday's release you will need to add 4 new columns to the mp_Pages table, see the create tables script for details. If you are using MS SQL you should also update the stored procedures.
If you are trying to upgrade from any previous version, be sure and backup both your site and current db before you start making changes in case things get messed up and you want to go back.  Upgrading while the project is in the alpha stage is a manual process, I will try to add some guidlines under the Documentation menu soon.  Eventually I will have an automated upgrade process.

The bug that was fixed in the MS SQL data layer would only have revealed itself if you configured an Html Module for multiple items like articles or announcements.

I also added some documentation to the site today under Documentation > Creating Skins and Documentation > Securing mojoPortal

I will be upgrading this site and my demo sites to the new version sometime in the next few days.  If you are viewing the site while I'm doing the upgrade you may get a page not found error or some other server error but rest assured it will only be for a few minutes when it happens.

Update 3/21/2005
I just finished upgrading this site as well as the demo sites and my personal site to the new version

Release 20050319 alpha is now available

See the download page for details.  mojoPortal now supports multiple sites using one installation and db. 
Each site must have a different host name entered in the mp_SiteHosts table, if no matching host name is found the first site in the mp_Sites table is returned.  The sites sharing a single installation each have separate users and content but they do share the same culture.  To support a different culture, you still need a separate installation and db.

As always, if you have any trouble with mojoPortal, please post in the forums and I will try to help as soon as possible.

Next steps in the development plan

Support for PostgreSQL is coming soon thanks to Joseph Hill of GotMono.com!

Page/Menu hierarchy improvements.
Currently, you can't create more than one menu item that points to the same page and you can't create menu items that point outside the page hierarchy either on site or off site.  I am going to change this so you can create "pages" that just point to a link which can be an exisiting page in the site or an external link.  You will also be able to configure whether it opens in the same window or a new one.  Also I will implement a feature so that a page can be configured to automatically display  links to its child pages.  For example, consider the Documentation menu item on this site, it is really just a container menu for other pages with specific documentation.  With the current implementation I had to add an Html Module to that page and manually add links to its child pages.  The next version will have a checkbox in the page configuration to do this automatically.

Moving content modules to different pages is a much needed feature that should be pretty easy to implement.  It can be done now manually by changing the PageID of the module in the database but I will make this very easy to do.

Module Consolidation
Not long ago I added features to the Html Module to allow configuring it for multiple items to support articles and announcements.  Now I see that there is almost a feature overlap with the blog module.  If the Html module had RSS, Comments and Archive capabilities the blog module would not be needed because the Html module could be configured as a blog.  I am planning to create a new Content Module that will combine all these features and will also add a content rating system and the ability to attach a threaded discussion to any content.  At that point I will move the current Blog and Html Modules out of the core and into separate assemblies.  This will provide backward compatibility for users with exisiting installations that are already using the Blog and Html modules and will also provide a reference architecture for others who may want to build external modules that plug in to mojoPortal.

Search
I had been thinking I would use Lucene.NET as the search engine for the site but now I'm leaning back toward using traditional db search capabilities.  My reasoning on this is that pages in mojoPortal can be configured as only visible to users in certain roles. I think the search needs to take into account whether the user is logged in and what roles the user is a member of in order to only display content that the user has rights to view.  I can easily pass the user id as a parameter for searching in the db and limit results to content on pages the user can see.  I haven't figured out a way to do something similar with Lucene but I am open to suggestions if those of you more familiar with Lucene.NET see something I am missing.

Multiple Sites is working!

The new feature to run multiple sites on one web instance and database is working now and will be in the next release. You can check it out now using one of my 3 demo sites :

demo.mojoportal.com
demo2.mojoportal.com
demo3.mojoportal.com

All 3 sites are being served from the same folder and using the same db, though they all have completely separate users and content.  I've configured them each with different skins to make it easy to tell them apart.

demo.mojoportal.com is the root and admin site where you can see how the host names for the other sites are configured by clicking the Admin menu after you log in. You can even change the skins on the other sites from demo.mojoportal.com.  I do have separate Virtual Hosts for each site configured in apache, but they all point to the same folder.  Having multiple Virtual Hosts in apache is not neccessary for it to work if you have the site configured to respond to all requests on the ip address, but I need them to host multiple sites on the same ip address including but not limited to these 3 demo sites.

Feel free to login as admin on these sites and play around, they all use admin@admin.com with the password admin

New Features on the Horizon

multiple sites on one web instance and db
I have been thinking about supporting multiple sites on one web instance and one db for a while and have finally got around to working on it since the design has finally coalesced in my mind. It ties in with thinking I've been doing about the role hierarchy within the site and my future plans to support content workflow.

The way it would know which site to use is by the host name in the url.
 
Say the ip address of your site is 1.1.1.1 and you have 2 (or more) DNS host records both pointing to that ip address for example
www.joeaudette.com
www.mojoportal.com

I would have a SiteHosts table in the db to connect the host names to site ids. Then using the host name in the request I can easily get the site id. There would be a fallback to use the first site in the table if no matching host name is found.
There will also be a need to separate and secure file system resources between sites. Things like gallery images for example should not be accessible between sites. I'm thinking I could create folders named based on the site id and store any site specific stuff beneath that.

There will have to be a property on each site indicating whether it is allowed "Server Administrator" priveleges. Sites with this setting will be able to create new sites and setup the site hosts. Also it would be nice if these admins could specify which modules are available to each of the non-serveradmin sites.  This way someone could do hosting with free for some features and charge for others. I'm thinking normally there will only be one site configured this way to administer the others.

search
Any good site needs to have a good search engine. DotLucene seems to have what I need. I'm still deciding on how best to build the index. I've thought about building a site crawler that could be run from a an aspx  page or from a cron job or scheduled task.  I'm leaning toward following the example of Martijn Boland and the approach he has taken with his Cuyahoga Web Site Framework. He is also using DotLucene and his design updates the index whenever content is added or updated so no scheduled indexing is needed. Pretty cool! I see alot of advantages to this approach. The index is never out of date and it works for hosted situations where scheduled tasks and cron jobs may not be an option at all. Of course I need to implement the mutliple sites feature first since I will want the search to be site specific, each site will have its own index.

Postgre SQL support
Joseph Hill of GotMono.com has begun work on a data layer for Postgre SQL. Joseph has a lot of experience porting ASP.NET apps to mono and Postgre SQL as you can see from the Projects page on his site.

miscellany
Found a few cool things recently that I plan to use in mojoPortal. ZedGraph is an awesome open source charting framework for .NET. Just look at the samples to see how visually impressive it is.  I also found a cool schedule control on codeproject.com, I'm sure I will find some use for these in the other features I have planned.