2011
09.03

I have upgraded the blog to run the alpha version of our next version, 6.1.2. This version is a big rewrite of the internals of isite.

Before the index.xsp main page was responsible for everything, parsing urls, and rendering responses. This meant that the url-scheme was hardcoded, either /* or /artikler/* (with some exceptions for /tjenester og /organisasjon). It also meant that there was only one way to respond with data, namely html.

In this release, we are splitting the code up into several smaller pieces.

  1. A url-router. This takes an incoming url and match agains a list of registered patterns, before calling a
  2. Controller. These are responsible for getting data, and showing them into a
  3. View. The view looks at the Accept header (or url-config) to see what content type is accepted, and deliver this trough
  4. Renderers. For now we are supporting Html and Json renderers, but it's easy to add more renderers, for example xml and pdf.

Renderers are also used to render redirections, and css and js.

What this means in "real life" is that we can split up different url's into different controllers:


/ -> Frontpage.index()
/{page} -> Page.index()
/id/{page} -> Page.id()

We can also send config paramters with the patterns, for example:


 /stuff -> Page.index(page:'some-stuff', language: 'no', type:'text/xml') 

A controller is a class written in Groovy. You can store these in any external jar-file, and easilly include these by referring them in the config. The system will dynamically load them. A controller must inherit from the base Controller class, and any method must return a void.


package no.wpc.isite.controllers

import no.wpc.isite.mvc.*;

class Hello extends Controller{
	def index() {
		fields["hello"] = "world"
	}	
}

Above is a simple example implementing a HelloWorld controller. To use this, we just have to set up a url to map to it:


 /any-page -> Hello.index() 

To connect it to a view, we now have several ways of doing this. For "standard" article types, you can look either in the article itself, or if not found, it will look for the standard site template. A second option is to provide a parameter with the router setup, template: 'my-template'. This will override any of the other methods. For applications, it makes sens to let the framework select a template. By default, it will look in the view.Hello folder, and it will look for a file named index.ftl. If you have specified that you wanted Json, it would have simply returned the "fields" map with its values.

I think this really changes the way iSite works, and makes it a lot easier to now start implementing applications on top of the framework. Stay tuned.

2011
01.03

I have now moved the blog databases internally to our development systems.

The stability of this site should not be compromised, but I don't have any demands on uptime on these servers. Our development environment consists of 2 clustered domino servers, fenris, where I do most of the development (and hence restart many times a day), and fimbul, used for more stable development. It usually stays up for days at a time.

The main reason for moving the blog here is:

  1. Testing bleeding edge features from builds not yet released in the wild
  2. Develop new features for the blog

The plan for the blog is to firstly move it to the unstable 6.1.2 branch, and then start modifying the blog interface. I want to restrutcture the blog documents a bit, and also implement a remote API for blogging, so that for example Windows Live blogger software can be used to blog.

2011
22.02

The final version of 6.1.1 is now released, and this blog has been updated accordingly. I will try to implement some of the new "standard" features from this version, one of the new, big, things in this release is the splitting of a standard implementation into it's own project. This means that templates can now use a lot of standard features to get up to speed quickly.

Further plans of this blog includes moving it onto our development environment, this way I can start to use experimental features, this will help in both planning and testing.

2010
17.08

From ISite version 6.1.1, there will now be easily possible to list any RSS or Atom feed directly on a page.

This is internally implemented using the Rome Feed API.

The following code will list the 4 last entries from our homepage :

<@feed url="http://www.workplace.no/feed.xml" count=4; feedEntry>
    <#if feedEntry?has_content>
    <h2>${feedEntry.getTitle()?html}</h2>
    <p>
    ${feedEntry.getDescription().getValue()}
    </p>
    </#if>
</@feed>

It doesn't get much simpler than that :)

2010
01.07

iSite version 6.1 has been relased, finally!

 

Yay!

 

The list of things fixed and improved is too long to be published here, but among the important bits are:

  • Drag and drop form editor
  • Async Memcached support
  • Logging of changes
  • Improved support of activities
  • Updated jQuery and jQueryUI to latest versions, and also with better jQueryUI integration
  • Several new themes (woot!)
  • A brand new "Relations" editor, that enables multiple categories of relations pr article