Practical DWR 2 Projects

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

I humbly disagree with J.Hughes who gave it two stars but stated it should only receive one star. The book had a rudimentary intro to AJAX because the author believes (as do I) that the term "AJAX" has been applied to many things. One must define the domain within which one works. The author did this, framing each technology well. The author gives you a good introduction into the AJAX frameworks that the reader could explore.The reason for the second half of the book is to introduce the reader to how DWR would fit in various scenarios. The author explored several other AJAX technologies to accomplish this. This will demonstrate to the average reader how to incorporate whatever framework they are using, into the DWR way of doing things. The book was far from comic relief and I'm not sure why that is a bad thing in our dry subject matter industry (i.e. programming).I believe this is not for the J. Hughes of this world who hate the presentation of subject matter within actual working programs. Yes you can drop the WAR file into the Tomcat webapps directory and poof you're see the application running. I liked the format, it help me learn many things. I am a tinkerer, and the best way to use ALL of the code that came from the author is to take bits and pieces from a program and get it working for yourself. Like the Dwiki example, I took the Login form and wanted to just make that work. The author also gives you additional project ideas to take the DWiki (or any of the other projects) further. I think this is a good format for the learner.Being an avid reader, I believe the J.Hughes type of person wants a dry terse reference. Nothing wrong with that, I have several books like that, and when I'm pressed for time, and "just have to solve the problem" then this book would drive me nuts. However, I wanted to learn the WHY of DWR as well as the HOW. So this book more than satisfied that requirement.Good luck to you all. The book was well worth the money.-T-

Author(s): Frank Zammetti
Series: Expert's voice in Java technology
Edition: 1
Publisher: Apress; Distributed to the book trade worldwide by Springer-Verlag New York
Year: 2008

Language: English
Pages: 568
City: Berkeley, CA :, New York, NY

Practical DWR 2 Projects......Page 1
Contents at a Glance......Page 7
Contents......Page 9
Foreword......Page 15
About the Author......Page 17
About the Technical Reviewer......Page 19
About the Illustrator......Page 21
Acknowledgments......Page 23
Introduction......Page 25
Obtaining This Book’s Source Code......Page 26
Contacting the Author......Page 27
A Brief History of Web Development: The “Classic” Model......Page 31
Dawn of a Whole New World: The PC Era......Page 33
Yet Another Revolution: Enter the Web......Page 35
What’s So Wrong with the Classic Web?......Page 39
Enter Ajax......Page 42
Why Is Ajax a Paradigm Shift? On the Road to RIAs......Page 46
The Flip Side of the Coin......Page 51
Let’s Get to the Good Stuff: Our First Ajax Code, the Manual Way......Page 53
A Quick Postmortem......Page 57
Hey, I Thought This Was Ajax?!?......Page 58
Cutting IN the Middle Man: Ajax Libraries to Ease Our Pain......Page 61
Alternatives to Ajax......Page 64
Hmm, Are We Forgetting Something? What Could It Be? Oh Yeah, DWR!......Page 67
Summary......Page 68
First Things First: Why DWR at All?......Page 71
DWR: RPC on Steroids for the Web......Page 73
DWR Architectural Overview......Page 75
Getting Ready for the Fun: Your DWR Development Environment......Page 77
Getting the Lay of the Land: Directory Structure......Page 80
From Code to Executable: Ant Build Script......Page 81
Application Configuration: web.xml......Page 82
The Markup: index.jsp......Page 83
On the Server Side: MathServlet.java......Page 84
The Workhorse: MathDelegate.java......Page 86
It’s Alive: Seeing It in Action......Page 88
Adding DWR to the Mix......Page 89
The DWR Test/Debug Page......Page 93
Configuring DWR Part 1: web.xml......Page 95
Configuring DWR Part 2: dwr.xml......Page 98
Built-in Creators and Converters......Page 103
The Section......Page 104
The Section......Page 107
Basic Call Syntax......Page 109
Call Metadata Object Approach......Page 110
Setting Beans on a Remote Object......Page 111
Extended Data Passing to Callbacks......Page 115
Interacting with DWR on the Server......Page 116
DWR Configuration and Other Concepts: The engine.js File......Page 118
A Quick Look at util.js, the DWR Utility Package......Page 120
Summary......Page 122
Locking the Doors: Security in DWR......Page 123
Deny by Default......Page 124
Securing the DWRServlet......Page 126
Securing Individual Methods......Page 128
When Perfection Is Elusive: Error Handling in DWR Applications......Page 129
Edge Cases: Improper Responses......Page 130
The Mechanics of Handling Exceptional Situations......Page 133
Another Word on Exceptions......Page 134
Help from Elsewhere: Accessing Other URLs......Page 135
Turning the Tables: Reverse Ajax......Page 137
Polling......Page 139
Comet......Page 140
Piggybacking......Page 142
The Code of Reverse Ajax......Page 143
Don’t Go It Alone: Integration with Frameworks and Libraries......Page 145
Spring......Page 146
WebWork/Struts 2......Page 147
Struts “Classic”......Page 148
Beehive......Page 149
Something Old, Something New: Annotations......Page 150
Summary......Page 153
Application Requirements and Goals......Page 157
Dissecting InstaMail......Page 158
web.xml......Page 160
dwr.xml......Page 161
The Client-Side Code......Page 162
styles.css......Page 163
index.jsp......Page 165
script.js......Page 169
OptionsManager.java......Page 191
AddressBookManager.java......Page 196
MailSender.java......Page 201
MailRetriever.java......Page 205
MailDeleter.java......Page 211
Suggested Exercises......Page 215
Summary......Page 216
Application Requirements and Goals......Page 217
FreeMarker......Page 219
Apache Derby......Page 222
Spring JDBC......Page 223
Dissecting DWiki......Page 225
Container-Managed Security Configuration......Page 227
web.xml......Page 228
dwr.xml......Page 231
dwiki.properties......Page 232
The Client-Side Code......Page 233
index.jsp......Page 234
login.jsp......Page 238
loginOk.jsp......Page 240
RolloversClass.js......Page 241
DWikiClass.js......Page 243
FreeMarker Templates......Page 251
DWikiContextListener.java......Page 258
Article.java......Page 261
ArticleHistoryItem.java......Page 262
Freemarker.java......Page 263
DatabaseWorker.java......Page 265
ArticleDAO.java......Page 271
Suggested Exercises......Page 285
Summary......Page 286
Application Requirements and Goals......Page 287
dhtmlx UI Components......Page 289
Jakarta Commons IO......Page 296
Jakarta Commons FileUpload......Page 297
Dissecting Fileman......Page 298
Container-Managed Security Configuration......Page 301
web.xml......Page 302
dwr.xml......Page 304
styles.css......Page 306
login.htm......Page 308
loginBad.htm......Page 309
index.jsp......Page 310
uploadFile.jsp......Page 314
downloadFile.jsp......Page 316
Fileman.js......Page 317
The Server-Side Code......Page 342
FileVO.java......Page 343
DirectoryVO.java......Page 344
FileSystemFunctions.java......Page 345
Summary......Page 354
Application Requirements and Goals......Page 357
Spring Dependency Injection (IoC)......Page 359
DataVision......Page 361
Quartz......Page 364
script.aculo.us......Page 365
A Sample Database to Report Against......Page 368
Dissecting RePortal......Page 369
web.xml......Page 374
appConfig.xml......Page 375
dwr.xml......Page 376
spring-beans.xml......Page 377
The RePortal Database......Page 379
styles.css......Page 380
A Beacon in the Night: lightbox.css and lightbox.js......Page 381
index.jsp......Page 387
RePortalClass.js......Page 393
Config.java......Page 413
ContextListener.java......Page 416
DatabaseWorker.java......Page 417
FavoritesWorker.java......Page 418
GroupWorker.java......Page 422
ReportDescriptor.java......Page 425
ReportWorker.java......Page 426
UserWorker.java......Page 430
ReportRunner.java......Page 432
ReportScheduleDescriptor.java......Page 437
ReportSchedulingWorker.java......Page 438
Suggested Exercises......Page 444
Summary......Page 445
Application Requirements and Goals......Page 447
DWR Annotations......Page 448
Reverse Ajax in Action......Page 449
Anything Else, or Can We Get Goin’ Already?!?......Page 450
Dissecting InMemoria......Page 451
web.xml......Page 452
styles.css......Page 454
index.jsp......Page 455
InMemoria.js......Page 458
GameCore.java......Page 469
OpponentCreator.java......Page 473
Opponent.java......Page 475
Summary......Page 484
Application Requirements and Goals......Page 485
HSQLDB......Page 486
Hibernate......Page 487
Ext JS......Page 489
Dissecting Timekeeper......Page 491
web.xml......Page 493
dwr.xml......Page 494
hibernate.cfg.xml......Page 495
Project.hbm.xml......Page 497
TimesheetItem.hbm.xml......Page 498
styles.css......Page 499
index.jsp......Page 501
Timekeeper.js......Page 507
Utils.java......Page 535
User.java......Page 537
UserDAO.java......Page 538
Project.java......Page 544
ProjectDAO.java......Page 545
TimesheetItem.java......Page 546
TimesheetDAO.java......Page 547
Suggested Exercises......Page 548
Summary......Page 549
Index......Page 551