ETL patterns/strategies/templates/"best practices"

The OWB Users Guide is good for defining the OWB operators, but I'm having some difficulty deciding how to best combine those operators to formulate a mapping. I'm hoping someone will be able to point me to documentation that will fill the gap. It wouldn't necessarily need to be OWB specific.
Some example questions that I'm hoping an "ETL patterns" book or document would address:
1. High level implementation decisions (Is the source data staged locally? How/when are the changed records identified?)
2. Options for locally staging data.
3. Options for implementing a Type I/II/III SCD.
4. Options for implementing a cube.
I was able to find "Slowly Changing Dimensions with Oracle9i Warehouse Builder" (http://otn.oracle.com/sample_code/products/warehouse/files/SCDWhitePaper.zip) that gave a lot of guidance on the SCD issues. The Type II SCD mapping presented in that document uses 10 operators. I never would have been able to formulate that on my own based on just reading the OWB documentation.
Thanks,
Brian

Hi Torsten
I assume you want to follow the framework described in the SCD Whitepaper.
Where do I have to add the unbound table?You will need to insert data into a table, and not a dimension. More than this, since you have a need for using a sequence to feed the items with a surrogate key, there comes a matching problem (this is described in the whitepaper).
The table must be added as the final destination of the data, after the last union (as shown in the Whitepaper).
Is it an OWB table in the target module where the target dimension is located? Or do I have to create it in the database using sql*plus?It is neither, read the next question
Why do you call it "unbound"? Because it is not a dimension or fact-table?The reason I call it unbound is that OWB does not have a "true" match between the object in the mapping and the object in the database. There is probable more to it than this, but let's just say, that it could be compared to some temporary table or something - usually it is not good to use unbound tables, but since we edit the "bound name" to an existing repository table, it's no problem - but be aware, that you will get a warning ever after...
But is it true that I don't need the target dimension in this mapping now?No, you should use it as in the whitepaper, since you need to check if there is a trigger column that should instantiate a new record, or, if an insert or an update should be required.
Or how do I connect the unbound table to the target mapping?You change the "bound name" (right-click the table, and choose "properties" and change the bound name to the name of the dimension).
Torsten, generally you should follow the whitepaper, except for the last table/dimension :)
Don't sweat if your stuck - I've clicked a gazillion times in OWB, in order to make this work - ask again, if I don't make sence :)
Yours
Kim

Similar Messages

  • Is dao pattern is the best practice in projects

    let me know if dao pattern is the best followed in all almost all the
    projects though finding alternatives to it. please clarify this for me and also i do want to know the best practices of the industry in using design patterns.

    There is no 'best' pattern. It is just all abouthow
    and where to apply them. This is very true,but these are common
    design patterns used in industry for standard
    problems.
    ost of the time patterns are used not for some
    special reason but for more manageability and ease of
    change.So if you have a small application than it's
    ok but if you are working on big application which
    are needed to be maintained over a time and changes
    are frequent.Than its better to start learning about
    patterns because their will be problems which right
    now you can't see but eventually you have to take
    care of.That is either incorrect or phrased poorly.
    Patterns come about because someone analyzes different existing code bases and notes that there are similarities in the way they are built.
    It isn't that they are easier to maintain but rather that because the pattern has similarities it is easier to comprehend, understand the limitations, understand the possible related patterns, etc. That might lead to easier maintainance but it isn't the reason. The reason is because, if and only if, the requirements/architecture lead to a situation where that pattern could be properly used.

  • Facelets template best practices

    Hi,
    As I gain more experience in JSF, I am doing things a bit differently. When I first started I was binding all components to a backing bean and using the component binding in code for various things such as multi component validation. Later I used only value bindings, and had a lot of configuration in the template:
    <select id="country" jsfc="h:selectOneMenu" value="#{user.countryCode}" validator="#{someBackingBean.country_validate}" required="true" requiredMessage="#{theme_messages['field.country']} #{theme_messages['word.required']}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>I modified that example from real code, so it might make more sense to use a converter than a validator for a country code... But anyway, there is a lot of per component configuration in my templates. When I create multiple themes/skins, this stuff has to be duplicated. When I make changes to the application, all themes have to be updated.
    I think Wicket encourages you to bind all components to the "backing bean" and do your configuration in code. Your equivalent template would look something like this:
    <select id="country" jsfc="h:selectOneMenu" binding="#{someBackingBean.countryDropDown}">
        <f:selectItems value="#{someBackingBean.countryItems}"/>
    </select>You might even leave the f:selectItems out of the template. The only challenge I foresee with this is that using JSF APIs to resolve EL to add a validator, converter, action, or whatever else into the component from code is very verbose and difficult. I asked the JSF expert group to enhance the APIs to make it easier to do everything in code, but it did not make the JSF 2.0 spec. They will consider it in a future release: [JSF API Ticket 363|https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=363]
    Can anyone share their experiences with facelets template complexities and best practices they have learned? If you do most of your component configuration in code, how much of it do you allow in the template? Do you allow value bindings? The f:selectItems tag?
    Thanks,
    Ryan

    If you want full understand facelets , Install NetBeans6.1, install facelets plugin for it, here isa link
    http://armarz.ifolder.ru/9150024. if you want more about facelets read this book -
    http://armarz.ifolder.ru/8396066 .
    In net beans the first create web/facelets application, create facelets template, and client pages for it.
    here is a template example, it hase top, left and content, also in each part inserted one xhtml file for defaults views(logo, logout...)
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/css/tableLayout.css" rel="stylesheet" type="text/css" />
        <link href="/css/index.css" rel="stylesheet" type="text/css" />
        <title>My Template</title>
      </head>
      <body>
        <table cellpadding="0"  cellspacing="0" border="0" width="100%">
          <tr>
            <td id="top" valign="top" align="left" colspan="2" >
              <ui:insert name="top"></ui:insert>
              <ui:include src="top.xhtml"></ui:include>         
            </td>
          </tr>
          <tr>
            <h:panelGroup rendered ="#{,,;,;,;,;,;,;l}">                 
              <td id="left" valign="top" align="left" width="150px">
                <ui:insert name="left"></ui:insert>
                <ui:include src="left.xhtml"></ui:include>           
              </td>
            </h:panelGroup>
            <h:panelGroup rendered ="#{kjkjkjkjkjkkk}">                 
              <td>
                <table width="150px" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td>
                      <f:verbatim> </f:verbatim>
                    </td>
                  </tr>
                </table>
              </td>
            </h:panelGroup>
            <td id="content" valign="top" align="left">
              <ui:insert name="content"></ui:insert>
              <ui:include src="content.xhtml"></ui:include>
            </td>
          </tr>
        </table>
      </body>
    </html>And here is a client page.
    <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                    xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:h="http://java.sun.com/jsf/html"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:c="http://java.sun.com/jsp/jstl/core"
                    template="/layout/main.xhtml">////refer to main.xhtml template
      <ui:define name="content">
        <f:view>
          <h:form id ="login">
            <table width="200" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td align="left" colspan="2" class="red" style="padding:0 0 5px 0" >                                               
                  </td>
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.username}" />
                  </td>
                  <td>
                    <h:inputText styleClass="input_text" id="loginname" value="#{Login.username}" required ="true"
                                 requiredMessage="#{log.required}">                  
                    </h:inputText>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="error" for="loginname" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td class="form_text">
                    <h:outputText styleclass="form_text" value="#{bean.pass}" />
                  </td>
                  <td >
                    <h:inputSecret styleClass="input_text" id="password" value="#{Login.password}" required ="true"
                                   requiredMessage="#{log.passlen}">                      
                    </h:inputSecret>
                  </td>
                </tr>
                <tr>
                  <td></td>
                  <td><h:message id="fail" for="password" styleClass="validate" /></td>           
                </tr>
                <tr>
                  <td>
                    <f:verbatim> </f:verbatim>
                  </td>
                </tr>           
                <tr>
                  <td></td>
                  <td align="right">
                    <h:commandButton styleClass="submit" style="float:right;" value="#{bean.login}" action="#{Login.loggedIn}"  >
                    </h:commandButton>
                  </td>
                </tr>
              </h:panelGroup>
            </table>
          </h:form>
        </f:view>
      </ui:define>
    </ui:composition>is this useful?:)

  • IOS Template - Best Practices

    Hello,
    Does anyone have a standard template that they apply to all ios switches/routers/waps? I'm looking for some best practices for ios configs. For example, which services do you disable on all devices, what snmp settings, etc..
    Thanks!

    Hi,
    See the below link :
    http://www.cymru.com/Documents/secure-ios-template.html
    Regards,
    Mehrdad

  • Template(best practice) for Switch ports

    Hi,
    Looking for best practice advice on switchport config for client facing ports.
    We recently had an incident where an access port turned into a trunk(trunk mode desirable), which we obviously do not want to happen again!
    For Access Ports(First two should stop DTP I'm hoping?):
    switchport mode access
    switchport nonegotiate
    storm-control broadcast level 20.00
    storm-control action trap
    no cdp enable
    spanning-tree portfast
    spanning-tree bpdufilter enable
    spanning-tree guard root
    switchport port-security maximum 10
    switchport port-security
    switchport port-security aging time 10
    And for trunk ports to clients:
    switchport trunk encapsulation dot1q
    switchport mode trunk
    switchport trunk allowed vlan xxx,xxx
    switchport nonegotiate
    storm-control broadcast level 20.00
    storm-control action trap
    no cdp enable
    spanning-tree bpdufilter enable
    spanning-tree guard root
    Thanks in advance.

    Look here: http://www.cisco.com/en/US/docs/solutions/Enterprise/Branch/E_B_SDC1.html#wp68930
    That's Cisco's branch design doc from Design Zone.
    For those that want a fast answer:
    For VoIP phones and PC:
    interface GigabitEthernet1/0/6 - interface GigabitEthernet1/0/23
    description phone with PC connected to phone
    switchport access vlan 102
    switchport mode access
    switchport voice vlan 101
    switchport port-security maximum 2
    switchport port-security
    switchport port-security aging time 2
    switchport port-security violation restrict
    switchport port-security aging type inactivity
    ip arp inspection limit rate 100
    load-interval 30
    srr-queue bandwidth share 1 70 25 5
    srr-queue bandwidth shape 3 0 0 0
    priority-queue out
    mls qos trust device cisco-phone
    spanning-tree portfast
    spanning-tree bpduguard enable
    ip verify source
    ip dhcp snooping limit rate 100
    For data only:
    interface GigabitEthernet1/0/24- interface GigabitEthernet1/0/28
    description DATA only ports
    switchport access vlan 102
    switchport mode access
    switchport port-security maximum 3
    switchport port-security
    switchport port-security aging time 2
    switchport port-security violation restrict
    switchport port-security aging type inactivity
    ip arp inspection limit rate 100
    load-interval 30
    srr-queue bandwidth share 1 70 25 5
    srr-queue bandwidth shape 3 0 0 0
    priority-queue out
    spanning-tree portfast
    spanning-tree bpduguard enable
    ip verify source
    ip dhcp snooping limit rate 100
    That's Cisco's recommendation.
    And just my opinion is that I'd much rather shut a port down that receives a BPDU than just filter it. Reason being that you can't trust users not to do something stupid, like hook two switch ports to the same switch they're using at their desk in an effort to "make the network faster". For two, if someone malicious plugs in a switch into your environment, shut the port down. . .that makes it hard for them to do anything malicious.

  • ASA5545x basic config template Best Practice

    Hello
    I am in the process of making some major WAN/Data Center network changes. As part of that, i am installing
    dual ASA5545x's in each DC (2) for redundancy. Please advise on what is best practice for basic configuration on these devices.

    If you want a good overview guide, there's a Cisco Validated Design (CVD) that covers an ASA setup. See this link.
    At the same time, firewall configuration and what you setup depends a lot on your policy and what you're using the firewall for - Internet edge, DMZ, milti-tenant, inter-department, remote access VPN (client-based and clientless), site to site VPN, etc.
    Each has numerous options and no prescriptive guide covers them all.

  • ETL processing Performance and best practices

    I have been tasked with enhancing an existing ETL process. The process includes dumping data from a flat file to staging tables and process records from the initial tables to the permanent table. The first step, extracting data from flat file to staging
    tables is done by Biztalk, no problems here. The second part, processing records from staging tables and updating/inserting permanent tables is done in .Net. I find this process inefficient and prone to deadlocks because the code loads the data from the initial
    tables(using stored procs) and loops through each record in .net and makes several subsequent calls to stored procedures to process data and then updates the record. I see a variety of problems here, the process is very chatty with the database which is a
    big red flag. I need some opinions from ETL experts, so that I can convince my co-workers that this is not the best solution.
    Anonymous

    I'm not going to call myself an ETL expert, but you are right on the money that this is not an efficient way to work with the data. Indeed very chatty. Once you have the data in SQL Server - keep it there. (Well, if you are interacting with other data
    source, it's a different game.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Best practice for Active Directory User Templates regarding Distribution Lists

    Hello All
    I am looking to implement Active Directory User templates for each department in the company to make the process of creating user accounts for new employees easier. Currently when a user is created a current user's Active directory account is copied, but
    this has led to problems with new employees being added to groups which they should not be a part of.
    I have attempted to implement this in the past but ran into an issue regarding Distribution Lists. I would like to set up template users with all group memberships that are needed for the department, including distribution lists. Previously I set this up
    but received complaints from users who would send e-mail to distribution lists the template accounts were members of.
    When sending an e-mail to the distribution list with a member template user, users received an error because the template account does not have an e-mail address.
    What is the best practice regarding template user accounts as it pertains to distribution lists? It seems like I will have to create a mailbox for each template user but I can't help but feel there is a better way to avoid this problem. If a mailbox is created
    for each template user, it will prevent the error messages users were receiving, but messages will simply build up in these mailboxes. I could set a rule for each one that deletes messages, but again I feel like there is a better way which I haven't thought
    of.
    Has anyone come up with a better method of doing this?
    Thank you

    You can just add arbitrary email (not a mailbox) to all your templates and it should solve the problem with errors when sending emails to distribution lists.
    If you want to further simplify your user creation process you can have a look at Adaxes (consider it's a third-party app). If you want to use templates, it gives you a slightly better way to do that (http://www.adaxes.com/tutorials_WebInterfaceCustomization_AllowUsingTemplatesForUserCreation.htm)
    and it also can automatically perform tasks such as mailbox creation for newly created users (http://www.adaxes.com/tutorials_AutomatingDailyTasks_AutomateExchangeMailboxesCreationForNewUsers.htm).
    Alternatively you can abandon templates at all and use customizable condition-based rules to automatically perform all the needed tasks on user creation such as OU allocation, group membership assignment, mailbox creation, home folder creation, etc. based on
    the factors you predefine for them.

  • Captivate 4.0 - Need best practice tips on panning, templates, resolution, etc.

    Hi all,
    Been searching all over in case someone has already published Best Practices for Captivate 4.0 (particularly the new/enhanced features), but coming up empty. My client's in house graphics person has been tasked with creating a template for us to use for a number of software simulations. He's running in to these challenges:
    - Our SWF needs to be 800 x 600 and he created the template for this size, but the app won't fit.
    - He's found the panning feature to produce very choppy, disappointing results. Tips?
    - His suggestion is we capture at 1024 x 768, then resize to 800 x 600, then copy/paste the slides into his 800 x 600 template. Would we be better off recreating the template at 1024 x 768 and not resizing until the final output is generated for each tutorial? His concern is that our template will then become larger, making it harder for us to send back and forth as changes are made, etc.
    Any other suggestions for how to deal with the resolution issue, how best to take advantage of templates, etc.?
    Thanks,
    Katie Carver
    Senior Technical Writer
    Docs-to-You, LLC

    Hi there
    In my own opinion, Panning is a nice attempt, but just doesn't cut the mustard. It's nowhere near as good as the panning one sees with Camtasia Studio.
    I might suggest combining Camtasia with Captivate for the ultimate development set. There are aspects Captivate shines in when compared with Camtasia, and there are aspects Camtasia shines in when compared with Captivate. So I say if you can afford it, go for it!
    Now I know that both packages are sort of pricey and not everyone can afford both. In that case you might want to try Jing, which is free to use. I've not looked very deeply at it, but it may offer some of what Camtasia does. You could then use that for your panning and enhance Captivate that way.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Design Patterns/Best Practices etc...

    fellow WLI gurus,
    I am looking for design patterns/best practices especially in EAI / WLI.
    Books ? Links ?
    With patterns/best practices I mean f.i.
    * When to use asynchronous/synchronous application view calls
    * where to do validation (if your connecting 2 EIS, both EIS, only in WLI,
    * what if an EIS is unavailable? How to handle this in your workflow?
    * performance issues
    Anyone want to share his/her thoughts on this ?
    Kris

              Hi.
              I recently bought WROX Press book Professional J2EE EAI, which discusses Enterprise
              Integration. Maybe not on a Design Pattern-level (if there is one), but it gave
              me a good overview and helped me make some desig decisions. I´m not sure if its
              technical enough for those used to such decisions, but it proved useful to me.
              http://www.wrox.com/ACON11.asp?WROXEMPTOKEN=87620ZUwNF3Eaw3YLdhXRpuVzK&ISBN=186100544X
              HTH
              Oskar
              

  • Code Set pattern or best practice?

    Hi all,
    I have what I would have thought to be a common problem: the best way to model and implement an organization's code sets. I've Googled, and I've forumed - without success.
    The problem domain is this: I'm redeveloping an existing application, which currently represents it's vast array of code sets using a seperate table for each set. There are currently 180+ of these tables. Not a very elegant approach at present. The majority of these code sets are what I would class as "simple" - a numeric value associated with a textual description - eg 1 = male, 2 = female, or 1 "drinks excessively", 2 "drinks sometimes" ... etc. Most of these will just be used to associate a value with a combo box selected value.
    There are also what I would class as "complex" code sets, which may have 1..n attributes (ie not just a numeric and text value pair). An example of this (not overly complex) is zip code, which has a unique identifier, the zip code itself (which may change - hence the id), a locality description, and a state value.
    Is there a "best practice" approach or pattern which outlines the most efficient way of implementing such code sets? I need to consider performance vs the ability to update the code set values, as some of them may change from time to time without notice at the discretion of government departments.
    I had considered hard coding, creating classes to represent each one, holding them in xml files, storing in the database etc, but it would seem that making the structure generic enough to cater to varying numbers of attributes and their associated datatypes will be at the cost of performance.
    Any suggestions would be greatly appreciated.
    Thanks.
    Paul C.

    Hi Saish,
    Thanks for your response. Yes, this approach is what
    I had considered - I'll be using Hibernate so these
    values will be cached etc.
    I guess my main concern is reducing the huge number
    of very small tables in use. I was thinking about
    this some more, and for the simple tables was
    thinking of 2 tables: 1 (eg "CODE_SET") to describe
    the code set (or ref table etc) in question, the
    second to hold the values. This way 80 odd tables
    would be reduced to 2. Not sure what's best here -
    simpler ER diagram or more performance!Tables...
    Enumeration
    - EnumerationId
    - EnumerationName
    - EnumerationAbbreviation
    EnumerationValues
    - EnumerationId
    - ValueIndex
    - ValueName
    - ValueAbbreviation
    The above allows the names to change.
    You can add a delete flag if values might be deleted but old records need to be maintianed.
    Convention: In the above I specifically name the second table with a plural because it holds a collection of sets (plural) rather than a single set.
    In the first table the id is the key. In the second the id and the index are the key. The ids are unique (of course). The enumeration name should be unique in the first table. In the second table the EnumerationId and value name should be unique.
    Conversely you might choose to base uniqueness on the abbreviation rather than the name.
    The Name vs Abbreviation are used for reporting/display purposes (long name versus short name).
    It is likely that for display/report purposes you will have to deal with each of the sets uniquely rather than a group. Ideally (strongly urged) you should create something that autogenerates a java enumeration (specific with 1.5 or general with 1.4) that uses the id values and perhaps the indexes as the values and the names are generated from the abbreviations. This should also generate the database load table for the values. Obviously going forward care must be taken in how this is modified.

  • Best practice - creating functions in data model vs. rtf template

    Just a general question. Is there a best practice of creating functions in the data model vs. creating the functions in the data template?
    For example, is it more efficient to sum two fields in my SQL query or to create a function in the template that sums the two fields? Just curious if there is any performance benefit of one over the other.
    Thanks!

    anything you push it to DB(SQL), will be the faster than processing outside.

  • Design Pattern / Best Practice Question

    Hi,
    I have been using Flex for a while now, but there is a
    scenario which I still have not found a solution I'm entirely happy
    with. I'm wondering if anyone else out there might have suggestions
    on a design pattern or best practice.
    Suppose I have a view which depends on model data which
    resides in some back end systems. That model data may or may not
    have been loaded (e.g. via a web service or remote object call) at
    the time the view is displayed.
    I don't know if the user will ever visit this part of the
    application so I would prefer to defer retrieval of the data until
    the user actually navigates to this view. Or I want to retrieve the
    data each time the view is displayed because the data is dynamic
    and could change between one presentation of the view and the next.
    Because the data comes from several systems, I cannot simply
    make one service call and display the view when it completes and
    all the data is available. I need to call several services which
    could complete in any order but I only want to display my view
    after I know all of them have completed and all of the model data
    is available. Otherwise, I can present the user an incomplete view
    (e.g. some combo boxes are empty until the corresponding service
    call to get the data completes).
    The solution I like best so far is to dispatch a single event
    (I am using Cairngorm) handled by a single command which acts as
    the caller and responder for all of the services. This command then
    remembers which responses it has received and dispatches another
    event to navigate to the view once all the results have returned.
    If the services being called are used in different
    combinations on different screens, this results in proliferation of
    events and commands. An event and command for each service and
    additional events and commands to bundle the services and the
    handling of their responses in the right combinations for each of
    the views.
    Another approach is to have some helper class listen for all
    of the model changes and only display the view when the model
    enters some state that is acceptable. It is sometimes difficult to
    determine just by looking at the model whether it is in the right
    state (e.g. how can I tell that a collection is the new collection
    that should just have been requested versus an old one lingering
    from a previous call). The logic required can get kind of
    convoluted and brittle.
    Basically, all of the solutions I've come up with so far seem
    less than ideal and a little hackish. I keep thinking there is some
    elegant solution out there that I am just missing ... but so far,
    no luck finding it. Thoughts?
    Thanks.
    Bill

    i think a service class is right - to coordinate your calls.
    i would have 1 event per call (so you could listen to individual
    responses if you wanted to).
    then i would use a flag. if you want to check for staleness,
    you would probably want two objects to map your service flag to
    lastRequested and lastCompleted. when you check, check if it's
    completed, and if it's not stale and that your lastRequested is
    less than lastCompleted (meaning that you're not currently waiting,
    i.e. you've returned since making a request). then make the request
    and update your lastRequested.
    here's a snippet of what i mean.
    ./paul
    public static const SVC1_LOADED:int = 1;
    public static const SVC2_LOADED:int = 2;
    public static const SVC3_LOADED:int = 4;
    public static const SVCALL_LOADED:int = 7;
    private var completedFlag:int = 0;
    then each call would have it's own callback.
    private function onSvc1Complete( evt:Event):void {
    completedFlag |= SVC1_LOADED;
    lastCompleted[ SVC1_LOADED ] = getTimer();
    dispatchEvent( new Event("svc1complete") );
    checkDone();
    private function checkDone():void{
    if( completedFlag == SVCALL_LOADED )
    dispatchEvent(new Event( "allLoaded" ));

  • Single Template support multiple formats of data - Best practice

    I have a requirement to create Invoices in a single PDF file.
    The invoices would belong to different categories - DebitNotes, CreditNotes, Invoices with single product,
    invoices with multiple product etc.. each will have a different format.
    I initially thought the right way to create a single pdf is to use a
    single Template, with different formats of invoice seperated by conditional formatting.
    The see from reading the blogs that the other way is to create sub-template
    (one each for credit, invoice, Debits etc) and plug it into the
    main template.
    I would like to know what is the best practice that is followed in the above case.
    If I were to use sub-templates how would I make it possible to view the invoice stub only on the first page.
    Since the data from the sub-template would go to multiple pages.
    Is adding the stub data to the footer the only option. Please can someone share with me an example
    template.
    Thanks
    Shandrila

    Shandrila
    If the various document types are of a single XML format ie the same structure with just document type differences and the layout format is the same just the data different or very minimal changes that can be handled with conditional formatting then I think it would be OK to have a single report for all document types.
    If the data structures are very different and the layout requirements are different then I would create separate reports for each document type. If the data structure is teh same but the document type layouts are different then go for separate layout formats.
    Going down the sub template path can be a little difficult, you might end up with a very complex set of templates that are almost as much of a pain to manage as the original report you are trying to replace.
    Here's the best scenario IMHO ...
    1 data extract, parameterized to pull invoice, CM, etc data based on the user request
    Multiple layout templates, 1 for each document type. If you have common layout sections across the layouts e.g address blocks then break them out as sub template components that all of the layouts can access and share.
    Multiple report definitions, sharing the data extract with a single layout template associated with them
    cheers
    Tim

  • Best practices for JavaFX architecture and patterns?

    Hi,
    I want to write reusable, easy to maintain JavaFX code for a larger UI project and wonder what are the best practices doing so.
    1) Are there preferred UI patterns? MVC, MVP, Presentation Model, ...?
    2) Does it make sense to use FXML to separate View from Logic? Or should I use 2-3 Java classes instead (one for View, one for Logic, one for Domain Model, depending on the pattern)
    3) How to organize all the views? Should I use Dependency Injection? Or Singletons for each view? Spring or Guice framework, if at all?
    Currently I use singletons for most views, so that I can use them from anywhere in my application. If a window is closed and opened again, I use the same instance for that, which still resists in memory.
    For patterns, I try to lean on Presentation Model, since this is what I know from Flex development: Having a View layer, which contains all the UI stuff and an abstract view layer, which holds properties, that describe the View, e.g. submitButtonDisabledProperty. The View knows the abstract layer (Presentation Model), but not vice versa and the UI elements are bound to its properties.
    I am unsure if this is appropriate for JavaFX, too (for Flex or Silverlight it is).
    What are your recommendations / experiences for large UI projects?

    You are correct that in 'pure' MVP the View should know as little about it's presenter implementation as possible. The view should just notify one or more 'listeners' that something has happened.
    You can use event listeners for this, but I would highly recommend not exposing your Control-specific GUI events and instead create your own. So for example, don't expose ActionEvent or MouseEvent as these expose too much detail about your View's implementation, instead create 'semantic' events, so you might have something like 'sayHelloRequested' or 'printOptionSelected' (whatever naming system you want). This hides how the option is implemented, so you might have a 'print' button, a 'print' menu option, a CTRL+P print shortcut, or a double tap anywhere on your screen to print. The listener knows only that the view thinks 'print was requested by the user' - decoupling achieved.
    Once you start doing this however you end up with an explosion of event listener interfaces. So say a view has 10 callbacks it wants to notify about, then you end up with 10 interfaces, and if you're being really pure you also end up with 10 'Event' beans (or DTOs) to encapsulate the details of that event. It starts to get ungainly even for a semi-purist like me. So the logical progression from there is usually just to define all 10 callbacks in one interface and call it something like MyViewListener.
    There are two common ways to implement listeners, the traditional way is to allow an arbitrary number of listeners to be added. Whereas another option is to allow only a single listener to be added. In JFX you will notice that Button for example has a setOnAction() method not a addOnAction() method - it allows a single event handler only and let's face it this is generally fine in 95% of cases. For the remaining 5% you can just write your own aggregate event handler that dispatches the event to multiple listeners.
    So if we go down the road of single event listeners, using an interface for all of the callbacks and not bothering with full 'Event' objects, you end up with something like this:
    public interface MyViewListener {
        void printRequested();
        void doSomething(int someParam);   
        void doSomethingElse(String someOtherParam);   
    }And if you look closely at the 'Purist' option in my MVP pattern where I define interfaces for everything, then you will see that this is pretty much the exact interface I've created for the 'Presenter'. You could just as easily rename this interface to MyViewListener in this pattern and have the same outcome.
    So to wrap all that up, yes, the Presenter should be decoupled and I highly favour the 'purist' option in my blog and would definitely use it if FXML didn't dictate a impure design pattern (there are some ongoing discussions about this on the OpenJFX discussion group). And, yes, my 'purist' option could be even more pure if you went for the full-blown event callback model and if you go down that road you will have an extremely clean architecture but also an extremely large code-base - totally your call whether it's worth it.
    It's also worth remembering in all this, that there are a lot of people from a lot of different backgrounds using JFX and some people hate (passionately) even my semi-pure option - especially those coming from other, less heavy-weight languages. They just don't get why you wouldn't build it all into one class and reduce the overheads. So what you have in my blog is my thoughts on it, other people will most definitely differ. I'm a big fan of developer's choice, and that's why I did the smorgasboard approach even though I personally would never use some of those implementations.
    Also this video on GWT is an awesome reference on GUI design patterns: http://www.youtube.com/watch?v=PDuhR18-EdM
    JFX Flow draws a lot from GWT as I think it is a very clean architecture (just such a shame that they put all that effort into hiding the horrid, sordid mess that is the web+html+css, instead of making something proper, like JFX).
    Hope that helps,
    zonski

Maybe you are looking for

  • I have a strane error message when syncing with itunes + i cannot access it

    Hi all, this is only place i thought of that might know these problems: 1. I cannot access itunes store from itunes - it just says loading... and doesn't load anything 2. I have an error: " ITunes cannot sync photos to the iPhone because the folder "

  • Mozilla Addons site does not load correctly in IE - impala-min.js

    It seems that the Mozilla Addons website does not load correctly any more in IE and the errors below are generated on XP (IE8), Windows 7 (IE9) and Windows 8 (IE10). It seems to be a JavaScript error from the messages from webpage error popup. Browsi

  • Call function with select options problem

    Hi there dear SDN community members. I have got an strange ABAP problem wich function call. Code1 CLEAR ls_selec . ls_selec-iobjnm = '9AMATNR' . ls_selec-sign   = 'I' .                                     ls_selec-option = 'EQ' . ls_selec-low    = '0

  • Ora-00907 error

    My query is like this :-- select * from incident inc inner join injuryincident inj on inc.docid=inj.docid where inc.incdate = (1=decode( :date1 ,null,1,0) or inc.incdate= :date1) while if it is other field except date it is working fine. Kindly sugge

  • Logo in sap smart forms

    hi,   i have one logo and i want to insert that logo into the smart forms so can u suggest me the steps to insert that logo in smart forms. regards, kamal