售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Enterprise Application Development with Ext JS and Spring
Table of Contents
Enterprise Application Development with Ext JS and Spring
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What the book covers
What you need for this book
Who this book is for
Application architects
Java developers
Ext JS developers
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Preparing Your Development Environment
Installing MySQL
Installing the Java SE Development Kit (JDK)
Installing the NetBeans IDE
Introducing Maven
Creating the Maven Web Application project
Understanding the POM and dependency management
Understanding dependency scope
Defining Maven properties
Understanding Maven-build plugins
Executing the Maven build
Starting the GlassFish 4 server
Running the Task Time Tracker project
Summary
2. The Task Time Tracker Database
Connecting NetBeans with MySQL
The 3T database
The company table
The projects table
The tasks table
The user table
The task log table
Enterprise options for the 3T database
Password encryption
LDAP integration
Audit trails
Logon activity audits
Custom audit tables
Summary
3. Reverse Engineering the Domain Layer with JPA
Understanding the reasons for using JPA
Understanding JPA implementations
Reverse engineering with NetBeans
Introducing the persistence.xml file
Refactoring the Java classes
The Company.java file
The @Entity annotation
The @Table annotation
The @Id annotation
The @GeneratedValue annotation
The @Basic annotation
The @Column annotation
The @NotNull and @Size annotations
The @OneToMany annotation
The @NamedQueries annotation
The Projects.java file
The @ManyToOne annotation
Bidirectional mapping and owning entities
The Task.java file
The User.java file
The TaskLog.java file
Introducing the Java Persistence Query Language
Defining named queries
Refactoring Java equals() and hashCode()
Summary
4. Data Access Made Easy
Defining the DAO interfaces
Adding the CompanyDao interface
Adding the ProjectDao interface
Defining a generic DAO interface
The TaskDao interface
The UserDao interface
The TaskLogDao interface
Defining the generic DAO implementation
The Simple Logging Facade for Java
The@PersistenceContext(unitName = "tttPU") line
The @Transactional annotation
The Propagation.REQUIRED property
The Propagation.SUPPORTS property
The readOnly property
Other transaction properties
Defining the DAO implementations
The CompanyDaoImpl class
The ProjectDaoImpl class
The TaskDaoImpl class
The UserDaoImpl class
The TaskLogDaoImpl class
A better domain layer
Exercise – a simple change request
Summary
5. Testing the DAO Layer with Spring and JUnit
Unit testing overview
The benefits of unit testing
Configuring the test environment
The jdbc.properties file
The logback.xml file
The test-persistence.xml file
Introducing the Spring IoC container
Exploring the testingContext.xml file
The Spring XML namespaces
The property file configuration
Creating the JDBC DataSource
Defining helper beans
Defining the EntityManagerFactory class
Configuring the transaction manager
Autowiring beans
Thanks for the plumbing!
Enabling the Maven environment for testing
Defining a test case superclass
Defining the CompanyDao test case
Running the JUnit test cases with Maven
Running the CompanyDaoTest.java file
The results for the CompanyDaoTests.testMerge test case
The results for the CompanyDaoTests.testFindAll test case
The results for the CompanyDaoTests.testFind test case
Results for the CompanyDaoTests.testPersist test case
Results for the CompanyDaoTests.testRemove test case
JPA traps for the unwary
Exercises
Summary
6. Back to Business – The Service Layer
Service layer considerations
Building the service layer
The Result Data Transfer Object
The AbstractService.java class
The service layer interfaces
Implementing the service layer
Authentication, authorization, and security
The CompanyService implementation
The TaskService implementation
The TaskLogService implementation
Testing the service layer
Automating the service layer tests
Exercises
Summary
7. The Web Request Handling Layer
A brief history of Web MVC
Request handling for enterprise web applications
Building the request handling layer
Preparing for JSON generation
Implementing the Company addJson method
Implementing the Project addJson method
Implementing the Task addJson method
Implementing the User addJson method
Implementing the TaskLog addJson method
A note on JSON
Creating the request handlers
Defining the AbstractHandler superclass
Defining the SecurityHandler class
The @Controller and @RequestMapping annotations
The @ResponseBody annotation
The @RequestParam annotation
Authenticating a user
Logging out
Defining the CompanyHandler class
Defining the ProjectHandler class
The Spring HandlerInterceptor interface
The Spring MVC configuration
Defining the TaskLogHandler class
The @InitBinder annotation
More on Spring MVC
Exercises
Summary
8. Running 3T on GlassFish
Configuring the 3T web application
The Spring applicationContext.xml file
The web.xml file
The glassfish-web.xml file
Configuring the Maven pom.xml file
Adding eclipselink.target-server to the persistence.xml file
Adding the logback.xml file to your resources directory
Configuring the GlassFish server
Renaming the setup directory
Starting the GlassFish server in NetBeans
Configuring the JDBC connection pool
Configuring the JDBC resource
Running 3T
Managing GlassFish without NetBeans
Summary
9. Getting Started with Ext JS 4
The importance of application design
Ext JS 4 MVC concepts
Model
View
Controller
Ext JS 4 flexibility
Ext JS 4 design conventions and concepts
Practical conventions
Project structure
Naming conventions
Naming stores and models
Naming views
Naming controllers
Naming xtypes
The Ext JS 4 development environment
Installing Sencha Cmd
Installing Ext JS 4 SDK
Generating the 3T Ext JS 4 application skeleton
The index.html file
The app.js and Application.js files
The bootstrap.js and bootstrap.css files
The app/Viewport.js and app/view/Main.js files
The app/controller/Main.js file
Creating components using Sencha Cmd
Generating model skeletons
Generating views and controllers using Sencha Cmd
Summary
10. Logging On and Maintaining Users
Layouts, screens, and workflows
Defining view components
Building our views
Defining the Logon window
Using the initComponent() function
Defining the viewport
The MainHeader.js view
The MainCards.js file
Defining the Welcome panel
Defining the user management components
The ManageUsers.js file
The UserForm.js file
The UserList.js file
The User store
Models and persistence
Defining the proxy
Comparing AJAX and REST proxies
Defining the reader
Defining the writer
Defining validations
Controlling the Logon and Viewport actions
The MainController.js file
Controlling our user views
The doAddUser function
The doSelectUser function
The doSaveUser function
The doDeleteUser function
Let's log on!
Let's maintain users
Summary
11. Building the Task Log User Interface
Task log workflows and layouts
Building our task log views
The ManageTaskLogs.js file
The TaskLogForm.js file
The TaskLogList.js file
Defining our models
The TaskLog Model
The Project model
The Task Model
Defining our stores
The TaskLog store
The Project store
The Task store
Controlling the TaskLog actions
Testing the task log interface
Summary
12. 3T Administration Made Easy
Administration workflows and layouts
Building the 3T administration interface
The ManageTasks.js file
The CompanyForm.js file
The ProjectForm.js file
The TaskForm.js file
The CompanyTree.js file
Introducing the Ext.data.TreeStore class
Generating a JSON tree in the CompanyHandler class
The CompanyHandler.getTreeNodeId() method
The CompanyHandler.getCompanyTreeJson() method
Controlling the 3T administration
Defining the Company model and store
The doAfterActivate function
The doSelectTreeItem function
The doSave functions
The doDelete functions
The doAdd functions
Testing the 3T administration interface
Dynamically loading tree nodes
Displaying multiple tree columns
Drag-and-drop made easy
Summary
13. Moving Your Application to Production
Compiling with Sencha Cmd
Ext JS 4 theming
Compiling for production use
Integrating Sencha Cmd compiling with Maven
Adding the build version and timestamp
Building a slimmer WAR file
Deploying the WAR file to GlassFish
Opening the GlassFish admin console
GlassFish security basics
Deploying the WAR file using the admin console
Deploying the WAR file using asadmin
Further deployment information and reading
GlassFish performance tuning and optimization
Summary
A. Introducing Spring Data JPA
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜