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: Armen Baghumian
Subject: Re: webapp architecture -- license to use
Date: Mon, 19 May 2008 23:14:42 +0430

Hi Davi,

its almost makes sense now, thaks for description.

On Sat, 10 May 2008 18:58:52 +0200
Davi Leal <address@hidden> wrote:

> 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.

I'll take a more deep look at the code, I want to check if it is
possible to implement a tiny framework for GNUHerds or not. it seems
the code is reuse abel and it will not take much time to do, I don't
like to have three layers just for a controller but I culd be wrong.

> 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.

no I dont mean to call a method of a class but I suggest to do that as
a hook or filter which runs before the main requested action, as far as
this is depend on implementing that light weight framework, let me
check that first, I'll come back with a real world solution.

> > 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.

makes sense.

> > 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.

Let me ask this question in anther way.
Is there any benefits to have 3 layers as controller?

--Armen




reply via email to

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