Enterprise Application Development with Ext JS and Spring


Enterprise Application Development with Ext JS and Spring
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Embark on the exciting journey through the entire enterprise web application development lifecycle
  • Leverage key Spring Framework concepts to deliver comprehensive and concise Java code
  • Build a real world Ext JS web application that interacts with dynamic database driven data

Book Details

Language : English
Paperback : 446 pages [ 235mm x 191mm ]
Release Date : December 2013
ISBN : 1783285451
ISBN 13 : 9781783285457
Author(s) : Gerald Gierer
Topics and Technologies : All Books, Application Development, Web Development, Open Source


Table of Contents

Preface
Chapter 1: Preparing Your Development Environment
Chapter 2: The Task Time Tracker Database
Chapter 3: Reverse Engineering the Domain Layer with JPA
Chapter 4: Data Access Made Easy
Chapter 5: Testing the DAO Layer with Spring and JUnit
Chapter 6: Back to Business – The Service Layer
Chapter 7: The Web Request Handling Layer
Chapter 8: Running 3T on GlassFish
Chapter 9: Getting Started with Ext JS 4
Chapter 10: Logging On and Maintaining Users
Chapter 11: Building the Task Log User Interface
Chapter 12: 3T Administration Made Easy
Chapter 13: Moving Your Application to Production
Appendix: Introducing Spring Data JPA
Index
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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
  • Chapter 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

Gerald Gierer

Gerald Gierer has been involved in enterprise web application projects for more than 15 years and continues to find his work challenging and rewarding. He started his software development career working with C, PowerBuilder, and Unix, until the rise of the Internet and Java caught his attention. In 2000, he made a conscious decision to focus on Internet application development using the Java language.

The frustration of working with the first Enterprise JavaBeans (EJB) implementations was the predominant reason he investigated the alternatives that could make enterprise development more productive. In 2004, he first heard of the Spring framework and quickly realized how comprehensive and well-designed an alternative this was to EJB. Since then he has architected and developed many Spring projects using a range of view technologies including JSP, JSF, Struts, Tiles, Freemarker, DWR, and YUI.

In 2009, he became aware of Ext JS and was immediately struck by the power of this JavaScript framework. Having spent countless hours building complex web pages from scratch, Ext JS was a breath of fresh air for the client realm. He has been working with Ext JS ever since.

He lives in Geelong, Australia, but often spends time in Europe, having lived and worked for five years in Munich. In his spare time, he enjoys keeping fit, brewing beer, being outdoors, and rock climbing—a passion that has kept him sane for more than 25 years.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Enterprise Application Development with Ext JS and Spring +    Citrix XenServer 6.0 Administration Essential Guide =
50% Off
the second eBook
Price for both: ₨424.80

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Set up the key components of an enterprise development environment
  • Get to grips with practical database design strategies using MySQL
  • Practice JPA concepts and database reverse engineering using NetBeans
  • Access data using the DAO design pattern and Spring
  • Implement practical testing strategies using Maven and JUnit
  • Build a comprehensive service layer to encapsulate business logic
  • Leverage the best of Spring Web controllers for enterprise use
  • Implement a dynamic Ext JS user interface using Sencha MVC
  • Understand and control the Maven build process
  • Configure and deploy to a production GlassFish environment

In Detail

Spring and Ext JS are cutting edge frameworks that allow us to build high performance web applications for modern devices, that are now consuming data at a faster rate than ever before. It is the appropriate time for you to understand how to best leverage these technologies when architecting, designing, and developing large scale web development projects.

This practical guide condenses an approach to web development that was gained from real world projects, and outlines a simple, practical approach to developing high performance, and enterprise grade web applications.

Starting with configuring Java, NetBeans, and MySQL to prepare your development environment, you will then learn how to connect your NetBeans IDE to the MySQL database server. We will then explore the Task Time Tracker (3T) project database structure and populate these tables with test data.

Following on from this, we will examine core JPA concepts after reverse engineering the domain layer with NetBeans. Leveraging the Data Access Object design pattern, you will learn how to build the Java DAO implementation layer assisted by generics in base classes, followed by a Data Transfer Object enabled service layer to encapsulate the business logic of your 3T application.

The final chapters that focus on Java explore how to implement the request handling layer using Spring annotated controllers, and deploy the 3T application to the GlassFish server. We will then configure the Ext JS 4 development environment and introduce key Ext JS 4 concepts, including MVC and practical design conventions.

Covering a variety of important Ext JS 4 strategies and concepts, you will be fully-equipped to implement a variety of different user interfaces using the Ext JS MVC design pattern. Your journey ends by exploring the production build and deployment process using Maven, Sencha Cmd and GlassFish.

Approach

An easy-to-follow tutorial, that breaks down the enterprise application development journey into easy to understand phases documented by clear examples and concise explanations.

Who this book is for

If you are an intermediate developer with a good understanding of Java, JavaScript and web development concepts, this book is ideal for you. Basic Ext JS development experience, including an understanding of the framework APIs is needed by those of you who are interested in this book. Regardless of your experience and background, the practical examples provided in this book are written in a way that thoroughly covers each concept before moving on to the next chapter.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software