-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog
127 lines (81 loc) · 4.49 KB
/
blog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Domain name:
------------
On 4/9/2012 at 17:09 BST I registered the domain name www.rotabug.com
using my justhost account (chorleyandleylandmethodists.org "I am not a
spade" https://my.justhost.com/cgi-bin/cplogin). It is free for one year,
and they will automatically re-register it each year, I assume at the
cost of £7.99 that was shown on the registration age.
To begin a new blank project:
----------------------------
- install eclipse (https://developers.google.com/web-toolkit/usingeclipse)
- install GWT plugin for eclipse
- create a web application
- Rotabug in package com.rotabug
- do generate sample code
- "Create project in " -> /var/www/html (see
http://cambiatablog.wordpress.com/2010/11/22/gwt-developing-with-hosted-mode-and-phpxampp/ )
- delete GreetingService*.java from src/com.rotabug.client
- delete FieldVerified.java from src/com.rotabug.shared
- delete all content from onModuleLoad in Rotabug.java
- delete all unused stuff from Rotabug.java
- Edit Rotabug.html within "war"
- Remove comments
- Change title to "Rotabug - rota creation made easy"
- Delete all body elements other than the history enabling iframe and <noscript> tag.
- Add a line "<div id="Rotabug"></div>" at the top of the body.
- Right click on "war" and click on "New" then "Other", then "PHP" then "PHP File" - enter name "Rotabug.php" and finish.
- Right click on "war" and click on "New" then "Other", then "PHP" then "PHP File" - enter name "rb.php" and finish.
- Copy ~/Downloads/rb.php /var/www/html/Rotabug/war (to replace the file created above -
see redbeanphp.com)
- Right click the eclipse project name in the package explorer ("Rotabug") and look for
the Run As > Run Configurations… alternative. In the dialog box, sele the "Web
Application" - "Rotabug" item in the left tree, and open the Arguments tab. Set the
startupurl string to http://localhost/Rotabug/war/Rotabug.html . Then click "Run" at
bottom of dialog box.
- DO the same again but this time select "Debug As" > "Debug Configurations"� alternative.
- In eclipse, click the "GWT Compile PRoject" item in the "Google" button
- Click the green "Run" button, then double click the url that appears (should be http://localhost/Rotabug/war/Rotabug.html?gwt.codesvr=127.0.0.1:9997)
To test a change:
-----------------
- In eclipse, save all changes (contrl-S) and compile the project ("GWT
Compile Project" in the google button)
- If development mode is not already running, click the green "Run" button,
then double click the url that appears (should be
http://localhost/Rotabug/war/Rotabug.html?gwt.codesvr=127.0.0.1:9997)
- If development mode is already running, click the yellow back-to-back
arrows symbol, and reload the web page in the browser.
MVP etc
-------
See https://developers.google.com/web-toolkit/articles/mvp-architecture
For each form/GUI seen by the user that is part of the app we need:
1) Give it a name: e.g. "Home", "Login", "EditVenue", etc
2) A presenter class: e.g "HomePresenter", "LoginPresenter", etc. It
includes a definition of a "Display" interface that defines all the
interatactions between the presenter and the view (and a method to get
the view as a single Widget). .
3) A view class: e.g. "HomeView", "LoginView", etc. This contains just the
widgets themselves with no event handlers or other logic.
4) EntryPoint.onModuleLoad: Creates any app-wide resources (used by
multiple views/presenters). E.g. the server and user requesters, the
AppController, the EventBus. It then passes control to the AppController.
5) Define a set of app wide event classes - these are events that a
presenter fires that are acted upon by other presenters. Each class needs
to extend GwtEvent., and requires an associated event handler class.
GIT:
----
http://unicase.blogspot.co.uk/2011/01/egit-tutorial-for-beginners.html
http://wiki.eclipse.org/EGit/User_Guide
PHP:
1) install PDT (see http://wiki.eclipse.org/PDT/Installation#Eclipse_3.7_.2F_Indigo_.2F_PDT_3.0)
2) Check php server is running by creating /var/www/html/index.php holding
<?php
phpinfo();
?>
and then visiting http://localhost/index.php
3) The rotabug.php file writes to a log file so make sure it exists:
% touch /home/dsb/rotabug/php.log
% chmod a+w /home/dsb/rotabug/php.log
4) Make sure phpmyadmin is installed (e.g. see help.ubuntu.com/community/phpMyAdmin)
5) sudo /etc/init.d/apache2 reload
6) Go to http://localhost/phpmyadmin in a browser, log in as root.
7) Click "databases" and create a new database called rotabug