gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: webapp architecture -- license to use


From: Davi Leal
Subject: Re: webapp architecture -- license to use
Date: Sat, 10 May 2008 18:58:52 +0200
User-agent: KMail/1.9.7

Armen Baghumian wrote:
> I just checked GNUHerds code again, Herds is a big system, it has a
> clean code, you guys had logic and presentation separation in mind, it
> has unique design with its advantage and disadvantage let me get through
> that.
>
>
> The code has interesting design but I think there are these
> disadvantage:
>
> 1) Lake of using any kind of shiny framework out there I hardly believe
>    that it should be rewrite with one of those free/libre frameworks out
>    there. yes I know sometimes frameworks are bad but a system like herds
>    which needs to maintain should be done with a nice and fast framework.

As Victor Engmark exposed:
 "Starting the web site from scratch instead of using a .. is a lot of work,
  but can give some long-term benefits:  More terse pages, i.e. faster
  downloads & easier redesign."

The current gnuherds code is faster than using any other framework. Anyhow, as 
you exposed below gnuherds is using some specialized frameworks: Smarty and 
gettext.


> 2) Lake of a dispatcher to take control of every thing why not have a
>    central dispatcher/controller to take any kind of action from user?

The gnuherds code is already using the MVC pattern:

  * The Model[M] is the Layer-5, being accessed from its interface (Layer-4).
    The Layer-4 takes care managing the Access Control List (ACL). Note that
    ACL is not authentication but authorization.


  * The Controller[C] is composed by the  0, 1, and 2 layers:

      Layer 1 is the core of the controller, where the web page is build:

          Layer-1__Page_builder/Web_Page.php

      Layer 2 keeps the business logic of the controller:

          Layer-2__Business_logic/*

      Layer 0 is the entry point to the controller:

          Layer-0__Site_entry_point/*.php


  * The View[V] is Smarty.


We could improve the code duplication at "Layer-0../*.php" unifying the entry 
point to the controller but IMHO it is not needed because it would not 
improve significantly the project development or maintenance cost, and the 
webapp would be some microseconds slower.

However, IMHO we should improve the duplication of some of the form-checking, 
as Klaus proposed in her architecture.

Note: Due to the lack of developers, we should concentrate the effort on 
adding the new features.  Anyhow, of course, anyone can work in what [s]he 
wants.


> 3) Lake of dynamic access control why not to have a nice access control
>    module, why put all access control stuff at the top of pages?

There is not need of a complex access control module. We just need a secure 
way to get the user+password information.

The access control must be carried out as first step. So it is because it is 
at the top of pages.

The email+password is sent only once, and only over HTTPS. The log-in state is 
saved at the Apache server, identified by the PHPSESSID cookie. Such cookie 
is only accepted by the Apache server if it has been sent via HTTPS.

You could take a look at [1] to read more details.

 [1] http://lists.gnu.org/archive/html/gnuherds-app-dev/2008-05/msg00032.html

I agree with you we could replace the access control stuff at the top of pages 
by a call to a class method which does the same thing executing the same 
source code lines, so removing such code duplication.  However that code is 
only a short "if". Adding a class to manage it could add more complexity to 
the webapp than just adding such "if" as is on top of pages.


> 4) why not have a generic static page controller to serve all static
>    pages, why put duplicated logic for each page?

There are not static pages due to pages have to be translated dynamically. 
When the project have more than 1000 request by second we should maybe 
optimize it using static pages, or just increase the server CPU power.

If we create translated static pages, for example as "file.lang.html" we will 
have duplication and we will break the uniform use of gettext PO files as 
I18N framework.

About duplicated logic read above about MVC pattern.


> 5) Why not use only three layers to separate Logic and Presentation and
>    have a Central model and glue them with a central controller? (I mean
>    ModelViewController)

Note that even CSS is not just one layer. CSS can be several layers [2]. Let's 
not simply what is in nature complex.

  [2] http://www.wdvl.com/Authoring/Style/Sheets/Layers.html

About central controller, Web_Page.php is the central controller. Read above.

      Layer-1__Page_builder/Web_Page.php


> And its advantages:
>
> 1) Using Smarty as template engine
> 2) Using standard gettext as I18N layer
> 3) Separating logic and presentation, I like that


> I think if we rewrite the GNUHerds with a framework then its code will
> be vacuumed and could be more maintain able.
>
> I suggest you to use Kohana[1] and Arag[2] over it, each of those are
> libre.
>
> [1] http://kohanaphp.com
> [2] http://arag.berlios.de

I have took a look at the "kohana" software and IMHO is is unnecessary bloated 
and I do not like its license [3].

  [3] http://kohanaphp.com/license.html


And here, a key point:

  The project needs to use the AGPLv3 license [5]. AGPLv3 closes
  the “ASP loophole”. The project needs to use AGPLv3 to add
  more protection to its users.

  [5] http://blogs.zdnet.com/open-source/?p=2408

  Reads as Google refuse to use AGPLv3 [5].


It could have other blockers, as for example if they do not make it easier to 
use HTML instead of XHTML.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]