Metamorphosis from Forms to Java: Part II  Michael A. Fons RMOUG Quarterly Meeting May 2007
Preamble <ul><li>Demo-Centric presentation </li></ul><ul><li>Walkthrough of ADF basics </li></ul><ul><ul><li>Deployment </...
Issues and Highlights <ul><li>What follows are technical issue and highlights of ADF and JDeveloper features. </li></ul><u...
First Subject:  Deployment <ul><li>OC4J:  learn about it; work with it.  </li></ul><ul><ul><li>Great container!  </li></ul...
Deployment <ul><li>If you are deploying to OC4J or OAS you can deploy several ways: </li></ul><ul><ul><li>Developers using...
Deployment <ul><li>Cautions: </li></ul><ul><ul><li>OAS 9.0.4, 10.1.2 and 10.1.3 have different deployment requirements par...
Demo 1:  a deployment <ul><li>Deploy a simple application </li></ul><ul><li>Run it on an external OC4J </li></ul>
MVC (Model-view-controller) <ul><li>In a web program  </li></ul><ul><ul><li>the “view” is what you see and interact with. ...
MVC:  the Model side <ul><li>ADF BC is what I have worked with on the model side.  (I do not know TopLink, etc.) </li></ul...
MVC:  the Model  side <ul><li>Drag and drop on Business Component diagrams – may help visual-learners. </li></ul><ul><li>E...
Demo 2:  create simple model <ul><li>Create new app </li></ul><ul><li>Create new Entity from a table </li></ul><ul><li>Cre...
MVC:  View/Controller <ul><li>In JDev app templates, View and Controller are bundled separate from Model, probably because...
Demo 3:  add a simple UI <ul><li>Add a simple form page UI to the model we created. </li></ul>
Inter-page data passing <ul><li>Can use parameters for passing information. </li></ul><ul><li>Other data can be stored in ...
Visual Designer
Visual Designer <ul><li>Double-click a web page icon on the Navigation Diagrammer or the Navigator pane to edit a page wit...
Bindings <ul><li>Can mean different things depending on context (bind variables, data bindings) </li></ul><ul><li>Very imp...
Bindings <ul><li>Another way to see bindings:  in the visual designer you can click on and then right-click in a data fiel...
Demo 4:  take a look at visual designer and bindings <ul><li>Peruse visual designer of simple UI we just created </li></ul...
New Subject:  Beans <ul><li>What are beans?  </li></ul><ul><ul><li>reusable Java programs </li></ul></ul><ul><li>According...
Beans <ul><li>Where are beans found in ADF? </li></ul><ul><li>There appears to be both View-layer and Model-layer beans in...
Beans <ul><li>Model versus View beans </li></ul><ul><ul><li>Model layer </li></ul></ul><ul><ul><ul><li>Model-level Java pr...
Beans <ul><li>Helpful facts about beans: </li></ul><ul><ul><li>You can bind an input field on a page directly to a bean at...
Demo 5:  create backing bean  for a couple of UI components <ul><li>Create bean for a field </li></ul><ul><li>Create a but...
Scope <ul><li>like “automatic” beans…(not aeromatic). </li></ul><ul><li>Request, Process, Session, Application Scope varia...
Demo 6:  pass some data <ul><li>Create a second page using a different view </li></ul><ul><li>Pass some existing data from...
GUI Components <ul><li>There are Model- and View-layer components. </li></ul><ul><ul><li>Model </li></ul></ul><ul><ul><ul>...
GUI Components <ul><li>Form – vertical field layout </li></ul><ul><li>Table – horizontal, multi-row layout </li></ul><ul><...
Demo 7:  GUI component palette <ul><li>Create a page which uses a find window for parameter value. </li></ul><ul><li>Make ...
Collection vs. Iterator <ul><li>Initially it was difficult for me to understand what a collection was and what an iterator...
Oddballs and Whiney-bits <ul><li>While learning and experimenting I ran into things that threw me for a loop. </li></ul><u...
Odd-balls… <ul><li>If you move your JDev home… </li></ul><ul><ul><li>any applications that you have run against JDev’s emb...
Oddballs… <ul><li>Your pages, iterators and fields on your page can be granted access to roles through Authorization Edito...
Demo 8:  use the authorization editor to make some components read-only <ul><li>Run a simple log-in application; demonstra...
Oddballs… <ul><li>Entity Definitions are to Entities as View Objects are to ViewRow Objects.  Why not View Def/View Row, o...
Oddballs… <ul><li>Make view objects that are based on multiple entities able to update all its entities with the click of ...
Demo 9:  multi-table updatable view <ul><li>Create a view to select from multiple tables. </li></ul><ul><li>Make both tabl...
Oddballs… <ul><li>On a Form component, if you use bindings EL expression to keep a record counter against an iterator (to ...
Oddballs… <ul><li>The ADF Developer’s Guide says Table components will not allow you to bind a database table to a list el...
Demo 10:  create list element in a table component <ul><li>Create a page with a drop-down list based on a view. </li></ul>
A Word about JHeadstart <ul><li>Good productivity tool </li></ul><ul><li>Consistant UI </li></ul><ul><li>Costs extra </li>...
Some Tips… <ul><li>I have a few things left to say which will help someone out there… </li></ul><ul><li>Then we are done. ...
Tips <ul><li>Good things to remember about ADF… </li></ul><ul><ul><li>As you are building your page, drag items from the  ...
Tips <ul><li>Your application module has a “main” method in it if you need to run your model in debug mode.  It works grea...
Final Tips… <ul><li>The application module’s constructor does not represent the start of the life of the application modul...
Demo 11:  extend your framework to use pl/sql <ul><li>Add a framework extension to an application. </li></ul><ul><li>Add a...
Any Questions?  <ul><li>Hope you enjoyed this presentation. </li></ul><ul><li>Any questions?  Special requests? </li></ul>...
Upcoming SlideShare
Loading in …5
×

Metamorphosis from Forms to Java: A technical lead's perspective, part II

1,293 views

Published on

JSF presentation I did for RMOUG, May 2007

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Metamorphosis from Forms to Java: A technical lead's perspective, part II

  1. 1. Metamorphosis from Forms to Java: Part II Michael A. Fons RMOUG Quarterly Meeting May 2007
  2. 2. Preamble <ul><li>Demo-Centric presentation </li></ul><ul><li>Walkthrough of ADF basics </li></ul><ul><ul><li>Deployment </li></ul></ul><ul><ul><li>Model side </li></ul></ul><ul><ul><li>Presentation layer </li></ul></ul><ul><ul><li>Binding </li></ul></ul><ul><ul><li>Beans </li></ul></ul><ul><ul><li>Scope </li></ul></ul><ul><ul><li>More… </li></ul></ul>
  3. 3. Issues and Highlights <ul><li>What follows are technical issue and highlights of ADF and JDeveloper features. </li></ul><ul><li>Main resources I used were </li></ul><ul><ul><li>Oracle Application Development Framework Developer’s Guide for Forms/4GL Developers </li></ul></ul><ul><ul><li>Oracle JDeveloper 10g for Forms & PL/SQL Developers: A Guide to Web Development with Oracle ADF </li></ul></ul><ul><ul><li>Dive Into ADF Blog, AMIS website, Frank Nimphius… </li></ul></ul><ul><li>These two books cover this material in great detail. I recommend them both highly. </li></ul><ul><li>JDeveloper allows access to many technology stacks; </li></ul><ul><ul><li>I only cover one here. </li></ul></ul><ul><ul><li>These two books also cover this same stack I am covering. (ADF BC, JSF) </li></ul></ul>
  4. 4. First Subject: Deployment <ul><li>OC4J: learn about it; work with it. </li></ul><ul><ul><li>Great container! </li></ul></ul><ul><ul><li>Fully functional (and free). </li></ul></ul><ul><ul><li>Gives you deployment practice… </li></ul></ul><ul><li>OC4J will only take you so far: </li></ul><ul><ul><li>need to deploy to real test bed (like Oracle 10g AS) </li></ul></ul><ul><ul><li>This will help you feel confident and remain motivated. </li></ul></ul><ul><ul><li>This laptop is has 1 Mb of RAM and runs (walks?)… </li></ul></ul><ul><ul><ul><li>OAS 10.1.3.1 </li></ul></ul></ul><ul><ul><ul><li>JDeveloper 10.1.3.1 </li></ul></ul></ul><ul><ul><ul><li>Oracle XE database 10g </li></ul></ul></ul><ul><ul><ul><li>Internet Explorer </li></ul></ul></ul><ul><ul><li>Better to have multi-tiered environment </li></ul></ul><ul><ul><ul><li>You or your company may need to get some more hardware (used is OK); </li></ul></ul></ul><ul><ul><ul><li>deploying to existing servers can be too scary at first to inexperienced system administrators. </li></ul></ul></ul><ul><ul><ul><li>Might consider virtual machine software (like VMWare or Xen) </li></ul></ul></ul><ul><li>The paper which accompanies this presentation has instructions if you want to set up 10.1.3 OAS on a Red Hat install. This is pretty easy. </li></ul>
  5. 5. Deployment <ul><li>If you are deploying to OC4J or OAS you can deploy several ways: </li></ul><ul><ul><li>Developers using JDeveloper can create an application connection to deploy easily. </li></ul></ul><ul><ul><li>Other deployment methods require an EAR file or something like it. To make an EAR file… </li></ul></ul><ul><ul><ul><li>create a WAR deployment profile in JDev (use New…on context menu for ViewController Resource Folder). </li></ul></ul></ul><ul><ul><ul><li>In deployment profile context menu deploy to an EAR file . </li></ul></ul></ul><ul><ul><li>With an EAR file you can use… </li></ul></ul><ul><ul><ul><li>Oracle Enterprise Manager to deploy from anywhere. </li></ul></ul></ul><ul><ul><ul><li>admin.jar to deploy from the server side. </li></ul></ul></ul>
  6. 6. Deployment <ul><li>Cautions: </li></ul><ul><ul><li>OAS 9.0.4, 10.1.2 and 10.1.3 have different deployment requirements partially because they run different versions of the JDK; so your deployment target matters when attempting a deployment. </li></ul></ul><ul><ul><li>JDeveloper help has deployment instructions, which are somewhat helpful and somewhat erroneous depending on what version you are deploying to </li></ul></ul><ul><ul><li>see paper for details on JDev 10.1.2 to OAS 9.0.4 errata. </li></ul></ul><ul><ul><li>Save time: follow the Oracle compatibility matrix. </li></ul></ul>
  7. 7. Demo 1: a deployment <ul><li>Deploy a simple application </li></ul><ul><li>Run it on an external OC4J </li></ul>
  8. 8. MVC (Model-view-controller) <ul><li>In a web program </li></ul><ul><ul><li>the “view” is what you see and interact with. </li></ul></ul><ul><ul><li>the “model” is the data and the data access. </li></ul></ul><ul><ul><li>changing one can affect the other. </li></ul></ul><ul><li>MVC promotes having an intermediate layer called the “controller” layer to allow changes to view or model without affecting the other. </li></ul>
  9. 9. MVC: the Model side <ul><li>ADF BC is what I have worked with on the model side. (I do not know TopLink, etc.) </li></ul><ul><li>With ADF BC you use an Entity pointing to a database table if you want to update/insert/delete that table’s data. </li></ul><ul><li>A View Object needed when you want to select. </li></ul><ul><li>Entities and View Objects can be linked together, like with tables and their PK/FK’s, with Associations and Link Objects. </li></ul><ul><li>View Objects nest in Application Module objects (hence: the icon for application module is a suitcase.) </li></ul><ul><li>Application modules should contain the data controls that represent a Use Case or a “unit of work” (building blocks) </li></ul>
  10. 10. MVC: the Model side <ul><li>Drag and drop on Business Component diagrams – may help visual-learners. </li></ul><ul><li>Entities/Associations often come from tables/referential constraints. </li></ul><ul><ul><li>Can drag </li></ul></ul><ul><ul><ul><li>entities into views to make a query/view based on a table/entity. </li></ul></ul></ul><ul><ul><ul><li>views/view links into application modules to make instances of these objects. </li></ul></ul></ul><ul><ul><ul><li>application modules into other application modules </li></ul></ul></ul><ul><li>View Object control hints will allow you to more easily deploy your application to different locales (countries) with very few configuration changes. </li></ul>
  11. 11. Demo 2: create simple model <ul><li>Create new app </li></ul><ul><li>Create new Entity from a table </li></ul><ul><li>Create a new View to go with that Entity </li></ul><ul><li>Create an Application Module to go with that View </li></ul>
  12. 12. MVC: View/Controller <ul><li>In JDev app templates, View and Controller are bundled separate from Model, probably because Model objects are more likely to be shared between applications. All three parts of MVC are of equal importance, however. </li></ul><ul><li>Controller: Oracle favors JSF over Struts because of </li></ul><ul><ul><li>wide acceptance and government by JCP (Java Community Process). </li></ul></ul><ul><ul><li>Also JSF reacts at the component level, where Struts reacts at the page level. </li></ul></ul><ul><ul><li>SUN may like Struts better </li></ul></ul><ul><li>Faces-config.xml tracks… </li></ul><ul><ul><li>navigation rules </li></ul></ul><ul><ul><ul><li>nice diagramming tool for this; called navigation modeler/diagrammer </li></ul></ul></ul><ul><ul><ul><li>what beans/properties your application has </li></ul></ul></ul><ul><ul><li>lots of other stuff (see Overview tab) </li></ul></ul>
  13. 13. Demo 3: add a simple UI <ul><li>Add a simple form page UI to the model we created. </li></ul>
  14. 14. Inter-page data passing <ul><li>Can use parameters for passing information. </li></ul><ul><li>Other data can be stored in request, session or process-scope variables (more about them in a minute…). </li></ul><ul><li>Like passing data: If you use the same iterator crossing pages you will not lose the current-row marker setting. </li></ul><ul><li>Can use Transient View Objects </li></ul>
  15. 15. Visual Designer
  16. 16. Visual Designer <ul><li>Double-click a web page icon on the Navigation Diagrammer or the Navigator pane to edit a page with the Visual Designer editor. </li></ul><ul><li>Can drag individual GUI components or data-based data-control components and operations onto the page or structure pane. </li></ul><ul><li>Can drag-and-drop, or select and click (for components). </li></ul>
  17. 17. Bindings <ul><li>Can mean different things depending on context (bind variables, data bindings) </li></ul><ul><li>Very important to understand how to manually create and edit bindings (Koletzke). </li></ul><ul><li>Bindings connect things: </li></ul><ul><ul><li>GUI components to iterators, </li></ul></ul><ul><ul><li>GUI components to data elements, </li></ul></ul><ul><ul><li>GUI components to actions and methods </li></ul></ul><ul><li>Right-click on your visual designer page and choose the Page Definition file to see your page’s bindings so far. </li></ul>
  18. 18. Bindings <ul><li>Another way to see bindings: in the visual designer you can click on and then right-click in a data field and choose Edit Bindings to open up the Attribute binding editor. </li></ul><ul><li>To make your page to use custom model code you write you will need to do the following: </li></ul><ul><ul><li>Commonly you would create or override a Java method in your extended application module file. </li></ul></ul><ul><ul><li>Expose this method on the Client Interface Node of the App Module editor. (Double-click the application module to enter this editor.) </li></ul></ul><ul><ul><li>Insert a method binding into the page definition file structure pane. </li></ul></ul><ul><ul><li>Now you can call your code from a button or an invokeAction executable. </li></ul></ul>
  19. 19. Demo 4: take a look at visual designer and bindings <ul><li>Peruse visual designer of simple UI we just created </li></ul><ul><li>Take a look at the bindings for this page </li></ul>
  20. 20. New Subject: Beans <ul><li>What are beans? </li></ul><ul><ul><li>reusable Java programs </li></ul></ul><ul><li>According to wikipedia.com, the required conventions of JavaBeans are… </li></ul><ul><ul><li>The class should be serializable (able to persistently save and restore its state) </li></ul></ul><ul><ul><li>no-argument constructor </li></ul></ul><ul><ul><li>have get/set “accessors” for each class attribute </li></ul></ul><ul><ul><li>It should contain any required event-handling methods </li></ul></ul>
  21. 21. Beans <ul><li>Where are beans found in ADF? </li></ul><ul><li>There appears to be both View-layer and Model-layer beans in ADF apps. </li></ul><ul><ul><li>GUI/Presentation layer validation </li></ul></ul><ul><ul><li>Storing inter-page persistent data. </li></ul></ul>
  22. 22. Beans <ul><li>Model versus View beans </li></ul><ul><ul><li>Model layer </li></ul></ul><ul><ul><ul><li>Model-level Java programs accessible within the Sources folder in the structure pane when the BC component is highlighted in the Application Navigator; </li></ul></ul></ul><ul><ul><ul><li>java settings for this component must have java code option turned on. </li></ul></ul></ul><ul><ul><ul><li>JDev documentation does not refer to these programs as beans. </li></ul></ul></ul><ul><ul><li>View layer </li></ul></ul><ul><ul><ul><li>You can create/manage (View layer) managed beans through your configuration editor (faces-config.xml overview tab). </li></ul></ul></ul><ul><ul><ul><li>Binding layer calls these beans. </li></ul></ul></ul><ul><ul><ul><li>It is possible to interact and manipulate binding through bean code. (Koletzke: this is a really good thing to learn how to do.) </li></ul></ul></ul>
  23. 23. Beans <ul><li>Helpful facts about beans: </li></ul><ul><ul><li>You can bind an input field on a page directly to a bean attribute. Use the EL format “<beanname>.<attribute>” to reference it. (Note: “<scope>.<beanname>.<attribute>” may cause an error.) </li></ul></ul><ul><ul><li>You can opt to have JDev automatically maintain backing beans so when you add a new attribute to a page the backing bean gets a corresponding attribute added. (You can also double-click on a GUI component and create a bean from there.) </li></ul></ul><ul><ul><li>Can change name (id) property of your fields and beans by altering the id in your property sheet. This editing method allows you to have better names for your fields to references in your custom code later. </li></ul></ul>
  24. 24. Demo 5: create backing bean for a couple of UI components <ul><li>Create bean for a field </li></ul><ul><li>Create a button with a backing attribute in the same bean. </li></ul><ul><li>Make the button programmatically change attributes on a field. </li></ul>
  25. 25. Scope <ul><li>like “automatic” beans…(not aeromatic). </li></ul><ul><li>Request, Process, Session, Application Scope variables are created dynamically on reference to them. </li></ul><ul><li>Inter-page data storage </li></ul><ul><ul><li>If SetActionListener component is dropped onto a button, then it sets a value prior to executing the action associated with the button. </li></ul></ul><ul><ul><li>I told the SetActionListener to do a (from, to) of (#{row}, #{processScope.detailContacts}). Then I made the target page reference #{processScope.detailContacts.Pid} as its value. </li></ul></ul><ul><ul><li>The result was values were passed from page to page painlessly. </li></ul></ul><ul><ul><li>Request or other scope works just as well for inter-page value passing. </li></ul></ul>
  26. 26. Demo 6: pass some data <ul><li>Create a second page using a different view </li></ul><ul><li>Pass some existing data from page one to page two using request scope </li></ul>
  27. 27. GUI Components <ul><li>There are Model- and View-layer components. </li></ul><ul><ul><li>Model </li></ul></ul><ul><ul><ul><li>View Objects, </li></ul></ul></ul><ul><ul><ul><li>Application Modules, </li></ul></ul></ul><ul><ul><ul><li>Entities </li></ul></ul></ul><ul><ul><li>View- or Presentation-layer (GUI) components </li></ul></ul><ul><ul><ul><li>what you see (or not) on a web page like a </li></ul></ul></ul><ul><ul><ul><ul><li>button, </li></ul></ul></ul></ul><ul><ul><ul><ul><li>field, </li></ul></ul></ul></ul><ul><ul><ul><ul><li>drop-down list </li></ul></ul></ul></ul><ul><li>JSF and ADF Faces have many View-layer components to choose from. </li></ul>
  28. 28. GUI Components <ul><li>Form – vertical field layout </li></ul><ul><li>Table – horizontal, multi-row layout </li></ul><ul><li>Tree </li></ul><ul><ul><li>Tree binding editor </li></ul></ul><ul><ul><li>What data elements do you want to see on each level? </li></ul></ul><ul><ul><li>Link current rule to next (branch rule accessors) </li></ul></ul><ul><li>Adf Faces switcher and JSF facets – conditionally showing parts of your web page. </li></ul><ul><li>Drop Collection-level action “executeWithParams” to get ADF Parameter Form </li></ul><ul><li>So many more… </li></ul>
  29. 29. Demo 7: GUI component palette <ul><li>Create a page which uses a find window for parameter value. </li></ul><ul><li>Make this page use a switcher component. </li></ul>
  30. 30. Collection vs. Iterator <ul><li>Initially it was difficult for me to understand what a collection was and what an iterator was. </li></ul><ul><li>Model layer has Application Modules and View Object instances inside of it. ViewController layer has DataControl with Collections inside of it. App Module and DataControl are two ways of looking at the nearly the same thing – depending on what layer you are in. </li></ul><ul><li>Iterators are like cursor pointers in pl/sql; they point at a particular row in a returned set of data rows (a collection…which is a rowset inside a view object instance). </li></ul>
  31. 31. Oddballs and Whiney-bits <ul><li>While learning and experimenting I ran into things that threw me for a loop. </li></ul><ul><li>The following section will help you be prepared for these same stumbling blocks, hopefully. </li></ul><ul><li>Many other gotchas are highlighted in the ADF Developer’s Guide. </li></ul><ul><li>New versions of JDev will makes these disappear and others appear, no doubt. </li></ul>
  32. 32. Odd-balls… <ul><li>If you move your JDev home… </li></ul><ul><ul><li>any applications that you have run against JDev’s embedded OC4J server has imiplicitly been deployed there, and would need to be un-deployed and redeployed to make this move successful. </li></ul></ul><ul><ul><li>No EM on this server instance so you would probably need to use admin.jar to do this. </li></ul></ul><ul><ul><li>It is probably easier to just reinstall JDev to the new location and open your application in the new JDev. </li></ul></ul>
  33. 33. Oddballs… <ul><li>Your pages, iterators and fields on your page can be granted access to roles through Authorization Editor. </li></ul><ul><li>Authorization Editor hard to find. </li></ul><ul><ul><li>open the page definition for the page in question. </li></ul></ul><ul><ul><li>click on the page definition page, </li></ul></ul><ul><ul><li>go to the structure window </li></ul></ul><ul><ul><li>right click on the Page Def (root) node in that structure window. </li></ul></ul><ul><ul><li>select the option to “Edit Authorization” </li></ul></ul><ul><li>Other security settings occur in web.xml and in the embedded OC4J settings. Also jazn.xml </li></ul>
  34. 34. Demo 8: use the authorization editor to make some components read-only <ul><li>Run a simple log-in application; demonstrate access on a particular field </li></ul><ul><li>Open authorization editor; alter permission for a that field </li></ul><ul><li>Re-run with same log-in; show access has changed. </li></ul>
  35. 35. Oddballs… <ul><li>Entity Definitions are to Entities as View Objects are to ViewRow Objects. Why not View Def/View Row, or Entity Object/EntityRow? </li></ul><ul><li>Creating custom properties in AppModules, View Objects or Entities is possible…but is annoying. </li></ul><ul><li>If you normally set proxy exceptions in your intranet may need to set Embedded OC4J Server Preferences Startup to use localhost instead of your machine name. </li></ul><ul><li>Deleting and re-adding things to Data Model diagrams can create really long link lines. </li></ul>
  36. 36. Oddballs… <ul><li>Make view objects that are based on multiple entities able to update all its entities with the click of a checkbox (might need some additional programming, too). </li></ul><ul><li>ADF manual for Forms/4GL Developers, Chapter 9 has some typos and omissions that are handy to know about – see the paper. </li></ul><ul><li>If computer is forcibly rebooted while you have changes to save it can mess up your JDev installation; so can certain mistaken uses of JDev functionality. (need reinstall) </li></ul>
  37. 37. Demo 9: multi-table updatable view <ul><li>Create a view to select from multiple tables. </li></ul><ul><li>Make both tables updatable. </li></ul><ul><li>Run application. Demonstrate update of both tables. </li></ul>
  38. 38. Oddballs… <ul><li>On a Form component, if you use bindings EL expression to keep a record counter against an iterator (to create “page 3 of 10” and the like) and the iterator’s RangeStart expression does not seem to be advancing, … </li></ul><ul><ul><li>make sure that the page definition file’s setting of RangeSize is set to the number of rows displayed on the screen (i.e., 1 for a Form). </li></ul></ul><ul><ul><li>The default for this attribute for iterators is 10. </li></ul></ul><ul><ul><li>It should instead match the number of records you are displaying on that page (1 for a form component). </li></ul></ul>
  39. 39. Oddballs… <ul><li>The ADF Developer’s Guide says Table components will not allow you to bind a database table to a list element within it. </li></ul><ul><ul><li>But I tried it, and it worked fine. </li></ul></ul><ul><li>Watch out for java.lang.Number versus oracle.jbo.domain.Number ; datatype mismatch errors involving numbers are probably caused by these. </li></ul>
  40. 40. Demo 10: create list element in a table component <ul><li>Create a page with a drop-down list based on a view. </li></ul>
  41. 41. A Word about JHeadstart <ul><li>Good productivity tool </li></ul><ul><li>Consistant UI </li></ul><ul><li>Costs extra </li></ul><ul><li>JHeadstart authors not so emphatic about 100% generation as in Headstart product. </li></ul><ul><li>Will factor in Designer repository modules. </li></ul><ul><li>You would have to learn yet another “declarative” layer though… </li></ul><ul><li>May help Designer users migrate to ADF </li></ul>
  42. 42. Some Tips… <ul><li>I have a few things left to say which will help someone out there… </li></ul><ul><li>Then we are done. </li></ul>
  43. 43. Tips <ul><li>Good things to remember about ADF… </li></ul><ul><ul><li>As you are building your page, drag items from the Data Control palette rather than the Component Palette when possible. </li></ul></ul><ul><ul><li>Learn names of different components, editors, panes/panels, etc. This will help in reading documentation. </li></ul></ul><ul><ul><li>Refactoring: a year ago refactoring was not safe. Now it is. Go for it. Only a few thing need doing manually ( e.g., change DataBinding.cpx if you change the name of a page). </li></ul></ul>
  44. 44. Tips <ul><li>Your application module has a “main” method in it if you need to run your model in debug mode. It works great! </li></ul><ul><li>If you publish your custom method in the client interface you may need to rebuild your client interface code so that “code insight” in your code editors shows your new code changes. </li></ul><ul><li>SRDemo great to study. Oracle ADF Guide for Forms/4GL Developer’s works with this app in code examples. </li></ul>
  45. 45. Final Tips… <ul><li>The application module’s constructor does not represent the start of the life of the application module. Instead, override “create” method if you want to do something which coincides with the beginning of the App Module’s life. </li></ul><ul><li>Try to create your Framework Extension Layer as soon as you can stomach it </li></ul><ul><ul><li>check out chapter 25.1 through 25.3 in Developer’s Guide to do so. </li></ul></ul><ul><ul><li>This will give you flexibility in the long run. </li></ul></ul>
  46. 46. Demo 11: extend your framework to use pl/sql <ul><li>Add a framework extension to an application. </li></ul><ul><li>Add a call to a use of pl/sql that occurs in the framework. </li></ul><ul><li>Run the application. </li></ul>
  47. 47. Any Questions? <ul><li>Hope you enjoyed this presentation. </li></ul><ul><li>Any questions? Special requests? </li></ul><ul><li>Contact me at mfons@graebel.com </li></ul>

×