tooling support for enterprise development · tooling support for enterprise development . ... in...
TRANSCRIPT
![Page 1: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/1.jpg)
R YA N C U P R A K & R E Z A R A H M A N
TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT
![Page 2: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/2.jpg)
JAVA EE DEVELOPMENT
• Java EE has had a bad reputation: • Too complicated • Long build times • Complicated/expensive tooling • Copious amounts of repetitive code • Expensive application servers • Overkill for most projects
• Times have changed since 2000! • Java EE 5 made great strides leveraging new features
introduced in Java 5. Java EE 6 pushes us forward. • Excellent tooling support combined with a simplification of
features makes Java EE development fast, easy, and clean (maintainable).
• It is Java EE – NOT J2EE!!!
![Page 3: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/3.jpg)
OBJECTIVE
Challenge: Starting a new project is often painful. In this presentation you’ll learn: • How to setup a new Java EE project. • Disconnect between theory and practice. • Tools that you should consider learning/adding. • Best practices for Java EE development from tools
side.
When is the last time you evaluated your tools?
![Page 4: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/4.jpg)
APPLICATION TYPES
Types of Java EE applications: • Prototype – verify technology, try different techniques,
learn new features. • Throw-away – application which has a short-life space,
temporary use. • Internal/external portal – application with a long life
expectancy and which will grow over time. • Minimize dependence on tools.
• Product – an application which deployed at a more than one customer site. Possibly multiple code branches. • Minimize dependence on tools.
Life expectancy drives tooling decisions.
![Page 5: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/5.jpg)
PRELIMINARIES
Considerations for a Java EE toolbox: • Build system: Ant, Maven, IDE
specific? • Container: GlassFish/JBoss/
WebLogic/etc. • Technologies: EJB/JPA/CDI/JSF • IDE: Eclipse, NetBeans, IntelliJ IDEA • Other tools: Unit testing,
integration testing, UI testing, etc.
![Page 6: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/6.jpg)
IDES
• NetBeans • Easy to use Java EE templates. • Includes a pre-configured GlassFish container. • Support for bleeding edge Java EE features.
• IntelliJ • Excellent editor support – auto-completion and analysis. • Support for complex project structures. • Support for a myriad of web technologies.
• Eclipse • Wide industry adoption. • External Java EE tools from JBoss. • External plugins – large ecosystem.
If exploring Java EE, start with NetBeans.
![Page 7: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/7.jpg)
ADD-ON TOOLS
Beyond the IDE: • JBoss Tools – extends Eclipse’s Java EE capabilities. • JRebel – greatly speeds deployments so that you only swap in the code
that changes. http://zeroturnaround.com/ • Arquillian – integration testing – enables EJBs to be tested an in embedded
Java EE container (GlassFish/JBoss etc.). http://www.jboss.org/arquillian.html • Liquidbase – “version control” for database schemas – important for
applications that are going to grow over time. http://www.liquidbase.org
• JMeter – web application stress testing tool (http://jmeter.apache.org). • Hudson/Jenkins – continuous integration (http://hudson-ci.org). • Selenium – functional web UI testing (http://seleniumhq.org). • SOAP UI – testing SOAP/rest web services (http://www.soapui.org). • Monitoring Tools – NAGIOS/HP OpenView/IBM Tivoli/Oracle Enterprise
Management Tools • Profiling – NetBeans Profiler/Jprofiler/VisualVM/etc.
Impossible to cover everything.
![Page 8: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/8.jpg)
BUILD SYSTEMS
Ant • Pro: • Infinitely flexible – write
once. • Integrated support with
most IDEs.
• Cons • No defined project
standard • Maintenance headache • IDE integration.
Maven • Pro • Standard project layout • Dependency management • Supported by all IDEs
• Cons • Steep learning curve • Harder to customize • Build cycle-time (lacks
incremental compilation)
![Page 9: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/9.jpg)
BUILD SYSTEM
IDE • Pro • Fast build/deployment • GUI management
• Cons • Not portable • Continuous integration
support
Hybrid (bad idea): • Pro • Fast build times • Tool independence
• Cons • Twice the work
![Page 10: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/10.jpg)
JAVA EE PACKAGING
Traditional EE: EJB-JAR (.jar)EAR (.ear)
META-INF
XML
ejb-jar.xml
XML
persistence.xml
XML
beans.xml
EJB 1
EJB 1
WAR (.war) WEB-INFXML
web.xml
index.xhtml
XML
application.xml
libdependency 1.jar
dependency 2.jar
![Page 11: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/11.jpg)
SIMPLIFIED JAVA EE PACKAGING
Simplified EJB packaging (WAR):
Introduced in EJB 3.1
WEB-INFWAR (.war)
classes
XML
XML
beans.xml
EJB 2
EJB 1
XML
web.xmlindex.xhtml
XML
faces-config.xml
persistence.xml
login.xhtml
![Page 12: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/12.jpg)
CONFIGURATION FILES
beans.xml web.xml
ejb-jar.xml
faces-config.xml persistence.xml
application.xml
![Page 13: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/13.jpg)
PACKAGING & CONFIGURATION
Tooling challenge – how do you: • Create a new project scratch? • Import an existing project? • Create valid Java EE configuration files? • Edit Java EE configuration files? • Navigate Java EE features effectively? • Manage the evolution of a project and Java EE
technology changes?
![Page 14: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/14.jpg)
IDES
• Leading Java IDEs: • NetBeans 7.2 • IntelliJ IDEA 11 • Eclipse Juno
• Is one IDE better than the others? • NO! Each has a unique set of features.
• What are the major differences: • Available project templates • Supported containers • Setup/external libraries • Ease of use
• Unique features: • NetBeans: Profiling, Hudson integration, CDI, HTML5, JavaFX, etc. • IDEA: Code inspection/completion, SOAP UI, Android, Flash/Flex, SQL/
JavaScript editor, etc. • Eclipse: BIRT, Perspectives, GWT, AspectJ, JBoss Tools, gigantic unique of
add-ons.
![Page 15: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/15.jpg)
IDES
Key features to consider: • Project creation/management
(wizards) • Container integration (launching/
deploying/debugging) • Generating/checking configuration
files • Generating entities/CRUDs • Embedded libraries • JQL query code completion/
verification • EL code completion (CDI support) • CDI/JSF/JPA validation/error detection
![Page 16: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/16.jpg)
IDEA
• JetBrains IDEA – two editions: • Community – core Java development (free) • Ultimate – support for enterprise technologies (purchase
$199 personal license/$99 academic) • Support for running in application servers. • CDI/JPA coding support etc.
• Ultimate edition needed for Java EE development.
![Page 17: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/17.jpg)
IDEA
IDEA build system support: • Build system options with IDEA: • Maven – supported project type • IDEA specific
• IDEA uses its own build system by default. • Drawbacks: • Other developers must use IDEA to compile/package • Cannot integrate into continuous integration services such Hudson,
CruiseControl, etc. • Benefits: • Optimized for fast builds and incremental compiling • Tight integration with IDEA – complete management in UI.
• Options: • Create an Ant build file: Build | Generate Ant Build… • Create project using Maven • Create a Maven project using mvn idea:idea
![Page 18: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/18.jpg)
IDEA
• Before creating a project: • Configure the application server you are going to be using. • Create data sources in IDEA for a database.
• Supported containers: • Apache Tomcat (4.0-7.0) • WebLogic (7.0-12.1.1) • WebSphere (5.1-8.0) • JBoss (4.2-7.0.2) • GlassFish (2-3) • Resin (3-4) • Jetty (6-8.1) • JSR45 Compatible server
• Container can be either local or remote
![Page 19: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/19.jpg)
IDEA
• Important concepts: • Project – organizational unit that represents a complete
solution. It is composed of modules. • Module – discrete unit of functionality with can be compiled/
run/tested independently. (WAR/EJB JAR) • Facets – represents a framework/technology/language used in
a module. (CDI/JSF/JPA) • Two project formats: • Directory based: .idea • Configuration settings are stored in separate XML files (compiler.xml,
encoding.xml, etc.) • workspace.xml should not be stored in VCS.
• File based: • .ipr – project settings to be stored in VCS. • .iws – machine specific settings – do not put in VCS.
![Page 20: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/20.jpg)
IDEA
• Java EE Projects: • No pre-defined Java EE templates. • Three starting points: • New project from scratch • Create from external model (Maven/Eclipse/Gradle) • Existing sources (ignores build file)
• Add facets/frameworks for Java EE features. • Configure artifacts to define Java EE packaging. • Create a Project and a Module.
![Page 21: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/21.jpg)
IDEA
New Project Wizard
Pick Java Module
Configure technologies
Configure Facets
• Java • Web • Plugin • J2ME • Flash • Maven • Grails • Griffon • Android
• Web Application • Struts • JSF • Struts 2
• Application Server • EJB • Java EE Application • Java EE Persistence • Hibernate • SQL Support
Java EE Pertinent
Configure Artifacts
• JPA • CDI • EJB • GWT • JRebel • JSF • Seam • Struts • etc.
• WAR • EAR • JAR • Exploded
![Page 22: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/22.jpg)
IDEA
DEMO
![Page 23: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/23.jpg)
IDEA
Wizard Summary • Wizard creates a single module project. • Project uses the technologies that you selected. • Downloads Java EE dependencies. Important • Additional modules can be created after the
project is created. • Don’t select all of the technologies if creating an EAR!!
• Wizard does not create a “EAR” project with multiple modules.
![Page 24: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/24.jpg)
IDEA
What have we accomplished? • Created a new IDEA project from scratch. • Single enterprise web module • Downloaded and configured CDI. • Added facets for CDI, JPA, and EJB. • Deployed the application to GlassFish. Challenges: • Container installation performed separately. • Libraries had to be downloaded separately. • Config files must be created separately. • Required project setup post configuration.
![Page 25: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/25.jpg)
NETBEANS
• Excellent support for Java EE. • Java EE support is not a separate download (features
can be activated). • 3 Java web templates: • Web Application – supports CDI/EJB (simplified project) • Web Application with Existing Sources • Web Free Form Application
• 6 Java EE templates: • Enterprise Application • Enterprise Application with Existing Sources • EJB Module • EJB Module with Existing Sources • Enterprise Application Client • Enterprise Application Client with Existing Sources
![Page 26: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/26.jpg)
NETBEANS
• Full support for Java EE 6 • Integrated IDE support for CDI • Service integration/monitoring: • Database editor • Container integration: • Tomcat • GlassFish • JBoss • WebLogic
• JPA support • Web Services (consume/produce) • JSF support • Integration with Hudson
![Page 27: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/27.jpg)
NETBEANS
NetBeans Java EE File Templates
![Page 28: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/28.jpg)
NETBEANS
Service integration:
Deployed application
Deployed web services
Hudson servers
JDBC Resources
GlassFish Server
![Page 29: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/29.jpg)
NETBEANS
• NetBeans doesn’t have the concept of ‘modules’. • “Modules” concept from IntelliJ/Maven are represented as
separate NetBeans projects.
• Projects can depend upon other projects. • Dependencies are not exported! • Project must produce an artifact.
• Projects types: • Standard projects – use NetBeans generated Ant build file. • Maven projects – use Maven natively. • Free-form projects – delegate to custom Ant file.
• Ant/Maven native projects – no custom build system.
![Page 30: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/30.jpg)
NETBEANS
Choosing a project template:
Existing project?
Existing build?
Ant or Maven?
Java Free Form Project
Java project with existing
sources
Java project template
Maven project
template
Yes No
Yes No ANT Maven
![Page 31: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/31.jpg)
IDEA
DEMO
![Page 32: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/32.jpg)
NETBEANS
Output:
ctjava.ear
Ctjava-ejb.jar
Ctjava-war.jar
![Page 33: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/33.jpg)
NETBEANS
Customizing Ant build:
![Page 34: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/34.jpg)
NETBEANS
NetBeans specific files: • .nbproject contains project related settings. • .nbproject/private contains local settings that
should not be checked in VCS. • build.xml contains is the modifiable Ant build file. • build-impl.xml should never be edited, changes/
overrides belong in build.xml.
![Page 35: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/35.jpg)
NETBEANS
Differences between IntelliJ and NetBeans: • Many pre-defined project templates to simplify
initial project creation. • No need to download a CDI implementation. • Still must create a beans.xml configuration file to use CDI.
• GlassFish comes pre-packaged with NetBeans and pre-configured. • Smaller subset of supported containers. • NetBeans has numerous templates to simplify basic
tasks. • Integrated support for Ant.
![Page 36: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/36.jpg)
ECLIPSE
• Eclipse IDE for Java EE provides numerous Java EE templates and plug-ins. • Java EE Projects: • Application Client Project • Connector Project • Enterprise Application Project • Utility Project • EJB Project • JPA Project
![Page 37: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/37.jpg)
ECLIPSE
• JBoss Tools – invaluable collection of tools. • Available through MarketPlace or directly:
http://www.jboss.org/tools • Greatly expands Eclipse’s baseline Java EE support: • Maven/git • CDI • Templates and wizards for EJB, Web Services (SOAP/REST),
JSF configuration, SEAM, etc.
• Tools are a necessity for Java EE developers using Eclipse.
![Page 38: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/38.jpg)
ECLIPSE
DEMO
![Page 39: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/39.jpg)
MAVEN
• Maven is much more than a build tool. • Provides a standard layout to projects. • Dependency management.
• Supported as a project type by all IDEs: • Seamless support (no need for a plugin): • NetBeans • IntelliJ IDEA
• Plugin required (provided by JBoss tools): • Eclipse
• Maven is IDE independent – can move between IDEs easily.
![Page 40: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/40.jpg)
MAVEN
• Pre-configured archetypes in NetBeans & Eclipse.
![Page 41: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/41.jpg)
MAVEN
Create Java EAR project: mvn archetype:generate
-DgroupId=org.ctjava
-DartifactId=portal
-DarchetypeArtifactId=jboss-javaee6-ear-webapp
-DarchetypeGroupId=org.jboss.spec.archetypes
portal
portal-ear portal-ejb portal-web
![Page 42: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/42.jpg)
MAVEN
IDE support: • IDEA: • Built-in support for Maven • Open existing Maven project – no support for creating a
new Maven Java EE project.
• NetBeans: • Built-in support for Maven. • Open existing Maven projects. • Create new Java EE Maven projects using wizards.
• Eclipse: • No Maven support-out of the box. • Download JBoss tools for Maven support
![Page 43: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/43.jpg)
ARQUILLIAN
Basics • JBoss Arquillian automates in-container testing. • EJB and CDI code can be tested – code that uses
JPA, invokes EJBs, etc. • Integration tests are run inside of a container such
as GlassFish, JBoss. • Integrates with Selenium available. • Can perform regression performance tests. • Less painful when using Maven.
![Page 44: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/44.jpg)
ARQUILLIAN
Maven configuration:
![Page 45: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/45.jpg)
ARQUILLIAN
• Supporting artifacts: • arquillian.xml – specifies domain.xml for GlassFish. • domain.xml – custom GlassFish configuration file. • web.xml – custom web app configuration file.
![Page 46: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/46.jpg)
ARQUILLIAN
![Page 47: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/47.jpg)
LIQUIBASE
Database Schema Versioning • JPA handles object relational mapping but how are the
database schema being managed? • Could you replicate the current database schema in
production? • Could you recreate a database schema required for a specific
code tag? • How do you “upgrade” a database schema to a new version?
Liquibase • Tool for tracking and managing database changes. • Open source project. • http://www.liquibase.org • Command line tool • Changes tracked in a change log, store in EAR/WAR.
![Page 48: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/48.jpg)
LIQUIBASE
changelog.xml tracks database operations.
![Page 49: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/49.jpg)
LIQUIBASE
Changes are tracked in the database.
![Page 50: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/50.jpg)
SUMMARY
• Explorations and Java EE prototypes: • Use NetBeans to explore Java EE and create new projects.
• Large projects: • Use Maven as the build system. • Dependency management. • Standard project layout. • Profiles to build sub-systems. • IDE independence – mix and match IDEs for different features.
• Modularize the system into manageable chunks. • Use Arquillian for integration testing – unit testing isn’t enough
for large applications. • Use JRebel to reduce deployment times. • Use Liquibase to manage database changes.
• Invest in tooling! • Don’t forget there is NetBeans Certification!
Re-evaluate your tools regularly!
![Page 51: TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT · TOOLING SUPPORT FOR ENTERPRISE DEVELOPMENT . ... In this presentation you’ll learn: ... SOAP UI, Android, Flash/Flex, SQL/ JavaScript](https://reader031.vdocuments.site/reader031/viewer/2022020204/5b1699517f8b9a4f6d8cd6fb/html5/thumbnails/51.jpg)
Q&A