Progressive-Learning-Platform / PLPTool6

Prototype for PLPTool frontend interface overhaul
2 stars 4 forks source link

[Web] Add plp web repository to main PLP repository #94

Open tobielf opened 6 years ago

tobielf commented 6 years ago

I checked out the code from https://github.com/dhawal9035/WebPLP to my local machine. The path WebPLP/src/main/java/edu/asu/tool/* files comes from PLP backend, we don't need to change these. The critical issue is we need to provide a configure script to install the dependency software, like MySQL. Addtionally, more library needs to add into the lib folder. For example, org.apache.commons.compress, org.apache.commons.io and org.apache.commons.cli.

tobielf commented 6 years ago

Web team member, please update your progress here. Clone the code from this repository, and resolve those issues above. Provide a manual to guide the user setting up MySQL. Once we can run the WebPLP stand alone, then it can merge into the PLP repository.

tusharpandit18 commented 6 years ago

Could you please elaborate on : “The critical issue is we need to provide a configure script to install the dependency software, like MySQL.“. Do you mean a shell script or just steps providing ways to setup MySql?

tobielf commented 6 years ago

For example, if I am a new user to this program. I download the WebPLP, I can't run it, but I don't know why. Maybe some dependency issue, like I didn't install the MySQL on my computer? So, a README file need to provide on how to deploy the Web Server, what's the prerequisite to run the WebPLP. Furthermore, if we can provide a automatically deployment script will be better, like try to run the mysql command from the shell script, using homebrew or apt-get install to setup a new MySQL. In the future, maybe we can provide a docker image to make the deployment much easier.

tobielf commented 6 years ago

@mjadhav1 Please add a dialog on MySQL connection exception. Create a new branch "fixing-bug-94" to add your changes.

tobielf commented 6 years ago

@mjadhav1 For MySQL problem, look into /dao/UserDao.java saveUser, instead of using JdbcTemplate, and jdbc.updte() directly without try-catch, check this exampe, section 4. Data Access Object (DAO) pattern. Create a connection object first then you will see how to handle exceptions.

mjadhav1 commented 6 years ago

@tobielf But the control flow doesn't come to the UserDao.java in the current code. How can I tell the application to execute the methods in the UserDao.java?

image

and can you give me the DB schema(plp_database)?

tobielf commented 6 years ago

For this kind of error, you need to inject an Exception Handler into Spring Framework. All exception will be handled at one place. Create an "exception" folder, and put different types of handler under this folder.

I don't have DB schema, ask @abhilash576 for help.

mjadhav1 commented 6 years ago

@abhilash576 Can you provide me the DB schema for Web PLP DB?

abhilash576 commented 6 years ago

The db schema was local to dhawal machine and the same was not updated to WebPlp. I will check with him and update on the same.

tobielf commented 6 years ago

@mjadhav1 Read the code in detail, you will get the database name, table name, and table structure. Once you got all the information, create a program to initialize the DB.

mjadhav1 commented 6 years ago

@tobielf @abhilash576 What is the purpose of user_info table which has emailId, first_name and last_name columns? When you login, it inserts the entry into the table. When the same user try to login next time, it throws an exception. I want to know, the purpose of the table.

abhilash576 commented 6 years ago

Currently the userinfo table collects the data on who all are using the WebPLP.