The Website

Michal Pasternak michal at
Tue Mar 30 11:45:04 PST 2004

Devon H. O'Dell [Tue, Mar 30, 2004 at 09:08:49PM +0200]:
> Indeed. Unfortunately, here is where you start to get into popularity. 
> More people will be able to contribute (code-wise) to a PHP-based 
> project than a, say, Ruby-based project.

Well, this is getting a bit offtopic, but perhaps in the future it could be
a good reference for people, who want to start with such projects.

Real problem with PHP is, that it allows you to mix content & style easily.
For many people it is the first programming language today; this can create
bad programming practices.

I've got a very simple PHP implementation of MVC framework, basically the
idea is a copycat of rendering as seen Twisted Woven/Newov projects. I could
polish that code a bit, add some documentation and publish it somewhere, if
there is demand.

> XHTML compliancy? What version?

Currently irrelevant :)

> One other thing I would add to this list is distribution. 
> has content that is mirrored across the globe via CVS or CVSup. How do 
> you distribute the content of this site?

Same as rest of CVS. NetBSD, for example, has directory called "othersrc" in
their repository, which is for sources, that don't fit to "src", "pkgsrc",
"xsrc". Perhaps this would be a good place for the sources of the web engine.

No idea about data. SQL dumps in CVS seem, well... unwise.

> PHP 5's objects are fashionable, though I'd still argue that OO 
> development isn't necessary for web development.

That's not exactly fashion. By using Adapter/Interface approach, you can
write very clean and very extensible code. Basically, for example, the main
page rendering procedure adapts all the objects it has to render using
interface called "RenderIt", for example. Each of the objects can be
different class - it can be a built-in type (string or array in PHP), it can
be a paragraph object, it can be a picture. Adaptation of, for example,
class Picture to interface RenderIt, would be done via a 3rd class (called,
for example, PictureRenderer). Using this approach, you can have many ways
to render a given object, even in a different contexts.

Example code? See paragraph about page rendering.

> I know very little about Python, but there are other languages to 
> consider. Namely:
> 	* C

1 month of Python coding can be worth 6 months of C/C++ coding. Belive me.
Not always, but very often. I'd not consider C as a basic language of such
website; it would be of course a great help in some areas, that need
optimization - but basically, all the alghoritms should be first created in
a high level language. Python, for example, seems much easier to debug, much
harder to exploit via a buffer overflow, comes with interactive mode. Yes,
there's Ch.. :)

> 	* Combination of any of the above

That's also important. Currently, except SQL database, I don't see other
ways to exchange data between scripts/programs written in different
languages. Propositions?

> There have been some ridiculous security vulnerabilities in Zope as of
> late. (From what I've heard. Don't jump on me, I'm repeating what's been
> told to me.) I don't know if ZODB can be clustered/distributed, which is 
> my personal main concern with a database.

Of course, bugs happen in every software project. My suggestion to have a
look at Zope didn't mean, that we should use it as a basic development
platform. My point is, that you can learn a lot about implementation of such
software from so big project as it - this is very important, and I
personally didn't found any PHP project, that would incorporate as advanced
solutions, as Zope or Twisted. Language barieer? Perhaps. PHP still has to
get mature.

> This begs the question though: develop your own CMS or use/expand an 
> existing system. These are all things that need to be discussed.

Pass. I've never seriously used any CMS. Propositions? (other, than ?


More information about the freebsd-advocacy mailing list