introducing exadel flamingo javaone, may 2008 igor polevoy: [email protected] [email protected]...

21
Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: [email protected] Starting at 7:00PM

Upload: sophie-carter

Post on 05-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Introducing Exadel Flamingo

JavaOne, May 2008Igor Polevoy: [email protected]

Starting at 7:00PM

Page 2: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

JavaCGI

Java Servlets

JSP

JSTL

Struts 1

WebWork

Tapestry

JSF

AJAX Fever:Scriptaculous

PrototypeDWR

Jqueryetc

A4JSF

RichFaces

SpringMVC

?

Struts 2

Wicket

MyFaces

Traditional Web Technologies Timeline(approximate)

Page 3: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Rich Web Technologies Timeline(approximate)

ActiveX

Java Applets

Adobe Air

Laszlo

JavaScript:

ScriptaculousPrototype

DWRJquery

etc

Flex

Google Web Toolkit

?

Silverlight

Page 4: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Case for Flamingo

• Demand for RIA• Crowded market in the area of traditional applications• Very interesting developments in RIA technologies

– Flex– GWT– JavaFX– Silverlight– ?

• None of the frameworks are comprehensive• Every project is unique: developers are left to put projects

together by hand each and every time, no consistency between projects

• Most solutions are just glue between server and client code and do not offer anything else

Page 5: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

What is Flamingo?

• Integration Library

• Set of client side components

• Supporting tools

Page 6: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Advantage

• Integration Library – very fast, uses binary protocols for communication

• Client Side Components– Drastically reduce amount of code (dynamic methods, binding, validation)– Allow for special cases where bundling is necessary (call set)

• Tools– extremely easy to setup– if new project created, it is configured automatically– allow for rapid application development; project creation, adding project artifacts

automated

• Bottom Line for Flamingo:– Fast time to market– Developers focus on business problem, not wiring– A lot less code to write– Projects look a lot like each other (same project structure)

Page 7: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Integration Library

• Only binary communication protocols are supported currently:– AMF – Hessian

• Binds directly to Seam components or Spring beans

• Almost no configuration is necessary

• If new project generated, so is configuration

• Main motto: it just works, do not focus on it!

Page 8: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Client Side Component

• Binding: allows to bind client UI components (text boxes, etc.) to server side components (Seam components, Spring beans)

• Validation: transparent use of use of Hibernate Validation framework. This allows a developer to use Hibernate validation rules (annotations) directly on user interface.

• CallSet: allows to bundle multiple client operations into one server call. This is great for transactions, efficiency, use of event-scoped components.

• Dynamic Persistent Methods: provide ability to dynamically specify simple queries on the client side as remote methods without having them implemented anywhere. Flamingo runtime builds queries on demand.

Page 9: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Tools

• Code generation:– Projects– Services– Entities– Screens (CRUD)

• Tools future directions: – IDE integration for artifact generation, re-factoring– Dynamic scaffolding?

Page 10: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Binding

1. Client side value object:var user:PersonVO;user = new PersonVO();user.firstName = "John";user.lastName = "Doe";user.city = "New York";

2. Binding Definition: <flamingo:SeamBinding

id="personBinding"destination="userBean" source="{user}" fault="faultHandler(event)" />

name of this binding

server component

name of local object

3. On event:personBinding.commit() //will commit changes to server componentpersonBinding.update() //will update local component from server

4. Supports complex object graphs

Page 11: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Validatorbased on Hibernate Validator

import org.hibernate.validator.Length;..@Length(min=3, max=40, message=“Last name too short or too long”)

public String getLastName() { return lastName;}

<flamingo:EntityValidator id="validator"destination="{destination.text}"

validationTarget="{target.text}"source="{test}" property="text" required="false"/>

name of server component

name of server component property

UI component

UI component property

Page 12: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo CallSet

1. Define a call set<flamingo:SeamCallSet id="loginTest"

destination="callSet"result="loginTestResultHandler(event)"fault="testFaultHandler(event)">

<flamingo:SeamCall component="identity" method="setUsername"/> <flamingo:SeamCall component="identity" method="setPassword"/> <flamingo:SeamCall component="identity" method="login"/> <flamingo:SeamCall component="identity" method="isLoggedIn"/></flamingo:SeamCallSet>

2. Execute a call set

loginTest.send([username.text],[password.text],[],[]);

Page 13: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Seam Conversation Support

• Full support of Seam conversations

• Easy to use in code

Page 14: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Seam Conversation

Client:<flamingo:SeamRemoteObject id="starter" destination="conversationStarter"/><flamingo:SeamRemoteObject id="checker" destination="checker"/><flamingo:SeamRemoteObject id="stopper" destination="conversationStopper"/>

@Name("conversationStarter") Component 1public class ConversationStarter { @Out private ConversationObject conversationObject; @Begin public void start() { conversationObject = new ConversationObject(); }}

@Name("checker") Component 2public class ConversationChecker { @In(required=false) private ConversationObject conversationObject;

public boolean isActive() { return conversationObject != null; }}

Component 3@Name("conversationStopper")public class ConversationStopper { @End() public void stop() {}}

Component 4@Name("conversationObject")@Scope(ScopeType.CONVERSATION)public class ConversationObject {

}

Page 15: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Dynamic Persistent Methods

• Cover high percentage of simple queries• No need to implement DAOs, write SQL, HQL, etc.

• Define remote object:<mx:RemoteObject id="person" destination="Person“ result="resultHandler(event)" …

• Call Dynamic methods:

<mx:Button label="findByNameIsNotNull" click="person.findByNameIsNotNull();"/>

<mx:Button label="findByNameLike" click="person.findByNameLike(parameter.text);"/>

<mx:Button label="findByIdGreaterThan" click="person.findByIdGreaterThan(int(parameter.text));"/>

• Nothing to implement on client or server

Page 16: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Example of New Project Creation

Example of new project creation:Please choose the type of application to generate [flamingo-seam, flamingo-spring]flamingo-seamPlease enter the location in which your new application will be created (i.e. c:/java/development):c:/tmpEnter the project name (e.g. myproject):flamingo-bookPlease enter the root package name for your project (e.g. com.mydomain.myproject):org.javaone.flamingo.bookIs this project deployed as an EAR (with EJB components) or a WAR (with no EJB support)? [ear, war]:earWill this project have Flex and JavaFx user interface? [flex, javafx]:flexWill this project use Hessian or AMF protocol? [amf, hessian]:amfWill this project use Seam Remoting or Flamingo servlets? [servlets, remoting, both]:servletsWhat kind of database are you using? [hsql, mysql, oracle, postgres, mssql, db2, sybase, none]:mysqlEnter the JDBC URL for your database (e.g. jdbc:hsqldb:.):jdbc:mysql:/localhost/testEnter database username:rootEnter database password:******Do you want to update the database schema each time you deploy? [y, n]:yEnter the entity class name (Flex source files to view and modify entities will be generated as well):Book

Page 17: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Generated Project Structure

What you get:

./ear/pom.xml

./ear/src/main/application/META-INF/components.xml

./ear/src/main/application/META-INF/jboss-app.xml

./ejb/pom.xml

./ejb/src/main/java/org/javaone/flamingo/book/domain/Book.java

./ejb/src/main/java/org/javaone/flamingo/book/service/AuthenticatorAction.java

./ejb/src/main/java/org/javaone/flamingo/book/service/BookAction.java

./ejb/src/main/java/org/javaone/flamingo/book/service/BookList.java

./ejb/src/main/java/org/javaone/flamingo/book/service/IBookAction.java

./ejb/src/main/resources/flamingo-book-ds.xml

./ejb/src/main/resources/META-INF/components.xml

./ejb/src/main/resources/META-INF/ejb-jar.xml

./ejb/src/main/resources/META-INF/persistence.xml

./ejb/src/test/java/EntityTest.java

./flex/pom.xml

./flex/src/main/flex/main.mxml

./flex/src/main/flex/org/javaone/flamingo/book/flex/view/BookManager.mxml

./flex/src/main/flex/org/javaone/flamingo/book/flex/vo/Book.as

./flex/src/main/resources/services-config.xml

./pom.xml

./readme.txt

./web/pom.xml

./web/src/main/webapp/index.html

./web/src/main/webapp/WEB-INF/web.xml

Note: Standard Maven commands apply at this point

Page 18: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Developers Feedback

• Flamingo is very young, but we have some positive feedback from the community:

– “I was just reading the Dynamic finders docs, and really: this is a

feature that will save us from a lot of code!”– “IT IS A VERY GOOD JOB, CONGRATULATIONS FOR THE

CREATORS AND CONTRIBUTORS.”– “(I)…generated app structure and it has functioned perfectly! ”

note: caps, spelling and grammar left intact

Page 19: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

People Behind Flamingo

• Alex Burak

• Artem Pleskatsevich

• Kirill Lebed

• Igor Polevoy

• Andrei Basharkevich

• Evgeny Zheleznyakov

• The rest of Exadel

Page 20: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Flamingo Roadmap / Vision

• Next Steps– Server push, failover messaging– Relationships– IDE Integration– Migrations?– ASN1– ?

• Vision– Provide much needed Agility for RIA– Soup to nuts environment for building RIA– Comprehensive platform, not just integration layer, everything

needed to develop business applications

Page 21: Introducing Exadel Flamingo JavaOne, May 2008 Igor Polevoy: ipolevoy@exadel.com ipolevoy@exadel.com Starting at 7:00PM

Questions?

?