Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Enterprise Application Development with Ext JS and Spring
Enterprise Application Development with Ext JS and Spring

Enterprise Application Development with Ext JS and Spring: Designed for intermediate developers, this superb tutorial will lead you step by step through the process of developing enterprise web applications combining two leading-edge frameworks. Take a big leap forward in easy stages.

eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Enterprise Application Development with Ext JS and Spring

Chapter 1. Preparing Your Development Environment

This chapter will install and configure your development environment. The Rapid Application Development (RAD) tool is NetBeans, an open source, cross-platform Integrated Development Environment (IDE) that can be used for creating visual desktop, mobile, web, and Service-Oriented Architecture (SOA) applications. NetBeans officially supports Java, PHP, JavaScript, and C/C++ programming languages, but it is best known for providing a complete toolset for all the latest Java Enterprise Edition (Java EE) standards (currently Java EE 7).

The database of choice for this book is MySQL, the world's most widely used open source Relational Database Management System (RDBMS). MySQL is the most popular choice of database for web applications hosted on Linux platforms and continues to deliver outstanding performance in a multitude of applications. Its small footprint and ease of use makes it perfect for development use on a single computer.

The application server used in this book is GlassFish 4, which comes bundled with the NetBeans download. GlassFish is installed as part of the NetBeans installation, and the tight integration between the two makes configuring GlassFish a simple process. GlassFish is an open source, production-quality application server that implements all the Java EE 7 features. It has enterprise-grade reliability and is considered by many to be the best open source application server available. GlassFish 4 is the Reference Implementation (RI) for the Java EE 7 specification, a full description of which can be found at https://glassfish.java.net/downloads/ri/.

All of these development tools are freely available for PC, Mac, and Linux. Each tool has extensive examples, comprehensive tutorials, and online support forums available.

It should be noted that although this chapter focuses on NetBeans, MySQL, and GlassFish, it is possible for you to configure any appropriate combination of tools that they are familiar with. The development tasks outlined in this book can just as easily be followed using Eclipse, Oracle, and JBoss—although some described configuration details may require minor modifications.

In this chapter, we will perform the following tasks:

  • Install the MySQL Database server
  • Install the Java SDK
  • Install and configure the NetBeans IDE
  • Create the application project and explore Maven
  • Run the project in GlassFish

Installing MySQL

MySQL can be downloaded from http://www.mysql.com/downloads/mysql. Select the appropriate MySQL Community server for your operating system and architecture. It is important to follow the instructions, making note of installation directories and paths for future reference. After downloading and running the setup file, you should select the Developer Default installation for this book.

Installing MySQL

Choosing the default settings is best unless you are familiar with MySQL. This will include setting the default port to 3306, enabling TCP/IP networking, and opening the required firewall port for network access (not strictly required for a developer machine where all apps are running on the same environment, but required if you are configuring a dedicated MySQL server).

Regardless of the environment, it is important to set a root user password during the installation process. We will use the root user to connect to the running MySQL server to execute commands.

Installing MySQL

Note

The rest of this book will assume the root user has the password adminadmin. This is not a very secure password but should be easy to remember!

We recommend that the MySQL server is configured to start when the operating system starts. How this is done will depend on your environment, but it is usually performed at the end of the Initial Configuration action. Windows users will have the option to start the MySQL server at system startup. Mac users will need to install the MySQL Startup Item after the server has been installed.

Should you decide not to start MySQL when the operating system starts, you will need to start the MySQL server manually whenever required. How this is done will once again depend on your environment, but you should start your server now to confirm that the installation was successful.

Note

Unix and Linux users will need to install MySQL as appropriate for their operating system. This may include the use of Advanced Packaging Tool (APT) or Yet another Setup Tool (YaST), or even the installation of MySQL from source. There are detailed instructions for various operating systems found at http://dev.mysql.com/doc/refman/5.7/en/installing.html.

At the end of the configuration process, you will have a running MySQL server ready to be used in Chapter 2, The Task Time Tracker Database.

Installing the Java SE Development Kit (JDK)

The Java SE Development Kit (JDK) can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html. You may choose to skip this step if you already have the JDK 7 Update 45 (or later) installed on your system.

Note

Do not select the NetBeans bundle as it does not contain the GlassFish server.

Installing the Java SE Development Kit (JDK)

You will need to accept the JDK 7 License Agreement before selecting the appropriate distribution. After downloading the JDK, run the setup program and follow the instructions and prompts.

Installing the NetBeans IDE

NetBeans can be downloaded from https://netbeans.org/downloads/. The distribution requires a valid JDK to be already installed on your platform. At the time of this writing, I used JDK 7 Update 45, but any JDK 7 (or higher) version would be fine. There are several distribution bundles; you will need to select the Java EE bundle.

Installing the NetBeans IDE

The latest version at the time of this writing was NetBeans 7.4, which introduced significant new features, including extended HTML5 and JavaScript support. For the first time, NetBeans also included editing and code completion support for the Ext JS framework.

To install the software, simply download and follow the detailed instructions available from the NetBeans website. This will take you through a sequence of setup screens as follows:

  1. The GlassFish 4 server is automatically selected. You do not need to install Tomcat.
  2. Accept the terms in the license agreement.
  3. Accept the terms of the JUnit license agreement. JUnit is used for testing in Chapter 5, Testing the DAO Layer with Spring and JUnit.
  4. Note the installation path of the NetBeans IDE for future reference. Select the appropriate JDK that was installed previously (if there is more than one JDK on your system).
  5. Note the installation path for the GlassFish 4 server for future reference.
  6. The final screen summarizes the installation. Ensure to Check for Updates before clicking on Install to start the process.

The process may take several minutes depending on your platform and hardware.

When the installation is complete, you can run NetBeans for the first time. If you had a previous version of NetBeans installed, you may be prompted to Import Settings. The default opening screen will then be displayed as follows:

Installing the NetBeans IDE

The most useful panels can now be opened from the menu:

  • Projects: This panel is the main entry point to your project sources. It shows a logical view of important project content, grouped into appropriate contexts.
  • Files: This panel shows the actual file structure of the project node as it exists on your filesystem.
  • Services: This panel displays your runtime resources. It shows a logical view of important runtime resources such as the servers and databases that are registered with the IDE.

At this stage, the first two panels will be empty but the Services panel will have several entries. Opening the Servers panel will display the installed GlassFish 4 Server as seen in the following screenshot:

Installing the NetBeans IDE

Introducing Maven

Apache Maven is a tool that is used for building and managing Java-based projects. It is an open source project hosted at http://maven.apache.org and comes bundled with the NetBeans IDE. Maven simplifies many steps common to all Java development projects and provides numerous features, including the following:

  • The provision of convention over configuration. Maven comes with a series of predefined targets for performing certain well-defined tasks including compilation, testing, and packaging of projects. All tasks are managed through a single configuration file: pom.xml.
  • A consistent coding structure and project framework. Each Maven project has the same directory structure and location for source files, test files, build files, and project resources. This common structure brings us easily up to speed with projects.
  • A consistent build system with numerous plugins to make common tasks easy.
  • The ability to execute tests as part of the build process.
  • A highly flexible and powerful dependency management system. This allows software developers to publish information and share Java libraries through (external or remote) Maven repositories hosted on the Internet. Libraries are then downloaded and cached locally by Maven for use in the project.

We encourage you to visit the Maven website to explore the many features available. NetBeans will use Maven to create and manage the web application project.

Creating the Maven Web Application project

A NetBeans project encapsulates all the source code and related components required to maintain and develop an application. Navigate to File | New Project from the menu to start the process:

Creating the Maven Web Application project

Select Maven in the Categories listing and Web Application from the Projects listing, as shown in the preceding screenshot, before selecting the Next button. This will present you with the project configuration screen with the following fields:

  • Project Name: This specifies the display name of the project in the project window. This name is also used to create the project folder and must not contain spaces.

    Note

    Our project is called Task Time Tracker. This tool will allow users to manage the time spent on different tasks for different projects. The project name field is the lowercase, nonspaced translation of the name of the project: task-time-tracker.

  • Project Location: This specifies the filesystem root folder where you want to store the project metadata and source code. We normally create a project-specific folder at the root level of a drive, rather than burying it deep within a folder structure under NetBeans. This makes it easier to find and copy files into the project.

    Note

    Windows users should create a project folder under c:\projects. Mac users may wish to replace this with /Users/{username}/projects and Unix users with /home/{username}/projects. The rest of the book will refer to this location in all examples as the project folder.

  • Project Folder: The project folder is read-only and generated based on the name of the project and the project location.
  • Artifact Id: This is a read-only Maven-specific property to identify the project and is based on the project name.
  • Group Id: This is another Maven property that represents a top-level container for multiple artifacts. It usually represents the Top-Level Domain (TLD) of the organization owning the project.

    Note

    The Group Id for the project is com.gieman, the company of the author.

  • Version: This is another Maven property that represents the version of the artifact. The default version is 1.0-SNAPSHOT, which we will change to 1.0. As projects evolve and new versions are released, Maven will keep track of the different builds based on their versions.
  • Package: The IDE will automatically create a Java source package structure based on this field. We will use the package com.gieman.tttracker.

You should now have entered the following project details:

Creating the Maven Web Application project

Click on the Next button to view the final screen. Do not change the default GlassFish Server 4.0 and Java EE 7 settings before clicking on the Finish button. You will now see activity in the Project Creation output tab as the project is created and configured. Opening the Project and Files panels will allow you to see the project structure:

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Creating the Maven Web Application project

Right-clicking on the project name in either tab will allow you to select the Properties for the project. This will display all properties and paths relevant to the project under different categories:

Creating the Maven Web Application project

You should not need to change these properties for the remainder of the book.

Understanding the POM and dependency management

Each Maven project has a pom.xml configuration file at the root level of the NetBeans project. Click on the Files view and double-click on the pom.xml file to open it in the editor:

Understanding the POM and dependency management

Note

You should see the Navigator window open in the bottom-left panel. This displays an outline of the file being edited and is very helpful when navigating through large files. Double-clicking on a node in the Navigator will position the cursor at the appropriate line in the editor.

If the Navigator window does not open (or has been closed), you can open it manually by navigating to Window | Navigating | Navigator from the menu.

The Project Object Model (POM) fully defines the project and all required Maven properties and build behaviors. There is only one dependency shown in pom.xml:

<dependencies>
  <dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-web-api</artifactId>
    <version>7.0</version>
    <scope>provided</scope>
  </dependency>
</dependencies>

This dependency identifies that the project requires Java EE 7 for building. This entry ensures the full Java EE 7 APIs are available for Java coding in the Task Time Tracker project. Our project also requires the Spring Framework, which must now be added as additional dependencies. Typing in the editor will result in autocompletion help to determine the correct dependencies. After adding the Spring Framework groupId and artifactId entries, as shown in the following screenshot, the Ctrl + Space bar keyboard shortcut will open the available matching entries for the artifactId starting with the text spring:

Understanding the POM and dependency management

If this autocomplete list is not available, it may be due to the Maven repository being indexed for the first time. In this situation you will then see the following screenshot at the bottom of the editor:

Understanding the POM and dependency management

Be patient and in a few minutes the indexing will be finished and the autocomplete will become available. Indexing is required to download available entries from the Maven repository.

The required Spring Framework components are as follows:

  • spring-context: This is the central artifact required for Spring's dependency injection container
  • spring-tx: This is the transaction management abstraction required for implementing transactional behavior
  • spring-context-support: These are various application context utilities, including Ehcache, JavaMail, Quartz, and FreeMarker integration
  • spring-jdbc: This is the JDBC data access library
  • spring-orm: This is the Object-to-Relation-Mapping (ORM) integration for JPA development
  • spring-instrument: This is for the weaving of classes
  • spring-webmvc: This is the Spring Model-View-Controller (MVC) for Servlet environments
  • spring-test: This is the support for testing Spring applications with JUnit

To add these dependencies using the latest Spring release version (3.2.4) requires the following additions to the pom.xml file:

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-context</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-context-support</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-tx</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-jdbc</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-orm</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-instrument</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-webmvc</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-test</artifactId>
  <version>3.2.4.RELEASE</version>
</dependency>

Understanding dependency scope

The final Spring Framework dependency is only required for testing. We can define this by adding a scope attribute with value test. This tells Maven that the dependency is only required when running the testing phase of the build and is not required for deployment.

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-test</artifactId>
  <version>3.2.4.RELEASE</version>
  <scope>test</scope>
</dependency>

The javaee-web-api dependency that was automatically created by NetBeans has a scope of provided. This means the dependency is not required for deployment and is provided by the target server. The GlassFish 4 server itself is the provider of this dependency.

If the scope attribute has not been included, the dependency JAR will be included in the final build. This is the equivalent of providing a scope entry of compile. As a result, all the Spring Framework dependency JARs will be included in the final build file.

A full explanation of the Maven dependency mechanism and scoping can be found at http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.

Defining Maven properties

The Spring Framework dependencies defined in pom.xml all have the same version (3.2.4.RELEASE). This duplication is not ideal, especially when we wish to upgrade to a newer version at a later time. Changes would be required in multiple places, one for each Spring dependency. A simple solution is to add a property to hold the release version value as shown in the following code:

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.2.4.RELEASE</spring.version>
</properties>

This custom property, which we have named spring.version, can now be used to replace the multiple duplicates as follows:

<dependency>
<groupId>org.springframework</groupId>
  <artifactId>spring-context-support</artifactId>
  <version>${spring.version}</version>
</dependency>

The ${spring.version} placeholder will then be substituted with the properties value during the build process.

Understanding Maven-build plugins

The Maven build process executes each defined build plugin during the appropriate build phase. A full list of build plugins can be found at http://maven.apache.org/plugins/index.html. We will introduce plugins as needed in subsequent chapters, but the default plugins created by the NetBeans IDE are of interest now.

The maven-compiler-plugin controls and executes the compilation of Java source files. This plugin allows you to specify both the source and target Java versions for compilation as shown in the following code:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.1</version>
  <configuration>
    <source>1.7</source>
    <target>1.7</target>
    <compilerArguments>
      <endorseddirs>${endorsed.dir}</endorseddirs>
    </compilerArguments>
  </configuration>
</plugin>

Changing these values to 1.6 may be required when compiling projects for older Java servers running on the earlier versions of Java.

The maven-war-plugin builds a WAR file for the project as follows:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <failOnMissingWebXml>false</failOnMissingWebXml>
  </configuration>
</plugin>

The default generated WAR filename is {artifactId}-{version}.war, which can be changed by including the warName configuration property. We will be adding properties to this plugin when building the project for production release in the final chapter. A full list of maven-war-plugin options may be found at http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html.

The maven-dependency-plugin copies dependency JAR files to the defined output directory as shown in the following code:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
  <version>2.6</version>
  <executions>
    <execution>
      <phase>validate</phase>
      <goals>
        <goal>copy</goal>
      </goals>
      <configuration>
        <outputDirectory>${endorsed.dir}</outputDirectory>
        <silent>true</silent>
        <artifactItems>
          <artifactItem>
            <groupId>javax</groupId>
            <artifactId>javaee-endorsed-api</artifactId>
            <version>7.0</version>
            <type>jar</type>
          </artifactItem>
        </artifactItems>
      </configuration>
    </execution>
  </executions>
</plugin>

This is useful to see which JARs are used by the project and to identify what transitive dependencies are required (dependencies of dependencies).

We will modify this plugin to copy all compile-time dependencies of the project to a directory in ${project.build.directory}. This special build directory is under the root folder of the project and is named target, the target destination of the build process. The updated entry will now look as follows:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
  <version>2.1</version>
  <executions>
    <execution>
      <id>copy-endorsed</id>
      <phase>validate</phase>
      <goals>
        <goal>copy</goal>
      </goals>
      <configuration>
        <outputDirectory>${endorsed.dir}</outputDirectory>
        <silent>true</silent>
        <artifactItems>
          <artifactItem>
            <groupId>javax</groupId>
            <artifactId>javaee-endorsed-api</artifactId>
            <version>7.0</version>
            <type>jar</type>
          </artifactItem>
        </artifactItems>
      </configuration>
    </execution> 
    <execution>
      <id>copy-all-dependencies</id>
      <phase>compile</phase>
      <goals>
        <goal>copy-dependencies</goal>
      </goals>
      <configuration>
        <outputDirectory>${project.build.directory}/lib
        </outputDirectory>
        <includeScope>compile</includeScope>
      </configuration> 
    </execution>
  </executions>
</plugin>

As we are now performing two executions in the single plugin, each execution needs its own <id>. The second execution, with ID copy-all-dependencies, will copy all dependent JARs with the scope compile to the target/lib directory.

Executing the Maven build

The simplest way to execute a build is to click on the Clean and Build Project button in the toolbar. You can also right-click on the project node in the Projects tab and select Clean and Build from the menu. The build process will then execute each defined phase in the POM, resulting in Java code compilation, dependency resolution (and copying), and finally, WAR file generation. Opening the target directory structure will display the build result as follows:

Executing the Maven build

Even though we have not written a single line of code, the generated WAR file task-time-tracker-1.0.war can now be deployed to the GlassFish server.

Starting the GlassFish 4 server

Opening the Services tab and expanding the Servers node will list the GlassFish server that was installed during the NetBeans installation process. You can now right-click on the GlassFish Server 4.0 node and select Start as shown in the following screenshot:

Starting the GlassFish 4 server

The Output panel should now open at the bottom of your NetBeans IDE and display the startup results. Select the GlassFish Server 4.0 tab to view the details.

Starting the GlassFish 4 server

The fifth-last line identifies that the server has started and is listening to port 8080, written as 8,080 in the log:

INFO: Grizzly Framework 2.3.1 started in: 16ms - bound to [/0.0.0.0:8,080]

You can now open your preferred browser and view the page http://localhost:8080.

Note

Note that depending on your environment, you may have other applications listening to port 8080. In these circumstances, you will need to substitute the correct port, as defined in the GlassFish server output, in place of 8080.

Starting the GlassFish 4 server

You can now stop the server by right-clicking on the GlassFish Server 4.0 node and clicking on Stop.

Starting the GlassFish 4 server

Running the Task Time Tracker project

We have already built the project successfully; it is now time to run the project in GlassFish. Click on the Run toolbar item to start the process as follows:

Running the Task Time Tracker project

The output should display the process, first building the project followed by starting and deploying to the GlassFish server. The final step will open your default browser and display the world-renowned message that is loved by all developers, as shown in the following screenshot:

Running the Task Time Tracker project

Congratulations! You have now configured the core components for developing, building, and deploying a Spring Java project. The final step is to change the text on the default page. Open the index.html file as shown in the following screenshot:

Running the Task Time Tracker project

Change <title> to Task Time Tracker Home Page and the <h1> text to Welcome to Task Time Tracker!. Save the page and refresh your browser to see the change.

Running the Task Time Tracker project

Note

Didn't see the updated text change on browser refresh? Under some circumstances, after deploying to GlassFish for the first time, the changes made in the index.html file may not be seen in the browser when you refresh the page. Restarting your NetBeans IDE should fix the issue and ensure subsequent changes are immediately deployed to GlassFish when any project resource is saved.

Summary

In this chapter, you have been introduced to some of the key technologies we will be using in this book. You have downloaded and installed the MySQL database server, the JDK, and the NetBeans IDE. We then introduced Maven and how it is used to simplify the building and management of Java projects. We finally deployed our skeleton Task Time Tracker project to GlassFish without writing a single line of code.

Although we have added the Spring Framework to our project, we are yet to delve into how it is used. Likewise, we are yet to mention Sencha Ext JS. Be patient, there is plenty more to come! The next chapter will introduce our Task Time Tracker database tables and start our development journey.

Left arrow icon Right arrow icon

Key benefits

  • 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

Description

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.

Who is this book 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.

What you will learn

  • 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

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 20, 2013
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781783285464
Vendor :
Pivotal
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Dec 20, 2013
Length: 446 pages
Edition : 1st
Language : English
ISBN-13 : 9781783285464
Vendor :
Pivotal
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 112.97
Ext JS Data-driven Application Design
€28.99
Enterprise Application Development with Ext JS and Spring
€41.99
Spring Security 3.x Cookbook
€41.99
Total 112.97 Stars icon

Table of Contents

15 Chapters
1. Preparing Your Development Environment Chevron down icon Chevron up icon
2. The Task Time Tracker Database Chevron down icon Chevron up icon
3. Reverse Engineering the Domain Layer with JPA Chevron down icon Chevron up icon
4. Data Access Made Easy Chevron down icon Chevron up icon
5. Testing the DAO Layer with Spring and JUnit Chevron down icon Chevron up icon
6. Back to Business – The Service Layer Chevron down icon Chevron up icon
7. The Web Request Handling Layer Chevron down icon Chevron up icon
8. Running 3T on GlassFish Chevron down icon Chevron up icon
9. Getting Started with Ext JS 4 Chevron down icon Chevron up icon
10. Logging On and Maintaining Users Chevron down icon Chevron up icon
11. Building the Task Log User Interface Chevron down icon Chevron up icon
12. 3T Administration Made Easy Chevron down icon Chevron up icon
13. Moving Your Application to Production Chevron down icon Chevron up icon
A. Introducing Spring Data JPA Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(10 Ratings)
5 star 50%
4 star 30%
3 star 10%
2 star 0%
1 star 10%
Filter icon Filter
Top Reviews

Filter reviews by




Mario Ivan Jiménez Guia Feb 19, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Buen producto
Amazon Verified review Amazon
milestonebass Feb 26, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I used this book to migrate a legacy ExtJS3 project to use the latest technologies and standards as set out in the book. I had intermediate knowledge of ExtJS3 and a basic knowledge of most of the other technologies and found the book very easy to follow. The thing I like most about this book is how it guides you through the process, start to finish. I found some books take you through development without many check and balances along the way, and as a result when you run into problems it’s hard to figure out where things went wrong. I had no such problems here and when I did run into problems they were easy enough to fix due to the way the book is written.To get your head fully around all the technologies and condense what you would need to develop a web application would mean you wouldn’t have a running application until next year! The book tells you only what you need to know to get a product up and running and gives references if you want to investigate/learn any further.The system I migrated had extensive use of EXT tree components and I was surprised with the depth in which they were covered in the book. I was able to leverage a lot of the structures and standards for use in my own project. It also demystified the whole Sencha Command process for me, which I had trouble with in the past.I would highly recommend this book for any developer looking to get web applications up and running quickly and to the latest standard. It is an excellent tool to learn and also end up with a great finished product!
Amazon Verified review Amazon
Marco Antonio Apr 11, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It is a excellent book for developers with an intermediate level and/or advanced, whom wish to see the combinaion of Spring and Ext-JS current versions.Describes the development cycle of an application from start to finish in all parts describing the different tools and / or components that each requires (as Maven, JPA, unit test, etc), an easy way to track thanks to the good images that are displayed and the code segment in each chapter.Whether the grounds for Spring framework are known, the book is easy to folllow, as it explains is a timely manner which is performed at each step. It also has the necessary references to access information about technologies used to develop the sample aplicación.Also use features of Java 7 as the JSON API for handling data in the application.I highly recommend it.
Amazon Verified review Amazon
Philip Arad Mar 06, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Developing an up to date online application? If so, you have to make the right choices for the Web frameworks you are going to use, both for your Server and your client. Nowadays, Sencha Ext JS JavaScript framework is the most suitable package for your client, and the Spring Framework is the best choice for your server. Combining these two powerful frameworks together will give you the best results you need to achieve.Sencha Ext JS brings cross-browser high-performance UI widgets and rich data management libraries to the app development, enables developers to use a model-view-controller (MVC) architecture, and delivers the most advanced charting and graphing capabilities of any JavaScript framework.The Spring Framework is an open source application framework and inversion of control container for the Java platform. It helps development teams to build simple, portable, fast and flexible JVM-based systems and applications.For best using these frameworks, I recommend you to read the book from 'Packt Publishing': ' Enterprise Application Development with Ext JS and Spring ' (see:[...]).The book is a very useful hands-on practical guide for both intermediate and expert developers. It 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.The book starts with configuring Java, NetBeans, and MySQL to prepare a development environment, connect the NetBeans IDE to the MySQL database server, and populate the tables with data.Next, it examines core JPA concepts after reverse engineering the domain layer with NetBeans, teach you how to build the Java DAO implementation layer assisted by generics, build a Data Transfer Object service layer to encapsulate the business logic of the Web application.The final chapters show how to implement the request handling layer using Spring annotated controllers, and deploy the application to the GlassFish server. It elaborates on how to configure the Ext JS 4 development environment and introduce key Ext JS 4 concepts, including MVC and practical design conventions.The book describes in detail each subject with extensive examples that you can use and adapt for your own purposes.By using all the features introduced in this book, you can use these great platforms to build robust applications and to address correctly the problems you encounter when developing your applications and web sites.
Amazon Verified review Amazon
Maheswar Vayugandla Mar 16, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I started looking for a book on Spring framework and Ext JS after we decided to go with that combination for our new project. Much to my surprise, I found only this one book. After reading the book, I felt like this book is enough for having a great start to our project. The content is organized very well and the quality of presentation is very good. It would be a good bookfor any developer. Even if you are new to these technologies, an introduction and useful references to additional resources are provided on all the technologies (Maven, JPA, JUnit, Logback etc.,) used in the sample project and to improve the understanding and follow along well with the content being covered.I found the book and included project example easy to follow. Chapters build on one another throughout the book so that the reader is guided to build fully-fledged basic application using Spring and Ext JS from ground up. No ambiguity and the provided code works perfectly without any errors. Author also mentioned several useful points and recommendations in view of real-world enterprise applications based on his own experience.Overall, it is an excellent book that explains how Spring works and how to apply it in an application. Also, the book explains well how Ext JS 4 takes care of the MVC paradigm on the client side and shows how to use Java API for JSON (new feature of Java EE7). Shows good use of Java generics for implementing common functionality. EclipseLink is used to implement JPA,Maven is used as build tool, JUnit for testing and Logback for logging.This book provides a way to get a feel for what this excellent combination of Spring and Ext JS can do for your project. I would definitely recommend this book to others who want to experience Spring framework, Ext JS and JPA.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.