webme frontend working

I spent most of the day reconciling the fork that yesterday’s work created, then started work on the front end.

The original version of WebME uses a home-grown templating system, but Smarty is better than my version and is better maintained, and has more users, so today’s work was about trying to convert WebME to start using Smarty instead of my templating solution.

The biggest work was in trying to abstract away all the code that handles anything to do with templates. While that work is not yet complete, it’s at a point where it will at least display something on the screen now.

As Conor pointed out yesterday, some Pear libraries are required to get this all working. I’ve still to add a verification script to the installer, but for now, those requirements are: mdb2, mdb2_driver_mysql, net_useragent_detect. On a Fedora system, the following RPMs should also be installed: mysql-server pear php glibc-common glibc php-gd php-pear php-pdo php-mysql ImageMagick. The minimum PHP version should be 5.2.3 (for json_encode support and other modern niceties)

So yeah. At the moment, there is a default template in place. This template shows a very simple style.

As of now, webme is an actual working CMS. you can create pages, and those pages will be shown on the front end. Obviously, it is not very polished yet, but that will come over the next few weeks as I bring it closer to completion.

The next article should probably be on how you can create your own templates. As always, you can download the application here. A packaged version will be available soon, once it looks a bit more polished and I’ve cleaned up the admin area to not have areas which are not actually yet available for playing with.

2 Replies to “webme frontend working”

  1. I am wary of anything that’s said by someone who is trying to stay anonymous (you are /not/ “root @ microsoft.com”) because usually it is said by someone who thinks what they are saying is so embarrassing that they don’t want to be associated with it.

    I think you are missing the point of templating engines. The point of using something like Smarty (at least /my/ reason for using it) is not so you can have yet another programming language, but that it is separation of view from model and content. In essence, the template is the V in MVC.

    I don’t mind designers playing with Views, but I really don’t want them messing with the Controllers and Models. Smarty and other templating engines are good because designers can use plain HTML with a /minimum/ of code to data variables.

    The articles you mentioned argue that templating engines are largely useless because they go beyond simple templating and add programmatic abilities as well. I agree with that. If you need to create an “if” conditional, then you should probably be doing it in the controller, and not in the view.

    However, just because Smarty allows you to do X, Y and Z, does not mean you should ignore it just because you only need X. If you don’t need Y and Z, then don’t use them.

Comments are closed.