nice tool you've developed. But unfortunately I can't find any documentatiom about how SWC gets up and running. Only a big phpDoc generated technical documentaion is shipped with SWC, which say nothing about the installation anyway.
I've got no idea how to install this thing! I'd appreciate any kind of help. Thank you and keep up the good work!
Regards
Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a lot for pointing this fact and sorry that I have overlooked the fact that a comprehensive installation guide is missing. I will add (hopefully a better one than the one below) to next version. I try to provide a quick guide here, if there are still open questions please don't hesitate to ask.
Nice development with SWC!
Kind Regards,
sTEFANs
The SWC directory as downloaded must be put under a directory that is accessible via web browser and where PHP scripts can be executed.
For each project that should be controlled via SWC a configuration needs to be created. This configuration implements the interfaces given by the abstract class 'SwcConfigAdapter' located in swc/inc/config.inc.php.
Furthermore, the configuration must be 'registered' at an overridden version of the configuration factory (class SwcConfigFactory), also declared in swc/inc/config.inc.php.
Detailed documentation of these classes can be found within the API documentation of these classes.
Concrete examples are implemented for the 'TestProjects'. For an example of a SWC configuration as described below, please have a look to 'tp1.html' and 'tp1_conf.php' located in the root directory of SWC. To open this page within a browser simply use the URL to SWC <swc_path>/tp1.html. An example implementation for option 2 can be found in 'swc/config/std_config_factory.inc.php' and 'swc/config/std_config1.inc.php' or 'swc/config/std_config2.inc.php'.
There are two ways of applying configurations via Configuration Factory:
1. In the root folder of a project that should
be controlled via SWC is a frameset page. This
frameset page offers just one frame. The source URL
of that frame points to swc/start.php and has a argument
that points to the SWC configuration file for that project.
This means the frame src could be swc/start.php?config=../conf.php.
The path of the config file must be relative to SWC directory
from SWCs point of view. The example above assumes that SWC is
located within root/swc directory. By the way, it is a good idea
to place the project also into a subdirectory of root, just to keep
everything clean and separated.
Within this configuration file there must be function called
<b>GetSwcConfigFactory()</b> that returns the implementation
object of <b>SwcConfigFactory</b> and provides the config
for the project.
2. If a configuration factory is not provided as described above,
SWC takes the config factory instance provided within
<b>.swc/config/std_config_factory.php</b>. This factory needs to be
implemented in a way, that it returns <b>Configuration</b>s for
all projects that should be controlled by SWC.
Both scenarios described above has some advantages but also some disadvantages.
It depends highly on the development rules and environment, which one
to use. However, examples for both scenarios are provided together SWC.
Please have a look into the html root directory for scenario 1 and into swc/config
for scenario 2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
nice tool you've developed. But unfortunately I can't find any documentatiom about how SWC gets up and running. Only a big phpDoc generated technical documentaion is shipped with SWC, which say nothing about the installation anyway.
I've got no idea how to install this thing! I'd appreciate any kind of help. Thank you and keep up the good work!
Regards
Peter
Hi Peter,
Thanks a lot for pointing this fact and sorry that I have overlooked the fact that a comprehensive installation guide is missing. I will add (hopefully a better one than the one below) to next version. I try to provide a quick guide here, if there are still open questions please don't hesitate to ask.
Nice development with SWC!
Kind Regards,
sTEFANs
The SWC directory as downloaded must be put under a directory that is accessible via web browser and where PHP scripts can be executed.
For each project that should be controlled via SWC a configuration needs to be created. This configuration implements the interfaces given by the abstract class 'SwcConfigAdapter' located in swc/inc/config.inc.php.
Furthermore, the configuration must be 'registered' at an overridden version of the configuration factory (class SwcConfigFactory), also declared in swc/inc/config.inc.php.
Detailed documentation of these classes can be found within the API documentation of these classes.
Concrete examples are implemented for the 'TestProjects'. For an example of a SWC configuration as described below, please have a look to 'tp1.html' and 'tp1_conf.php' located in the root directory of SWC. To open this page within a browser simply use the URL to SWC <swc_path>/tp1.html. An example implementation for option 2 can be found in 'swc/config/std_config_factory.inc.php' and 'swc/config/std_config1.inc.php' or 'swc/config/std_config2.inc.php'.
There are two ways of applying configurations via Configuration Factory:
1. In the root folder of a project that should
be controlled via SWC is a frameset page. This
frameset page offers just one frame. The source URL
of that frame points to swc/start.php and has a argument
that points to the SWC configuration file for that project.
This means the frame src could be swc/start.php?config=../conf.php.
The path of the config file must be relative to SWC directory
from SWCs point of view. The example above assumes that SWC is
located within root/swc directory. By the way, it is a good idea
to place the project also into a subdirectory of root, just to keep
everything clean and separated.
Within this configuration file there must be function called
<b>GetSwcConfigFactory()</b> that returns the implementation
object of <b>SwcConfigFactory</b> and provides the config
for the project.
2. If a configuration factory is not provided as described above,
SWC takes the config factory instance provided within
<b>.swc/config/std_config_factory.php</b>. This factory needs to be
implemented in a way, that it returns <b>Configuration</b>s for
all projects that should be controlled by SWC.
Both scenarios described above has some advantages but also some disadvantages.
It depends highly on the development rules and environment, which one
to use. However, examples for both scenarios are provided together SWC.
Please have a look into the html root directory for scenario 1 and into swc/config
for scenario 2.