WOS 2 / Proceedings / Panels / Freie Software / Open Source Content Management Systeme / Ami Ganguli / script


Herbert Meyer: The next presenter is Ami Ganguli presenting Mitgard, setting up a system. Now we see Mitgard another system with a community which is very active. It is located in Scandinavia not only. In France too. But Ami Ganguli will tell us more about Mitgard.

Ami Ganguli: Actually it is located all over the place. I'm Canadian living in Finland right now. So, I started using it originally while I was living in Toronto and moved to France to a company working with Mitgard there and moved to Finland to a company working with Mitgard there. There is a company in the Nederlands which is where this site is hosted. There is a company in Switzerland the admin. site that we were looking at a second ago and I'll go back to was developed by a company in Hong Kong. So, we are all over the place. The number of developers is really hard to say. There are probably about five real core developers who work on the C library behind Mitgard. But there are other things going to the project, other then just the C library. There is also the admin. interface which is within on top of that which is mostly Perl and to the Mitgard template system and all this kind of stuff. The one that I'll show you was developed in Hong Kong. What I want to do is to set up a view different windows here, so that I can go back to them later on.

The Mitgard project site of course is Actually I want to ask a few questions first of all to the audience. How many people do develop websites? So there is a reason for you that you are here right? How many people are using Java to work with their websites? Perl? PHP? Divan? The PHP people are the once who gone be the most interested in Mitgard. At least right now. We are working towards a little bit towards language independence but right now it is a PHP dependant and it uses PHP very heavily. There is a down side and a upside. The downside is well if you don't like PHP then you won't like Mitgard. You aren't gone be our developer but with a real nice Mitgard site without some coding and that coding is gone be in PHP today. It will change a little bit over time but it will be take a bit of time. On the plus side it means that we can do everything that PHP can do. Standard PHP code. You can load your PHP includes, use all the PHP functionality and there is a lot of functionality.

And that comes back to the definition of what a content management system is. If you use a very broad definition of a content management system then really all you need is a PHP. All you need is a nice website with the directories split up nicely so that people can edit it. What we do, what we give you on top of PHP then is a library, an extension to PHP, a bunch of routines you can call that do nice things that you want your content management system to be able to do, like retrieve articles, create users, basic things, store data. We also give you a nice frame work. We have an object tree. It is not as object oriented as the Python is but it is more object oriented then it used to be when we were getting. We are sort of moving in that direction. We started from a very practical "we-need-to-do-this-now" kind of perspective and build a system that worked and as a content management system and we are going more towards being an application server which is why we need more general object types.

To look at the way the system works, I figured if the performance isn't too bad we will try to look at an existing site or a site that is being worked on right now for different conferences in Brussels in February called FOSDEM: Free and open source software developer European meeting. This is the second one. There was one last year at the same time. If you have a chance go to it. It will be a lots of fun. I will be there too. The nice thing about this site it is of course totally Mitgard based and it is a typical Mitgard site in that we have me doing the design of the website which why it looks ugly. I'm a programmer and not a web designer. So, if we would have professional web design artists it would look better and me doing the technical. And you have a bunch of editors going in and editing articles, editing content, doing stuff. They don't want to worry about the programming and they don't want to worry about the layout of this site. That is really to me what a content management system is. Built this using the basic Mitgard tools, a bit of PHP scripting and the Mitgard user interface.

This is our admin interface. Everybody has an admin interface. This one is actually one of several. As I said, developed in Hong Kong. We have an approval system here that I don't use. So you can ignore this stuff. But if we are using the approval system, I would go in here and click on the right hand side to check of articles that I think should go up into the site. Right now as I said the approval system for this site I didn't use it at all. So it is pretty much irrelevant. We are going into the web sites.

Mitgard has a system called site groups which basically is a system where we can separate the data base. There is one in MySQL database. We can separate it into individual pieces. There is a very hard logical split between them. This is designed for ASP. This is actually being hosted by ASP in the Netherlands. We have some developers in the Netherlands. And he host several clients on the same server in the same data base. The different clients can not see each other. So the top level you have your site group. You cannot see outside your site group. Beneath that you have the host level which is what I'm hoping comes up sometimes soon. Beneath the host level you have the page tree. The page tree is analogise to what you used to. If you are used to write PHP sites then what you have is already on your hard drive, is a directory full of PHP files that are getting interpreted to serve each page. We have the same thing here. The difference is that for us a page can be active or dynamic. If the page is active it means that if I tip lets say I have /news. If I tip /news/101/205. The 101/205 are probably references into the database somewhere. If "news" was an active page then if the rest of the path doesn't exist the original page the one of the part of the path that does exist /news will end up getting the request. So for us it is a way to create an active portion of the website very simply. And it also means that the dynamic, active portion of the site can be browsed by Google or whoever you want to index your site which is important if you have "/news?" article id equals ect, ect then the web search engine won't ever see that content which isn't good, especially if you are publishing a magazine and want some hits.

I have only got one site in my site group "" and that site group has a group page. Beneath the group page we will see a bunch of other pages. Some of them are dynamic which means that they take the hits for everything beneath and some of them are not. That is not really very existing. We haven't really got into the content. We haven't really got into the styles. What I can do now is from each of this pages I can pull in the style elements and content elements using a template system. So, these are the different pages. Let's look at something that is not dynamic the CSS page which is just a CSS style sheet that I use for the site. It is pretty ugly. I wasn't really planing on showing this. So there is a lot of ugly code that I cut and pasted from elsewhere. So don't use this as an example for the right way to develop a Mitgard site. It was done pretty quickly. Standard page just get surfed up and it is actually not very existing. If it doesn't load up very quickly I'll just ignore it. Because it is just text. Not really too much to interesting but the point is you can still do it and it is right here. So that is you are familiar with. You go to where you are not so familiar. We hide our styles. Where the styles are is a nested set of elements. It is a template system and I think most of the systems have a template system of some sort. That is the CSS page rendered really badly. If I want to hit the edit later on you will see that CSS doesn't really display very well on an HTML page that is why.

The style system allows you then to have nested elements on the page. So usually when you design your website the top level style element is a big table. At least that is what most people end up doing. And then within the table you have different sections. You divided up your page that way and each section gets a new style element which is a different section of HTML or PHP code. We can intermix them if you want. And it recourses that way so the file of the styles basically can go inside each other pretty much anywhere where I want. So I have a style here called "internet basic". The reason it is called that because I stole it from another site. I wanted to develop that really quickly and not put a lot of time into it. So the name doesn't make any sense. Route page is the first one that gets interpreted. I look for a page. I look at the root style element and within there I start digging down and putting my page together by pulling in different style elements.

And this is how we separated the style from the content. I click on edit and I can edit this style element, the root style element. Redirect isn't really interesting. There is much of PHP code in there that redirects me if I'm not logged in and I supposed to be. Head and body are well basically just the head and the body. There is also a little bit of code you can't see in this little preview mode because again the HTML page doesn't render it nicely but you see it when we edit it. Lets see if we can get it. From here you can already see that we have got a little bit of an interface. Even though that this is internet explorer there is for this particular interface an Active-X control available. I don't know actually what the licensing style of it is. This sweet here, this particular admin. interface is solved as a box set. It is also available for free on the Hong-Kong website. But it is also soled as a box set with a manual and a CD and all of this stuff from the Guys in Hong-Kong and they include on that this Active-X control. So it is not the nice Java thing that works everywhere but on AI you can install an Active-X control and do the point and click, highlight this and click bold and like this and click italic and so on you are editing your content. This of course isn't gone work that way because (evidence) is under control. So it is just gone be a basic text based edit box.

In the future we are working on a lot of different things. Web based admin. interface work great most of the time but PHP coders or coders in general actual like to have a real editor which is something I 'm really, really wanting because I spent a lot of time in this interface and gets really annoying after a while. And we have actually somebody working on that. There is PHP GKT bindings which I though is really wired the first time I saw it actually at last years Fosdom in Brussel. I though why on earth would you want to do that. How ever somebody has started writing a Mitgard admin. interface using the GKT bindings for PHP. So it actually has a real editor in it. So you can edit your PHP code, post into the site and it is basically the same back end. I don't know if it is ever gone actually come up. You saw a little bit of it already. You saw the templates takes. There you see the names of them here up. It is greater then... the square rackets ect. Then ends up when ever you put it in a style element, a page element what ever it ends up being replaced by the element that has that name. So the route template really just has a few basic once. The head and the body and you can then drill down and create your web site that way. And the idea here again is that this is the view that you show your web designer. Are here we go. Well it was pretty un-existing. It really not work that way. I thought that there is a little bit more of coder on which is what I wanted. Oh hello. They've already got actually the editor edit. That is magic. O.k. So here we go.

This is the Active-X control which suddenly magically showed up on this machine. It is probably loaded by another application or something. Cool. So yeah, you can actually select do the times roman ect and it all works. I'm not gone bother showing you. It is like using basic windows right or something like that. O.k. this is the view you show your web designer. It is not really that web designer friendly. You actually have to teach him how to write in HTML which is unfortunate. Again that is the future direction: I'd like to get to the point where we can just give the web designer interface they can understand somehow let them able to play this tool using front-page or what ever and we actually want to borrow a little bit of the idea of Zope which we don't think they did probably but was not a bad idea just bad implementation. We will fix it and put it into Mitgard. I'm sure they will tell you differently later on but anyway. So we want to make this something so that a regular web designer, your mother or whatever could actually play with. It is not really the case today. It allows you to separate the look from the content from programming. You still have to know HTML . Too bad, but I think all the systems are like that today. So that are the styles. I'm not gone drill down to much it is a little bit to slow. The same thing then.

Now the content I'm not gone show because it also takes forever. But there is a content tree. So, you have topics, articles, it is divided up that way. It looks basically the same way. So you would show your content editor, the editor of your site who only have access to the content tree that be able to edit new articles and that sort of thing. They'll be able to add new content. The guys who wrote these little articles they just said "create new article" and it showed up on this site. It is magic. The way the magic happens O.k. it is not really magic. You still have to be able to code PHP. Lets go back to be websites. We have a nice little PHP API that helps us to work with the content. So the typical call would be "Mitgard get article" or "Mitgard list topic articles". Basically that says I have this topic. I want all these articles of this topic to appear on this page. So list them and then I can loop through using a PHP loop for each what ever and print out those topics. So it is still PHP coding. It is very simple PHP coding. So what we do then is well basically the same thing every other system does.

I like to think that we have got a little bit more maturity then most of them but actually some of them are pretty much decent. So it depends on what your preferences is. Apache on the front level. We have a module for Apache that does the rewriting, the nice URL re-writing an so on. We have somebody working on getting rid of that just using mud re-write. We have MySQL as a data base, PHP as a scripting language and a nice template system and a C library that goes with it. Support of course is available from everybody. That is how we make our money because the system is free. if you want to see me. But I can also point you to other people who happen to be local to you. There is a lots of people providing support for it in our days. To learn more about the system the switching places I believe were the Zope. I don't know why but they don't want to be Saturday, so I'm gone be Saturday.

[transcript: Katja Pratschke]

Creative Commons License
All original works on this website unless otherwise noted are
copyright protected and licensed under the
Creative Commons Attribution-ShareAlike License Germany.