Menu

"Module"-like function

Help
2003-10-12
2004-01-13
  • Paul Mateescu

    Paul Mateescu - 2003-10-12

    Hi!

    I very much like your PHX framework. I have Fusebox/PHP experience and my main concern is that Fusebox/PHP is rather slow in complex applications. Another concern is that the Fusebox developers all seem to like much more that strange and dying technology named ColdFusion, so every advance done with Fusebox is firstly implemented in ColdFusion and then, IF they have the time (and it seems that they do not have it), in PHP. For instance, Fusebox 4 has been released a few months ago and so far I heard nothing about Fusebox 4/PHP!

    I am firmly taking to PHX. However, I feel there is one more thing to be done in PHX in order to make it better that Fusebox: the Module function which is implemented in Fusebox. In a large application, the Module function comes as a very big help. I have developed an Intranet application that would have been impossible without the Module function, for instance.

    So, would it be possible for you to write the following function:

    Module($command, $params, $stopLayout)

    in which:
    -  $command would be the command, for instance, "phx.shoppingCart.showContents"
    - $params is an array of actual parameters (like $params['customerID'] = 'cl0124', $params['itemsPerPage']=20)
    - $stopLayout is boolean and shows if the layout mechanism should be used or not

    The function would return the contents of the request.

    I think that the absence of this function is the only thing that prevents me from adopting your framework. With this function, PHX will be MUCH BETTER than Fusebox.

    The bad thing is that I have started working at another big project and I was forced to adopt the Fusebox stuff. If you could rearrange your code to make use  of this function in due time, a week would be OK for me, I would adopt it at this early stage. Anyway, I will start using PHX as soon as the Module becomes available.
    I will be verry happy to translate all my sites in PHX and then send you the URLs to prove that people have already started taking to it.

    I don't think this function will go against the principles of simplicity and lightweight. You could rearrange your code so that the main phx.php takes advantage of it, too.

    If there is anything I can do to help working at PHX framework, please let me know.

    Best regards,

    Paul

     
    • Paul Mateescu

      Paul Mateescu - 2003-10-22

      Dear Abdallah,

      I have sent you am e-mail some time ago, concerning a development of your PHX framework.

      Meanwhile, I have read the license terms and to my horror, I found it under the GNU GPL license. As more and more people know, this is a very strange type of license, which no pogrammer who has to eat and feed his/her family would ever accept. Not all people are students supported by parents :-).

      Please disregard my previous e-mail. I will immediately stop any involvement or interest in your framework. However, if you choose to place it under the BSD license, things will change. You may find a copy of the BSD license at www.postgresql.org, for instance.

      Best regards,

      Paul

       
    • Abdallah Al Utaibi

      I agree with you in both cases. Next version will incorporate a BSD license.

      I still need to understand FuseBox's Module function. If you can explain it more to me and how is it used?

      Appreciate it

       
    • Aleksander Podlaski

      As I understand  "Module"-like function called phx_mod is part of new version 1.2?

      I propose two subjects.

      1. I suggest such modification:

      function phx_mod($command, $modVars) {
        global $phx, $phxVars;

      instead of :

      function phx_mod($command, $phxVars) {
          global $phx;

      The reason is: I'd like to access both variables:
      global $phxVars array, and module parameters ($modVars), but your function hides global $phxVars array.

      2. I don't understand the code inside this function:
        ...
            include($filepath . $filename);
      =>  CHDIR($CWD);

      I had to comment chdir($cwd), because there is no $cwd variable and chdir($cwd) returned an error.
      The only reason for above code I could imagine is:

      =>  $CWD = GETCWD();
            include($filepath . $filename);
            chdir($cwd);

      I'm not sure wheter above question are "right thinking" or not.
      I'll be grateful for your advice.

      Best regards,
      Olek

      PS: I hope you understand my english. If not - forgive me.

       

Log in to post a comment.

MongoDB Logo MongoDB