The Website

Michal Pasternak michal at pasternak.w.lub.pl
Tue Mar 30 10:11:52 PST 2004


John Von Essen [Tue, Mar 30, 2004 at 12:02:20PM -0500]:
> I believe I was the one that requested a core sanction. The reason is I
> remember when this thread came up before... It's difficult to go out and
> start doing something and dedicate alot of time when you are not
> absolutely sure that it will be accepted.

On the other hand, how do they have to sanacize something, that they didn't
see?

> A core sanction would also help in other areas... What is the decided
> platform? Perl, PHP, MySQL, Postgresql.
> 
> What happens if I go out and do it in mod_perl and mysql, and then a core
> member says, "It should be done in php like site xyz".

Well, that's a good question.

First, philosophy. Sorry, if that's obvious, but:

 * structure of the site: what do we want to have, what we will be introducing
   in the future. Very important, start from creating it. Discuss it. Many
   times.

 * clean, easy to maintain code - that lets new people contribute to such
   project easier
   
 * separate data from page design/look. Always. Learn about MVC pattern, if 
   you didn't do that already.
   
 * remember about machine, that serves the content. Not everything has to 
   be a dynamic PHP script, you can save rendered HTML pages to save CPU
   time, perhaps in many areas of the site.
   
 * translations! Every letter of text on the page (images included) should
   be translateable to other languages. Think about this, while writing 
   a web engine.
   
 * 2-clicks rule, cross-browser compatibility, coding - utf, of course,
   similar webinterface stuff
 
 * security! slashdot-like trolls on forums, bruteforce webform password
   crackers... remember about this.
   
Tools, tools, tools.
   
 * choose by features and possibilities, that the tool gives you, not by
   popularity. "More people use PHP & MySQL, so it's better" sounds just like 
   "More people use Windows XP, than FreeBSD, so Windows's better".

 * choose by features, not by speed. According to extreme programming rules,
   you should optimize only the bottleneck; how can you predict the bottleneck
   if you have no project?

Only those tools I know a bit, sorry for not providing more information:

 * PHP: very popular among fresh webdevelopers, sometimes very criticized by
   the senior ones, especially by people, who like real object-oriented
   languages. Objects in PHP 5 are getting much better, perhaps PHP 6 or PHP
   7 will be really good in this area. DOM XML module, except ugly syntax,
   seems to be pretty useable at parsing XML forms. It is quite easy to
   implement basic Adapter/Interface pattern in PHP; on the other hand,
   language syntax has still much TBD. Popular. Popularity should *not*
   be the _only_ factor considered.
   
 * Python: there are a few interesting Python projects to do webdevelopment,
   which intensivley utilize Python's syntax & object-oriented features; they
   are definetley worth giving them a look, among others:
   
     * Zope and Plone. Enough said - very complete, very sophisticated,
       still easy to use.
  
     * Twisted Python together with Newov (from divmod.org) - that's a quite
       interesting webdevelopment framework, if you ask me. Strongly
       suggested, if you don't plan to use it, at least have a look at
       the way problems are solved there. And, you can turn your simple
       test webserver into load-balancing spread cluster with single
       line of code.

Database?

 * PostgreSQL is pretty good. In fact, it is very advanced database. MySQL
   could be an option, if you don't need that much features. Speed of 
   database should *not* be the _only_ factor considered. Pros? Data can
   be shared between no-matter-what-language-you-write-it-in software.   
   I have modified some sites, that used MySQL, and suffered because of lack of
   some features, that were already present in PostgreSQL. I don't know,
   how this two DBMS compare to each other at the time of this writing,
   but personally I'd choose PostgreSQL, unless someone will proove me 
   the existence of the same features in MySQL server.

 * Zope uses ZODB, object oriented database engine. ZODB is definetley
   worth having a look; together with IndexedCatalog it can be quite
   fast. Pros? Many. Cons? Python-only, AFAIK.

Just my $.25.

Starting - as an open project - "the new corporate FreeBSD site" - requires
much more discussion. Not to mention your own (yes, yours) time and
resources. And, the discussion, if the page should be red, green or black
should come after 40 - 75% of the code is done, not earlier.

-- 
m


More information about the freebsd-advocacy mailing list