Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Client-Server Web Apps with JavaScript and Java
Preface
Who Is This Book For?
How This Book Is Organized
Conventions Used in This Book
Code Examples
Long Command Formats
Safari® Books Online
How to Contact Us
Acknowledgments
1. Change Begets Change
Web Users
Technology
Software Development
What Has Not Changed
The Nature of the Web
Server-Driven Web Development Considered Harmful
Why Client-Server Web Applications?
Code Organization/Software Architecture
Flexibility of Design/Use of Open Source APIs
Prototyping
Developer Productivity
Application Performance
Conclusion
2. JavaScript and JavaScript Tools
Learning JavaScript
JavaScript History
A Functional Language
Scope
First-Class Functions
Function Declarations and Expressions
Function Invocations
Function Arguments
Objects
JavaScript for Java Developers
HelloWorld.java
Program execution
File system organization
HelloWorld.java (with Variables)
Development Best Practices
Coding Style and Conventions
Browsers for Development
Integrated Development Environments
Unit Testing
Documentation
Project
3. REST and JSON
What Is REST?
Resources
Verbs (HTTP Request Methods)
Uniform Resource Identifiers
REST Constraints
Client–Server
Stateless
Cacheable
Uniform Interface
Layered
Code on Demand
HTTP Response Codes
What Is Success?
JSON (JavaScript Object Notation)
HATEOAS
REST and JSON
API Measures and Classification
Functional Programming and REST
Project
Other Web API Tools
Constraints Redux
4. Java Tools
Java Language
Java Virtual Machine (JVM)
Java Tools
Build Tools
Benefits of Maven
Functionality of Maven
Version Control
Unit Testing
JSON Java Libraries
Projects
Java with JSON
JVM Scripting Languages with JSON
Conclusion
5. Client-Side Frameworks
Overview
Starting Point One: Responsive Web Design
HTML5 Boilerplate
Bootstrap
Starting Point Two: JavaScript Libraries and Frameworks
Browser Compatibility
Frameworks
Functionality
Popularity
Obtaining Starter Projects
Download Directly from Repositories
Download from Starter Sites
IDE-Generated Starter Projects
The Rise of the Front-End Engineer
Client-Side Templating
Asset Pipelines
Development Workflow
Project
Conclusion
6. Java Web API Servers
Simpler Server-Side Solutions
Java-Based Servers
Java HTTP Server
Embedded Jetty Server
Restlet
Roo
Embedded Netty Server
Play Server
Other Lightweight Server Solutions
JVM-Based Servers
Jython
Web Application Servers
Development Usage
Conclusion
7. Rapid Development Practices
Developer Productivity
Optimizing Developer and Team Workflow
Example: Web Application Fix
Example: Testing Integration
Example: Greenfield Development
Productivity and the Software Development Life Cycle
Management and Culture
Technical Architecture
Software Tools
Performance
Testing
Underlying Platform(s)
Conclusion
8. API Design
A Decision to Design
Practical Web APIs Versus RESTful APIs
Guidelines
Nouns as Resources; Verbs as HTTP Actions
Query Parameters as Modifiers
Web API Versions
HTTP Headers
Linking
Responses
Documentation
Formatting Conventions
Security
Project
Running the Project
Server Code
Curl and jQuery
Theory in Practice
9. jQuery and Jython
Server Side: Jython
Python Web Server
Jython Web Server
Mock APIs
Client Side: jQuery
DOM Traversal and Manipulation
Utility Functions
Effects
Event Handling
Ajax
jQuery and Higher-Level Abstractions
Project
Basic HTML
JavaScript and jQuery
Conclusion
10. JRuby and Angular
Server Side: JRuby and Sinatra
Workflow
Interactive Ruby Shell
Ruby Version Manager (RVM)
Packages
Sinatra
JSON Processing
Client Side: AngularJS
Model
Views
Controllers
Services
Comparing jQuery and Angular
DOM Versus Model Manipulation
Unobtrusiveness of Angular
Project
Conclusion
11. Packaging and Deployment
Java and JEE Packaging
JEE Deployment
GUI Administration
Command-Line Administration
Non-JEE Deployment
Server Outside
Server Alongside
Server Inside
Implications of Deployment Choice
Load Balancing
Automating Application Deployment
Project
Client
Server
Conclusion
12. Virtualization
Full Virtualization
Virtual Machine Implementations
VMWare
VirtualBox
Amazon EC2
Management of Virtual Machines
Vagrant
Packer
DevOps Configuration Management
Containers
LXC
Docker
Project
Docker Help
Image and Container Maintenance
Java on Docker
Docker and Vagrant Networking
Conclusion
13. Testing and Documentation
Types of Testing
Formal Versus Informal
Extent of Testing
Who Tests What for Whom?
Testing as an Indicator of Organizational Maturity
CMM to Assess Process Uniformity
Maven to Promote Uniform Processes
BDD to Promote Uniform Processes
Testing Frameworks
JUnit
Jasmine
Cucumber
Project
JUnit
Jasmine
Cucumber
Maven Site Reports
Conclusion
14. Conclusion
Community
History
Coda
A. JRuby IRB and Java API
Setup Using Gradle
JRuby IRB
Intro to IRB
Java-Based Relational Databases
H2
HSQLDB
Derby
Conclusion
B. RESTful Web API Summary
HTTP 1.1 Request Methods
HTTP 1.1 Response Codes
Curl for Web APIs
JSON Syntax
JSON Types
Railroad Diagrams
Object
Array
Value
C. References
Index
Colophon
Copyright
← Prev
Back
Next →
← Prev
Back
Next →