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
highly recommended to use JPA optimistic locking in a multi-tier environment (@Version annotation)
Tip
The easiest and recommended way for getting Tide enabled managed entities is to generate them from Java classes with Gas3 or the GDS Eclipse builder using
the tide="true" option.
In a typical Flex/app server/database application, an entity lives in three layers:
the Flex client
the Hibernate/JPA persistence context
the database
only invariant is the id.
id reliably links the different existing versions of the entity in the three layers
Baseline Diagram Comparison
Conduct a visual diagram comparison between your current diagram and a previous baseline .
Personal Information Window
See how the Personal Information Window in Enterprise Architect can help you organize your daily tasks and workflow.
Working Sets
As you perform work on your model, you open various windows, diagrams and views. Working Sets allow you to return to these same views in a later work session.
Business Rules
A car rental system is used to illustrate how to generate executable business rules using Enterprise Architect.
Menu Customization
Quickly and easily suppress individual menu items or entire categories of commands to create custom menu layouts.
Floating and Dockable Windows
Save the position and layout of Floating and Dockable Windows using a Working Set in the Personal Information Window.
Build and Debug a Java Application
Set up Enterprise Architect to build and debug a Java Application, using a VEA sample project.
Sequence Diagrams
Learn how to create a simple Sequence diagram. The video also illustrates how to bring your Sequence diagram to life using model simulation.
HTML Report Generation
This brief introduction illustrates how to automatically generate a HTML Report using Enterprise Architect.
Basic Use Case Demonstration
A guide to constructing a Use Case model in under 30 seconds, including use cases, notes and issues.
Traceability within Enterprise Architect
This video examines Traceability and discusses how to use Enterprise Architect to conduct an Impact Analysis.
Requirements Reporting
A brief overview of requirements reporting in Enterprise Architect. Topics include document generation in web and RTF formats, report customization and virtual documents, including Model and Master documents.
Requirements Traceability
An examination of requirements traceability in Enterprise Architect. Topics include traceability views, tracing to external artifacts, conducting an impact analysis, viewing the Relationship Matrix and using Enterprise Architect's Auditing capabilities.
Requirements Modeling
A brief overview of requirements modeling in Enterprise Architect. Topics include requirements capture and definition, custom properties, tabular editing, auto-naming and screen prototypes.
Installing EA
An introductory walk through and discussion of Enterprise Architect in the Software Development Lifecycle.
Enterprise Architect 7.5 Overview
An overview of Enterprise Architect features released with version 7.5.
Introduction to Enterprise Architect
An introductory walk through and discussion of Enterprise Architect in the Software Development Lifecycle.
Brief Overview
The 10 minute guide to Enterprise Architect, from Requirements Management and Business Process Modeling to MDA and Code Engineering.
jboss-as-maven-plugin to deploy the webapp. Unfortunately, this plugin does not allow me to start and stop the server and it seems redundant to require a local install if the Arquillian tests already download an AS instance (yes, I could run the test against the local instance as well, but think for example continuous integration where I want to manage/control the WHOLE ENVIRONMENT).
cargo plugin another go. A lot has happened there and it supports not only JBoss 7.x, but it also offers a so called artifact installer which allows to download the app server as a managed maven dependency.
cargo:install in the initialize phase to install the app server into the target directory. This way I can install a custom module (via the gmaven plugin) before the tests get executed and/or before I start the application
It's even possible to use the Tide framework if you don't use GraniteDS as the AMF remoting provider by initializing the application with the singleton Tide.
Client-side setup for remoting
initialize manually the Flex remoting channels that will be used by Tide
use the DefaultServiceInitializer component
of course don't forget to change the context root to your web app path
one of the most important value
propositions for frameworks like Spring has been the ability to easily extend the framework or
integrate third-party solutions
SPI allows you to register your own beans, custom scopes, stereotypes, interceptors and
decorators with CDI even if is it not included in the automatic scanning process (such as perhaps
registering Spring beans as CDI beans), programmatically looking up CDI beans and injecting them
into your own objects (such as injecting CDI beans into Spring beans) and adding/overriding
annotation-metadata from other sources (such as from a database or property file)
SPI can be
segmented into three parts. Interfaces like Bean, Interceptor and
Decorator model container meta-data (there are a few other meta-data interfaces such as
ObserverMethod, Producer, InjectionTarget, InjectionPoint,
AnnotatedType, AnnotatedMethod, etc). Each meta-data object encapsulates
everything that the CDI container needs to know about the meta-data type
JPA 2.0, still contains only a subset of the features supported by many database vendors
features not supported in JP QL.
performance required by an application is to replace the JP QL query with a hand-optimized SQL version. This may be a simple restructuring of the query that the persistence provider was generating, or it may be a vendor-specific version that leverages query hints and features specific to a particular database.
recommend avoiding SQL initially if possible and then introducing it only when necessary
benefits of SQL query support is that it uses the same Query interface used for JP QL queries. With some small exceptions that will be described later, all the Query interface operations discussed in previous chapters apply equally to both JP QL and SQL queries.
keep application code consistent because it needs to concern itself only with the EntityManager and Query interfaces.
An unfortunate result of adding the TypedQuery interface in JPA 2.0 is that the createNativeQuery() method was already defined in JPA 1.0 to accept a SQL string and a result class and return an untyped Query interface
consequence is that when the createNativeQuery() method is called with a result class argument one might mistakenly think it will produce a TypedQuery, like createQuery() and createNamedQuery() do when a result class is passed in.
@NamedNativeQuery
resultClass=Employee.class
The fact that the named query was defined using SQL instead of JP QL is not important to the caller
SQL Result Set Mapping
JPA provides SQL result set mappings to handle these scenarios
A SQL result set mapping is defined using the @SqlResultSetMapping annotation. It may be placed on an entity class and consists of a name (unique within the persistence unit) and one or more entity and column mappings.
expected result type and therefore received an instance of TypedQuery that is bound to the expected type. By qualifying the result type in this way, the getResultList() and getSingleResult() methods return the correct types without the need for casting.
Defining a Class for Use in a Constructor Expression
public EmpMenu(String employeeName, String departmentName)
List<EmpMenu>
NEW example.EmpMenu(" +
"e.name, e.department.name)
EmpMenu.class
createNamedQuery() can return a TypedQuery whereas the createNativeQuery() method returns an untyped Query
The configuration of a GraniteDS project will generally involve the following steps :
Add the GraniteDS jars to the WEB-INF/lib folder of the WAR file or the lib folder of the EAR file
Add the GraniteDS listener, servlets and filters in the standard WEB-INF/web.xml configuration file
Define the internal configuration of GraniteDS in the WEB-INF/granite/granite-config.xml file
Define the application configuration of GraniteDS (remoting destinations, messaging topics...) in the WEB-INF/flex/services-config.xml
You will always need granite.jar
jar for your JPA provider (granite-hibernate.jar for Hibernate)
JSR-303 (“Bean Validation”) ActionScript3 framework for form validation
validation framework is a specific adaptation of the JSR-303 (Bean Validation) specification to Flex: like its Java counterpart, it relies on validation annotations placed on bean properties and provides an engine API that lets you validate your forms without writing by hand a specific validator for each of your input fields
code generation tools provided by GraniteDS so that when you write your Java entity bean with validation annotations, they are automatically replicated in your ActionScript3 beans
problem with LCDS is mainly that it promotes a strict “client / server” architecture, with – roughly speaking – a heavy Flex client application connected to a server almost reduced to a database frontend
big majority of these organizations use BlazeDS, a free and open-source subset of LCDS
need more advanced mechanisms than just Remoting start looking for open-source libraries to enable deeper integrations with the Java business layer, and GraniteDS is for sure the most popular project
“Flex Data Services” (now renamed to “Live Cycle Data Services”)
"Bean Validation" specification (aka JSR-303) standardizes an annotation-based validation framework for Java
Flex doesn't provide by itself such framework. The standard way of processing validation is to use Validator subclasses and to bind each validator to each user input (see Validating data). This method is at least time consuming for the developer, source of inconsistancies between the client-side and the server-side validation processes, and source of redundancies in your MXML code.
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
GraniteDS validation framework provides a set of standard constraints
Constraint
Description
AssertFalse
The annotated element must be false
AssertTrue
The annotated element must be true
DecimalMax
The annotated element must be a number whose value must be lower or equal to the specified maximum
DecimalMin
The annotated element must be a number whose value must be greater or equal to the specified minimum
Digits
The annotated element must be a number whithin accepted range
Future
The annotated element must be a date in the future
Max
The annotated element must be a number whose value must be lower or equal to the specified maximum
Min
The annotated element must be a number whose value must be greater or equal to the specified minimum
NotNull
The annotated element must not be null
Null
The annotated element must be null
Past
The annotated element must be a date in the past
Pattern
The annotated String must match the supplied regular expression
Size
The annotated element size must be between the specified boundaries (included)
Constraint annotations must be placed on public properties, either public variables or public accessors