gettingstarted.doxy
1 /*!
2 \page gettingstarted Getting started
3 <div class="has-toc"></div>
4 
5 # Getting started # {#getting_started}
6 
7 The wCMF project mainly consists of two parts, the application framework and an
8 application template.
9 
10 ## wCMF Framework ## {#framework}
11 
12 The wCMF framework provides the infrastructure to create PHP web applications based
13 on the model-view-controller pattern. The project's source code is hosted at
14 [GitHub](https://github.com/iherwig/wcmf) and can be forked or downloaded from there.
15 
16 If you manage your dependencies using [Composer](https://getcomposer.org/) you may
17 want to add the following lines to your `composer.json`:
18 
19 ~~~~~~~~~~~~~
20 {
21  "require-dev": {
22  "wcmf/wcmf": "dev-master"
23  }
24 }
25 ~~~~~~~~~~~~~
26 
27 ## Default Application ## {#app}
28 
29 The default application is a fully functional data managing application based on the
30 wCMF framework. Besides interfaces for create/read/update/delete (CRUD) operations
31 on all entity types defined in the domain model, it features user, role and
32 permission management as well as a lucene based search.
33 
34 The following screenshots show the list and detail view of an _Author_ entity type.
35 
36 @image html wcmf-default-app1ws.png
37 
38 @image html wcmf-default-app2ws.png
39 
40 ### Prerequisites ### {#app_pre}
41 
42 To run the wCMF default application you will need the following:
43 
44 - Web server (e.g. Apache)
45 - PHP
46 - MySQL
47 - [Composer](https://getcomposer.org/)
48 - [Apache Ant](http://ant.apache.org/) for code generation and deployment
49 
50 To modify the demo model you additionally need:
51 
52 - UML Modeling tool (e.g. [Eclipse Papyrus](http://www.eclipse.org/papyrus/) or
53  [Chronos Web Modeler](http://sourceforge.net/projects/olympos/)),
54 
55 ### Installation ### {#app_install}
56 
57 We assume that the application's root directory is accessible to your web server
58 and mapped to the url `http://localhost/wcmf-default-app`.
59 
60 #### GitHub #### {#app_install_github}
61 
62 The application's source code may be cloned from
63 [GitHub](https://github.com/iherwig/wcmf-default-app) using the following command:
64 
65 ~~~~~~~~~~~~~
66 $ git clone https://github.com/iherwig/wcmf-default-app
67 ~~~~~~~~~~~~~
68 
69 After that you should see the following directories:
70 
71 - _app_
72  - _config_
73  - _locale_
74  - _public_
75  - _src_
76 - _build_
77 - _install_
78 - _model_
79 - _test_
80 - _tools_
81 
82 The application uses Composer to manage external dependencies.
83 Execute the following command in the root directory of the application to fetch them:
84 
85 ~~~~~~~~~~~~~
86 $ composer install
87 ~~~~~~~~~~~~~
88 
89 #### Composer #### {#app_install_composer}
90 
91 Alternatively you can also use Composer to install the source code together with
92 all dependencies:
93 
94 ~~~~~~~~~~~~~
95 $ composer create-project wcmf/wcmf-default-app wcmf-default-app
96 ~~~~~~~~~~~~~
97 
98 ### Model the domain ### {#app_model}
99 
100 The application ships with a demo UML model that may be used as a quick start.
101 It's located in `model/model.uml`. Base models for those who want to start
102 from scratch are located in _model/base/cwm/_ and _model/base/papyrus/_. An
103 in-depth guide on modeling for wCMF may be found in the section \ref model.
104 
105 ### Generate the code ### {#app_gen}
106 
107 A code generator is used to generate class- and configuration files from the domain
108 model. Execute the following command in the _build_ directory of the application in
109 order to run the generator:
110 
111 ~~~~~~~~~~~~~
112 $ ant generate
113 ~~~~~~~~~~~~~
114 
115 ### Setup the database connection ### {#app_db}
116 
117 The database connection information is defined in the file `app/config/server.ini` and
118 defaults to
119 
120 ~~~~~~~~~~~~~{.ini}
121 [Database]
122 dbType = mysql
123 dbHostName = 127.0.0.1
124 dbName = wcmf_testapp
125 dbUserName = root
126 dbPassword =
127 dbCharSet = utf8
128 ~~~~~~~~~~~~~
129 
130 Change these values to fit your local configuration. If privileges are granted,
131 the database will be created automatically in the next step. If not, you have
132 to create it beforehand.
133 
134 ### Run installation scripts ### {#app_db_init}
135 
136 Open a web browser and navigate to `http://localhost/wcmf-default-app/install/`.
137 Click the buttons:
138 
139 - _Update database_ to create the application tables
140 - _Initialize database_ to create the initial data (e.g. the _admin_ user)
141 
142 ### Open the application ### {#app_run}
143 
144 Navigate to `http://localhost/wcmf-default-app/app/public/` to open the login screen.
145 Sign in using
146 
147 - Username: _admin_
148 - Password: _admin_
149 */