Make each application editable from the web ============================================ Web Development Environment --------------------------- A web based tool (web application) that will be written using phpWebApp. This tool will be used to construct, modify and collaboratively develop web applications that are based on phpWebApp. All this development will be done from the browser, using a web interface. Each page of the application will display at the end a link: 'Edit'. When this link is clicked the framework will open the WDE for edit this page. The link 'Edit' will be displayed only if the constant ENABLE_EDITING in 'config/const.Settings.php' is true. The framework may also optionally have authentication for editing. So, if authentication is enabled then the user will be asked for a username and password before proceeding with editing. This authentication will be done only once for session, and then the user can freely switch between 'View' mode and 'Edit' mode (between the application and WDE) until the end of the session. While in editing mode, the developer will have several ways and tools for choosing what to edit. - One of them will be the file browser, so that the user can browse the folder structure of the application, can add or delete files, and can preview and edit files (which may be templates, php code, js code, etc.). - Another tool may be a list of the webclasses and a tree of the webobjects of the application, where the user can choose which one to preview or edit. - Another tool may be a tree (that can be collapsed and expanded on each node) of all the tags (tags reckognized by the framework) of the page, like , , , etc. Then each tag (each node) can be selected for preview or editing. - Another tool may be a view of the page where the s and s are displayed with borders around them and have a titlebar on the top. The titlebar displays info about the webobject or the include and also have some buttons that can colapse the box (so that only the title bar remains), expand it, remove the box from this webobject, hide this webobject (so that the surrounding layout can be studied more conveniently), edit this webobject or the corresponding webclass, etc. When editing a webbox, several aspects of it can be edited: the template (HTML code), the client-side logic (JS code), the server side logic (PHP code), the DB logic etc. It can also have a button for previewing (testing) the webbox. Since a webbox has state vars and acts like a state machine, it would be very nice to be able to view a diagram of this state machine and to be able to modify it somehow. It would be even better if the changes in the statechart diagram are automatically engineered into the PHP code and the changes in the PHP code are automatically reverse-engineered into the statechart diagram. Also each webbox should have documentation, which shows how to use it (for those that want to use it) and how it is constructed (for those that want to modify it). A toolbox may be available as well, that will be used to insert into a page predefined objects, that can be customized to fit the needs of the application. Such predefined objects may be a dynamic menu (or a sitemap), a login box, etc. Each object will have a way to customize it, e.g. the menu will have a menu editor that will allow to add and remove elements, to change the look and feel of the menu (colors, styles etc.). Also a code library (that contains PHP functions, JS functions, etc.), a template library, a button library (image library) etc. may be useful. The users can use items from libraries or can add items to the libraries. It is better that these libraries are categorized, rather than flat, so that the user can find easier what he needs. (The toolbox can also be thought like a library of webboxes and webclasses). The application development environment can be developed in several steps: - Initially only a single user can make changes to the application and these changes are published immediately. Two developpers can edit different parts of the application, but if they try to edit the same part, they may destroy the changes of each-other. - Later it may be improved so that multiple developpers can work concurrently without conflicts. This will require that the WDE makes use of the CVS. Also, it will be better that the changes are not published immediately but they require the aproval of an authorized person (admin, team leader, manager, etc.), in order to be published to the public site. This will ensure that any bugs that disrupt the work of the application are not propagated to the public site, which has a stable version of the application. Only after the new version is totally finished, tested and fixed, all the changes may be published to the main site. But this feature can be turned on and off optionally, in case that sometimes you may want to publish the changes immediately, without any approval, e.g. when you want just to fix something or you want everybody to edit the application. Also, it will be good if for any user or group of users that can edit the application, the coordinator (or application manager, or team leader) can specify which parts of the application (which folders, files or webclasses) the user can touch or cannot touch.