万本电子书0元读

万本电子书0元读

顶部广告

Learning Modular Java Programming电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Tejaswini Mandar Jog

出  版  社:Packt Publishing

出版时间:2016-06-01

字       数:269.1万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Explore the power of modular programming for building applications with Java and Spring! About This Book Understand the basic concepts of Modular Programming to build enterprise applications with Java Create short and precise code and eliminate recursion The book follows a step-by-step approach that makes implementing Modular Programming easy Who This Book Is For This book targets Java developers who have a basic knowledge of application development with Java and are interested in learning the Modular Programming approach for building reusable applications that are easy to test, and thus improve overall project management. What You Will Learn Learn about Modular Programming and what modules an enterprise application can be divided into. Set up a development environment and create a "Hello World" application. Start implementing a sample application from the presentation layer. Implement the persistence layer. Implement the business layer, wrapping up all of the modules with Contexts and Dependency Injection (CDI). Manage an application's life cycle. Learn how to secure Web applications. Test enterprise applications and their automation. Understand how to version source code using Source Code Management (SCM) systems such as GIT and SVN. In Detail Modular programming means dividing an application into small parts and then developing it. It is an approach taken by developers to build applications and helps them add efficiency in their development process, thus making it more effective. The book starts with the fundamentals of Modular Programming. Then we move on to the actual implementation, where we teach developers how to divide an application into different modules or layers (such as presentation, execution, security, lifecycle, services, and so on) for better management. Once readers are well-versed in these modules and their development, the book shows how to create bindings in order to join these different modules and form a complete application. Next, the readers will learn how to manage these modules through dependency injection. Later, we move on to testing; readers will learn how to test the different modules of an application. The book ends by teaching readers how to maintain different versions of their application and how to modify it. By the end of the book, readers will have a good understanding of modular programming and will be able to use it to build applications with Java. Style and approach This book is a practical guide to help readers learn Modular Programming with Java and build an enterprise-ready app along the way. The book is divided into three major sections. The first teaches the fundamentals of Modular Programming and how to implement them; the second teaches readers to combine and manage the modules developed; in the final section, the book explains the applications of Modular Programming.
目录展开

Learning Modular Java Programming

Table of Contents

Learning Modular Java Programming

Credits

About the Author

About the Reviewer

www.PacktPub.com

eBooks, discount offers, and more

Why subscribe?

Instant updates on new Packt books

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Introducing Modular Programming

Software – the perspective

Modules

What is behind and in a module?

The practical aspect

The gang – modular programming

The world of modules

Tiers and layers in an enterprise application

One-tier applications

Two-tier applications

Three-tier applications

N-tier applications

Java Enterprise architecture

Sharing the work

Coordinate with the team

Versioning tools

Centralized versioning

CVS

Apache Subversion

The architecture of SVN

The repository

The client program

Distributed versioning

GitHub

Summary

2. Saying Hello to Java EE

The enterprise as an application

The Java EE platform

Features of the Java EE platform

The world of dotcoms

Servlet – the dynamicity

MVC I architecture

MVC II architecture

The practical aspect

What is a framework?

Advantages of frameworks

Spring MVC

The components

The front controller

Spring MVC controller

ModelAndView

ViewResolver

The configuration file

Summary

3. Implementing the Presentation Layer

Presentation

Data binding

Case 1 – Reading request parameters for searching

Case 2 – Reading multiple form fields

Form backing object

Pre-population of forms

Form validation

Developing customized validators using Spring validators

Annotation-based validations

Summary

4. Talking to the Database

Persistence

Using object serialization

Disadvantages of using object serialization

Storing data in XML

Disadvantages of storing data in XML

Saving the data in a relational database

Advantages of saving data in a relational database

Interaction of Java with relational databases

Types of JDBC drivers

JDBC-ODBC bridge driver

Advantages of the JDBC-ODBC bridge driver

Disadvantages of the JDBC-ODBC bridge driver

JDBC Native API Driver/Partly Java Driver

Advantages of the JDBC Native API Driver

Disadvantages of the JDBC Native API Driver

JDBC Net Protocol Driver

Advantages of the JDBC Net Protocol Driver

Disadvantages of the JDBC Net Protocol Driver

All Java drivers

Advantage of Java drivers

Disadvantages of the Java Driver

Spring-JDBC integration

Configuring DataSource in Spring JDBC

Getting data sources by looking up using JNDI

Getting data sources that pool connections configured on a server

Getting data sources from the JDBC driver

Types of integration of JDBC

Integrating the DataSource to get a connection reference

Integrating the JDBC template

Integrating JDBC DAO support

Problems with JDBC

Introduction to ORM

Advantages of using ORM

Introduction to Hibernate

Hibernate architecture

Spring Hibernate integration

Introduction to unit testing

Unit testing using JUnit

Steps for writing a TestCase using annotation

Summary

5. Developing the Business Layer

Business logic

Domain knowledge

Rules, formulas, and conditions

Case studies

Developing the business layer

Transaction management

JDBC and transaction management

Spring and transaction management

Programmatic transaction

Declarative transaction

Managing declarative transaction in Spring

Step 1

Step 2

Step 3

Declarative transaction management

Programmatic transaction management

Summary

6. Testing Your Application

Software testing

The waterfall model

The spiral model

The V model

Verification phases

Validation phases

Mock testing

Spring testing framework

Case1 – Inserting contact with correct values as per validation rules

Case2 – Inserting a contact by violating validation rules for contacts

Why integration testing?

Mockito testing

Arquillian

Summary

7. Securing the Application

Make it safe, make it secure

Spring security framework

Secure web request

Way 1 – Spring Security for URL using servlet filters

Case 1 – Basic authentication

Case 2 – Login form authentication

Case 3 – Authentication against database

Case 4 – Remember me

Case 5 – Logout

Way 2 – Spring Security using AOP

@Secured

@RolesAllowed

SpEL-enabled security annotations for securing the methods

Spring Security using pointcut

Way 3 – Custom security

Summary

8. Versioning and Deploying

Versioning

Collabnet server

Visual SVN server

Adding SVN as a plugin to Eclipse

Adding files in the project and committing them to the repository

Importing the project in the workspace

Updating and tracking the project for latest changes in the repository

Project deployment

Copying a WAR file into Tomcat without Tomcat manager

Copying a WAR file into Tomcat with Tomcat manager

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部