Select the search type
  • Site
  • Web
Search
You are here:  Company/News

Blog2mind

Core team News module update

It has been a while since I took over the News module and still there's no new release. This post will explain a little bit what has been happening 'behind the scenes' and try to give some insight into why things can go so slow.

First a critical look at the current module (03.01)

The current news (feeds) module is a fairly straightforward module. In actual fact you could argue it is just an XML module with a preset XSL transformation. All it does is take an XML feed, transforms it using XSL, and reders this to screen. OK, you can specify login details to get at feeds that are protected, but there's really not much to it. It is one of those 'hello world' type of modules; you use it to get to understand how DNN module development works.

The biggest drawback, IMO, of the current solution is that on each page load the module will attempt to get the feed. I should make a nuance here: on each module refresh. In DNN we can cache modules, so it won’t be on every page refresh if the module cache is set correctly. But the main point here is that when needing a refresh the page will not go to the client until the feed(s) are in and have been transformed. There is a timeout of 10 seconds on the feed so your page load can drastically increase this way. Secondly, if within 10 seconds you do not have your feed the error looks distinctly inelegant. So one of the first things to do was to improve the power and flexibility of the caching of this module. IMO the core module cache setting was not enough for this.

Another major major wish was to be able to aggregate feeds. Some of you will probably find that this goes without saying for a feed module. Of course it should aggregate.

A final major point of intervention is the flexibility of rendering. There are now several core modules using various solutions to template their output. Although I’m a great fan of XSL (you can do just about anything with that) I grant it is not the simplest ‘syntax’ to master. So the module will need an alternative to the XSL rendering.

Since last fall

When Josh McWilliams stepped down as team lead there was a new Beta in the ‘vault’ of DNN. In other words: a new module was well under way of being completed. My first intention was to just push that to market. Then I had a conversation with the ‘project sponsor’ (Stefan Cullmann). This is the person that has access to the DNN core and takes the role as ‘coach’ to the team lead. He urged me to take another critical look at the design. He was not convinced the module was on the right path (and neither was I for that matter). The one argument that convinced me to backtrack was ‘remember you have to support whatever you roll out for eternity’. Ai. Yes. Good warning. Without going in too much detail it was decided the then beta version 03.03 would be abandoned. Instead I was going to focus on the couple of major necessary issues to be addressed outlined above.

Not too far before this all happened the DNN core was augmented with the ‘RssToolkit’. This is an open source project for manipulation, aggregation, downloading, etc of feeds. It was incorporated by Nik Kalyani as a backbone for the Feed Explorer. So there seemed to be a tool for aggregation and caching already in the core. So why not use this? Well, it was near perfect. The core toolkit version was 1.1 and the latest release 2.0. So I set about getting the core to upgrade to 2.0. At this time I was in contact with both Nik and Antonio Chagoury (Blog) about setting out a ‘helicopter view’ of syndication in the platform. Very interesting conversations. However, Nik was too consumed to be able to update the core syndication component. As I don’t have the power to do this myself (as a team lead you are confined to alter code of your own module) I was stuck at this point. The RssToolkit is in C# (not my native tongue) and the module is in VB. I did not want to roll out module with an extra component (News.RssToolkit) that I would then need to support. Neither did I want to have to support C# code.

At around this time we had Open Force US. A very exciting time and I met a bunch of inspiring people. I extended my visit to the Phoenix area (staying with my friend Kelly Ford) and met the local DNN group there. One of the locals wanted to join the News team and help out. Great. And he was a C# speaker. Even better. Get cracking on the RssToolkit. Unfortunately his time investment ran out in the early Months of this year and again work stalled on the module. So this time round I decided to try another approach. Convert the toolkit to VB and really embed it in the module. This is what I’ve done now. It is quite a bit of code, but SharpDevelop (for those of you not already familiar with it) does a great job of converting between VB and C#.

The translated and integrated toolkit needed quite a bit of work to ‘behave’ but there is now a working beta. It means the following goals have been achieved: the module can aggregate feeds. It can handle feeds of almost any type: Rss (0.91/1.0/2.0), Atom, Opml. It will recursively aggregate on Opml feeds. Feeds are cached (in SQL). The aggregated feed is cached (on disk). It retains the ability to specify authentication for feeds.

While creating a new version I also took the opportunity to overhaul the rendering mechanism of the module. I’ll blog about that in another post. Got to get coding now.

 

Archive