Giter Site home page Giter Site logo

ytools's People

Contributors

xploreraj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ytools's Issues

encrypting password

  1. password stored in encrypted format
  2. enhancing App to have more methods to do different tasks, from data and data file generation to creating or updating password.

DataService::ModulesData getModulesData() returning NULL for empty file.

In DataService::ModulesData getModulesData(), we are returning modulesData as null if JSON file is empty and Boon throws ClassCastException while mapping with ModulesData.class.

Q. What if we create an empty object and return. Then we also need to see dependencies of this method in AjaxController where its being directly accessed.

Usage of REST API

This will ensure that we no longer will need to manually run our App since it will reside on server.
Rather this project should be converted into REST with HATEOAS concept, so that creating or updating of data can also be done via REST clients.

And a super admin password ensures that we can manipulate normal admin/content creator password.

Chances of data file getting erased

Is there any chance of data file getting erased programmatically with Boon, as we are not accessing it with other means?

I think the contents got erased while reading empty file and mapping to ModulesData, or
with Module information present but Submodule name was null.

UI: index.jsp and create_edit.jsp

  1. For rendering the info in index.jsp, based upon the values of these fields, empty or not, collapsible divs have to be introduced. For example, in JSON response, lets say technicalInfo is coming as null/empty string, then either,
    • this should not be used to create any displayable element on index.jsp, or
    • we show those collapsible divs, but on expanding, show NA.
  2. For basic rendering, index.jsp will serve as example, where we are also replacing \n occurrences with <br> in the info we display.
  3. create_edit.jsp I think will have only simple text areas for all fields. This also needs to be enhanced.
  4. Company branding space needed too!
  5. The frame containing the info should be vertically scrollable. I think its inherently provided by browser, so need to try for short and long contents both.

Synchronization for data access :: Future proof

synchronizing read and write in DataService.
Issue 1: WRITE

  1. Two admin users read a version of the file,
  2. Now if one saves his info,
  3. And then another admin saves, then the previous change is lost.

Issue 2: READ
Multiple concurrent reads might lead to exception from file access.

Data file relative path not working

While fetching data

java.lang.ClassCastException: org.boon.core.value.CharSequenceValue cannot be cast to data.ModulesData
    at service.FAQReadWriteService.getModulesData(FAQReadWriteService.java:31)

create_edit.jsp : Admin page security

Admin page (create_edit.jsp) should be moved into WEB-INF to prevent direct access and an authentication should be used.
/WEB-INF/admin/create-edit.jsp
To start with, a hard coded passkey.

Merging different writes before writing to file

If two or more people are working on module information, and are saving it, then as per current basic implementation, the latest person's changes will be final, overwriting the previous saves.
We have to prevent that.

Probable solution:
A write buffer that merges different modules before final commit to file?

Presumptions:
Each user works on non-colliding submodules.

Using HTML5 localstorage to deliver information locally

To deliver files to client for read access and also prevent frequent file read access, we can store the contents on client side using localstorage (that can support up to 10 MB which will largely suffice).

This means the client requests will be served locally itself. An option to refresh the info will be added in JSP that should bring fresh data from server file and replace existing localstorage data.

Ref: https://en.wikipedia.org/wiki/Web_storage

Working with empty files not possible

Creating new information on an empty file is leading to exceptions and not possible now. As of now, at least one module information has to be present in file, Else following problems occur:

  1. file is cleared (even if some key is null, since we are converting names keyset to Treeset which throws NPE.
Module.getSubModuleNames()
ModulesData.getModuleNames()
May 08, 2016 2:47:17 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [controller.AjaxController] in context with path [/theFaqApp] threw exception
java.lang.ClassCastException: org.boon.core.value.CharSequenceValue cannot be cast to data.ModulesData
    at service.FAQReadWriteService.getModulesData(FAQReadWriteService.java:27)
    at controller.AjaxController.doPost(AjaxController.java:48)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.