advanced Spring Descriptive Questions

1. What do mean by Spring MVC ? 
Ans: In the spring framework, the Spring MVC module provides comprehensive support for the MVC pattern, with support for other feature(for example theming, i18n, validation, type conversion and formatting and so on) that ease the implementation of the presentation
http://www.webschoolbd.com/

2. How do you access Hibernate using Spring?
There are two ways to Spring’s Hibernate integration:
a.) By Inversion of Control with a Hibernate Template and Callback
b.) By extending Hibernate Dao Support and Applying an AOP Interceptor

3. How would you integrate Spring and Hibernate using Hibernate Dao Support?
This can be done through Spring’s SessionFactory called Local SessionFactory. The steps in integration process are: a.) Configure the Hibernate SessionFactory
b.) Extend your DAO Implementation from Hibernate Dao Support
c.) Wire in Transaction Support with AOP

4. What is JdbcTemplate in Spring? And how to use it?
The JdbcTemplate class is the main class of the JDBC Core package. The JdbcTemplate (The class internally use JDBC API) helps to eliminate lot of code you write with simple JDBC API (Creating connection, closing connection, releasing resources, handling JDB Exceptions, handle transaction etc.

5.Difference between domain objects and value objects?
Ans: A DOM is an object-based representation of the application problem domain, while a value object purely encompasses state. it is perfectly acceptable for a domain object to encompass both state and behavior. Another key difference between domain objects and value objects is that a value object’s structure is driven by the need to transfer data remotely, whereas a domain object is modeled to represent a real world concept and is not driven by some need of the application infrastructure

6. What are the major considerations of spring web application?
• Performance: Performance is always the top requirement of a web application. If users click a link and it takes a long time to execute user will definitely not be happy with the application.
• User-friendly: The application should be easy to use and easy to navigate with clear instructions without confusing the user.
• Interactive and richness: The user interface should be highly interactive and responsive.
• Accessibility: Nowadays the application is accessible from anywhere via any device.

7.Advantage of Spring JDBC Template?
Ans: • The Spring JDBC Template has more advantages compared with standard JDBC.
   • The Spring JDBC template allows to clean-up the resources automatically, e.g. release the database connections.
• This allows the programmer to react more flexible to the errors.
The Spring JDBC template converts also the vendor specific error messages into better understandable error messages.

8. What is Spring web Flow ?
Ans: Spring Web Flow is a framework for building flow-based applications. Spring web flow is a limited page flow functionality offered by classic MVC frameworks. Web Flow integrates nicely with Spring MVC, JSF or Struts and offers the means to define page flows consisting of views and actions and in addition allows page flow reuse

 9. What are the modules of spring web flow ?
 Spring-webflow
 Spring-faces
 Spring JavaScript
 Spring Binding

9. Describe the main concept of Spring web flow?
Flow: A flow is business process representing a use case. In spring web flow a flow consists of a series of steps called sates.
 View: The same as in the MVC pattern, a view is a user interfaces that presents the state of the model to the user and provide the user interaction.
 Conversation: In a web application, in terms of bean scopes, there are three type, namely, request, session and application.

10. Write some Bean Scope in Spring Web Flow?
  • Flow 
  • View 
  • Request
  • Flash 
  • Conversation 

11. JSF Application life Cycle
  • Restore view  
  • Apply request
  • Process validations
  • Update model values
  • Invoke application
  • Render response

12. Objective of spring data JPA
Ans: The Spring Data JPA project is a subproject under the Spring Data umbrella project. The main objective of the Spring Data JPA project is to provide additional features for simplifying application development with JPA.

13. What is Factory pattern in spring?
Ans: The Factory Pattern defines a class whose responsibility is to provide application components with implementations of other application components

14. What is Domain Object Model (DOM) ?
Ans: A DOM is an object-based representation of the application problem domain, intended to allow the programmer to code in terms of objects that exist in the problem domain.

15. What is service layer ?
 Ans: A service layer acts as a sort of gateway into your application, provident your presentation code with a simple, unified way to get at business logic or A good service layer also serves as a definition of what your application can actually perform and what logic is available to be presented to the user.(When one class provide service to another class that is called service layer).

16. What is database?
Ans: a database represents the actual data, and in other cases, it may represent a piece of software that manages the data, an instance of a process of this software, or even the physical machine that runs the manager process. Formally, adatabase is a collection of data;

17. What is the difference of datasource and database connection?
 Ans:The difference between a DataSource and a Connection is that a DataSource provides and manages Connections.

 18. Write the Hibernate dependency code?
Ans:  

<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.6.0.Final</version>
</dependency>


19. Write down the mandatory hibernate configurations
 Ans:  The mandatory hibernate configurations are bellow
* The dataSource bean 
*The transactionManager bean 
* Component scan 
* Hibernate SessionFactory bean 

20. The main configurations of JPA2 
Ans: 
*The dataSource bean 
* The transactionManager bean 
* Component scan 
* JPA EntityManagerFactory bean (emf) 

21. Why do we need the concept of Design to Interfaces 
Ans:
 * easy to swap out a component if it becomes problematic 
* gained by this loose coupling is the increase in testability 
* we can swap out an implementation of an interface for a mock implementation, 
which allows us more flexibility when testing. 

22. Drawback of basic factory pattern
Ans: 
• There is no way to change an implementing class without a recompile.
• There is no way to make multiple implementations available transparently to different components.
• There is no way simply to switch instantiation models. 

23. What is DOM and goals of DOM? 
Ans: A Domain Object Model (DOM) is a set of classes that model concepts from the problem domain. Goal of DOM:
 • How the problem domain is structured 
• How the domain objects will be used 
• How the underlying data store is constructed 

24. What is Data Access Layer? 
Ans: Data Access Layer provides to our application components with a standard mechanism for storing and retrieving data. 

25. What are the major considerations when developing web applications ? 
Ans: Performance: User-friendly Interactive and richness Accessibility

26. Detail of MVC pattern?  
Ans . Model : A model represents the business data as well as the “state” of the application within the context of the user. 
View: This presents the data to the user in the desired format, supports interaction with users, and supports client-side validation, i18n, styles, and so on. 
Controller: The controller handles requests for actions performed by users in the frontend, interacting with the service layer, updating the model, and directing users to the appropriate view based on the result of execution. 

27. The main components of Spring MVC request life cycle? 
Ans: 
• Filter 
• Dispatcher servlet 
• Common services 
• Handler mapping 
• Handler interceptor 
• Handler exception resolver 
• View Resolver 

28. Spring Web Flow Features. 
Ans:  Spring Web Flow Features are bellow-

• Flow: 
• View: 
• Conversation: 
• Request 
• Flash 

 

Web School BD

বাংলাদেশের প্রথম অনলাইন ভিত্তিক ট্রেনিং সেন্টার "Web School BD". ওয়েব স্কুল বিডি : https://www.webschool.com.bd

Post a Comment

আপনার কোন কিছু জানার থাকলে কমেন্টস বক্স এ লিখতে পারেন। আমরা যথাযত চেস্টা করব আপনার সঠিক উত্তর দিতে। ভালো লাগলে ধন্যবাদ দিতে ভুলবেন না। শিক্ষার্থীরা নোট ,সাজেশান্স ও নতুন নতুন ভিডিও সবার আগে পেতে আমাদের Web School BD চ্যানেলটি সাবস্ক্রাইব SUBSCRIBE করতে পারো।
- শুভকামনায় ওয়েব স্কুল বিডি

Previous Post Next Post