if dependency relationships were drawn between every class and the types of it's attributes, the class diagram becomes cluttered very quickly
this dependency is obvious if the type is indicated for each attribute
if a subclass sets an attribute to null, implements a method returning null or throwing a NotImplementedException, it really isn't a subclass, or the superclass needs to be decomposed
7.
Aggregation and Composition Guidelines
object is made up of other objects
aggregation
“is part of” relationships
whole-part relationship between two
objects
Composition
stronger
form of aggregation where the whole and parts have
coincident lifetimes, and it
is very common for the whole to manage the lifecycle of its parts
Apply the Sentence Rule for Aggregation
Depict the Whole to the Left of the Part
Don’t Worry About Getting the Diamonds Right
associations, aggregation, composition, dependencies,
inheritance, and realizations
line on a UML
class diagram
defines a cohesive set of behaviors
Indicate Visibility Only On Design Models
Design Class Diagrams Should Reflect Language Naming Conventions
even if you deploy your application in a Servlet or EJB container, there are still compelling reasons to use Shiro's Session support instead of the container's
GraniteDS introduces an ActionsScript3 implementation of the Bean Validation specification and provides code generation
tools integration so that your Java constraint annotations are reproduced in your AS3 beans
the glory of Spring's founding myth of killing the beast that was J2EE seems to be fading. The former beast is now as manageable and easy to use as Spring ever was, or even more so
Deconstructing Spring myths
looking at the capabilities of the Spring Framework itself, where are the killer features?
list of reasons why I feel more productive on Java EE 6 than on Spring 3.1
these days there's really no reason for preferring vendor-specific APIs over JPA 2.0
Spring and Java EE applications mostly differ in the following areas only:
the web framework (Spring MVC vs. JSF vs. Wicket vs. Vaadin vs. Struts vs.....)
Spring Beans vs. EJB
Spring Dependency Injection vs. CDI or Java EE 5 @EJB or @Resource injection
MDG Technologies allow users to extend Enterprise Architect's modeling capabilities to specific domains and notations. MDG Technologies seamlessly plug into Enterprise Architect to provide additional toolboxes, UML profiles, patterns, templates and other modeling resources.
Free MDG Technology downloads for Enterprise Architect:
EJB
MDG Technology for Enterprise Java Beans allows the user to model EJB entities and EJB sessions, complete with UML profiles for modeling EJB, EJB patterns and Code Management.
(requires Enterprise Architect 4.1 or later)
ICONIX AGILE DDT
ICONIX Agile Developer - Design-Driven Testing (DDT) streamlines the ICONIX modeling process, providing:
Convenient modeling of robustness diagrams
Automatic generation of sequence diagram structures from robustness diagrams
Transformation of robustness control elements to test diagrams
Transformation of sequence diagram elements to test diagrams
Transformation of requirement diagrams to test diagrams
Transformation between test cases and test classes. (JUnit & NUnit)
Built-in model validation rules for ICONIX robustness diagrams
(requires Enterprise Architect 7.5 or later)
Testing
MDG Technology for Testing helps users to rapidly model a wide range of testing procedures including component testing, SUT, Test Cases and more.
(requires Enterprise Architect 4.1 or later)
Instructions for loading an MDG Technology
EXE file:
Download and run the .exe file to install the MDG technology.
Open Enterprise Architect.
Select from the Main Menu Add-Ins | XYZ Technology | Load.
Built-in MDG Technologies:
Most of the MDG Technologies provided by Sparx Systems are built into Enterprise Architect directly. Depending on your edition of Enterprise Architect, some or all of the following MDG Technologies will be available:
Entity–attribute–value model (EAV) is a data model to describe entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest
also known as object–attribute–value model, vertical database model and open schema
In an EAV data model, each attribute-value pair is a fact describing an entity, and a row in an EAV table stores a single fact
EAV tables are often described as "long and skinny": "long" refers to the number of rows, "skinny" to the few columns
Data is recorded as three columns:
The entity: the item being described.
The attribute or parameter: a foreign key into a table of attribute definitions. At the very least, the attribute definitions table would contain the following columns: an attribute ID, attribute name, description, data type, and columns assisting input validation
The value of the attribute
Row modeling, where facts about something (in this case, a sales transaction) are recorded as multiple rows rather than multiple columns
differences between row modeling and EAV (which may be considered a generalization of row-modeling) are:
A row-modeled table is homogeneous in the facts that it describes
The data type of the value column/s in a row-modeled table is pre-determined by the nature of the facts it records. By contrast, in an EAV table, the conceptual data type of a value in a particular row depend on the attribute in that row
In the EAV table itself, this is just an attribute ID, a foreign key into an Attribute Definitions table
The Attribute
The Value
Coercing all values into strings
larger systems use separate EAV tables for each data type (including binary large objects, "BLOBS"), with the metadata for a given attribute identifying the EAV table in which its data will be stored
Where an EAV system is implemented through RDF, the RDF Schema language may conveniently be used to express such metadata
access to metadata must be restricted, and an audit trail of accesses and changes put into place to deal with situations where multiple individuals have metadata access
quality of the annotation and documentation within the metadata (i.e., the narrative/explanatory text in the descriptive columns of the metadata sub-schema) must be much higher, in order to facilitate understanding by various members of the development team.
Attribute metadata
Validation metadata include data type, range of permissible values or membership in a set of values, regular expression match, default value, and whether the value is permitted to be null
Presentation metadata: how the attribute is to be displayed to the user
Grouping metadata: Attributes are typically presented as part of a higher-order group, e.g., a specialty-specific form. Grouping metadata includes information such as the order in which attributes are presented
discuss the rationale for migrating your applications from Spring to Java EE 6 and show you real examples of upgrading the web UI, replacing the data access layer, migrating AOP to CDI interceptors, migrating JMX, how to deal with JDBC templates, and as an added bonus will demonstrate how to perform integration tests of you Java EE 6 application using Arquillian
EntityManagerClinicTest
There is also an interesting Arquillian Persistence extension that integrates DBUnit in Arquillian where you can define your test data externally
JDBC Templates hardly give any abstraction on top of the database and you’re on your own for Object Relational Mapping. We strongly advise to use JPA wherever possible; it gives portability by abstracting most of the database specific SQL that you would need, and it does all the hard and painful work of object mapping
if your application uses Hibernate 3 classes that are not available in Hibernate 4, for example, some of the validator or search classes, you may see ClassNotFoundExceptions when you deploy your application. If you encounter this problem, you can try one of two approaches:
You may be able to resolve the issue by copying the specific Hibernate 3 JARs containing those classes into the application "/lib" directory or by adding them to the classpath using some other method. In some cases this may result in ClassCastExceptions or other class loading issues due to the mixed use of the Hibernate versions, so you will need to use the second approach.
You need to tell the server to use only the Hibernate 3 libraries and you will need to add exclusions for the Hibernate 4 libraries. Details on how to do this are described here: JPA Reference Guide.
In previous versions of the application server, the JCA data source configuration was defined in a file with a suffix of *-ds.xml. This file was then deployed in the server's deploy directory. The JDBC driver was copied to the server lib/ directory or packaged in the application's WEB-INF/lib/ directory.
In AS7, this has all changed. You will no longer package the JDBC driver with the application or in the server/lib directory. The *-ds.xml file is now obsolete and the datasource configuration information is now defined in the standalone/configuration/standalone.xml or in the domain/configuration/domain.xml file.
A JDBC 4-compliant driver can be installed as a deployment or as a core module. A driver that is JDBC 4-compliant contains a META-INF/services/java.sql.Driver file that specifies the driver class name. A driver that is not JDBC 4-compliant requires additional steps, as noted below.
DataSource Configuration
domain mode, the configuration file is the domain/configuration/domain.xml
standalone mode, you will configure the datasource in the standalone/configuration/standalone.xml
example of the driver element for driver that is not JDBC 4-compliant. The driver-class must be specified since it there is no META-INF/services/java.sql.Driver file that specifies the driver class name.
An AuthorizingRealm extends the AuthenticatingRealm's capabilities by adding Authorization
(access control) support
perform all role and permission checks automatically (and subclasses do not have to
write this logic) as long as the
getAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection) method returns an
AuthorizationInfo
If caching is enabled and if any authorization data for an account is changed at
runtime, such as adding or removing roles and/or permissions, the subclass implementation should clear the
cached AuthorizationInfo for that account via the
do not at all describe "who" is able to perform the action(s)
Multiple Parts
Wildcard Permissions support the concept of multiple levels or parts. For example, you could restructure the previous simple example by granting a user the permission
printer:query
Multiple Values
Each part can contain multiple values. So instead of granting the user both the "printer:print" and "printer:query" permissions, you could simply grant them one:
printer:print,query
All Values
What if you wanted to grant a user all values in a particular part? It would be more convenient to do this than to have to manually list every value. Again, based on the wildcard character, we can do this. If the printer domain had 3 possible actions (query, print, and manage), this:
printer:query,print,manage
simply becomes this:
printer:*
Using the wildcard in this way scales better than explicitly listing actions since, if you added a new action to the application later, you don't need to update the permissions that use the wildcard character in that part.
Finally, it is also possible to use the wildcard token in any part of a wildcard permission string. For example, if you wanted to grant a user the "view" action across all domains (not just printers), you could grant this:
*:view
Then any permission check for "foo:view" would return true