Jump to content
Sign in to follow this  

PHP framework for easy web site creation

Recommended Posts



For those interested in creating an accessible web site, based on W3C standards, I just released my PHP framework, named ÉASY, under the GPL license.


Here is for example my "welcome page" source:


$require = 'begin,end,mainmenu,news,notes,atom';


<h1>Welcome !</h1>

<p>Dear web surfer,</p>
<p>You've just entered the YetI's vault !</p>
<p>Thank you for giving us your opinion about our website. Don't hesitate to ask questions too.</p>
<p>Have a nice time !</p>


<p class="noteform">You can make yourself heard ! Give us your comments, questions, or advice by <a href="mailto:gablin@fr.fm">sending an e-m@il</a>, or using the form below.</p>



Look at the generated XHTML page, and you'll see immediately why such a framework is interesting :)


I still have documentation to do, which is why the 'notes', 'poll', and 'news' (and 'atom' and 'rss1') modules are yet to be published.

I hope it will be of some use to someone, and that there will be plenty of problems :) so that I can correct those and make it better :)



Share this post

Link to post
Share on other sites



I just want to say, that I spotted some errors in my code. I'll upload the correction this evening (French time).


By the way, I have to emphasize one thing: this framework is not a CMS (content management system), nor is it a template-based, or blog, system.

It is aimed at helping to keep the layout and the presentation homogenous across the whole site, for a web site author who wants to be in control of the whole content.




[edit:]Done ! +grammar correction (thank you spinynorman :)) Now I have to keep translating the documentation, and then do the documentation for news, poll, atom, rss1, and notes, so that I can release them too. So much left to do... :wall:[/edit]

Share this post

Link to post
Share on other sites

It's been a long time. I had forgotten about this thread.

I just wanted to add that the "project" is not dead. However, since last time I posted, it evolved to version 2 where PHP is not seen anymore (eg: <easy:news file="file.news" feed="atom"/>), and even this version is now obsoleted by the one currently in (stagnated) development.



Share this post

Link to post
Share on other sites

Well, If you go to my site, you'll see a live site using the current (v2) framework, so at least it works. Another site written with the v2 framework: http://assolesoisillons.free.fr/

I'm not very organized but if you're interested, I can do my best to help you get started with what I currently have.

The same is true for anyone else.


In short: if you're interested: send a PrivateMessage to me with your email, and I'll answer. Don't be in too much hurry though, because I'll soon change home, so I'm currently preparing the financial aspect of it, after which the hard work part of it will come :)



Share this post

Link to post
Share on other sites

Thank you for the link, Paolo. It seems indeed to be an interesting tool.


Note however that this is different from what I want to achieve. Our goals are different.


What I want is neither a CMS, nor a blog system, nor a forum, nor a wiki, but rather a framework for easing the creation of a web site where the author retains control of everything. My framework is geared towards the creation of template-less content, with a strong focus on accessibility, and CSS- and JS-reuse, on top of standard XHTML coding (although the latter is mostly the responsibility of the programmer). More over, the framework has modules which define building blocks, or components, that you can reuse and for which parameters can be defined. Those components help create some dynamic behaviour without having to tinker with PHP.


Example : Here is a simple site I created for managing a news service for my team, along with the corresponding RSS feed.


I created the site map first — /index.map:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<site id="project-news" author="Yves" email="XXXXX@XXXXX"

 <ol name="mainmenu">
<label lang="en">Main menu</label>
<link rel="chapter" />
<li name="see-news" path="/see-news">
  <label lang="en">Display project news</label>
<xi:include href="/_easy/mod/news.map" />

and /_easy/mod/news.map, provided by the “news†module, which I modified to my taste (name and label):

<li name="add-news" path="/_easy/p/news">
 <label lang="en">Publish a news item</label>

I created the home page — /index.php, the easiest part :) :

<?php require_once('_easy/init.php'); ?>

and the “display†page — /see-news.en.php:

<?xml version="1.0" encoding="UTF-8" ?>

<title>Project news</title>


<easy:nav id="mainmenu" />

<h1>Project news</h1>

<easy:news src="project.news" feed="rss1" />



Using the administration GUI provided by the “news†module, I created the mentionned project.news file (no need to know about XML, only forms are used), and now, when I visit /project/index.php (or /project/index.php?page=see-news, which is the same), I get:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>

<title>Project news</title>
<link href="/project/index.php?page=see-news" rel="chapter" type="text/html" title="Project news" />
<link href="/project/index.php?page=add-news" rel="alternate chapter" type="text/html" title="Publish a news item" />
<link rel="alternate" type="application/rss+xml" title="Publication of the project news (English, RSS1)" hreflang="en" xml:lang="en" href="/project/project.news.en.rss1.php" />
<link rel="stylesheet" type="text/css" media="screen" href="/project/_css/main.screen.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/project/_css/news.screen.css" />

</head><body class="easy-index" id="project-news">

<div class="nav" id="mainmenu"><a href="#nav-skip-mainmenu" class="nav-skip-source"><small>Skip "Main menu"...</small></a><dl>

 <dt>Main menu</dt>
 <dd><ol class="nav-list">
<li class="nav-current"><strong><a href="/project/index.php?page=see-news">Project news</a></strong></li>
<li><a href="/project/index.php?page=add-news">Publish a news item</a></li>
</dl><a id="nav-skip-mainmenu" class="nav-skip-target"> </a></div>

<h1>Project news</h1>

<div class="news"><dl>
 <dt title="Publication of the project news">Project news <a class="feed-link rss1-link" href="/project/project.news.en.rss1.php" title="Publication of the project news (English, RSS1)"><img src="/project/_img/rss1-feed.png" alt="RSS1" width="40" height="15" /></a></dt>
 <dd><ol class="news-items">
<li class="news-item"><cite class="news-source">Documentation <span class="news-date"><span class="default-time" title="English time">Wed 29 Apr 2009</span></span></cite>
  <q class="news-item-summary">OpenOffice</q>

  <blockquote class="news-item-text"><p>Please all upgrade your version of OpenOffice.</p></blockquote>




You can see the huge difference between what is in the file, and what is produced.




(Edit: All has been edited for privacy reasons, of course. Please excuse me if I wrote mistakes in the process)

Edited by theYinYeti

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...