Metamorphosis from Forms to Java: a technical lead's perspective


Published on

JSF Presentation I did for RMOUG training days conferenece 2007

Published in: Technology
1 Comment
  • It was nice presentation. Thanks
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Metamorphosis from Forms to Java: a technical lead's perspective

    1. 1. Metamorphosis from Forms to Java: a technical lead's perspective Michael A. Fons RMOUG Training Days February 2007
    2. 2. Think… <ul><li>“ A change of any consequence to an Oracle Form of any consequence is complex and convoluted.” </li></ul><ul><ul><ul><ul><li>somebodyorother </li></ul></ul></ul></ul>
    3. 3. “ Greetingthz…” (apologies to Ernie Kovaks) <ul><li>I researched this topic as part of a strategic move while working as a team lead at the US Air Force Academy. I am now at Graebel Companies, Inc. </li></ul><ul><li>I have 16.5 years of experience with PL/SQL and Forms. </li></ul><ul><li>Along the way I have done some work with Java…not “gobs.” </li></ul><ul><li>For this paper I researched several publications (by Peter Koletzke, Steve Muench, and others), studied blogs, and interviewed experts and co-workers. </li></ul><ul><li>I want to share what I have learned during this process. </li></ul><ul><li>The paper will give more detail if you need it. </li></ul><ul><li>This presentation is ½ planning issues, ½ technical issues. </li></ul><ul><li>This presentation covers a lot of ground. Details are usually just “highlights.” </li></ul>
    4. 4. Planning Highlights
    5. 5. Why Switch? <ul><li>Oracle claims they have no plans to de-support Forms, so why switch? </li></ul><ul><li>Forms feels more and more like COBOL every day to me…(I was just called an “old-school Forms programmer” by a potential employer – no kidding!). </li></ul><ul><li>New developers are educated in different technologies like Java. This changes the market place. </li></ul><ul><li>JSF may be “lighter” than Forms on the web. </li></ul><ul><li>Possible reasons to dislike the Forms paradigm: </li></ul><ul><ul><li>inadequate GUI palette </li></ul></ul><ul><ul><li>enter query mode is non-intuitive </li></ul></ul><ul><ul><li>complex trigger interaction makes troubleshooting and programming difficult </li></ul></ul><ul><ul><li>JInitiator admin/installation on the fly may be a pain </li></ul></ul>
    6. 6. Why Switch? <ul><li>More Reasons: </li></ul><ul><ul><li>Oracle is migrating/has migrated their own applications to Java (c.f., Metalink, Apps?). </li></ul></ul><ul><ul><li>IDC (40+-year-old market intelligence provider) seems to indicate ultimate strategic direction of Oracle is toward Java. </li></ul></ul><ul><ul><li>Java is powerful and open source. </li></ul></ul><ul><ul><li>JDBC provides DB independence and portability. </li></ul></ul>
    7. 7. So you’re gonna switch to Java… <ul><li>This presentation assumes you have already decided to switch from Forms to Java . </li></ul><ul><li>… then just do the following: </li></ul><ul><ul><li>Convert (or replace) current existing applications </li></ul></ul><ul><ul><li>Train non-Java employees </li></ul></ul><ul><ul><ul><li>Get to know how individuals learn best (by course, by seat-of-the-pants, etc.). </li></ul></ul></ul><ul><ul><ul><li>Get to know what training options exist and at what cost . </li></ul></ul></ul><ul><ul><ul><li>Give prototype assignments to people who handle it. </li></ul></ul></ul><ul><ul><ul><li>Find time for the STEEP LEARNING CURVE for… </li></ul></ul></ul><ul><ul><ul><ul><li>JDeveloper </li></ul></ul></ul></ul><ul><ul><ul><ul><li>ADF </li></ul></ul></ul></ul><ul><ul><ul><ul><li>J2EE/OOP </li></ul></ul></ul></ul><ul><ul><ul><li>Find money…for training, hardware, software… </li></ul></ul></ul>
    8. 8. Conversion Approaches <ul><li>Approach 1: All-at-once </li></ul><ul><ul><li>First phase: </li></ul></ul><ul><ul><ul><li>accept no new development projects </li></ul></ul></ul><ul><ul><ul><li>focus on stabilizing old system </li></ul></ul></ul><ul><ul><ul><li>put all new development projects off until second phase </li></ul></ul></ul><ul><ul><li>Second phase: </li></ul></ul><ul><ul><ul><li>do all new development on new system </li></ul></ul></ul><ul><ul><ul><li>do no new work on old system </li></ul></ul></ul><ul><li>Naval academy did this not too long ago. </li></ul>
    9. 9. Conversion Approaches <ul><li>Approach 2: A-bit-at-a-time </li></ul><ul><ul><li>Do some pilot projects to convert parts of your system. </li></ul></ul><ul><ul><li>Work out what you need to do to allow Forms and Java code to co-exist. </li></ul></ul><ul><ul><li>As developers come on-line with Java you can convert more and more of your code. </li></ul></ul><ul><li>This may be a more popular approach. </li></ul>
    10. 10. Analysis of Approaches <ul><li>With all-at-once approach… </li></ul><ul><ul><li>The development team is super-productive on… </li></ul></ul><ul><ul><ul><li>old system during the first phase. </li></ul></ul></ul><ul><ul><ul><li>new system in the second phase. </li></ul></ul></ul><ul><ul><li>The only distractions to conversion are emergency fixes in both phases. </li></ul></ul><ul><ul><li>This approach requires serious buy-in from the top. </li></ul></ul><ul><ul><li>This approach is higher risk because second phase “productivity” is theoretical until massive cutover. </li></ul></ul>
    11. 11. Analysis of Approaches <ul><li>With a bit at a time approach… </li></ul><ul><ul><li>End-users will see… </li></ul></ul><ul><ul><ul><li>fewer radical changes to how much productivity they receive. </li></ul></ul></ul><ul><ul><ul><li>(due to learning curve) a medium-sized drop in the number of </li></ul></ul></ul><ul><ul><ul><ul><li>Fixes </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Enhancements </li></ul></ul></ul></ul><ul><ul><ul><ul><li>New Developments </li></ul></ul></ul></ul><ul><ul><ul><li>an increase in IT flexibility (due to extra victories, challenges, and new learning opportunities) </li></ul></ul></ul><ul><ul><ul><li>increased opportunities to give feedback to the IT staff. </li></ul></ul></ul>
    12. 12. Whichever approach you use… <ul><li>…do SOMETHING!! </li></ul><ul><ul><li>Action… </li></ul></ul><ul><ul><ul><li>gets you started down the path. </li></ul></ul></ul><ul><ul><ul><li>suppresses feeling overwhelmed and depressed. </li></ul></ul></ul><ul><ul><li>Start… </li></ul></ul><ul><ul><ul><li>Planning. </li></ul></ul></ul><ul><ul><ul><li>Learning. </li></ul></ul></ul><ul><ul><ul><li>Experimenting. </li></ul></ul></ul>
    13. 13. Planning <ul><li>Form-level pl/sql logic will need converting (.pll’s, Form triggers, Form program units). Where will the new business logic go? </li></ul><ul><ul><li>at database level? </li></ul></ul><ul><ul><ul><li>triggers, stored procedures </li></ul></ul></ul><ul><ul><ul><li>this may save corporate investment </li></ul></ul></ul><ul><ul><li>at Business component level? </li></ul></ul><ul><ul><ul><li>App Modules, View Objects </li></ul></ul></ul><ul><ul><ul><li>this may save unnecessary trips to the database </li></ul></ul></ul><ul><ul><li>in the presentation layer? </li></ul></ul><ul><ul><ul><li>Managed Bean code </li></ul></ul></ul><ul><ul><ul><li>some logic may “fit” better technologically here </li></ul></ul></ul><ul><li>Are you going to share ADF BC Entity/View Objects between applications? </li></ul><ul><li>What are you going to use for… </li></ul><ul><ul><li>Configuration Management (CM) ( e.g. , subversion)? </li></ul></ul><ul><ul><li>Testing ( e.g. , JUnit)? </li></ul></ul><ul><ul><li>Modeling ( e.g. , UML, Use Case)? </li></ul></ul><ul><ul><li>Coding/GUI ( e.g. , Java, ADF, JSF)? </li></ul></ul>
    14. 14. Planning <ul><li>More on converting your Forms </li></ul><ul><ul><li>Forms look and feel (LAF) is different from JSF GUI LAF. How will you map it? </li></ul></ul><ul><ul><li>Forms components may not map 1:1 with JSF/ADF components. </li></ul></ul><ul><ul><li>Are you going to use any automated conversion tools? </li></ul></ul><ul><ul><ul><li>Google on “migrate oracle forms to java” for lots of hits on tools to do this. </li></ul></ul></ul>
    15. 15. Learning <ul><li>Interleave code practice with “book-learnin’.” </li></ul><ul><li>Free learning: </li></ul><ul><ul><li>Read Blogs (Muench, Nimphius, etc.), Technet docs/examples, buy/borrow books, attend free/cheap conferences, ask around. </li></ul></ul><ul><ul><li>Share what you have learned with co-workers like with </li></ul></ul><ul><ul><ul><li>brown-bags </li></ul></ul></ul><ul><ul><ul><li>simple conversations </li></ul></ul></ul><ul><li>Not-free learning: </li></ul><ul><ul><li>Group Training </li></ul></ul><ul><ul><ul><li>Checked out a couple companies </li></ul></ul></ul><ul><ul><ul><ul><li>comparable…about $1000/day for 10 people. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>May offer mentoring packages. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Government can get GSA rates. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Oracle Corp training is a lot more expensive. </li></ul></ul></ul></ul>
    16. 16. Learning <ul><li>Psychology of learning: </li></ul><ul><ul><li>Don’t get too down if you do not “get it.” </li></ul></ul><ul><ul><li>Don’t get jealous (unless you find that motivating): </li></ul></ul><ul><ul><ul><li>others may learn some things before you </li></ul></ul></ul><ul><ul><ul><li>try to accept the challenge to learn from them, without beating yourself up too much. </li></ul></ul></ul><ul><li>Other ideas: </li></ul><ul><ul><li>Approach technical problems by consulting lots of sources, if possible, to get different points of view. </li></ul></ul><ul><ul><li>Technical guides, manuals, and versions of software must be used quickly before they get antiquated. </li></ul></ul>
    17. 17. Learning <ul><li>Hire one or more Java experts, and they can help train your Forms people. </li></ul><ul><ul><li>They should be… </li></ul></ul><ul><ul><ul><li>Self-motivated. </li></ul></ul></ul><ul><ul><ul><li>OK with </li></ul></ul></ul><ul><ul><ul><ul><li>teaching and being around learning people </li></ul></ul></ul></ul><ul><ul><ul><ul><li>changing technology. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>build a pilot, take it to management, and cajole them into walking their talk. </li></ul></ul></ul></ul><ul><ul><ul><li>Able to leap tall buildings… </li></ul></ul></ul>
    18. 18. Learning <ul><li>JDeveloper Concepts: </li></ul><ul><ul><li>There are many details to learn </li></ul></ul><ul><ul><ul><li>what are all the pieces? </li></ul></ul></ul><ul><ul><ul><li>How do they fit together? </li></ul></ul></ul><ul><ul><li>What can you drag to where in the IDE? </li></ul></ul><ul><ul><li>Highly customizable. In doc it says you can fix their bugs if you are impatient through extensions. </li></ul></ul><ul><ul><ul><li>How do you override and extend Java code in this framework? </li></ul></ul></ul><ul><ul><ul><li>How hard is it to extend a framework vs waiting for future versions? </li></ul></ul></ul>
    19. 19. Experimenting <ul><li>If you have an pilot/assignment to do you could… </li></ul><ul><ul><li>Do something you need to do anyway, only in the new technology (and old technology in parallel?). </li></ul></ul><ul><ul><li>Do a POST-MORTEM on the old way of doing things. </li></ul></ul><ul><ul><ul><li>Get together with everybody (users, programmers, et al ) agree what you did/did not like. </li></ul></ul></ul><ul><ul><ul><li>Do some story boards or your favorite requirements-gathering method </li></ul></ul></ul><ul><ul><li>Train your users on what is possible with the new technology so they can think outside their current “box”. </li></ul></ul>
    20. 20. Technical Highlights
    21. 21. Issues and Highlights <ul><li>What follows are more 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 can fill in the blanks offline or these books will help. 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>
    22. 22. First Subject: Deployment <ul><li>OC4J: learn about it; work with it. Great container! Fully functional. Gives you deployment practice… </li></ul><ul><li>OC4J will only take you so far. Need to deploy to real test bed to feel confident and remain motivated. </li></ul><ul><li>May need to get some more hardware (used is OK); deploying to existing servers can be too scary at first to inexperienced system administrators. </li></ul><ul><li>Might consider virtual machine software (like VMWare or Xen) </li></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>
    23. 23. 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>
    24. 24. 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 (see paper). </li></ul></ul><ul><ul><li>Save time: follow the Oracle compatibility matrix. </li></ul></ul>
    25. 25. 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>
    26. 26. 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>Generally you need 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>All these objects fit into 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>
    27. 27. MVC: Model <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>
    28. 28. MVC: View/Controller <ul><li>Thoughts: </li></ul><ul><ul><li>Not sure why View and Controller are bundled separate from model. All three are of equal importance and interrelated. </li></ul></ul><ul><ul><li>Controller: JSF favored by Oracle over Struts because of </li></ul></ul><ul><ul><ul><li>wide acceptance and government by JCP (Java Community Process). </li></ul></ul></ul><ul><ul><ul><li>Also JSF reacts at the component level, where Struts reacts at the page level. </li></ul></ul></ul><ul><ul><ul><li>SUN may like Struts better </li></ul></ul></ul><ul><ul><li>Faces-config.xml tracks </li></ul></ul><ul><ul><ul><li>navigation rules </li></ul></ul></ul><ul><ul><ul><ul><li>nice diagramming tool for this </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Names: navigation modeler, navigation diagrammer, and page-flow diagrammer (?) </li></ul></ul></ul></ul><ul><ul><ul><li>what beans/properties your application has </li></ul></ul></ul><ul><ul><ul><li>lots of other stuff </li></ul></ul></ul>
    29. 29. Inter-page data passing <ul><li>Can use parameters for passing information. </li></ul><ul><li>Other data can be stored in session or process-level beans (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>
    30. 30. Visual Designer
    31. 31. Visual Designer <ul><li>Double-click a web page icon on the Navigation Diagrammer 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>
    32. 32. 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>
    33. 33. 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>
    34. 34. New Subject: Beans <ul><li>What are beans? </li></ul><ul><ul><li>reusable Java programs </li></ul></ul><ul><li>According to, 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>
    35. 35. 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>
    36. 36. 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>
    37. 37. 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>
    38. 38. Scope <ul><li>like “automatic” beans…(not aeromatic). </li></ul><ul><li>Request, Process, Session, Application Scope “beans” are created dynamically. </li></ul><ul><li>Inter-page data storage </li></ul><ul><ul><li>SetActionListener component is dropped onto a button, and 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>
    39. 39. 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>
    40. 40. 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>
    41. 41. 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 has Application Modules and View Object instances inside of it. ViewController has DataControl with Collections inside of it. I think they are two ways of looking at the nearly the same things respectively. </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>
    42. 42. 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>
    43. 43. 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>
    44. 44. 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>
    45. 45. 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>
    46. 46. 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>
    47. 47. 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>
    48. 48. 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>
    49. 49. 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>
    50. 50. 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>
    51. 51. 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>
    52. 52. 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>
    53. 53. 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>
    54. 54. Enjoy Training Days! <ul><li>Hope you enjoyed this presentation. </li></ul><ul><li>Any questions? </li></ul><ul><li>Contact me at </li></ul>