Programming Grails - Helion
ISBN: 978-14-493-2453-7
stron: 364, Format: ebook
Data wydania: 2013-04-23
Księgarnia: Helion
Cena książki: 143,65 zł (poprzednio: 167,03 zł)
Oszczędzasz: 14% (-23,38 zł)
Dig deeper into Grails architecture and discover how this application framework works its magic. Written by a core developer on the Grails team, this practical guide takes you behind the curtain to reveal the inner workings of its 2.0 feature set. You’ll learn best practices for building and deploying Grails applications, including performance, security, scaling, tuning, debugging, and monitoring.
Understand how Grails integrates with Groovy, Spring, Hibernate, and other JVM technologies, and learn how to create and use plugins to augment your application’s functionality. Once you know how Grails adds behavior by convention, you can solve problems more easily and develop applications more intuitively.
- Write simpler, more powerful code with the Groovy language
- Manage persistence in Grails, using Hibernate or a NoSQL datastore
- Learn how Grails uses Spring’s functionality and optional modules
- Discover how Hibernate handles details for storing and retrieving data
- Integrate technologies for messaging, mail, creating web services, and other JEE technologies
- Bypass convention and configure Grails manually
- Learn a general approach to upgrading applications and plugins
- Use Grails to develop and deploy IaaS and PaaS applications
Osoby które kupowały "Programming Grails", wybierały także:
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Programowanie w języku Ruby. Mikrousługi i konteneryzacja 58,98 zł, (29,49 zł -50%)
- Rails. Sztuka programowania 58,98 zł, (29,49 zł -50%)
- Ruby on Rails. Od podstaw 49,00 zł, (24,50 zł -50%)
- Rails. Receptury 67,00 zł, (33,50 zł -50%)
Spis treści
Programming Grails. Best Practices for Experienced Grails Developers eBook -- spis treści
- Programming Grails
- Preface
- Who This Book Is For
- Other Resources
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. Introduction to Groovy
- Installing Groovy
- Groovy Console
- Optional Typing
- Collections and Maps
- Properties
- Using the AST Browser
- Decompiling with JD-GUI
- Decompiling with javap
- Closures
- Interface Coercion
- Programmatic Closures
- Owner, Delegate, and this
- Groovys Contributions in the War Against Verbosity
- Constructors
- Checked Exceptions
- Groovy Truth
- Semicolons
- Optional Return
- Scope
- Parentheses
- Default Imports
- Differences Between Java and Groovy
- Array Initialization
- in and def Keywords
- do/while Loops
- for Loops
- Annotations
- Groovy Equality
- Multimethod Dispatch
- Groovy Strings
- Static this
- The Groovy JDK (GDK)
- DefaultGroovyMethods and InvokerHelper
- Metaprogramming and the MOP
- Adding Methods
- Intercepting Method Calls
- getProperty and setProperty
- methodMissing and propertyMissing
- Intercepting Method Calls
- Operators
- Null-Safe Dereference
- Elvis
- Spread
- Spaceship
- Field Access
- as
- in
- Method Reference
- Overload Your Operators
- Being Too Groovy
- def Considered Harmful
- Closures Versus Methods
- TypeChecked, CompileStatic, and invokedynamic
- Installing Groovy
- 2. Grails Internals
- Installing Grails
- Creating an Application
- A nte about the work directory
- Running the application
- Creating an Application
- The Grails Command Line
- IDE Support
- Plugins
- Optional Plugins
- The cache plugin
- The database-migration plugin
- The hibernate plugin
- The jquery plugin
- The resources plugin
- The tomcat plugin
- The webxml plugin
- Core Plugins
- The codecs plugin
- The controllers plugin
- The converters plugin
- The core plugin
- The dataSource plugin
- The domainClass plugin
- The filters plugin
- The groovyPages plugin
- The i18n plugin
- The logging plugin
- The mimeTypes plugin
- The scaffolding plugin
- The services plugin
- The servlets plugin
- The urlMappings plugin
- The validation plugin
- Optional Plugins
- Conventions
- Controller and View Conventions
- Data binding conventions
- Layout conventions
- URI conventions
- Service Conventions
- Domain Class Conventions
- Controller and View Conventions
- More Information
- Installing Grails
- 3. Persistence
- Data Mapping
- Nonpersistent Domain Classes
- Data Validation
- Custom Validation
- Extreme Custom Validation
- Validation Plugins
- Friendly Error Messages
- Blanks Versus Nulls
- Transients
- Mapping Collections
- Querying
- Saving, Updating, and Deleting
- NoSQL Support
- Data Mapping
- 4. Spring
- Inversion of Control and Dependency Injection
- Complex Dependency Configuration Using Spring SpEL
- Manually Injecting Dependencies at Runtime
- Bean Scopes
- Transactional Services
- @Transactional
- Transaction Proxies
- Unintentionally bypassing the bean proxy
- Transaction Utility Methods
- Bean Life Cycles and Interfaces
- Bean Postprocessors
- A Groovier Way
- Bean Aliases
- Internationalization
- Resources
- Resource Dependency Injection
- ResourceLocator
- Data Binding and Validation
- Data Binding
- Validation
- Database Persistence
- Thread-Local Holders
- JdbcTemplate
- Other Database Support
- Spring MVC
- Filters
- Using Spring MVC Controllers
- Remoting
- Client Access
- JMS
- EJBs
- JMX
- Cache Abstraction
- Inversion of Control and Dependency Injection
- 5. Hibernate
- Mapping Domain Classes
- Dialects
- Dialect Autodetection
- Dialect Customization
- Hibernate Without GORM
- hibernate.cfg.xml
- HibernateUtil
- Author
- Book
- Experimenting with the APIs
- The Session
- withSession
- withNewSession
- Open Session in View
- Disabling OSIV
- Custom User Types
- Optimistic and Pessimistic Locking
- Accessing the Sessions Connection
- schema-export
- SQL Logging
- Proxies
- equals, hashCode, and compareTo
- Caching
- Examples
- Caching API
- evicting
- Accessing caches
- Query Caching Considered Harmful?
- HQL
- executeQuery
- Query Syntax
- Report Queries
- Single properties
- Multiple properties
- new list
- Aggregate Functions
- Expressions
- Collections
- Collections Performance
- The Solution
- Session.createFilter()
- Custom Configurations
- Mapping Views and Subselect Classes
- Subselect Domain Classes
- Selecting with a POGO
- get(), load(), and read()
- get()
- load()
- read()
- Performance
- Caching
- Lazy Loading
- Transactional Write-Behind
- 6. Integration
- JMS
- XA Support with the Atomikos Plugin
- Mail
- Sending Email
- Sending Email Asynchronously
- Sending Email from Log4j
- Testing
- SOAP Web Services
- The Server Application
- The Client Application
- TCPMon
- REST
- TCPMon
- JMX
- JMS
- 7. Configuration
- External config Files
- Loading the Configuration
- Partitioning Config Files
- Splitting resources.groovy
- Modularizing Within resources.groovy
- Environment-Specific Spring Beans
- Beans Closures in Config.groovy
- Options for BuildConfig.groovy
- Adding Additional Source Folders
- Extra Folders Under grails-app
- External config Files
- 8. Plugins
- Creating a Plugin
- Initial Steps
- The Plugin Descriptor
- Metadata
- Life Cycle Callbacks
- doWithWebDescriptor
- doWithSpring
- doWithDynamicMethods
- doWithApplicationContext
- onChange
- onConfigChange
- onShutdown
- Splitting Applications into Plugins
- Inline Plugins
- Building and Releasing
- Automated Testing
- A mini DSL to describe versions
- Continuous integration
- Testing scripts
- Automated Testing
- Running the Tests
- Custom Plugin Repositories
- Plugin Documentation
- Custom Artifacts
- Some Notes on Plugin Development Workflow
- Creating a Plugin
- 9. Security
- OWASP
- A1: Injection
- Command injection
- A2: Cross-Site Scripting (XSS)
- Remedies
- Best practices
- A3: Broken Authentication and Session Management
- A4: Insecure Direct Object References
- Remedies
- A5: Cross-Site Request Forgery
- Remedies
- A6: Security Misconfiguration
- Remedies
- A7: Insecure Cryptographic Storage
- Best practices
- A8: Failure to Restrict URL Access
- A9: Insufficient Transport Layer Protection
- A10: Unvalidated Redirects and Forwards
- A1: Injection
- Security Plugins
- spring-security-core
- Getting started
- Access control
- spring-security-core
- Other Plugins and Libraries
- AntiSamy
- ESAPI
- HDIV
- General Best Practices
- OWASP
- 10. The Cloud
- Cost Savings
- What You Give Up
- Cloud Foundry
- Database Applications
- Creating an application
- Scaling
- HTTP sessions
- NoSQL, RabbitMQ, and Searchable
- Monitoring and the Cloud Foundry UI Plugin
- The cloud-foundry-ui Plugin
- Database Applications
- Heroku
- Database Applications
- Creating an application
- Scaling
- HTTP sessions
- Build Packs
- Database Applications
- Other Providers
- Other Uses for Cloud Services
- 11. AOP
- Grails Filters
- HTTP Filters
- Groovy AOP
- Registering Metaclass Interceptors
- Error Code URL Mappings
- Spring AOP
- Enabling Spring AOP
- Defining AspectJ-Annotated Aspects
- Compile-Time Weaving
- 12. Upgrading Applications and Plugins
- Why Doesnt the Upgrade Script Do More?
- A General Approach to Upgrading
- Upgrading Petclinic: A Case Study
- Step 1: Determine the changes in the application
- Step 2: Make the first round of changes in a new application
- Step 3: Make the second round of changes
- Step 4: Finishing up
- Running the upgrade script instead
- Upgrading Petclinic: A Case Study
- A Short History of Grails
- Grails 1.2
- Grails 1.2.2
- Grails 1.2.4
- Grails 1.3
- Grails 1.3.1
- Grails 1.3.2
- Grails 1.3.4
- Grails 1.3.6
- Grails 1.3.7
- Grails 1.3.8
- Grails 1.3.9
- Grails 2.0
- Grails 2.0.2
- Grails 2.1.x
- Grails 2.2.x
- Notes on Upgrading
- Index
- About the Author
- Colophon
- Copyright