Open Admin - GWT
Upcoming SlideShare
Loading in...5
×
 

Open Admin - GWT

on

  • 1,213 views

 

Statistics

Views

Total Views
1,213
Views on SlideShare
1,208
Embed Views
5

Actions

Likes
0
Downloads
16
Comments
0

1 Embed 5

http://www.techgig.com 5

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Open Admin - GWT Open Admin - GWT Presentation Transcript

    • THE POWER OF PERSPECTIVE Open Admin - GWT Java Track Brian Polster Credera Copyright © 2011 Credera. All Rights Reserved.
    • www.credera.com About the Speaker Brian Polster  Lead the Java Practice at Credera for past 5½ years  Former Architect at American Airlines (www.aa.com)  Founder of Broadleaf Commerce (eCommerce framework based on open source technologies)Copyright © 2011 Credera. -2- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Agenda  What is Open Admin  GWT – Overview – Example  Smart-GWT Primer  Build a simple Open Admin ModuleCopyright © 2011 Credera. -3- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com What is Open Admin?  Component / Outcome of Broadleaf Commerce – Built in Security – Pluggable Module Metaphor – Sandbox capability – Release 1 Target – September  Based on common open source components – GWT – Smart GWT – Spring Security – JPA / HibernateCopyright © 2011 Credera. -4- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • Demo – (Broadleaf Commerce Admin) www.credera.comCopyright © 2011 Credera. -5- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Demo Broadleaf Commerce AdminCopyright © 2011 Credera. -6- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com GWT (Google Web Toolkit) Key Benefits (according to me ….)  Emits JavaScript from Java  Allows debugging of JavaScript using breakpoints in Java code  RPC and GWT-RPC  Shipped with component library that is extensible through JSNICopyright © 2011 Credera. -7- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com GWT – Sample Application Google has good tutorials on GWT. http://code.google.com/webtoolkit/gettingstarted.html The sample provides a good background on the following:  Google Compiler Configuration file (e.g. *.gwt.xml)  HTML start page  Entry Point Class(es)  GWT Debugger  GWT-RPCCopyright © 2011 Credera. -8- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Demo GWTCopyright © 2011 Credera. -9- All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Smart GWT  GWT wrapper over the Smart Client JavaScript library  Provides hooks for data source interaction  LPGL license for most widgets – company sells support and advanced features http://www.smartclient.com/product/smartgwt.jspCopyright © 2011 Credera. - 10 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Demo Smart GWT ShowcaseCopyright © 2011 Credera. - 11 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Open Admin Terminology Module Section ViewsCopyright © 2011 Credera. - 12 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Open Admin Terminology Module Section(s) View(s) Presenter Datasource Event Handlers List Grid Events Button Model Form Order CustomerCopyright © 2011 Credera. - 13 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Simple Example - Step 1 of 3: Building The View public class SimpleView extends HLayout implements Instantiable, Display { public SimpleView() { setHeight100(); setWidth100(); } public void build(DataSource entityDataSource) { new IButton("Click Me"); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { SC.say("Hello, World from smartGWT"); } }); addMember(button); }Copyright © 2011 Credera. - 14 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Simple Example - Step 2 of 3: Creating the Open Admin Module public class SimpleModule extends AbstractModule { public void onModuleLoad() { setModuleTitle("Tech Fest Module"); List<String> roles= new ArrayList<String>(); roles.add("ROLE_TECH_FEST_USER”); roles.add("ROLE_ADMIN"); setSection("Simple Example”, "viewKey”, SimpleView.class.getName(), roles); registerModule(); } }Copyright © 2011 Credera. - 15 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Simple Example - Step 3: Configuring the GWT Complier <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc. <...> <module> <inherits name="com.google.gwt.user.User" /> <inherits name="org.broadleafcommerce.openadmin.openadmin" /> <entry-point class="techfest.client.simple.SimpleModule" /> <source path="client" /> </module> Also need to add reference to the project *.gwt.xml file.Copyright © 2011 Credera. - 16 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Demo SecurityCopyright © 2011 Credera. - 17 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Dynamic Form Generation  The list grids and entry forms are generated automatically from the JPA and OpenAdmin configuration. @Column(name = "MODEL”) // JPA @AdminPresentation // Open Admin (friendlyName="Product Model", order=4, group="Product Description", prominent=true)  Open Admin field configuration can be done via an XML file or inline in the java class.  Other attributes include: readOnly, securityLevel, and validationCopyright © 2011 Credera. - 18 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Demo Review Source for Order and PrivilegeCopyright © 2011 Credera. - 19 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Recap the Steps for Adding a JPA Data Driven Section  Create the view by extend BasicListDetailView – Setting the title fields – Set the view handle (prefix)  Create the presenter by extending DynamicEntityPresenter – Specify the grid fields (optional) – Tie-in the associated DataSourceFactory  Create the DataSourceFactory by extending SimpleDataSourceFactory – Set the class name for your JPA configured class  Add a new section to your module that references the view and presenter.Copyright © 2011 Credera. - 20 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Summary Benefits of Open Admin – Helper classes to bridge SmartGWT DataSources and JPA – Simple “Out of Box” view and presenter classes that make building a rich UI easy – Configurable security based on Spring Security Announcement … – BLC Content Management  Content targeting, structured content, templated page developmentCopyright © 2011 Credera. - 21 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Credera is a Business and Technology Consulting Firm that Focuses on Leveraging Proven Technologies to Enable our Clients Business Strategy  Our Company  Our People – Full-service business and technology – Credera’s professionals possess a unique consulting firm combination of deep technical expertise with extensive business backgrounds – Provide business and technology solutions that offer measurable value to our clients – Backgrounds include business, technology, and strategy management consulting with some of the – Deliver value by leveraging our people’s most well-known and respected consulting firms accumulated industry and management in the world experience with their deep technical expertise – Have served many influential corporations in a variety of industries over the past 20 years – Established in 1999 – Offices in Dallas, Austin, Denver  Sample Clients  Our Services – Management Consulting – Technology Solutions – Business IntelligenceCopyright © 2011 Credera. - 22 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • www.credera.com Q&A Thank you for attending! Contact Information: Brian Polster bpolster@yahoo.com www.credera.com Twitter: polsterCopyright © 2011 Credera. - 23 - All Rights Reserved. T H E P O W E R O F P E R S P E C T I V E
    • THE POWER OF PERSPECTIVE Smart GWT & Open Admin Brian Polster Credera Copyright © 2011 Credera. All Rights Reserved.