App-MFILE-WWW

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for App::MFILE::WWW

*** N.B.: for versions 0.001-0.078 the distro was known as App::Dochazka:WWW on
    CPAN and the code was included in the 'dochazka' project on SourceForge

0.001  2014-08-11 17:22 CEST
- establish App::Dochazka::WWW on a green field (more or less)

0.002  2014-08-11 19:11 CEST
- modifications to get it to pass "bare basic" test suite

0.003  2014-08-12 10:23 CEST
- WWW.pm: write some POD

0.003  2014-08-12 16:57 CEST
- bring in Resource.pm from App-Dochazka-REST and start adapting it

0.004  2014-08-13 03:37 CEST
- bin/dochazka-www: bring in server startup script from App-Dochazka-REST
  and adapt to our needs
- config/WWW_Config.pm: add some config params
- WWW.pm: bring in initialization routine from App-Dochazka-REST, adapt it, and
  call it from dochazka-www
- Resource.pm: eliminate large chunks of App-Dochazka-REST code that we don't
  need here; add debug messages; think through how requests will be validated
  by writing comments
- looking good overall -- the server starts and displays placeholder
  credentials dialog

0.005  2014-08-13 08:36 CEST
- change distro sharedir from 'config/' to 'share/', move config/ into it
- make a new 'comp/' subdir under share/, for Mason components
- make a new 'auth.mc' top-level Mason component for the credentials dialog
- WWW.pm: instantiate Mason interpreter and export it as $Mason singleton;
  load our distro sharedir instead of App-Dochazka-REST's; replace 
  placeholder auth dialog with one constructed by Mason on the fly from
  the template stored in 'share/comp/auth.mc'

0.006  2014-08-13 13:17 CEST
- Resource: add 'service_available' method for purpose of logging incoming
  HTTP requests, as it is the first method Web::Machine calls
- dochazka-cli: serve files in 'js/' and 'css/' directories statically using
  Plack::Middleware::Static

0.007  2014-08-13 13:27 CEST
- MANIFEST: add bin/dochazka-www

0.008  2014-08-13 14:56 CEST
- MANIFEST: add missing files
- share/comp: bring in index.html.mc, dhandler.mc, and auth.mi from my old
  'mfile-mason' project; start adapting them to our purposes
- share/js: bring in jquery.js from jquery.com/download
- WWW.pm: export $VERSION so we can get to it from dhandler.mc
- executive summary: server starts and displays login dialog

0.009  2014-08-13 15:04 CEST
- WWW.pm: POD - add Jonathan Swartz's suggestions regarding a
  'Mason::Plugin::Utf8' to the 'Development notes' section

0.010  2014-08-13 16:05 CEST
- Build.PL: update dependencies
- MANIFEST: add auth.mi

0.011  2014-08-14 09:15 CEST
- add COPYING file with text of BSD license
- WWW.pm: write some POD
- add license boilerplate to Mason components
- auth.mi: get length of username and password fields from site configuration
- tickets/: work on tickets

0.012  2014-08-14 14:58 CEST
- share/config/WWW_Config.pm: add DOCHAZKA_WWW_HOST and DOCHAZKA_WWW_PORT
- bin/dochazka-www: look into how we could allow admin to specify host/port on
  command line, yet default to values in site configuration if they are not
  specified there

0.013  2014-08-14 17:01 CEST
- fighting with web technologies

0.014  2014-08-14 20:18 CEST
- add new JavaScript file js/02auth.js with authentication dialog-related
  functions
- Resource.pm: fix bug "don't die when no context at line 349"
- comp/auth.mi: eliminate useless legacy iframe; do not submit form -
  leave everything to the JavaScript code
- work on tickets

0.015  2014-08-15 11:14 CEST
- comp/: add license boilerplate; merge comp/index.html.mc into dhandler.mc
- js/02auth.js: merge beginnings of auth_check code

0.016  2014-08-15 17:47 CEST
- use jQuery 2.0 instead of 1.1.1
- jettisoned idea of having the JS code open a connection to the REST
  server via Ajax calls -- instead, will store a LWP::UserAgent object
  in the session data 

0.017  2014-08-16 10:15 CEST
- lots of trial-and-error work to get login dialog to authenticate against REST
  server with LWP::UserAgent object in session data
- current state: login dialog displays and user can enter credentials; each
  time the form is submitted, the credentials are authenticated to the REST
  server and the REST server's response is displayed

0.018  2014-08-18 10:06 CEST
- fix bug "messages not getting loaded properly due to typo in name of
  WWW_Message_en.conf file"
- rename 'auth.mi' to more descriptive 'login_dialog.mi'
- WWW.pm: add some POD detailing the request-response cycle
- Resource.pm: eliminate resource_exists and integrate _validate_session into
  is_authorized; improve session recognition; clarify that all POST requests 
  are treated as form submits and handled in 'process_post', which will not
  be reached if session not authorized
- dhandler.mc: clarify what dhandler.mc's job is 
- 02auth.js: rename to login_dialog.js and refactor to work with new
  generalized JSON structure for form submits

0.019  2014-08-18 10:43 CEST
- fix bug: "exception in Resource.pm->is_authorized"
- login_dialog.js: display reassuring message before attempting to
  authenticate to REST server

0.020  2014-08-18 11:45 CEST
- Resource.pm: fix 'known_content_type'
- add comp/main.mi and js/main.js
- dhandler.mc: modifications to enable display of main page when session is
  authorized; add debug messages
- login_dialog.mi: call MFILE.main() upon successful auth

0.021  2014-08-18 17:02 CEST
- WWW.pm: edit POD to get rid of 'Use of uninitialized value $_ in pattern
  match (m//)' error
- lots of other changes (WIP)

0.022  2014-08-18 22:19 CEST
- config/mainMenu_Config.pm: add config file for runtime generation of
  the main menu
- add mainLogout.{mi,js}
- rename main_menu.{mi,js} -> mainMenu.{mi,js}
- rename login_dialog.{mi,js} -> loginDialog.{mi,js}
- Resource.pm: move init_session function to WWW.pm
- Form.pm: fix logic; add mainMenu and setSessionTarget targets
- js/mainMenu.pm: add mainMenuFormSubmit function with AJAX call
- status: login dialog works, dynamically-generated main menu is displayed,
  mainLogout works
- NEXT: cache Mason-generated source in the JavaScript top-level object so we
  can switch between forms/targets without triggering a page reload

0.023  2014-08-19 14:16 CEST
- WWW.pm: write POD
- Form.pm: add a debug message
- Resource.pm: add debug messages; don't push session object onto context; 
  refactor is_authorized

0.024  2014-08-19 16:59 CEST
- attempt to cache subcomponent output in JavaScript object (failing so far
  due to quoting issues)

0.025  2014-08-19 23:37 CEST
- IMPLEMENT SUBCOMPONENT CACHING
- WWW.pm: export a $tcache singleton
- Form.pm: import $tcache singleton; fix mainLogout function; make
  mainMenu function return cached content if available; convert
  setSessionTarget into getTargetCache
- dhandler.mc: import $tcache singleton; get rid of previous caching attempt; 
  use content from $tcache if available so subcomponents are not called
  more than once
- mainMenu.js: add JS code to check the tcache and display the subcomponent source directly if
  available in MFILE.tcache object (not tested -- need to implement at least two subcomponents
  other than "mainLogout")

Changes  view on Meta::CPAN

  so the MFILE.currentEmployee object's properties match those of the employee
  object in the REST server's data model
- remove 'priv' from empProfile and empProfileEdit, as it is not a property
  of the employee data model object and it's presence here might confuse users   

0.052  2014-08-27 22:31 CEST
- add 'new employee' simple form
- 013simpleForm2.js: fix some minor issues in makeSimpleFormSource function

0.053  2014-08-28 10:03 CEST
- 006simpleForm1.js: add 'dispEmployee' target; add preamble text to 'empProfileEdit' target; 
  Nick is a required field, so it gets a star
- 011simpleMenu2.js: clear '#result' before displaying the menu
- 013simpleForm2.js: text of Back menu entry is now configurable; add 'dispEmployee' target;
  makeSimpleFormSource display preamble; menu selection defaults to 'X' (back) when there
  are no other menu entries
- 110empProfile.js: add 'dispEmployee' target; newEmployee target now calls 'dispEmployee'
  upon successful insert

0.054  2014-08-28 16:16 CEST
- WWW/Resource.pm: trying to tame JSON encoding/decoding
- js/: start working on employee search/browse
- status: implemented new 'Search employee' menu item, simple form for
  getting search key, AJAX call to REST server, "browse" results in cases
  when 0 or 1 employees found

0.055  2014-08-28 22:29 CEST
- js/: first shot at employee search functionality for administrators: simple 
  form gathers a nick search key (e.g. 'ro%') which matches 'n' records,
  which can then be displayed/browsed using a clumsy set of forms -- it is 
  enough to see that:
  (a) it can be done using the simple forms, but
  (b) realistically, a new widget will be needed

0.056  2014-08-29 08:53 CEST
- js/: add 'changePassword' target
- status: changePassword works, but REST server does not allow passerbies and
  inactives to change their passwords -- need to look at that

0.057  2014-08-29 13:42 CEST
- Resource.pm: 'rest_req' now returns entire HTTP::Response object instead
  of just its 'code' property: adapt our code to handle that; AJAX calls 
  return HTTP response code _and_ message
- js/: run JSlint on all the JavaScript source files and fix all errors

0.058  2014-08-29 16:18 CEST
- css/: widen application frame by "50 pixels"
- Build.PL: require App::Dochazka version 0.164 minimum
- 002lib.js: fix MFILE.lib.rightPadSpaces (broken by JSlint-related
  changes)
- 013simpleForm2.js: fix bug "form submit broken when clicking on submit
  button"

0.059  2014-08-29 17:20 CEST
- Resource.pm->_login_dialog: improve error displayed on login failure
- 007directAction.js: constructor gives dA objects a default start method
  if one is not provided in the argument object; add 'insertEmployee' dA
- 100login.js: refactor MFILE.loginDialogFormSubmit, improve error message
  displayed on login failure
- 110empProfile.js: refactor MFILE.directAction.newEmployee.start so it
  properly validates the nick before attempting the insert, which is
  implemented by calling the new 'insertEmployee' dA target

0.060  2014-08-29 22:36 CEST
- implement "Masquerade as different employee" feature
- js/: add 'masqEmployee' target; rename 003targets.js to 003prototypes.js
  after adding MFILE.empProfile prototype to it; minor cleanup
- 011simpleMenu2.pm: check MFILE.currentEmployee's heritage each time we enter
  a menu, and fix it if necessary (it loses its heritage on each page reload,
  but each page reload takes us to the main menu, where we restore the heritage)
- HTML.pm: give 'userbox' an id so we can refer to it
- test and debug MFILE.empProfile.sanitize function, now using it to ensure
  that employee objects don't have illegal properties when sending them to
  the REST server

0.061  2014-09-01 07:49 CEST
- Unicode hell

0.062  2014-09-02 17:57 CEST
- Unicode hell
- js/: split JS source files into 'mfile' and 'dochazka' trees -- 'mfile'
  is the "framework" and 'dochazka' is our "application" (preparation for
  Hackweek 11), minor cleanup
- HTML.pm, config/WWW_Config.pm: instead of having all the JS source code files
  in a single array ref, each source file now has its own site param

0.063  2014-09-02 18:42 CEST
- js/: js/mfile/004simpleMenu1.js contains "general" code, while the "real"
  simple menus are defined in js/dochazka/004simpleMenu1.js, which overwrites
  the MFILE.simpleMenu object; eliminate MFILE.listOfAllSimpleMenus array since
  this information can easily be derived from the MFILE.simpleMenu object

0.064  2014-09-03 12:21 CEST
- js/: separating general ('MFILE') from specific ('DOCHAZKA') code,
  implementing privilege history submenu (WIP)

0.065  2014-09-03 13:58 CEST
- Resource.pm, WWW_Config.pm: implement DOCHAZKA_WWW_BYPASS_LOGIN_DIALOG
  site configuration parameter so we don't have to type in credentials 
  a gazillion times a day

0.066  2014-09-03 16:40 CEST
- js/: get crazy idea to add a "Run unit tests" entry to the main menu,
  start implementing it

0.067  2014-09-03 17:34 CEST
- js/: move "specific" simple forms code to /js/dochazka, eliminate
  MFILE.listOfAllSimpleForms because it is trivial to derive the list
  from the MFILE.simpleForm object; add "Run unit tests" entry to main
  menu (WIP)

0.068  2014-09-03 22:44 CEST
- Resource.pm: fix bug ('ip_addr' and 'last_seen' not getting set properly 
  following addition of DOCHAZKA_WWW_BYPASS_LOGIN_DIALOG); add more
  debug messages
- js/: move some code to mfile/002lib.js, move more Dochazka-specific code
  from mfile/ to dochazka/

0.069  2014-09-04 11:12 CEST
- HTML.pm, config/WWW_Config.pm: fix bug (DOCHAZKA_WWW_JS_PRIVHISTORY was not
  defined and hence not being loaded at runtime)



( run in 1.162 second using v1.01-cache-2.11-cpan-39bf76dae61 )