govforms's Introduction
########################################## Answer 1 ########################################## It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract results. This class executes SQL queries or updates, initiating iteration over ResultSets and catching JDBC exceptions and translating them to the generic, more informative exception hierarchy defined in the org.springframework.dao package. Following classes use JDBCDaoTemplate. Actually they are the implementation for DAO used in the application. bd.gov.forms.dao.FormDaoImpl bd.gov.forms.dao.ListDaoImpl bd.gov.forms.dao.UserDaoImpl Its pitfalls 1. We need to write SQL queries which is considered as "Boiler Plate Code" 2. It will be hard to write database vendor independent SQL queries 3. Sometimes it is needed to build sql query, which can be erroneous So we will use JPA which is a standard for JavaEE application leaving those responsibility to underlying layer. ########################################## Answer 2 ########################################## Hibernate is an ORM. Advantages: it will generate database vendor independent SQL queries. Connection pooling & transaction management is possible to be done automatically. We can prefer using hibernate as persistance provider. Additionally JPA has support from JavaEE standard for injecting EntityManager & handle transaction automatically. From the perspective of this application it is not possible to create beans for the dynamic tables. We can consider using reflection to do that, but these are extreme cases. ########################################## Answer 3 ########################################## Uses of Hibernate can be decided on 2 cases. Data Read Data Write Generally it is not preferable to use hibernate(any ORM) for data read. It is better to use SQL statment or JDBCTemplate for this application. If Data Write is much more than Data read or about to be same I would prefer using Hibernate instead of JDBCTemplate. According to uses of this applicatoin we can think that it will have much data read compare to data write. So it should be preferable to have JDBC template. However we propose create seperating two different application. One for Form creation. Another for public uses & data entry or form download. Optionally third applicatoin can be created for analyzing data. All of them can be packages as an ear project. ########################################## Answer 4 ########################################## Following are the example uses @ModelAttribute("<something>") @Repository("formDao") @Controller @RequestMapping("<something>") @Service //these could be used @Qualifier //these could be used ########################################## Answer 5 ########################################## DAOs follow the principal Controllers follow the principal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.