Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Что почитать про Groovy и Grails, список книг и статей. 
:(
    Опции темы
Vasay
Дата 15.8.2010, 00:23 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



Официальная документация:

Groovy: 
http://groovy.codehaus.org/Download
http://groovy.codehaus.org/Articles
http://groovy.codehaus.org/FAQ

Grails:
http://www.grails.org/Documentation

Screencast-ы от разработчиков:
http://www.grails.org/Grails+Screencasts


Что есть на русском:


Grails in action
Доступен вполне неплохой перевод, хотя, местами и с косяками: Grails. Гибкость Groovy и надежность Java

Довольно толковая книжка. Есть глава про Groovy для Java разработчика, да и в целом книжка рассчитана на человека знающего Java.

Опирается на Groovy 1.6 и Grails 1.1

Содержание:
Код

Часть I. Введение в Grails

Глава 1. Коротко о Grails
1.1. Как появилась платформа Grails?
1.2. Установка
1.3. Пример программы Web 2.0 QOTD
1.4. Создание модели предметной области
1.5. Добавление действий в пользовательский интерфейс
1.6. Улучшение архитектуры
1.7. В заключение

Глава 2. Основы Grails
2.1. Введение
2.2. Исследование системы типов данных
2.3. Особенности, позволяющие экономить время
2.4. Специальные возможности Groovy
2.5. В заключение

Часть II. Основы Grails

Глава 3. Моделирование предметной области
3.1. Hubbub: приступаем к созданию приложения
3.2. Первый объект класса предметной области
3.3. Проверка: барьер на пути мусора
3.4. Определение модели данных - 1:1, 1:m, m:n
3.5. В заключение

Глава 4. Включение модели в работу
4.1. Создание пользовательского интерфейса с помощью механизма скаффолдинга
4.2. Извлечение данных динамическими методами и механизм Query by Example
4.3. Более сложные способы выполнения запросов
4.4. Начальная загрузка исходных данных
4.5. В заключение

Глава 5. Управление потоком выполнения приложения
5.1. Основы контроллеров
5.2. Службы: повышаем надежность и удобство сопровождения приложения
5.3. Привязка данных
5.4. Управляющие объекты
5.5. Работа с изображениями
5.6. Обработка запросов фильтрами
5.7. Создание собственных отображений URL
5.8. В заключение

Глава 6. Разработка привлекательных представлений, форм и макетов
6.1. Основные теги форм
6.2. Расширение представлений 
собственными тегами
6.3. Добавление привлекательных макетов
6.4. Применение тегов Ajax
6.5. В заключение

Глава 7. Создание надежных приложений
7.1. Зачем необходимо тестировать 
программное обеспечение?
7.2. Модульное тестирование
7.3. Интеграционное тестирование
7.4. Функциональное тестирование
7.5. В заключение

Часть III. Grails на каждый день

Глава 8. Расширения: добавляем поддержку Web 2.0 за 60 минут
8.1. Использование чужого труда в своих интересах
8.2. Добавление графиков и диаграмм
8.3. Добавление поддержки электронной почты
8.4. Полнотекстовый поиск: реализуем свою процедуру поиска
8.5. Улучшение интерфейса с помощью GrailsUI
8.6. В заключение

Глава 9. Реализация мастеров и последовательностей 
с помощью веб¬потоков
9.1. Что такое веб¬поток?
9.2. Работа с веб¬потоками
9.3. Дополнительные особенности веб¬потоков
9.4. Тестирование веб¬потоков
9.5. В заключение

Глава 10. Не впускайте незнакомцев, 
или к вопросу о безопасности
10.1. Почему безопасность имеет такое значение
10.2. Защита от злоумышленников
10.3. Управление доступом
10.4. Дальнейшее исследование Spring Security
10.5. В заключение

Глава 11. Удаленный доступ
11.1. Решение на базе REST
11.2. Согласование формата представления
11.3. Практика реализации интерфейса REST
11.4. Командно¬ориентированные удаленные взаимодейст¬вия 
11.5. В заключение

Глава 12. Обмен сообщениями и планирование заданий
12.1. Автостопом по работе с сообщениями
12.2. Использование расширения JMS для платформы Grails
12.3. Механизм планирования заданий платформы Grails
12.4. Дополнительные возможности планирования
12.5. В заключение
Часть IV. Расширенные возможности Grails

Глава 13. Тонкое искусство владения механизмом GORM
13.1. Искусство моделирования предметной области
13.2. Искусство кэширования: переходим от 2 пользователей к 210
13.3. Интеграция с имеющимся ПО: работа с несколькими источниками данных
13.4. Сложности взаимодействий с существующими базами данных
13.5. В заключение

Глава 14. Платформа Spring и транзакции
14.1. Spring и Grails
14.2. Использование транзакций в механизме GORM
14.3. В заключение

Глава 15. После компиляции, тестирования и запуска
15.1. Система сборки платформы Grails
15.2. Автоматизированная сборка - не для любителей
15.3. Обслуживание изменений в модели данных
15.4. В заключение

Глава 16. Разработка расширений
16.1. Создание нашего первого расширения
16.2. Публикация расширений
16.3. Интеграция с платформой Grails
16.4. В заключение
Алфавитный указатель







Это сообщение отредактировал(а) Vasay - 27.6.2011, 23:46


--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
Vasay
Дата 15.8.2010, 00:39 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



Groovy и Grails. Практические советы. В оригинале Groovy and Grails Recipes
Книгу не читал. Сказать что-то не могу. Английская версия гуляет по просторам глобальной паутины.

Опирается на Groovy 1.5.6 и Grails 1.0.3

UP от 18 августа 2010 Полистал книжку - ИМХО довольно интересна с точки зрения Groovy, с точки зрения Grails - не особо. 

Содержание: 
Код

CHAPTER 1 Getting Started with Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1-1. What Is Groovy?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1-2. What Is Wrong with Java? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1-3. How Does Groovy Address the Shortcomings of Java? . . . . . . . . . . . . 5
1-4. How Do I Download and Install Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . 8
1-5. What Tools Come with Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1-6. How Do I Use the Groovy Shell? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1-7. How Do I Use the Groovy Console? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1-8. How Do I Use groovyc and groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1-9. Is There IDE Support for Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1-10. How Do I Integrate Groovy with Eclipse? . . . . . . . . . . . . . . . . . . . . . . 12
1-11. How Do I Integrate Groovy with IntelliJ IDEA? . . . . . . . . . . . . . . . . . . 14
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
CHAPTER 2 From Java to Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2-1. What Are the Similarities Between Java and Groovy? . . . . . . . . . . . . 17
2-2. What Are the Differences Between Java and Groovy? . . . . . . . . . . . . 19
Optional Syntax Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
New and Enhanced Syntax Elements, Structures, and Constructs . . . 22
New Helpers, Libraries, and APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Other Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2-3. How Do I Integrate Groovy with Java? . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Compiling to Bytecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Using GroovyShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Using GroovyScriptEngine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Using GroovyClassLoader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Using JSR 223 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
CHAPTER 3 Groovy Data Types and Control Structures . . . . . . . . . . . . . . . . 45
3-1. What Are the Different Kinds of Strings in Groovy and
How Do I Use Them? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3-2. How Do I Use Regular Expressions in Groovy? . . . . . . . . . . . . . . . . . . 50
3-3. How Are Numbers in Groovy Different from Those in Java? . . . . . . . 53
3-4. How Do I Use Lists in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
3-5. How Do I Implement a Merge Sort in Groovy? . . . . . . . . . . . . . . . . . . . 62
3-6. How Do I Use Maps in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3-7. What Are Ranges and How Do I Use Them in Groovy? . . . . . . . . . . . . 66
3-8. What Is the Groovy Truth? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3-9. How Is the switch Statement in Groovy Different from Java? . . . . . . 68
3-10. How Do I Perform Looping in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . 69
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
CHAPTER 4 Object-Oriented Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4-1. What Are the Differences Between Classes and Scripts? . . . . . . . . . 71
One Public Class per File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Multiple Classes per File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Scripting Code Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Classes and Scripting Code in the Same File . . . . . . . . . . . . . . . . . . . 73
Choosing a Strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4-2. How Do I Use Packages? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4-3. What Is Type Aliasing and How Do I Use It? . . . . . . . . . . . . . . . . . . . . . 75
4-4. How Do I Use Inheritance in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4-5. How Do I Use Interfaces in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4-6. What Are Multimethods and How Do I Use Them? . . . . . . . . . . . . . . . 80

4-7. What Are Categories and How Do I Use Them? . . . . . . . . . . . . . . . . . . 82
4-8. How Are Groovy Fields and Local Variables Different
from Those in Java? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4-9. How Are Groovy Methods Different from Java Methods? . . . . . . . . . 85
Using Positional Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Using a List as a Single Argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Using an Array for Optional Parameters . . . . . . . . . . . . . . . . . . . . . . . . 87
Using Mapped Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
4-10. How Are Groovy Constructors Different from Those in Java? . . . . . 88
4-11. What Are GroovyBeans? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
4-12. What Are GPaths? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4-13. How Do I Use the Expando Class? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4-14. What Is Metaclass and How Do I Use It? . . . . . . . . . . . . . . . . . . . . . . 93
4-15. How Do I Intercept All Method Calls on an Object?. . . . . . . . . . . . . . 94
4-16. How Do I Intercept Methods That Don’t Exist on a Class? . . . . . . . . 95
4-17. How Do I Add Additional Behavior to a Class by
Using ExpandoMetaClass? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
CHAPTER 5 Closures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5-1. What Is a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
5-2. Why Do I Need Closures? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5-3. How Do Closures Compare with Anonymous Inner Classes? . . . . . . 99
5-4. How Do I Create a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5-5. How Do I Call a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
5-6. How Do I Return a Value from a Closure? . . . . . . . . . . . . . . . . . . . . . . 101
5-7. How Do I Reuse a Method as a Closure? . . . . . . . . . . . . . . . . . . . . . . 101
5-8. How Do I Pass a Closure as an Argument to Another Method? . . . 102
5-9. What Is the Scope of a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5-10. What Do this, owner, and delegate Mean Inside a Closure? . . . . . 105
5-11. How Can I Return from a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . 106
5-12. What Does It Mean to Curry Closures? . . . . . . . . . . . . . . . . . . . . . . . 107
5-13. How Do I Use a Closure Inside a switch Statement? . . . . . . . . . . . 108
5-14. How Do I Get More Information About the Parameters
Passed to a Closure? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5-15. How Do I Use Closures Inside a Map? . . . . . . . . . . . . . . . . . . . . . . . . 109
5-16. How Do I Use Closures with Files? . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
CHAPTER 6 Builders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
6-1. What Are Builders? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
6-2. Why Do I Need Builders? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6-3. How Do I Use MarkupBuilder to Build XML? . . . . . . . . . . . . . . . . . . . 114
6-4. How Do I Use MarkupBuilder to Build HTML? . . . . . . . . . . . . . . . . . . 119
6-5. How Do I Use NodeBuilder to Build a Tree of Objects? . . . . . . . . . . 120
6-6. How Do I Use ObjectGraphBuilder to Build a Tree of Objects? . . . . 122
6-7. How Do I Use AntBuilder to Write Ant Tasks? . . . . . . . . . . . . . . . . . . 123
6-8. How Do I Use SwingBuilder to Create Swing Widgets? . . . . . . . . . . 125
6-9. How Do I Use Layout Managers with SwingBuilder? . . . . . . . . . . . . 128
6-10. How Do I Add an Action to a Swing Widget? . . . . . . . . . . . . . . . . . . 131
6-11. How Do I Share Actions Among Widgets? . . . . . . . . . . . . . . . . . . . . 132
6-12. How Do I Use Swing Models? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
6-13. How Do I Create My Own Builder? . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
CHAPTER 7 Working with Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
7-1. How Do I Connect to a Database? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
7-2. How Do I Use Connection Pooling? . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7-3. How Do I Create a New Table? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
7-4. How Do I Insert, Update, and Delete Data? . . . . . . . . . . . . . . . . . . . . 143
7-5. How Do I Read Data from My Tables? . . . . . . . . . . . . . . . . . . . . . . . . . 145
7-6. How Do I Retrieve a Table’s Metadata? . . . . . . . . . . . . . . . . . . . . . . . 147
7-7. How Do I Use DataSet? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
7-8. How Do I Use DataSet with Joined Tables? . . . . . . . . . . . . . . . . . . . . 151
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
CHAPTER 8 Testing with Groovy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
8-1. How Do I Write an Inline Test in Groovy? . . . . . . . . . . . . . . . . . . . . . . 155
8-2. How Do I Write a Test Class in Groovy? . . . . . . . . . . . . . . . . . . . . . . . 156
8-3. How Do I Use Groovy to Test Java Code? . . . . . . . . . . . . . . . . . . . . . . 160
8-4. How Do I Organize Tests into Suites and Run Them
from My IDE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
8-5. How Do I Use Ant to Run My Tests? . . . . . . . . . . . . . . . . . . . . . . . . . . 163
8-6. How Do I Use Maven to Run My Tests? . . . . . . . . . . . . . . . . . . . . . . . 164
8-7. What Are the Advanced Testing Techniques
Offered by Groovy? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
8-8. How Do I Use Maps to Test My Code? . . . . . . . . . . . . . . . . . . . . . . . . 167
8-9. How Do I Use an Expando Object to Test My Code? . . . . . . . . . . . . . 169
8-10. How Do I Use Stubs and Mocks in Groovy? . . . . . . . . . . . . . . . . . . . 169
8-11. How Do I Use GroovyLogTestCase? . . . . . . . . . . . . . . . . . . . . . . . . . . 173
8-12. How Can I Measure My Code Coverage by Using Cobertura?. . . . 175
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
CHAPTER 9 Miscellaneous Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
9-1. How Do I Use Groovy Templates to Generate Dynamic
and Reusable Content? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
9-2. How Do I Use Groovlets to Generate Dynamic Web Content? . . . . . 187
9-3. How Do I Read and Process XML with XmlParser? . . . . . . . . . . . . . . 189
9-4. How Do I Read and Process XML with XmlSlurper? . . . . . . . . . . . . . 193
9-5. How Do I Use XPath? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
9-6. How Do I Read an XML RSS Feed? . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
9-7. How Do I Use Groovy on the Command Line? . . . . . . . . . . . . . . . . . . 196
9-8. How Do I Use ConfigSlurper to Write Configuration Files? . . . . . . . . 198
9-9. How Do I Use Groovy to Run External Processes? . . . . . . . . . . . . . . 200
9-10. How Do I Download a File in Groovy? . . . . . . . . . . . . . . . . . . . . . . . . 201
9-11. How Do I Process All Files in a Directory? . . . . . . . . . . . . . . . . . . . . 201
9-12. How Do I Count All Occurrences of a Word in a String? . . . . . . . . 202
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

CHAPTER 10 Getting Started with Grails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
10-1. What Is Grails? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
10-2. Why Another Framework? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
10-3. How Do I Download and Install Grails? . . . . . . . . . . . . . . . . . . . . . . . 209
10-4. How Do I Create My First Application in Grails? . . . . . . . . . . . . . . . 210
10-5. How Do I Use Grails with Eclipse? . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
10-6. How Do I Use Grails with IntelliJ IDEA? . . . . . . . . . . . . . . . . . . . . . . . 214
10-7. What Are the Different Grails Commands? . . . . . . . . . . . . . . . . . . . . 216
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
CHAPTER 11 The Web Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
11-1. How Do I Create a Controller? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
11-2. What Are Groovy Server Pages?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
11-3. What Is the Relationship Between Controllers and GSPs? . . . . . . . 224
11-4. How Can I Pass Variables from a Controller to a GSP? . . . . . . . . . 225
11-5. How Do I Use Tags as Method Calls? . . . . . . . . . . . . . . . . . . . . . . . . 226
11-6. How Can I Have Multiple Actions Inside a Controller? . . . . . . . . . . 227
11-7. What Are the Available Implicit Objects Inside a
Controller and a GSP? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
11-8. How Can I Render a Different View for the User? . . . . . . . . . . . . . . 235
11-9. How Do I Chain Actions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
11-10. How Do I Intercept Actions in a Controller? . . . . . . . . . . . . . . . . . . 238
11-11. How Do I Bind Incoming Parameters? . . . . . . . . . . . . . . . . . . . . . . 239
11-12. How Do I Output JSON? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
11-13. How Do I Render Domain Classes as XML or
JSON (Marshalling)? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
11-14. How Do I Upload and Download Files? . . . . . . . . . . . . . . . . . . . . . . 242
11-15. What Are Templates and How Do I Use Them? . . . . . . . . . . . . . . . 243
11-16. How Do I Change the Application’s Layout and Look? . . . . . . . . . 245
11-17. How Do I Write My Own Custom Tags? . . . . . . . . . . . . . . . . . . . . . 249
11-18. How Do I Use Filters? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
11-19. How Do I Use Ajax? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

CHAPTER 12 The Data Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
12-1. How Do I Configure My Application to Use a Database? . . . . . . . . 255
12-2. How Do I Create a Domain Class? . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
12-3. How Do I Model Relationships? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
12-4. How Do I Use Composition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
12-5. How Do I Perform CRUD Operations on My Domain Classes? . . . 270
12-6. How Do I Query with GORM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
12-7. How Do I Use Dynamic Finders? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
12-8. How Do I Use Criteria? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
12-9. How Do I Use HQL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
12-10. How Do I Use Inheritance? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
12-11. What Is Optimistic and Pessimistic Locking? . . . . . . . . . . . . . . . . 282
12-12. How Do I Use Events? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
12-13. How Do I Use Timestamps? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
12-14. How Do I Use Caching? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
12-15. How Do I Use a Custom Database Identifier? . . . . . . . . . . . . . . . . 287
12-16. How Do I Use a Composite Primary Key? . . . . . . . . . . . . . . . . . . . . 288
12-17. How Do I Add an Index to a Column? . . . . . . . . . . . . . . . . . . . . . . . 288
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
CHAPTER 13 Scaffolding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
13-1. How Do I Use Dynamic Scaffolding? . . . . . . . . . . . . . . . . . . . . . . . . . 292
13-2. How Do I Dynamically Scaffold Relationships? . . . . . . . . . . . . . . . . 295
13-3. How Do I Customize the Generated Views? . . . . . . . . . . . . . . . . . . . 298
13-4. What Are the Built-In Constraints in Grails? . . . . . . . . . . . . . . . . . . . 302
13-5. How Do I Override Scaffolded Actions and Views? . . . . . . . . . . . . . 305
13-6. How Do I Use Static Scaffolding? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
13-7. How Do I Change the Scaffolding Templates? . . . . . . . . . . . . . . . . . 313
13-8. How Do I Add My Own Property Editor? . . . . . . . . . . . . . . . . . . . . . . 314
13-9. How Do I Use Scaffolding with Hibernate Mapped Classes?. . . . . 318
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

CHAPTER 14 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
14-1. How Do I Protect My Application from SQL Injection Attacks? . . . .321
14-2. How Do I Protect My Application from
Cross- Site Scripting (XSS)? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
14-3. How Do I Use Codecs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
14-4. How Do I Restrict the HTTP Request Methods
That Can Call an Action? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
14-5. How Do I Implement Authentication in My Application? . . . . . . . . 325
14-6. How Do I Use the AcegiSecurity Plug- In? . . . . . . . . . . . . . . . . . . . . . 328
14-7. How Do I Use OpenID? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
CHAPTER 15 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
15-1. How Do I Unit- Test My Application? . . . . . . . . . . . . . . . . . . . . . . . . . 339
15-2. How Do I Create Integration Tests? . . . . . . . . . . . . . . . . . . . . . . . . . . 343
15-3. How Do I Test render and redirect Methods? . . . . . . . . . . . . . . . . . 345
15-4. How Do I Test Tag Libraries? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
15-5. How Do I Test Domain Classes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
15-6. How Do I Create a Functional Test with Canoo WebTest? . . . . . . . 349
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
CHAPTER 16 Miscellaneous Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
16-1. What About the Service Layer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
16-2. How Can I Use Some of Spring’s Advanced Features
with Grails? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
16-3. How Do I Configure My Application by Using External Files? . . . . 360
16-4. How Do I Configure Logging in My Application? . . . . . . . . . . . . . . . 363
16-5. How Do I Use Grails with Maven 2?. . . . . . . . . . . . . . . . . . . . . . . . . . 364
16-6. How Do I Use Grails with REST? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
16-7. How Do I Write SOAP Web Services in Grails with CXF? . . . . . . . . 369
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376


Добавлено @ 00:47
Русскоязычные статьи на сайте IBM:

Groovy на практике: Взгляд на Groovy как на DSL для Java-разработчиков 
Groovy: меньше кода – больше дела!

Работа с Grails: Cоздание первого Grails-приложения
Узнайте, как много возможностей заключено в этой маленькой инфраструктуре для разработки Web-приложений

Работа с Grails: GORM - Забавное название и серьезная технология
Работа с базами данных в Grails

Изучение Grails: Изменение представления данных с помощью Groovy Server Pages

Изучение Grails: Oсвежите ваше приложение Grails
Придайте свежий вид своему приложению с помощью CSS, шаблонов, библиотек тегов и т. д.

Изучение Grails: Cоздание собственного подключаемого модуля
Узнайте о создании модулей, пригодных для использования в различных приложениях Grails

Изучение Grails: Асинхронная обработка данных в Grails при помощи JSON и Ajax
Работа с mashup-компонентами Google Maps в Grails
Изучение Grails: Grails и мобильный Web
M – новый WWW

Groovy и Spring: Oсновы интеграции
Узнайте, как использование Groovy может повысить гибкость приложений на основе Spring

Groovy и Spring: Часть 2. Изменение поведения приложения в процессе выполнения
Добавление динамически обновляемых объектов Groovy в приложение Spring




Это сообщение отредактировал(а) Vasay - 18.8.2010, 17:18


--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
Vasay
Дата 15.8.2010, 01:02 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



Англоязычная литература:

Grails: A Quick-Start Guide
Описание книги и исходники примеров

Неплохая книжка для начала. Довольно простенькая.
Думаю, ее можно рекомендовать людям незнакомым с Java ЕЕ. Спавка по Groovy довольно коротенькая. 
 

Датирована октябрем 2009. 
pdf гуляет по просторам глобальной паутины. 

Содержание:


Код

1 Introduction 10
1.1 Let Me Tell You About Grails. . . . . . . . . . . . . . . . 10
1.2 How Does Grails Do It? . . . . . . . . . . . . . . . . . . . 11
1.3 Why This Book? . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Who Should Read This Book . . . . . . . . . . . . . . . 13
1.5 Source Code . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Enough Groovy to Be Dangerous . . . . . . . . . . . . . 14
1.7 Groovy Syntax Compared to Java . . . . . . . . . . . . 14
1.8 Groovy Strings . . . . . . . . . . . . . . . . . . . . . . . . 16
1.9 Groovy Closures . . . . . . . . . . . . . . . . . . . . . . . 17
1.10 Groovy Collections . . . . . . . . . . . . . . . . . . . . . 18
1.11 Where to from Here? . . . . . . . . . . . . . . . . . . . . 22
1.12 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 23
2 Our Project 25
2.1 Introducing TekDays.com . . . . . . . . . . . . . . . . . 26
2.2 Meet Our Customer . . . . . . . . . . . . . . . . . . . . . 26
2.3 Iteration Zero . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3 Laying the Foundation 35
3.1 Creating a Domain Class . . . . . . . . . . . . . . . . . . 35
3.2 More About Domain Classes . . . . . . . . . . . . . . . 37
3.3 Testing Our Domain Class . . . . . . . . . . . . . . . . . 38
3.4 Taking Control of Our Domain . . . . . . . . . . . . . . 41
3.5 Modifying Code That Doesn’t Exist . . . . . . . . . . . . 42
3.6 Bootstrapping Some Test Data . . . . . . . . . . . . . . 45
3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4 Building Relationships 53
4.1 The TekUser Domain Class . . . . . . . . . . . . . . . . 53
4.2 One-to-One Relationships . . . . . . . . . . . . . . . . . 55
4.3 One-to-Many Relationships . . . . . . . . . . . . . . . . 60
4.4 Collections of Simple Data Types . . . . . . . . . . . . . 62
4.5 Adding a Sponsor Class . . . . . . . . . . . . . . . . . . 64
4.6 Many-to-Many Relationships . . . . . . . . . . . . . . . 66
4.7 Finishing Up the Domain Model . . . . . . . . . . . . . 71
4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5 Beyond Scaffolding 75
5.1 Generating Scaffolding Code . . . . . . . . . . . . . . . 75
5.2 Anatomy of a Grails Controller . . . . . . . . . . . . . . 76
5.3 Grails Views with Groovy Server Pages . . . . . . . . . . 83
5.4 Configuring a Database . . . . . . . . . . . . . . . . . . 94
5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6 Getting Things Done 98
6.1 Changing All Our Views at Once . . . . . . . . . . . . . 98
6.2 Modifying the Scaffolded Views . . . . . . . . . . . . . . 99
6.3 Event Task List . . . . . . . . . . . . . . . . . . . . . . . 106
6.4 Grails Service Classes . . . . . . . . . . . . . . . . . . . 108
6.5 Integration Testing . . . . . . . . . . . . . . . . . . . . . 111
6.6 Modifying the Task Class . . . . . . . . . . . . . . . . . 113
6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
7 Forum Messages and UI Tricks 116
7.1 Restricting Messages to an Event . . . . . . . . . . . . . 116
7.2 Of Templates and Ajax . . . . . . . . . . . . . . . . . . . 122
7.3 Display Message Threads with a Custom Tag . . . . . . 128
7.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
8 Knock, Knock: Who’s There? Grails Security 135
8.1 Grails Security Options . . . . . . . . . . . . . . . . . . 135
8.2 Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . 136
8.3 Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
8.4 Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . 142
8.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
9 Big-Picture Views 146
9.1 Home Page Makeover . . . . . . . . . . . . . . . . . . . . 146
9.2 Creating a New Controller . . . . . . . . . . . . . . . . . 149
9.3 Designing the Dashboard View . . . . . . . . . . . . . . 150
9.4 Adding the Dashboard Action . . . . . . . . . . . . . . . 156
9.5 Adding a Menu . . . . . . . . . . . . . . . . . . . . . . . 158
9.6 Linking to the Dashboard . . . . . . . . . . . . . . . . . 160
9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
10 Seek, and You Shall Find 163
10.1 Search Using Dynamic Finders . . . . . . . . . . . . . . 163
10.2 Hibernate Criteria Builder . . . . . . . . . . . . . . . . . 166
10.3 The Big Guns: The Searchable Plug-In . . . . . . . . . . 170
10.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
11 Icing on the Cake 178
11.1 The Grails UI Plug-In . . . . . . . . . . . . . . . . . . . . 178
11.2 The Twitter Plug-In . . . . . . . . . . . . . . . . . . . . . 183
11.3 Making the Event Page Customizable with the Blurb
Plug-In . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
11.4 User-Friendly URLs . . . . . . . . . . . . . . . . . . . . . 193
11.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
12 Deployment and Beyond 198
12.1 Using a JNDI Data Source . . . . . . . . . . . . . . . . . 198
12.2 Creating and Deploying a WAR . . . . . . . . . . . . . . 200
12.3 Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . 201
12.4 Parting Thoughts . . . . . . . . . . . . . . . . . . . . . . 202
A Additional CSS Rules 203
B Resources 205
B.1 Online Resources . . . . . . . . . . . . . . . . . . . . . . 205
B.2 Meet the G3 Community . . . . . . . . . . . . . . . . . . 206
B.3 Other Resources . . . . . . . . . . . . . . . . . . . . . . 210
B.4 IDE Support . . . . . . . . . . . . . . . . . . . . . . . . . 211



Это сообщение отредактировал(а) Vasay - 15.8.2010, 01:04


--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
Vasay
Дата 15.8.2010, 01:21 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



The Definitive Guide to Grails
Second Edition


Книга-справочник не для начинающих. Свое название, пожалуй, оправдывает.
Опирается на Grails 1.1.

pdf гуляет по просторам глобальной паутины. 

Содержание:
Код

CHAPTER 1 The Essence of Grails  . 1
Simplicity and Power     . 2
Grails, the Platform     . 4
Living in the Java Ecosystem  4
Getting Started        5
Creating Your First Application                   . 7
Step 1: Creating the Application                . 7
Step 2: Creating a Controller                  8
Step 3: Printing a Message                  10
Step 4: Testing the Code                   10
Step 5: Running the Tests                  . 12
Step 6: Running the Application                13
Summary          15

CHAPTER 2 Getting Started with Grails                . 17
What Is Scaffolding?     17
Creating a Domain      17
Dynamic Scaffolding     19
The Create Operation  . 21
The Read Operation   23
The Update Operation . 25
The Delete Operation  . 26
Static Scaffolding      . 27
Generating a Controller                   . 27
Generating the Views  . 32
Being Environmentally Friendly                  . 33
Configuring Data Sources  . 34
The DataSource.groovy File                 35
Configuring a MySQL Database                37
Configuring a JNDI Data Source                39
Supported Databases  . 39
Deploying the Application   41
Deployment with run-war                  . 41
Deployment with a WAR file                 . 41
Summary          42
CHAPTER 3 Understanding Domain Classes              . 45
Persisting Fields to the Database                 45
Validating Domain Classes  . 46
Using Custom Validators   . 49
Understanding Transient Properties                . 50
Customizing Your Database Mapping                51
Building Relationships    . 53
Extending Classes with Inheritance                56
Embedding Objects     . 59
Testing Domain Classes   . 60
Summary          63
CHAPTER 4 Understanding Controllers                 . 65
Defining Controllers     . 65
Setting the Default Action                  . 66
Logging        . 67
Logging Exceptions  . 68
Accessing Request Attributes                 68
Using Controller Scopes                  . 70
Understanding Flash Scope                 . 71
Accessing Request Parameters                73
Rendering Text    . 73
Redirecting a Request  73
Creating a Model      75
Rendering a View      . 76
Finding the Default View                   76
Selecting a Custom View                   76
Rendering Templates  . 77
Performing Data Binding   . 77
Validating Incoming Data                   78
The Errors API and Controllers                . 79
Data Binding to Multiple Domain Objects            80
Data Binding with the bindData Method            80
Data Binding and Associations                . 81
Working with Command Objects                  82
Defining Command Objects                 82
Using Command Objects                   83
Imposing HTTP Method Restrictions                . 85
Implementing an Imperative Solution             . 85
Taking Advantage of a Declarative Syntax           85
Controller IO        86
Handling File Uploads  . 86
Reading the Request InputStream               89
Writing a Binary Response                 . 89
Using Simple Interceptors   90
Before Advice     . 90
After Advice      . 91
Testing Controllers      91
Controllers in Action     . 93
Creating the gTunes Home Page               . 94
Adding the User Domain Class                . 95
Adding a Login Form  96
Implementing Registration                 . 97
Testing the Registration Code                . 100
Allowing Users to Log In                  102
Testing the Login Process                  104
Summary         . 106

CHAPTER 5 Understanding Views 107
The Basics         107
Understanding the Model                 . 108
Page Directives    . 109
Groovy Scriptlets    109
GSP as GStrings   . 110
Built-in Grails Tags     . 111
Setting Variables with Tags                 . 111
Logical Tags      112
Iterative Tags     . 113
Filtering and Iteration  114
Grails Dynamic Tags    . 116
Linking Tags     117
Creating Forms and Fields                 119
Validation and Error Handling                . 123
Paginating Views    125
Rendering GSP Templates                  132
Creating Custom Tags    136
Creating a Tag Library                   . 137
Custom Tag Basics   138
Testing a Custom Tag 139
Summary         . 141
CHAPTER 6 Mapping URLs     . 143
Understanding the Default URL Mapping              143
Including Static Text in a URL Mapping              . 144
Removing the Controller and Action Names from the URL      . 145
Embedding Parameters in a Mapping              . 145
Specifying Additional Parameters                 147
Mapping to a View     . 148
Applying Constraints to URL Mappings              149
Including Wildcards in a Mapping                 150
Mapping to HTTP Request Methods                151
Mapping HTTP Response Codes                 . 153
Taking Advantage of Reverse URL Mapping            . 154
Defining Multiple URL Mappings Classes              155
Testing URL Mappings   155
Summary         . 158

CHAPTER 7 Internationalization  159
Localizing Messages    . 159
Defining User Messages                  . 159
Retrieving Message Values                 . 161
Using URL Mappings for Internationalization          163
Using Parameterized Messages                  164
Using java.text.MessageFormat               . 164
Using the message Tag for Parameterized Messages      165
Using Parameterized Messages for Validation         . 166
Using messageSource    168
Summary         . 170

CHAPTER 8 Ajax          . 171
The Basics of Ajax     . 171
Ajax in Action       173
Changing Your Ajax Provider                   174
Asynchronous Form Submission                 . 175
Executing Code Before and After a Call              . 177
Handling Events      . 178
Fun with Ajax Remote Linking                  . 179
Adding Effects and Animation                  . 193
Ajax-Enabled Form Fields  . 193
A Note on Ajax and Performance                 . 197
Summary         . 198

CHAPTER 9 Creating Web Flows  . 199
Getting Started with Flows  200
Defining a Flow    . 200
Defining the Start State                   200
Defining End States  . 201
Action States and View States                202
Flow Scopes     204
Flows, Serialization, and Flow Storage            . 204
Triggering Events from the View               205
Transition Actions and Form Validation            . 206
Subflows and Conversation Scope             . 206
Flows in Action       208
Updating the Domain  209
Updating the View  . 211
Defining the Flow   . 212
Adding a Start State  . 212
Implementing the First View State              . 216
Data Binding and Validation in Action             218
Action States in Action                   . 222
Reusing Actions with Closures                227
Using Command Objects with Flows             . 231
Dynamic Transitions  . 235
Verifying Flow State with Assertions             . 236
Testing Flows    . 244
Summary         . 247

CHAPTER 10 GORM         . 249
Persistence Basics     . 249
Reading Objects    249
Listing, Sorting, and Counting               . 250
Saving, Updating, and Deleting               251
Associations       . 252
Relationship Management Methods             253
Transitive Persistence                   . 254
Querying         254
Dynamic Finders    255
Criteria Queries    . 257
Query by Example   . 261
HQL and SQL     . 261
Pagination      262
Configuring GORM     . 263
SQL Logging     264
Specifying a Custom Dialect                 264
Other Hibernate Properties                 . 265
The Semantics of GORM   265
The Hibernate Session                   . 266
Session Management and Flushing              267
Obtaining the Session 268
Automatic Session Flushing                 270
Transactions in GORM    272
Detached Objects      274
The Persistence Life Cycle                 274
Reattaching Detached Objects                276
Merging Changes   . 277
Performance Tuning GORM                   . 278
Eager vs. Lazy Associations                 278
Batch Fetching    281
Caching       282
Inheritance Strategies                   . 285
Locking Strategies     . 285
Events Auto Time Stamping                   . 287
Summary         . 288

CHAPTER 11 Services         289
Service Basics       . 289
Services and Dependency Injection               . 291
Services in Action      291
Defining a Service   . 293
Using a Service    . 294
Transactions        295
Scoping Services      297
Testing Services      . 298
Exposing Services     298
Summary         . 304

CHAPTER 12 Integrating Grails    305
Grails and Configuration   305
Configuration Basics . 305
Environment-Specific Configuration             . 306
Configuring Logging  . 306
Stack Trace Filtering . 309
Externalized Configuration                 310
Understanding Grails’ Build System                310
Creating Gant Scripts  312
Command-Line Variables                 . 313
Parsing Command-Line Arguments             314
Documenting Your Scripts                  315
Reusing More of Grails                   . 316
Bootstrapping Grails from the Command Line         . 317
Gant in Action    . 317
Integration with Apache Ant                   . 325
Dependency Resolution with Ivy                 . 327
Code Coverage with Cobertura                 . 330
Continuous Integration with Hudson                331
Adding Support to Your Favorite IDE                335
IntelliJ        . 336
NetBeans       337
Eclipse       . 338
TextMate      . 342
Remote Debugging with an IDE               . 344
Integration with E-mail Servers                  345
Scheduling Jobs      . 349
Installing the Quartz Plugin                 . 349
Simple Jobs      350
Cron Jobs       351
Interacting with the Scheduler                354
Scheduling Jobs    354
Pausing and Resuming Jobs                 355
Triggering a Job    355
Adding and Removing Jobs                . 355
Jobs in Action     356
Deployment        . 361
Deploying with Grails  361
Deploying to a Container                  . 361
Application Versioning and Metadata             362
Customizing the WAR  363
Populating the Database with BootStrap Classes        364
Summary         . 365

CHAPTER 13 Plugins         . 367
Plugin Basics        367
Plugin Discovery    367
Plugin Installation   . 369
Local Plugins     . 370
Creating Plugins    370
Providing Plugin Metadata                 371
Supplying Application Artefacts               . 373
Plugin Hooks     . 374
Plugin Variables    . 375
Custom Artefact Types                   . 376
Providing Spring Beans                   379
Dynamic Spring Beans Using Conventions           382
Using Metaprogramming to Enhance Behavior         383
Plugin Events and Application Reloading           . 385
Modifying the Generated WAR Descriptor          . 388
Packaging and Distributing a Grails Plugin          389
Local Plugin Repositories                 . 390
Plugins in Action      . 391
Plugins to Add Behavior                   391
Plugins for Application Modularity              . 397
Summary         . 406

CHAPTER 14 Security         407
Securing Against Attacks  . 407
SQL or HQL Injection . 407
Groovy Injection    . 409
Cross-Site Scripting (XSS)                  409
XSS and URL Escaping                  . 411
Denial of Service (DoS)                  . 412
Batch Data Binding Vulnerability               413
Using Dynamic Codecs   . 414
Authentication and Authorization                 . 416
Grails Filters       . 417
The JSecurity Plugin    . 419
Authentication Realms                   . 419
Subjects and Principals                   420
Roles and Permissions                   . 421
JSecurity in Action   421
Limiting Access Through URL Mappings              446
Summary         . 448

CHAPTER 15 Web Services      449
REST           . 450
RESTful URL Mappings                  . 450
Content Negotiation  . 452
Content Negotiation with the ACCEPT Header         . 452
The ACCEPT Header and Older Browsers           . 456
Content Negotiation with the CONTENT_TYPE Header      457
Content Negotiation Using File Extensions           458
Content Negotiation with a Request Parameter        459
Content Negotiation and the View              . 459
Marshaling Objects to XML                 . 460
Marshaling Objects to JSON                 463
Unmarshaling XML or JSON                 466
REST and Security  . 472
Atom and RSS       . 473
Creating RSS and Atom Feeds                473
RSS and Atom Link Discovery               . 476
SOAP          . 478
SOAP Web Services via Plugins               . 479
Calling SOAP from the Client                482
Summary         . 485

CHAPTER 16 Leveraging Spring   . 487
Spring Basics       487
Spring and Grails      489
Dependency Injection and Grails               489
The BeanBuilder DSL  490
Spring in Action      498
Integrating JMS with Spring JMS              498
Mixing Groovy and Java with Spring             . 513
Summary         . 516

CHAPTER 17 Legacy Integration with Hibernate            . 519
Legacy Mapping with the ORM DSL                519
Changing Table and Column Name Mappings         . 520
Changing Association Mappings              . 521
Understanding Hibernate Types               . 524
Changing the Database Identity Generator           529
Using Composite Identifiers                . 531
Mapping with Hibernate XML                   532
EJB 3–Compliant Mapping                 . 535
Using Constraints with POJO Entities             541
Summary         . 543

APPENDIX The Groovy Language                   . 545
Groovy and Java: A Comparison                 . 545
What’s the Same?  . 546
What’s Different?   . 546
The Basics         547
Declaring Classes   . 548
Language-Level Assertions                 . 548
Groovy Strings     549
Closures       . 552
Lists, Maps, and Ranges                  . 553
Expando Objects    555
Ranges        556
Groovy Power Features   . 557
Everything Is an Object                  . 557
Metaprogramming   561
Understanding Builders                   567
Summary



--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
Vasay
Дата 16.8.2010, 13:53 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



Книга по Groovy:

Groovy in Action

pdf гуляет по просторам глобальной паутины.

Книжка старовата - 2007-го года.

Вроде как обещают обновление книги, которое должно выйти в том числе и на русском языке.

Содержание:
Код

ART 1 THE GROOVY LANGUAGE ...................................... 27
2 Overture: The Groovy basics 29
3 The simple Groovy datatypes 55
4 The collective Groovy datatypes 93
5 Working with closures 122
6 Groovy control structures 153
7 Dynamic object orientation, Groovy style 174
PART 2 AROUND THE GROOVY LIBRARY ........................ 227
8 Working with builders 229
9 Working with the GDK 277
10 Database programming with Groovy 323
11 Integrating Groovy 360
12 Working with XML 401
PART 3 EVERYDAY GROOVY ............................................ 451
13 Tips and tricks 453
14 Unit testing with Groovy 503
15 Groovy on Windows 546
16 Seeing the Grails light 572
appendix A Installation and documentation 606
appendix B Groovy language info 610
appendix C GDK API quick reference 613
appendix D Cheat sheets 631



--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
Vasay
Дата 18.8.2010, 01:32 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



Здесь , после регистрации, можно скачать (или посмотреть) запись вебинара Building Twitter with Grails in 40 Minutes 


--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
CrasyMen
Дата 31.8.2010, 11:17 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 264
Регистрация: 19.12.2006

Репутация: нет
Всего: 3



Vasay, спасибо

Это сообщение отредактировал(а) CrasyMen - 31.8.2010, 11:20


--------------------
Человек просто обязан ошибаться, раз другие учатся на его ошибках.
[color=skyblue]Хочу сменить ник и сменю как только дадут такую возможность.[/color]
PM MAIL ICQ   Вверх
serger
Дата 24.11.2010, 13:59 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 518
Регистрация: 19.6.2007
Где: Ижевск

Репутация: нет
Всего: 5





--------------------
упс!
PM MAIL WWW Skype GTalk Jabber   Вверх
itserg
Дата 24.11.2010, 15:28 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 2
Регистрация: 24.11.2010

Репутация: нет
Всего: нет



PM MAIL   Вверх
Vasay
Дата 27.6.2011, 23:48 (ссылка) |    (голосов:1) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
****


Профиль
Группа: Завсегдатай
Сообщений: 2097
Регистрация: 8.3.2006

Репутация: 3
Всего: 73



На сайте grails.org появилась третья часть скринкаста Getting Started with Grails

http://www.grails.org/Grails+Screencasts


--------------------
Придумать идеальную защиту от дурака невозможно, дураки, наудивление, изобретательны.
PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Java: Groovy & Grails | Следующая тема »


 




[ Время генерации скрипта: 0.1634 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.