concurrency programming in java - 04 - essentials of java practice
TRANSCRIPT
![Page 1: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/1.jpg)
Concurrent Programming
04
Sachintha Gunasena MBCShttp://lk.linkedin.com/in/sachinthadtg
![Page 2: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/2.jpg)
Java Programming Workshop
Sachintha Gunasena MBCShttp://lk.linkedin.com/in/sachinthadtg
![Page 3: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/3.jpg)
FileIOTest
• Simple application to perform File Input/Output operations.
![Page 4: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/4.jpg)
JDBC Example• Simple application to connect to the
database, read data from a database, edit data on a database, and delete the database.
• CRUD• important to import the correct database
driver to the project• the database server must be running
![Page 5: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/5.jpg)
JavaDBApp• Simple GUI application to
• get a username and password as input • and connect to a predefined database • to check whether the data entered in the form is matched
with data in database• then return a true or false• display a message stating whether the login was successful
or not• import correct database library to the project• make sure the database server is running
![Page 6: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/6.jpg)
Servlet Demo
• A servlet to authenticate a user by connecting to a login database
• import development server to the project• import correct database library to the
project
![Page 7: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/7.jpg)
Login Demo• Simple login page which will connect to a
database and authenticate a user• uses jsp pages• import correct database driver to the
project• import the development server used to test
the project
![Page 8: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/8.jpg)
Assignment• Create a GUI Java application to manipulate a database• User must be logged in first via the initial welcome and login page• There must be a separate page containing controls to
• create a table• add data to an existing(or newly created) table• delete a table
• Finally there must be an option to save a selected dataset from the database to a file in the user computer
• Errors must be properly handled and displayed to the user wherever possible
![Page 9: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/9.jpg)
Next Up…
• Concurrency
![Page 10: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/10.jpg)
References
• http://www.lionblogger.com/java-application-mysql-database/
• http://www.lionblogger.com/how-to-create-a-simple-login-form-using-java-servlet-and-mysql-db/
Sachintha Gunasena MBCShttp://lk.linkedin.com/in/sachinthadtg
![Page 11: Concurrency Programming in Java - 04 - Essentials of Java Practice](https://reader036.vdocuments.site/reader036/viewer/2022082322/5878ea5d1a28abfa038b66b9/html5/thumbnails/11.jpg)
Thank you.
Sachintha Gunasena MBCShttp://lk.linkedin.com/in/sachinthadtg