Git Product home page Git Product logo

java-complete-layer's Introduction

java-complete-layer

Guide to implement a complete layer

1.create the model (contractor, getter, setter and to string)


2.create the dao(create dao-interface with unimplemented method, implement method in daoImpl class)


3.create the utility package(create the database connection using singleton pattern)
3.1 import the .jar file
3.2 load the driver class and register with the driver manager
4.inside DAOImpl declare connection and prepare statement variable
4.1 create query and replace ?'s with actual value(using set method)
4.2 execute the query (execute for create/update/delete/insert,executeQuery for select)
4.3 if query is successful return the object
5.create the service layer
5.1 create the package,create the interface
5.2 create the implementation
5.3 declare DAO dependency and create the constructor in order to provide dependency injection
5.4 add encryption, validation
5.5 after implement the encryption code, create a student object to feed the encrypted password and return the studentDAO and the register student method with the new object
6. Create controller package, create the servlet
6.1 get parameter from the frontend, create object for student, studentDAO,studentService and create registeredStudent reference (we creating object using the super type reference) and check if registeredStudent is null(if not null show the success.jsp else the fail.jsp)

7.create the jsp files(index, success and fail files)
8.create the form with the different fields
9.create the database

java-complete-layer's People

Contributors

xxm4ntr4xx avatar

Watchers

 avatar

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.