Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Open Admin


Published on

Open Admin is an open source framework for building administration programs based on GWT. The framework provides the ability to easily integrate Spring Security, SmartGWT, and JPA. Open Admin is a component of the Broadleaf Commerce framework and will be released to the open source community as part of BroadleafComerce version 1.5.

Published in: Technology, Education
  • Login to see the comments

Open Admin

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