librelist archives

« back to archive

[PDP] Removal of the apps subfolder

[PDP] Removal of the apps subfolder

From:
Loic d'Anterroches
Date:
2011-07-09 @ 08:47
PDP: Photon Design Proposal

At the moment we have the subfolder "apps", this look nice, but,
basically, it means that we need to push this folder in the include path
at runtime. That is, we need to dynamically modify a global PHP settings
just to run a Photon project.

As I am cleaning all the "bootstrap" code of Photon, I find it was a bad
idea. The more we affect the global PHP settings to run Photon, the less
we can be reused in other project, unit tests, etc.

So, my simple proposal is to remove the apps folder and everything which
was in the apps folder must be put one folder below. This also goes well
with the idea that any application is available to a Photon project as
long as it lives on the PHP include path.

My next step is better logging, configuration loading, events. We should
basically have a way to "initialize" a Photon project. If your project
uses 35 applications, you will have the need to connect the applications
with each others through events. This is why we need:

- a way to generate and react on events.
- a way to register the events listeners at project startup.

One use of the system is the logging application. You want to initialize
it correctly at startup (log level, console or file or the sink you
want) and let other applications push info to be logged in.

The removal of the apps folder is one step in this direction, that is,
simplification and cleaning.

loïc

--
Indefero - Project management and code hosting - http://www.indefero.net
Photon - High Performance PHP Framework - http://photon-project.com
Céondo Ltd - Web + Science = Fun - http://www.ceondo.com

Re: [photon.users] [PDP] Removal of the apps subfolder

From:
William Martin
Date:
2011-07-10 @ 20:22
Hi loic,

I am agree with you to remove the folder apps. It was here just for aesthetics.

A important point, is how particles will be integrated in the main
project folder, and how update it.
So we have :
- 1 primary repo with the code of the main of your app
- n Sub modules of all generics particules with a repository for each
In the case of GIT, we can integrate those sub repo in the primary one
with the submodules command[1]

In the futur, we need to have a good documentation about "How to use
your favorite scm to track your code and integrate particules into it
?".
This point can block a novice (in photon/scm), if i want to integrate
his code near some particules. For my example, the use of the git
command "submodules" is uncommon.

William

[1] http://book.git-scm.com/5_submodules.html



On Sat, Jul 9, 2011 at 10:47 AM, Loic d'Anterroches <loic@ceondo.com> wrote:
> PDP: Photon Design Proposal
>
> At the moment we have the subfolder "apps", this look nice, but,
> basically, it means that we need to push this folder in the include path
> at runtime. That is, we need to dynamically modify a global PHP settings
> just to run a Photon project.
>
> As I am cleaning all the "bootstrap" code of Photon, I find it was a bad
> idea. The more we affect the global PHP settings to run Photon, the less
> we can be reused in other project, unit tests, etc.
>
> So, my simple proposal is to remove the apps folder and everything which
> was in the apps folder must be put one folder below. This also goes well
> with the idea that any application is available to a Photon project as
> long as it lives on the PHP include path.
>
> My next step is better logging, configuration loading, events. We should
> basically have a way to "initialize" a Photon project. If your project
> uses 35 applications, you will have the need to connect the applications
> with each others through events. This is why we need:
>
> - a way to generate and react on events.
> - a way to register the events listeners at project startup.
>
> One use of the system is the logging application. You want to initialize
> it correctly at startup (log level, console or file or the sink you
> want) and let other applications push info to be logged in.
>
> The removal of the apps folder is one step in this direction, that is,
> simplification and cleaning.
>
> loïc
>
> --
> Indefero - Project management and code hosting - http://www.indefero.net
> Photon - High Performance PHP Framework - http://photon-project.com
> Céondo Ltd - Web + Science = Fun - http://www.ceondo.com
>



-- 
---------------------------------------------------------
William MARTIN
wysman @NoSpAm@ gmail @DoT@ com

Re: [photon.users] [PDP] Removal of the apps subfolder

From:
Loic d'Anterroches
Date:
2011-07-11 @ 06:45
Hello,

> I am agree with you to remove the folder apps. It was here just for aesthetics.

Good.

> A important point, is how particles will be integrated in the main
> project folder, and how update it.
> So we have :
> - 1 primary repo with the code of the main of your app
> - n Sub modules of all generics particules with a repository for each
> In the case of GIT, we can integrate those sub repo in the primary one
> with the submodules command[1]

One can do that or like me simply copy the app in the project and some
times to times update the code. You can also simply symlink the folder,
have a given "particles" folder in your PHP include path were you put
all the particles, etc. As we "just need to have them in the path", it
gives us quite some freedom.

loíc

> In the futur, we need to have a good documentation about "How to use
> your favorite scm to track your code and integrate particules into it
> ?".
> This point can block a novice (in photon/scm), if i want to integrate
> his code near some particules. For my example, the use of the git
> command "submodules" is uncommon.
> 
> William
> 
> [1] http://book.git-scm.com/5_submodules.html
> 
> 
> 
> On Sat, Jul 9, 2011 at 10:47 AM, Loic d'Anterroches <loic@ceondo.com> wrote:
>> PDP: Photon Design Proposal
>>
>> At the moment we have the subfolder "apps", this look nice, but,
>> basically, it means that we need to push this folder in the include path
>> at runtime. That is, we need to dynamically modify a global PHP settings
>> just to run a Photon project.
>>
>> As I am cleaning all the "bootstrap" code of Photon, I find it was a bad
>> idea. The more we affect the global PHP settings to run Photon, the less
>> we can be reused in other project, unit tests, etc.
>>
>> So, my simple proposal is to remove the apps folder and everything which
>> was in the apps folder must be put one folder below. This also goes well
>> with the idea that any application is available to a Photon project as
>> long as it lives on the PHP include path.
>>
>> My next step is better logging, configuration loading, events. We should
>> basically have a way to "initialize" a Photon project. If your project
>> uses 35 applications, you will have the need to connect the applications
>> with each others through events. This is why we need:
>>
>> - a way to generate and react on events.
>> - a way to register the events listeners at project startup.
>>
>> One use of the system is the logging application. You want to initialize
>> it correctly at startup (log level, console or file or the sink you
>> want) and let other applications push info to be logged in.
>>
>> The removal of the apps folder is one step in this direction, that is,
>> simplification and cleaning.
>>
>> loïc
>>
>> --
>> Indefero - Project management and code hosting - http://www.indefero.net
>> Photon - High Performance PHP Framework - http://photon-project.com
>> Céondo Ltd - Web + Science = Fun - http://www.ceondo.com
>>
> 
> 
>