home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / ODFRDSGN.INF (.txt) < prev    next >
OS/2 Help File  |  1995-06-14  |  35KB  |  731 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Overview ΓòÉΓòÉΓòÉ
  3.  
  4. THIS IS A LIVING, WORKING DOCUMENT, AND WILL CHANGE OVER TIME AS DESIGN AND 
  5. DEVELOPMENT PROGRESSES. IT DESCRIBES FUNCTIONS WHICH HAVE NOT YET BEEN 
  6. IMPLEMENTED AS WELL AS FUNCTIONS WHICH HAVE. SEE THE ACCOMPANYING ONLINE 
  7. REFERENCE AND READ.ME FOR A BETTER UNDERSTANDING OF WHAT HAS BEEN IMPLEMENTED 
  8. IN A GIVEN DRIVER. CONTACT THE DEVELOPMENT GROUP IF YOU HAVE SPECIFIC 
  9. REQUIREMENTS FOR ANY OF THIS FUNCTION, SO THAT YOUR REQUIREMENTS CAN BE 
  10. CONSIDERED. INTERNAL TO IBM, CONTACT PHOLMES AT CARVM3. EXTERNAL TO IBM, APPEND 
  11. TO THE OPENDOC FORUMS ON EITHER COMPUSERVE (GO OPENDOC) OR INTERNET 
  12. (opendoc-interest on cilabs.org). 
  13.  
  14. THIS DOCUMENT CONTAINS NO SCHEDULES. FOR AVAILABILITY DATES OF PARTICULAR 
  15. FUNCTIONS (FUNCTION MAY BE STAGED), CONTACT THE AUTHOR. NOTE TO EXTERNAL 
  16. CUSTOMERS: I'LL NEED TO GET YOU ON A CONFIDENTIAL DISCLOSURE AGREEMENT 
  17. INDIVIDUALLY IF YOU NEED ANY EXCEPT THE MOST NEAR-TERM SOLID DATES. 
  18.  
  19. Arthur Jolin 
  20. OpenDoc Frameworks 
  21. C++ UI Tools Development, IBM 
  22. jolin@vnet.ibm.com 
  23.  
  24.  
  25. ΓòÉΓòÉΓòÉ 1.1. Goals ΓòÉΓòÉΓòÉ
  26.  
  27. The primary goal of the IBM OpenDoc Forms Framework (OD Framework for short) is 
  28. to make it as simple as possible for C++ developers to create forms-style 
  29. OpenDoc parts. "Forms-style" means that the visual interface to the part 
  30. consists primarily of GUI controls (e..g, buttons, text entry fields, 
  31. bitmap-display controls), with perhaps some simple 2D drawing and rendering. 
  32. This Framework is not appropriate for all OpenDoc parts, but it makes the above 
  33. kinds of parts easier to implement. 
  34.  
  35. The OD Framework will consist both of classes for creating and testing your 
  36. parts and sample fully-implemented parts that use the OD Framework. These 
  37. sample parts will have their source code made available, to help guide new part 
  38. developers. The OD Framework will include function designed specifically to 
  39. work in conjunction with the IBM VisualAge C++ OpenClass class libraries; 
  40. specifically, OpenClass classes can be used to implement the interior/contents 
  41. of OD Framework parts in a way familiar to current users of OpenClass. 
  42.  
  43. The OD Framework is not the same thing as the OpenDoc base toolkit and runtime 
  44. (the underlying OS support for OpenDoc). OpenDoc toolkit is being produced by 
  45. IBM's system groups (OS/2, AIX), WordPerfect (Windows), Sun, etc. It contains 
  46. basic C++/SOM support, as defined in the Apple design documents for OpenDoc. By 
  47. definition, as stated in the Apple document, it's goal is not to make it easy 
  48. to create parts, but only to make it possible. Lastly, the OpenDoc toolkit is 
  49. intended to be part of the operating system, or made freely available. The OD 
  50. Framework, on the other hand, is being produced by IBM's SWS, the home of 
  51. VisualAge C++ (VA C++) and it's OpenClass class libraries (formerly known as 
  52. IBMCLASS). It's goal is to make it easy to create parts written in C++. The OD 
  53. Framework is intended to be shipped as part of VA C++. It may be made available 
  54. in additional ways if conditions (e.g., schedules) demand it. During 
  55. development, drivers will be made available periodically. 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ 1.2. Environments ΓòÉΓòÉΓòÉ
  59.  
  60. The OpenDoc Forms Framework depends on the base OpenDoc support in each 
  61. environment, as well as VA C++ class libraries in each environment. Based on 
  62. current plans, we intend to support the following environments: 
  63.  
  64.    o  OS/2 Warp 
  65.  
  66.    o  OS/2 Warp for the PowerPC 
  67.  
  68.    o  Windows 32bit (i.e., Windows95, a.k.a.Chicago, WindowsNT) 
  69.  
  70.    o  Win32S. Because certain controls (e.g., container) are not available to 
  71.       Win32S applications (and thus there can be no OpenClass classes for 
  72.       them), OD Framework content will be limited here. 
  73.  
  74.    o  AIX 
  75.  
  76.    o  AIX for the PowerPC 
  77.  
  78.    o  Solaris (not sure when OpenDoc support will be completed) 
  79.  
  80.    o  Potentially, other UNIXes, such as HPUX (depends on the VA C++ and 
  81.       OpenDoc products being supported on these UNIX variants) 
  82.  We are working with Apple toward achieving common or very similar frameworks 
  83.  on the MacOS as are available on the other platforms. This may include an OS/2 
  84.  version of Apple's OpenDoc Developer Framework (ODF) and/or a MacOS version of 
  85.  the VA C++ OpenDoc Forms Framework. 
  86.  
  87.  
  88. ΓòÉΓòÉΓòÉ 1.3. Target Users ΓòÉΓòÉΓòÉ
  89.  
  90. Target users of the OpenDoc Forms Framework include developers with the 
  91. following skills and needs: 
  92.  
  93.    o  C++ and general OO programming skills 
  94.  
  95.    o  Little to moderate knowledge of OpenDoc Library 
  96.  
  97.    o  Skills in their own domain (e.g., financial, insurance) 
  98.  
  99.    o  need to convert existing GUI application(s) to a compound document style 
  100.       UI (app becomes a set of semi-independent parts) 
  101.  
  102.    o  need to write OpenDoc parts for the first time 
  103.  
  104.    o  need to write OpenDoc parts which use GUI controls or VA C++ UI Class 
  105.       Library objects, and/or moderately detailed drawn images (via GDI, GPI or 
  106.       VA C++'s portable drawing classes) 
  107.  
  108.  
  109. ΓòÉΓòÉΓòÉ 1.4. Summary of Content and its Value to Users ΓòÉΓòÉΓòÉ
  110.  
  111. The OpenDoc Forms Framework consists of three major sections: 
  112.  
  113.    o  A forms part framework 
  114.  
  115.    o  A set of already-implemented sample parts and their source code 
  116.  
  117.    o  Test & support stuff 
  118.  Also included in the OD Framework, for purposes of planning & funding, are 
  119.  enhancements to VA C++ class libraries (e.g., OpenClass) in support of 
  120.  OpenDoc. 
  121.  
  122.  Sub-frameworks have been defined for some part domains, however we welcome and 
  123.  depend on feedback from part developers for additional frameworks. We are 
  124.  actively working with existing part developers, obtaining their code and using 
  125.  it as a guide for where and how new frameworks can help significant numbers of 
  126.  future developers. Naturally, we will concentrate on part domains where 
  127.  significant numbers of parts are expected to be written, and where a framework 
  128.  can have significant value add. 
  129.  
  130.  Please contact the author directly if you are developing an OpenDoc part and 
  131.  would be interested in working with the IBM OD Framework team. 
  132.  
  133.  
  134. ΓòÉΓòÉΓòÉ 1.4.1. Integration with other Products ΓòÉΓòÉΓòÉ
  135.  
  136. The OpenDoc Forms Framework is specifically designed to integrate with the VA 
  137. C++ OpenClass. OpenClass is a primary vehicle for creating the interior of 
  138. OpenDoc parts created with the OD Framework. 
  139.  
  140. You will be able to use the VA C++ visual builder to construct OpenDoc parts by 
  141. combining classes from the OD Framework and OpenClass, similar to how you 
  142. combine non-visual "builder-parts" (i.e., model content objects) and visual 
  143. "builder-parts" (i.e., views) today. This capability will be available at the 
  144. same time as the OpenDoc Framework GA. 
  145.  
  146.  
  147. ΓòÉΓòÉΓòÉ 1.4.2. Usability ΓòÉΓòÉΓòÉ
  148.  
  149. See OpenClass usability plan. 
  150.  
  151.  
  152. ΓòÉΓòÉΓòÉ 1.4.3. Documentation ΓòÉΓòÉΓòÉ
  153.  
  154. Eventual documentation will consist of a users guide and a reference. We are 
  155. investigating whether this is best done as additions to the existing OpenClass 
  156. books or as separate books. Assumption is separate books. The material from 
  157. this document will form the core of the users guide text, to be reviewed by ID 
  158. for content approximately 3 months before code freeze, and edited to final 
  159. content format approximately 2 months before code freeze. Content adjustments 
  160. will occur up until the last minute (let's get real, folks). 
  161.  
  162. The reference will be produced using the Odyssey tool, and will adhere to the 
  163. same format as the OpenClass by using the same Odyssey template. Format of the 
  164. refrerence is roughly the same as the reference shipped with this driver. 
  165.  
  166.  
  167. ΓòÉΓòÉΓòÉ 1.4.4. Install Plan ΓòÉΓòÉΓòÉ
  168.  
  169. See OpenClass install plan. 
  170.  
  171.  
  172. ΓòÉΓòÉΓòÉ 1.4.5. Development Dependencies ΓòÉΓòÉΓòÉ
  173.  
  174. The OD Framework depends on the OpenDoc Library, both toolkit and runtime, for 
  175. each of its environments. It also depends on the VA C++ R3 (specifically, user 
  176. interface and collection classes) for each of its environments. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 1.4.6. Performance Objectives ΓòÉΓòÉΓòÉ
  180.  
  181. TBD in detail. Basically, the same as for OpenDoc and the VA C++ OpenClass. 
  182.  
  183.  
  184. ΓòÉΓòÉΓòÉ 1.4.7. DBCS/NLS Enablement ΓòÉΓòÉΓòÉ
  185.  
  186. The OD Framework depends on the DBCS/NLS support in the OpenDoc Library and in 
  187. the VA C++ OpenClass. To date, there are no unique places in the OpenDoc 
  188. Framework requiring DBCS/NLS support. 
  189.  
  190.  
  191. ΓòÉΓòÉΓòÉ 1.4.8. Forms Part Frameworks ΓòÉΓòÉΓòÉ
  192.  
  193. The focus of the forms part framework is to: 
  194.  
  195.    o  help part developers that don't render their own parts but wish to use 
  196.       OpenClass controls to create their part interiors. This is done by giving 
  197.       them model and view classes, where the models derive from an ODPart and 
  198.       the views derive from some existing OpenClass classes. Built-in behaviors 
  199.       between the model, view and related classes make them a framework for 
  200.       part development. Such parts are generically refered to as "form parts" 
  201.  
  202.    o  help part developers that do render their own parts but who have somewhat 
  203.       simple needs. This is done by giving them a view class to derive from 
  204.       that has large amounts of built-in behavior that will be appropriate for 
  205.       at least 50% (guestimate) of anticipated parts, but which does not assume 
  206.       the view uses controls (or system windows of any kind). This puts much 
  207.       more of a burden on the part developer, as the rendering of visuals takes 
  208.       substantial effort. As such specific visuals are unique to each part, the 
  209.       OD Framework can not help you much here (tho the OpenClass graphics and 
  210.       text-drawing classes can help somewhat). The same model class as above, 
  211.       together with a different base view class, is expected to serve this 
  212.       role. 
  213.  
  214.    o  help part developers manage menus (which includes menu bar items, pop-up 
  215.       menus, accelerator keys, etc.) 
  216.  
  217.    o  help part developers manage persistance (in the broadest sense, which 
  218.       includes transfer of data via drag/drop, clipboard and links) 
  219.  
  220.    o  help part developers handle semantic events and being driven by a script, 
  221.       including help for undo/redo of these operations 
  222.  
  223.    o  build other classes into the framework where we have clear value-add over 
  224.       the OD Library classes themselves. This is the same criterion used in the 
  225.       creation of OpenClass, and was well-received by its customers. 
  226.  
  227.  The model and form view classes will be especially useful to those creating 
  228.  OpenDoc parts for most LOB needs (esp. converting current applications to 
  229.  parts), as well as ISV parts whose views are based primarily on the use of GUI 
  230.  controls. The use of separate model and view classes allows logic for data 
  231.  manipulation, query logic, etc. to be kept discreet from logic for presenting 
  232.  the data. It allows a variety of different views of the same model data. It 
  233.  allows various views of the same model to be kept in synch when the data is 
  234.  changed on one view; this synchronization can be handled mostly by OD 
  235.  Framework code, once the model and view classes are configured. 
  236.  
  237.  The focus on "form" views comes from examining current UI guides and 
  238.  standards. Due to the guidance of CUA, Motif and other style guides, the 
  239.  majority of views can be grouped into one of several basic varieties. These 
  240.  varieties are: 
  241.  
  242.    o  panel/dialog view - a window (whether present for a long time or only 
  243.       briefly popped-up as needed) which contains entry fields, list boxes, 
  244.       buttons, etc. This is often used to create online forms. Tabular views 
  245.       are (for the time being) included under panel-based views, since today 
  246.       they are typically constructed from a series of entry fields. 
  247.  
  248.    o  notebook-based - a window which represents a set of related panel-based 
  249.       views, each appearing on a separate page of a notebook-like visual 
  250.  
  251.    o  the standard OpenDoc "static" views of icon, mini-icon and thumbnail 
  252.  
  253.    o  container-based - a window which contains a representation (e.g., icon 
  254.       view, a one-line-summary details view) of a large number of objects. 
  255.       Typically, each of these objects can be clicked on and opened into a 
  256.       panel view 
  257.  Note that text/wordprocessor views, graphic/bitmap/drawing views, etc. are not 
  258.  included in this list. Even though MLE and bitmap controls can be used in 
  259.  panel views to achieve something like such views, these are best handled by 
  260.  going beyond the simple text and bitmap controls available today; users demand 
  261.  more functionality in a part than these controls can provide (e.g., rich text, 
  262.  interactive shape drawing & special effects) and this usually means they must 
  263.  render themselves. 
  264.  
  265.  The "container-based view" deserves special mention. In the OpenDoc UI 
  266.  paradigm, the distinction between container-based views and other views fades 
  267.  away. This is because OpenDoc defines how a part may simultaniously have its 
  268.  own content (be it entry fields and buttons, or drawn images) and have other 
  269.  OpenDoc parts embedded in it. Unlike the CUA paradigm of containment as 
  270.  defined in the container control or "folder", the types of objects can be 
  271.  totally heterogeneous (which, it should be noted, is often a mixed blessing). 
  272.  In recognition of this OpenDoc UI paradigm, the ODFramework views will be able 
  273.  to (optionally) have other OpenDoc parts embedded in them; a combination of OD 
  274.  Framework code and part-specific code will manage how this is done. 
  275.  
  276.  The idea of multiple views is also based in real scenarios of use. For 
  277.  example, a form part could be loaded with an IMS record representing the 
  278.  complete account information for a bank customer. A loan application review 
  279.  document might include a panel view showing only a summary of balances in 
  280.  various accounts (the data for which came from portions of the form part's IMS 
  281.  record). On the other hand, a deposit/withdrawl document might include a panel 
  282.  view showing details of one particular account. The two views sharing the same 
  283.  form part as model would be kept in synch. Periodically, the form part could 
  284.  be resynchronized with the original IMS database (making updates to the 
  285.  database on behalf of all views, automatically). Parts which do not use the 
  286.  client/server aspects of the OpenDoc Framework can, of course, also be 
  287.  constructed. A part could deal with data strictly on the local user's machine 
  288.  without incurring any additional overhead. 
  289.  
  290.  
  291. ΓòÉΓòÉΓòÉ 1.4.9. Test & support ΓòÉΓòÉΓòÉ
  292.  
  293. The focus of test & support is to insure a part developer does not have to 
  294. build a scaffold shell simply to test a part. This will also include sample 
  295. code. This is not any sort of COMPLIANCE test bed, nor a complete, exhaustive 
  296. FVT test bed for OpenDoc parts. 
  297.  
  298.  
  299. ΓòÉΓòÉΓòÉ 1.5. Strategic Positioning ΓòÉΓòÉΓòÉ
  300.  
  301. The OpenDoc Forms Framework has been welcomed by the OpenDoc toolkit 
  302. development teams for OS/2, AIX, Win32 (i.e., WordPerfect) and Apple. Of 
  303. course, these folks welcome all OpenDoc-related development. ;-)  . Apple and 
  304. we are working together with the goal of achieving similar or identical support 
  305. on all platforms. 
  306.  
  307. OpenDoc (and, by extension the OD Framework) are part of the IBM Open 
  308. Blueprint, as are the VA C++ OpenClass class libraries. 
  309.  
  310.  
  311. ΓòÉΓòÉΓòÉ 1.5.1. Positioning with Taligent ΓòÉΓòÉΓòÉ
  312.  
  313. OpenDoc, the OpenDoc Forms Framework and VA C++ OpenClass are all based on the 
  314. assumption that standard operating system facilities (e.g., PM, GPI, Motif) 
  315. should be used. On the other hand, the Taligent UI Frameworks are based on the 
  316. assumption of new system facilities from low-level drawing on up through 
  317. controls to the CHER compound document framework. There are advantages and 
  318. disadvantages to either choice. Use of standard system facilities usually 
  319. results in smaller size. Creating new facilities can allow new functionality to 
  320. be added. There are users who desire each choice to be available. 
  321.  
  322. Outside of the UI area, many of the classes in TalAE and in VA C++ are 
  323. complementary to each other. TalAE, for example, has file and licensing 
  324. frameworks which VA C++ does not. VA C++ has more robust collection classes the 
  325. those currently in TalAE and which can be used instead. 
  326.  
  327. In recognition of these facts, IBM is organizing a unified set of class 
  328. libraries and frameworks which allow developers to work in either "native" or 
  329. "TalAE" look and feel for current UI constructs, while continuing to enhance 
  330. both with new user interface capabilities. The "native" and "TalAE" classes 
  331. will not be identical. Along with the UI support, it will include a rich set of 
  332. general application programming frameworks. Existing work from both VA C++ (UI 
  333. classes, collection classes, OD Framework, etc.) and TalAE (Albert, UI 
  334. Framework, File, etc.) will be incorporated. 
  335.  
  336.  
  337. ΓòÉΓòÉΓòÉ 1.6. Key Design Assumptions ΓòÉΓòÉΓòÉ
  338.  
  339. The OpenDoc Forms Framework will be designed as a C++ framework. This choice is 
  340. based on the fact that C++ is the most widely-used OO language among our target 
  341. customers (and application developers as a whole), that C++ is the best 
  342. ANSI-standard language match (today) to underlying SOM/DSOM IDL and functions, 
  343. and that use of C++ will insure smooth interoperability with the rest of VA 
  344. C++. For those environments which support it (which should be all of them), key 
  345. classes within the OD Framework will also have IDL interfaces. 
  346.  
  347. The OpenClass support within the OD Framework is dependent on the OpenDoc 
  348. toolkit supporting ODFacets which are true HWNDs, at least as an option which 
  349. any part developer can choose to use. The this support is currently available 
  350. in the SOM version of the OpenDoc Toolkit for OS/2. Similar support exists or 
  351. is planned for the Windows and *IX versions of OpenDoc. This support is not 
  352. required on the Mac platform, due to window system differences. 
  353.  
  354. Within this document, "?"s indicate the idea, function, etc. is not yet well 
  355. understood. The number of "?"s roughly indicates the degree of uncertainty; 
  356. this is also roughly the uncertainty of this function making it into the final 
  357. OD Framework. Also, please mentally add one "?" to anything in this document 
  358. which has not been implemented yet. 
  359.  
  360.  
  361. ΓòÉΓòÉΓòÉ 2. Design Notes ΓòÉΓòÉΓòÉ
  362.  
  363. These design notes explain the overall intent of the various portions of the 
  364. OpenDoc Framework. This information can be thought of as "User's Guide" type 
  365. information, and will be one source of info for the eventual User's Guide. 
  366.  
  367.  
  368. ΓòÉΓòÉΓòÉ 2.1. Part Framework ΓòÉΓòÉΓòÉ
  369.  
  370. This framework is used to create OpenDoc parts whose needs with respect to the 
  371. data they contain and how they handle that data can be described by one of 
  372. several "recipies". The first such recipe is for parts who directly or 
  373. indirectly contain data in the form of records, files or byte streams with a 
  374. known format, or C/C++ data structures; the parts should also wish to portray 
  375. that data on the screen by using GUI controls (e.g., entry fields, buttons), 
  376. simple to medium-complexity drawn images, or a combination of the two. 
  377.  
  378.  
  379. ΓòÉΓòÉΓòÉ 2.1.1. ODFFormView ΓòÉΓòÉΓòÉ
  380.  
  381. This class is designed to help in writing parts which serve the same purpose 
  382. that panels and dialogs do in today's applications. You can think of, and 
  383. programatically use, an ODFFormView in roughly the same way you use an ICanvas 
  384. client of an IFrameWindow today. In OpenDoc, the document as a whole is your 
  385. "frame window"; ODFFormView is your piece of that document. You do not control 
  386. the presence/absence of most frame window decorations (system menu, min/max 
  387. buttons, menu, titlebar); you can interact with both title bar and menu (within 
  388. limits) as if they were your own BUT ONLY when OpenDoc permits you to - 
  389. typically when you are active. 
  390.  
  391. ODFFormView assumes it owns one ODFrame and one (for now) ODFacet, and hides 
  392. the functionality of these two in a single class for simplicity. We have 
  393. investigated an additional alternative as well; a separate ODFormViewFrame and 
  394. ODFormViewFacet, to allow one-to-many flexibility. However, it appears today 
  395. that this would not fit with current window system design, would complicate 
  396. things for most application developers, and we don't plan to do it at this 
  397. time. Standard OpenDoc views types of icon, mini-icon and thumbnail are not 
  398. (normally) handled via this class. They by default are data members of your 
  399. model class (see ODFFormPart), and we will manage and display them for you 
  400. (once you give us an icon or bitmap) automatically. We may be able to create a 
  401. thumbnail for you automatically (at your option, of course). 
  402.  
  403. Significant features include: 
  404.  
  405.    o  Existing IHandlers for HI events can be attached to an ODFFormView in the 
  406.       same way you attach them to IFrameWindows in today's OpenClass 
  407.       applications. 
  408.  
  409.    o  ODMouse events will be mapped to/from OpenClass IMouse*Handler functions 
  410.  
  411.    o  The OD document menu can be manipulated via classes similar to OpenClass 
  412.       IMenuBar, IMenuItem (we could move this function to the model object. Any 
  413.       comments? isn't there a need for unique menu items for each view of a 
  414.       model?) 
  415.  
  416.    o  Assistance to help the part save & restore the ODFFormView state (so a 
  417.       part can keep it's view(s) in the same state across sessions). This 
  418.       assistance will likely take the form of methods to streamout ODFFormView 
  419.       state data in a form suitable for storage in an OpenDoc PartData 
  420.       structure. The PartInfo data is data that a part can associate with a 
  421.       frame.  It should be used to save frame specific information such as the 
  422.       activation state of the frame, not part content (which is saved elsewhere 
  423.       by the part). 
  424.  
  425.  Methods identified so far are described in the reference section. 
  426.  
  427.  Also, all methods inherited from ICanvas and IWindow are supported with the 
  428.  exception of: 
  429.  
  430.    o  window-positioning methods will be limited by the part's containing part 
  431.  
  432.    o  setParent may be restricted or may not be supported 
  433.  
  434.    o  messageQueue won't work, as OpenDoc may support multiple message queues 
  435.  
  436.    o  sendEvent and postEvent may change, to add support for OpenDoc events 
  437.  
  438.    o  not sure what isPrimaryWindow method should return, will work with users 
  439.       to determine 
  440.  
  441.    o  styles clipToParent and synchPaint 
  442.  
  443.  
  444. ΓòÉΓòÉΓòÉ 2.1.2. ODFModel ΓòÉΓòÉΓòÉ
  445.  
  446. This is the part class most likely to be used in conjunction with an 
  447. ODFFormView; ODFModel can act as the model and ODFFormView can act as the view 
  448. in a classic "model/view" structure. ODFModel manages interactions with OpenDoc 
  449. and contains much function, but it does not itself contain your part-specific 
  450. model data. An ODFModel has (typically as data members, with corresponding 
  451. accessors) one or more model content objects derived from IStandardNotifier 
  452. (called IPart in the VA C++ BETA2 driver, not to be confused with ODPart - it 
  453. has nothing to do with it). The model content objects are always implemented by 
  454. part developers (there are no standard ones supplied by the OD Framework, as 
  455. they are unique to the part). The model content objects may be reused from 
  456. other parts that you have access to, or may be written specifically for this 
  457. part. Model content objects are classes containing purely data (no UI) and 
  458. methods to manipulate that data. These are like the classic objects often 
  459. discussed in introductory OO texts. 
  460.  
  461. The actual data "attributes" owned by or contained in a model content object 
  462. typically come from some outside source. They might be fields within a stream 
  463. of bytes which originated as a VSAM record, a CICS or IMS database record, etc. 
  464. They could be individual variables (or parts of a structure) fetched from a 
  465. relational database. They could be fields within a workstation file with some 
  466. kind of standard format known to your model content object. Model content 
  467. objects could also be produced by DAX relation database access support in VA 
  468. C++. The attributes may be stored back into the outside source after 
  469. modification; they could also be stored and retrieved directly in the OpenDoc 
  470. document as ODStorageUnit values. Or you may use a combination of these two. 
  471.  
  472. Besides the framework-supplied behavior built into ODFModel and the model 
  473. content objects, there is often part-specific behavior which applies to the 
  474. part as a whole (and is therefore not a method on a model content object). In 
  475. pre-OpenDoc OpenClass applications, ICommandHandlers are often the classes 
  476. which implement such methods. In the OpenDoc world, many (tho not all) of these 
  477. ICommandEvents are better handled by ODFModel, in keeping with the model/view 
  478. separation of OpenDoc. This is because they are conceptually similar to Apple 
  479. semantic events, which are also handled by the part. However, ICommandEvents 
  480. such as the standard "OK", "CANCEL", etc. should probably still be handled at 
  481. the view level, as they typically signal that some view data is ready to be 
  482. processed or should be discarded, etc. We are working on the best way to unify 
  483. these two concepts, and assist you to migrate your work with user-defined 
  484. ICommandEvents to OpenDoc semantic events where appropriate. See "Semantic 
  485. IHandlers" for more information. 
  486.  
  487. See the reference section for further details on this class. 
  488.  
  489.  
  490. ΓòÉΓòÉΓòÉ 2.1.3. ODFNotebook - an alternative view for ODFModels ΓòÉΓòÉΓòÉ
  491.  
  492. An earlier version of this document mentioned a separate class for a 
  493. notebook-based view. In our current design, you can now make an INotebook 
  494. object the client-child of an ODFFormView. You can then make connections 
  495. between controls on any page of the notebook and data in your model. This 
  496. yields the same functionality as we planned for the ODFNotebook class; 
  497. therefore, this class is dropped from the design. 
  498.  
  499.  
  500. ΓòÉΓòÉΓòÉ 2.1.4. Container support in the OpenDoc Framework ΓòÉΓòÉΓòÉ
  501.  
  502. (this section replaces ODFContainerView and ODFCollectionPart) 
  503.  
  504. Since the basic capability to contain parts within parts is integral to 
  505. OpenDoc, the ODFrk will enhance and extend that capability to move it more 
  506. toward the level of functionality in the current CUA control and OpenClass 
  507. IContainerControl et al framework. The major areas of extension include: 
  508.  
  509.    o  layout - built-in functions (virtual) which lay out the objects within a 
  510.       container. Layouts will either be on demand (i.e., like WPShell's 
  511.       "arrange" folder function), or will be automatic. "Automatic" means that 
  512.       the contained parts can be dragged in/out of the container, and an 
  513.       override will be available to allow part-specific logic to determine what 
  514.       cell/location the dropped part should go into. The drag/drop ability can 
  515.       be disabled if desired, of course, in which case only programmatic 
  516.       insertion of new parts will use the override. Additional details TBD as 
  517.       the work progresses. The design goal is to be able to use any of the 
  518.       standard layout canvases (i.e., ISetCanvas or IMultiCellCanvas), or any 
  519.       user-written layout canvases which are compatible with these. 
  520.  
  521.    o  scrolling - built-in functions (virtual) which assist in scrolling the 
  522.       contents of a container. Not sure yet what will happen when parts (i.e., 
  523.       their facets) scroll out of view and possibly get deleted. This will have 
  524.       to be integrated with OpenDoc transforms, which are the OpenDoc-y way to 
  525.       move parts; this may be a non-trivial design problem. As you can tell, 
  526.       there are many unknowns in scrolling support. 
  527.  
  528.    o  inserting/deleting items in a container - questions TBD 
  529.  
  530.    o  details view - this is even more of an unknown topic. The OpenDoc UI 
  531.       Guidelines has not settled yet on whether there should be a details view 
  532.       in an OpenDoc container. The main problem is that OpenDoc containers can 
  533.       hold heterogeneous parts, and CUA container details view was designed 
  534.       assuming homogenous objects. One possibility which is being at least 
  535.       thought of, tho not within current resources, is establishing a protocol 
  536.       whereby OpenDoc parts can act homogeneous by responding to a homogeneous 
  537.       set of functions (analogous to a semantic event suite, but purely for 
  538.       data access). If a part did not respond to a given function, the 
  539.       corresponding column for that part would be empty and non-editable. 
  540.       Again, this design and development work is not within current plan. Those 
  541.       who require a details view should contact us to levy requirements, so we 
  542.       can prioritize our work. 
  543.  
  544.  
  545. ΓòÉΓòÉΓòÉ 2.1.5. ODFContainerEditView (a.k.a. Tony's View) ΓòÉΓòÉΓòÉ
  546.  
  547. This was mentioned in prior versions of this document. We have determined that 
  548. this function is specific to non-OpenDoc UIs (including the interior of an 
  549. OpenDoc part, of course). It has been converted to a proposed feature of 
  550. OpenClass itself and has been removed from the OpenDoc Framework-specific 
  551. feature list. 
  552.  
  553.  
  554. ΓòÉΓòÉΓòÉ 2.1.6. Semantic IHandlers for use with ODF parts ΓòÉΓòÉΓòÉ
  555.  
  556. The semantic events supported by OpenDoc will (according to current specs) be 
  557. modeled after AppleEvents, and will be grouped into event suites. Current 
  558. design of OpenDoc will require that part developers code up a "case statement 
  559. from hell" (as one programmer called it) to look for and process all the events 
  560. in the suite. Based on our experience with OpenClass, developers prefer to 
  561. stick with the C++ model of overriding methods if and as necessary. That was 
  562. one of the reasons for the IHandler classes in OpenClass. 
  563.  
  564. The semantic IHandler classes will be specialized subclasses of IHandler (see 
  565. OpenClass documentation), tailored to each of the OD semantic event suites. 
  566. Each semantic IHandler will include as much default behavior as is possible, 
  567. with all methods being virtual so derived classes can override them if 
  568. necessary. We expect that many methods will be pure virtual because there is no 
  569. reasonable default behavior. Exactly how this works out must wait until the OD 
  570. Library supports semantic events and we can see exactly how the underlying 
  571. support works. 
  572.  
  573. These IHandler classes can be attached to OD Framework parts in the same way 
  574. the current OpenClass IHandlers can be attached to IWindows today. If a part 
  575. developer has created a part which should respond to a particular semantic 
  576. event suite, s/he can attach the appropriate semantic IHandler (after deriving 
  577. to add its part-specific processing for methods) in the part ctor. As in 
  578. OpenClass, semantic IHandlers can be shared by any number of parts. 
  579.  
  580. Additional details TBD as these classes are developed. 
  581.  
  582.  
  583. ΓòÉΓòÉΓòÉ 2.1.7. Storage Framework (to assist in using ODStorageUnit & related classes) ΓòÉΓòÉΓòÉ
  584.  
  585. The ODFrk storage framework has three main goals: 
  586.  
  587.    o  to simplify the programmer's job in storing and retrieving the persistant 
  588.       data of a part. If the programmer's needs are complex, this framework may 
  589.       not suffice and s/he will have to drop back to OpenDoc classes. The 
  590.       OpenDoc classes are well designed, albeit with some awkward syntax 
  591.       checking. 
  592.  
  593.    o  to allow each class in the ancestry of an object to contribute its own 
  594.       persistant data, and retrieve it as necessary. 
  595.  
  596.    o  to eliminate the awkward syntax checking, which (according to some OD 
  597.       part developers) can easily lead to unexpected and erroneous results. The 
  598.       goal is to do this without actually eliminating any function; we would 
  599.       simply do more thorough cross-checking of parameters prior to calling the 
  600.       underlying OpenDoc storage functions. 
  601.  
  602.  There are two basic flavors of persistance that we anticipate supporting. The 
  603.  first is the traditional "stream-in/stream-out" paradigm of persistance. This 
  604.  will use the de facto standard of ">>" and "<<" operators. The ODFramework 
  605.  will manage storing the resulting stream for a given part into the document 
  606.  (using ODStorageUnits under the covers) and retrieving it as necessary. 
  607.  
  608.  The second is similar but will use the OpenDoc storage unit paradigm. Current 
  609.  design thoughts are that this paradigm can be abstracted into a three-part key 
  610.  plus value. Each piece of data can be uniquely identified by: 
  611.  
  612.    o  what class is contributing it. This insures that each class in the 
  613.       ancestry of a part can contribute data and retrieve it. This key could be 
  614.       of type IString or perhaps an ODType (which is a char*). 
  615.  
  616.    o  the value name. This uniquely identified the item of data within the 
  617.       scope of this class. This key would be of type ODType. 
  618.  
  619.    o  the value type. This identifies one of perhaps several formats (e.g, 
  620.       ASCII text vs. rich text) in which the value is stored. This key would be 
  621.       of type ODValueType. 
  622.  The value itself is in the form of a length (ODULong or just unsigned long) 
  623.  and an ODValue (which is a void*). The major design decisions in this form of 
  624.  persistance support relate to performance overhead versus flexibility of data 
  625.  storage. The more elaborate the set of C++ objects used to store the data 
  626.  (e.g., many nested ODStorageUnits), the worse the performance. How good or bad 
  627.  it is remains TBD. 
  628.  
  629.  
  630. ΓòÉΓòÉΓòÉ 2.2. Enhancements to OpenClass in support of OD Framework ΓòÉΓòÉΓòÉ
  631.  
  632.    o  Non-rectangular IMultiCell canvas class ??? 
  633.  
  634.       The goal here is to help with dynamic layout within a non-rectangular 
  635.       area. This assumes the OpenDoc Library achieves some form of 
  636.       non-rectangular HWND, 
  637.  
  638.    o  asStream method, stream ctor (may use <<, >> operators) 
  639.  
  640.       Selected OpenClass classes will have a method asStream which returns all 
  641.       necessary data to reconstruct the object later. The returned data will be 
  642.       in an IString (which can be used as if it were an ODValue), ready to 
  643.       stuff into an ODStorageUnit. These OpenClass classes will also have a new 
  644.       ctor which takes the output of asStream() and reconstructs the object. 
  645.  
  646.       The goal here is to help a part save away the state of it's associated 
  647.       view; the assumption is that the view (frame/facet) does the work, using 
  648.       the proposed new OpenClass methods of asStream as an aid. It then passes 
  649.       the stream of data to the part, who saves it along with the part-specific 
  650.       data in its storage unit(s).  The reverse is done when a part is 
  651.       initialized or opened, using the new OpenClass stream ctors as an aid. 
  652.       Since, in OpenDoc, the part is the key to persistance (not frames or 
  653.       facets), this data passing between part and frame/facet must be coded by 
  654.       the part developer. Also, whether or not it makes sense to restore the 
  655.       state of a view (e.g., the current scroll position of an MLE) depends on 
  656.       whether the model data portrayed in that MLE has changed since it was 
  657.       last displayed. This also will ultimately need to be part-specific logic, 
  658.       done with the assistance of the OD Framework. 
  659.  
  660.       Note that it is up to the part to swizzle any references to OpenClass 
  661.       objects as needed ("swizzle" is the act of finding a reference to an 
  662.       object which was formerly at one memory location and is now at another - 
  663.       i.e., you reconstructed it from an ODStorageUnit value stream - and 
  664.       changing the reference to point to the new location). The ctor does no 
  665.       content validity checking, so the caller must insure that the proper 
  666.       string is passed in. The ctor will check for a signature substring which 
  667.       was placed in the stream when it was returned by asStream (e.g., "IBM 
  668.       OpenClass IEntryField"). 
  669.  
  670.       Classes will be selected based on how they would contribute to a part 
  671.       saving the state of its view(s), so that same part can reconstruct the 
  672.       view later. 
  673.  
  674.    o  Possible extensions to asStream 
  675.  
  676.         -  declare asStream a standard method, implemented uniquely for every 
  677.            class, which recursively runs imbedded and/or composed objects of 
  678.            the receiver, returning a concatinated stream. Reverse also, which 
  679.            implies a method which takes a stream and parses it to set data in 
  680.            existing objects (similar to the stream ctor on an individual 
  681.            OpenClass class above). This method would only be needed when the 
  682.            receiver contains imbedded or composed (imbedded reference to) 
  683.            objects. The implementation of this method is of course the 
  684.            responsibility of the part developer. 
  685.  
  686.         -  add support in OpenClass implementations of asStream to recursively 
  687.            run children of receiver IWindow, returning a concatinated stream. 
  688.            Reverse also, which calls stream ctors to recreate children. This 
  689.            method could probably be implemented completely by OpenClass, since 
  690.            we know how to find all children of an IWindow. It is not yet clear 
  691.            whether an entire panel or container can be recreated this way, nor 
  692.            whether it is really of any usefulness if it can be done (i.e., only 
  693.            the particular view may know what to do). 
  694.  
  695.    o  Drag/drop - ????mappable onto OpenDoc d/d classes???? 
  696.  
  697.    o  Addition of ODStorageUnit structure to the general drag/drop and 
  698.       clipboard support, so it can be used in data transfer even outside of 
  699.       OpenDoc parts. 
  700.  
  701.  
  702. ΓòÉΓòÉΓòÉ 2.3. Test Stuff ΓòÉΓòÉΓòÉ
  703.  
  704. This will include a shell, a containing part and a non-containing part. The 
  705. purpose of the shell and the containing part is to allow a unit-test-level 
  706. validation of customer-written parts, with emphasis on their relation to the 
  707. shell or part which contains them. The purpose of the containing part and 
  708. non-containing part is to allow a unit-test-level validation of 
  709. customer-written shells and containing parts, with emphasis on their relation 
  710. to the parts they contain. The parts will not only read their state from a 
  711. storage unit, but will write back to it as well (this has been shown to 
  712. exercise different code in containing parts). If the OpenDoc toolkit includes a 
  713. generic shell as planned, then we will not include one. 
  714.  
  715. The source code for these test classes will be included, to make it easier to 
  716. trace into and thru them. It is likely that the test stuff can also serve the 
  717. role of sample source code (see below). 
  718.  
  719. Further details after we have done some part and shell testing ourselves, and 
  720. probably after we get some user feedback. 
  721.  
  722.  
  723. ΓòÉΓòÉΓòÉ 2.4. Sample Source Code ΓòÉΓòÉΓòÉ
  724.  
  725. Samples of at least one non-containing part, one containing part and one shell 
  726. will be included. Samples will use OD Framework classes as applicable. Samples 
  727. will be well commented. Samples will attempt to actually apply to a real-world 
  728. situation. The "already-implemented parts" will be considered as a source for 
  729. these samples. 
  730.  
  731. Further details after most of the OD Framework is completed.