Home The News Book Reviews

Recommended Reading

Related Items

W3Counter

The News
Book Review: GlassFish Security by Masoud Kalali PDF Print E-mail
Written by Administrator   
Friday, 02 July 2010 07:13

GlassFish Security by Masoud Kalali provides an in-depth look at Java EE security issues.  The book is broken down into 3 parts:

1.       The Java EE security model

2.       Securing GlassFish and its environment

3.       Securing Java EE applications using OpenDS and Single-Sign-On (SSO).

The first section of the book describes the Java EE security model.  This section starts by assuming the reader has none or very little knowledge of Java EE security and describes the structure of a Java EE application and how security relates to it.  Basic terms such as User, Role, Realm, Principal and Credential are described together with examples of each.  Authentication and authorization are described and shown how these concepts are applied to Java EE applications as both XML configuration and annotations. 

When securing an application for use on GlassFish, several different security realms are available for use.  The book covers the GlassFish File, JDBC, LDAP and Certificate realms showing how each of these can be configured (using OpenDS in the case of the LDAP realm).

The first section of the book ends with a sample application summing up all that has been described so far.  The author shows how to develop and secure a sample Java EE application securing both the presentation and business tiers.  The complete code for this application is available online.  This is a good chapter that brings together all that the reader has learned so far into a simple, yet complete secure application.

Typically developers learn to secure their applications, but can sometimes forget to secure the application server and its environment.  The next section of the book shows how to secure the GlassFish environment and the application server itself.  Here, the author shows how to install and secure GlassFish on the OpenSolaris operating system.  Although the majority of the details here are specific to OpenSolaris, the book also goes into details of securing the Java Runtime with different policies which will be appropriate to all operating systems.  Even if you’re not deploying to OpenSolaris, this section gives a good overview of the problems faced when securing the environment.

After securing the GlassFish environment, the author continues to describe how to secure the application server itself.  In a similar fashion to the rest of this section, security is discussed and shown how to be implemented.  There is no source code provided here, instead details of how to use the JMX and client tools to secure the server.

The final section of the book introduces OpenDS, the open source Directory Server and OpenSSO, the open source Single-Sign-On solution.  To me, this is the most interesting section of the book and covers almost half of the book’s content.  If you’re not familiar with OpenDS or OpenSSO, or even directory services or single-sign-on, then this section probably warrants the price of the book by itself.  As with the rest of the book, the author provides a description of the security features being discussed (e.g. implementing SSO on web apps or web services) and provides illustrations and source code explaining the subject in detail.

If you are developing secure Java EE applications then this book is highly recommended.  The book is written for “application designers, developers, and administrators who work with GlassFish and are keen to understand Java EE and GlassFish security.”

Further details of the book can be found here.

GlassFish Security by Masoud Kalali. ISBN: 978-1-847199-38-6

 

Thanks to Sean at Packt for providing me with a copy of this book for review.

 
Book Review: Apache MyFaces Trinidad 1.2 PDF Print E-mail
Written by Administrator   
Friday, 26 March 2010 07:57

Review: Apache MyFaces Trinidad 1.2 – A Practical Guide By David Thomas

Apache MyFaces Trinidad 1.2 by David Thomas introduces the Trinidad framework and shows how it can be used in combination with the Seam Framework to provide a “comprehensive and effective technology for the development of powerful rich-client web applications”.

The book is comprised of 12 chapters. The first 4 chapters primarily provide useful background information whereas the remaining 8 chapters provide lots of source code examples showing how to use Trinidad with Seam.

In the first few chapters, the author introduces Trinidad and explains why it could be used for development of Rich Internet Applications. He describes several reasons for choosing Trinidad such as the wide range of components (“well over 100”), the framework's interoperability and its maturity.

The author also introduces Seam early on in the book, but there is very little discussion about how to configure and get started with Seam. I think that some prior knowledge of Seam would be useful before reading this book.

After discussing Seam, the author continues to introduce Facelets and its templating facilities. Facelets is a JSF view technology that now a standard technology with JSF 2. In the book however, the author concentrates on JSF 1.x. As with the Seam discussions, I would have liked a deeper discussion on Facelets, but as this is not the major subject of the book I can understand why this is not included.

Moving on, the author begins to discuss Trindad in further detail by discussing the most commonly used tags and attributes for the different components and how Trinidad allows Pages to be partially rendered. Partial Page Rendering (PPR) is Trinidad’s AJAX technology that allows only sections of pages to be rendered based upon events such as button clicks within a web page.

The main detailed content (from a code point of view) begins in Chapter 5 where the groundwork for developing Trinidad / Seam applications begins. This chapter details how Seam applications can be built using the SeamGen tool and then imported into Eclipse. The author shows how to modify a standard SeamGen application to use Trinidad instead of RichFaces – RedHat’s competing JSF component framework.

The remainder of the book provides in depth code coverage on how to use different Trinidad components to build web application. The author describes the Trinidad dialog framework, how to build panels, and forms and how to use many different basic Trinidad components, such as text fields, number fields, trees and tables.

Finally, the author provides details on using Trinidad to generate charts and graphs, wizards and popup dialogs – features that are not available with all JSF component libraries.

This book is a good introduction to Apache MyFaces Trinidad 1.2. Packt Publishing describe the book as being written for “Java Developers who are beginners at JSF and experiences web developers who are looking for an introduction into the world of open source JSF technology”. I would agree with this sentiment, but would also recommend prospective readers have at least a basic knowledge of Facelets and Seam before enjoying the book.

Further information about this book can be obtained from Packt Publishing.
 
Book Review: JBoss RichFaces 3.3 PDF Print E-mail
Written by David Salter   
Thursday, 21 January 2010 07:26

JBoss RichFaces 3.3 by Demetrio Filocamo is almost 300 pages long and aims to teach developers how to using RichFaces applications rather than just providing a set of API references.

The book is broadly split into 3 sections.

The first section provides an introduction to RichFaces. An overview and history of RichFaces is provided in chapter 1 followed by a discussion on the features available with RichFaces such as AJAX functionality and skinnability. Chapter 2 of the book provides details on how to start using RichFaces within your applications. Initially, explaining how seamgen can be downloaded and installed provides this. Seamgen is a set of build scripts that are provided with JBoss Seam distributions which create ANT scripts to build, test and deploy Seam applications. If you are not using Seam, the next section of this chapter shows how to integrate RichFaces into standard JSF applications.

I found the content informative, but felt that prior knowledge of Seam would be useful in understanding what is being explained. Finally in this section, the author provides details of Eclipse/JBoss Tools, JBoss Developer Studio and IntelliJ Idea showing where to get each piece of software. I found it strange that no mention of NetBeans was provided here. Admittedly, the support for Seam projects is superior in Eclipse to NetBeans, but NetBeans provides solid JSF/RichFaces support for non-Seam projects.

The next section of the book takes the user through developing a fully blown application using RichFaces and Seam. Again, I felt that prior knowledge of Seam would be useful. During this section, the author shows how to build a working “Contact Manager” application. The application is built from scratch using seamgen as the build system. The author explains the structure of seamgen created projects and shows how many different RichFaces components can be used to create a fully functional AJAX web application. With each form that is created for the application, the web code (facelets) is shown together with the corresponding Seam components acting as JSF backing beans. This is by far the biggest section of the book and provides lot of detail on RichFaces. Sections on skinning, internationalization, user registration and displaying data lists are all provided in detail with particular reference to RichFaces. Where relevant, each of these sections shows how AJAX functionality (provided by default by RichFaces) can easily be employed to enhance the users experience.

The final section of the book shows how some of the more advanced features of RichFaces can be used. Chapters 8 and 9 show how RichFaces skins can be customized and how Maven can be used to create new skins using the RichFaces CDK. The final 2 chapters of the book show how new components can be developed with the RichFaces CDK (a star rating component is created) and how some of the more advanced AJAX components (push and pull) can be used within web applications.

Altogether this is a good book on RichFaces, but it does assume that the reader has some knowledge of developing enterprise applications and in particular I feel that prior knowledge of JBoss Seam would be greatly beneficial to reading the book. This book is recommended for web application developers using JBoss RichFaces.

Thanks to Packt Publishing for providing me the copy of this book to review.

 
Book Review: Beginning Java EE 6 Platform with GlassFish 3 PDF Print E-mail
Written by David Salter   
Monday, 05 October 2009 08:54

"Beginning Java™ EE 6 Platform with GlassFish™ 3: From Novice to Professional " by Antonio Goncalves provides 15 chapters concentrating on the most important APIs and features of Java EE 6.  The book is almost 500 pages long and provides a good level of detail and many code samples and UML diagrams for each topic being discussed.

 

The book starts by introducing Java EE 6.  A brief history of Java EE is provided showing how it has changed from inception through to the latest version of the specification.  A brief description is provided for the major parts of Java EE describing what containers are used for and what APIs are relevant to each container (Web, EJB, Applet and Application Client).  After describing the basic architecture of Java EE 6, the book explains what is different in EE 6 over previous versions giving code samples and details of the new APIs involved.  Finally in the introduction, details are given of the working environment used to develop code samples throughout the book.  This includes Maven, JUnit, Derby DB and GlassFish v3.  I would have liked to see some samples of EE6 applications using NetBeans 6.8, but because this is still under development I can understand why this was not included in the book.

 

Chapters 2 through 5 of the book cover Java Persistence using JPA.  This section of the book starts by providing an overview of JPA and describing what is new in JPA 2.0.  ORM, queries and JPA lifecycles are all introduced before a full chapter is provided on each subject.  In each of these chapters (Java Persistence, Object-Relational Mapping, Managing Persistent Objects and Callbacks and Listeners), the subject is described in detail with many code samples and UML and database diagrams where appropriate.  The different APIs used for persistence are detailed in depth, for example, @MappedSuperclass is described together with why it should be used.  When discussing querying JPA objects, details are provided on both SQL and JPQL for comparison.  I think this would be useful to developers who are new to JPQL but are familiar with SQL.  The book really assumes little or no knowledge of JPA querying and discusses dynamic queries, named queries and native queries.

 

The final chapter on persistence covers callbacks and listeners detailing annotations such as @PrePersist, @PostPersist, @PostRemove and @PostLoad.  Again, as is standard thorughout the entire book, valuable UML diagrams are displayed to help explain the section in question along with numerous code samples as both Java code and XML where necessary.

 

The next section of the book, chapters 6 through 9, covers what many consider to be one of the main aspects of Java EE - Enterprise Java Beans. This section starts by taking a look at EJB - what is it and how has it changed in this latest release of the specification.  For many of the code samples in the book, a CD Book Store type application is developed progressively throughout the book.  This process is continued throughout the chapters about EJB.  The book shows how to write EJBs, how to call them from client code , how to compile and package them with Maven and then how to deploy to GlassFish using the command line asadmin tool.

 

Stateless, Stateful and Singleton session beans are described along with techniques for invoking EJBs including dependency injection, the timer service and unit testing.  Next, lifecycle events of EJBs are described including details of the different annotation to make this process simpler.  The book introduces lifecycle annotations such as @PostContruct and  @PreDestroy before describing how interceptors can be applied to EJB using the @Interceptors annotation.

 

The final section on EJB covers transactions and security.  A thorough description of transactions is provided including details on XA and distributed transactions explaining two-phase commit - something that is not always included in Java EE texts.  As expected, both container and bean managed transactions are detailed along with details of the APIs used and reasons as to why one should use the different types of transactions in the EJB container.

 

The final third of the book covers the technologies usually found in the web container in Java EE applications.  This covers Java Server Faces 2.0, message sending and SOAP and RESTful web services.

 

The section on web technologies is my favorite part of the book as it covers so much information.  It covers the basics of web page development and includes details on HTML, XHTML, CSS, DOM, JSP, scripting, JSTL, JSF, Facelets and much more.  I would have liked to see more information on Facelets however as I believe templating of components has great benefits, but is quite often missed by programmers in favor of copy and paste web design.  Having said that, there is sufficient information on Facelets to describe what it is and how it should be used.

 

The final two chapters of the book describe SOAP and RESTful web services.  These technologies are traditionally difficult to understand and develop, however these chapters provide clear details of how to develop against and deploy these technologies against GlassFish.

 

All in all, this is a very comprehensive book on Java EE 6 and is thoroughly recommended.  The writing style is easy to understand even when complex subjects are being described.  I would recommend this book to anyone that does Java Enterprise development whether they are intending to use EE 6 technologies or not.

 

 

Thanks to Twitter, I found out from @alexismp that the latest code for the book is available from Antonio's web site.

 

 

 

 
"OpenCms 7 Development" Book Review PDF Print E-mail
Written by Administrator   
Thursday, 28 August 2008 17:00

"OpenCms 7 Development" by Dan Liliedahl is intended for Java developers who wish to extend and customize OpenCms via its Java APIs. The book takes a tutorial approach to customizing OpenCms starting off by describing the blog application that is developed throughout the course of the book.Â

 

Content Management is one of the buzz words within the IT industry at the moment. Many different CMS systems are available which can be customized in different ways either via .NET code, Java code or some other programming languages. OpenCms 7 is developed in Java and can be completely customized using its Java and XML apis.The book starts by describing the skills necessary for OpenCms development which range from basic HTML skills through to Java skills and having an in depth knowledge of the programming model behind the OpenCms product. For this book, it is assumed that the reader has basic Java knowledge and some familiariity with OpenCms although not necessarily at the code level. To ensure the reader has sufficient knowledge of OpenCms, a brief introduction to the product is provided including details of the applications architecture and Virtual File system.

 

After introducing OpenCms and the different levels of development and customization available, chapter 2 of the book describes how to set up an Eclipse based environment for editing JSP code and how WebDAV can be used for editing pages within an OpenCms enviroment. The author describes this in detail including intricacies that a newcomer to the product may not be aware of. The chapter concludes by detailing how to check OpenCms out of the CVS repository and how to build and debug it within Eclipse.

 

After spending a fair amount of time with introductions, the author moves on to describe OpenCms modules describing what they are and how to create them within the OpemCms Module Management view. A blog entry content type is created for which the full XSD is listed within the book. After creating a content type, the reader is shown how to register this within OpenCms and how to create field mappings between the content type (XML Schema) and the fields within the blog application that are displayed on the page. Different widgets are described (for example the calendar and HTML editor widgets) along with the XML needed to allow them to be displayed on a form. This section contains a lot of XML and isn't for the feint hearted.

 

The next chapter of the book continues to talk about user interface issues. In it, the author describes how to build templates for an OpenCms site. This section describes how templates are built (including sidebars, headers and footers) providing details of how the OpemCms Java tag library can be used in conjunction with JSTL and JavaBeans showing how templates for different page types can be built up. The author spends a good amount of time on this section providing code samples for each feature described. All of these code samples used throughout the book are also available on the publisher's web site.

 

What's a web site without search? Well, chapter 5 details the Lucene search engine which is included as part of the OpenCms distribution. A discussion on Lucene and the Luke Visual Indexer tool follows which is very useful for readers not familiar with the product. Again, as is common throughout the rest of the book, both JSP and Java source code is provided throughout the chapter in this instance, whilst describing how to configure search screens and backend search code.

 

The next few chapters of the book incrementally add new features to the blog application namely, user registration, comment support, RSS feeds and administration support. The tutorial style is continued throughout these chapters with each starting with a description of the topic at hand. The reader is then taken through the stages necessary to develop the features each one including Java and JSP source code.

 

This is a good book that I'd recommend for developers who are working with OpenCms 7 however I would suggest that readers of the book be familiar with OpenCms before reading it as the concepts can be quite difficult for new users to grasp. Experience of Java web development is required to make full use of this book as is experience of XML. Further details of this book can be obtained from the Publisher's web site.

 
«StartPrev123NextEnd»

Page 1 of 3
Copyright © 2010 Develop In Java. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
 

Advertisement

ClustrMaps

Locations of visitors to this page