Best practise - Domain model design

Hello forum,
we're writing an application divided into three sub projects where one of the sub projects will be realized using J2EE and the other two sub projects are stand alone fat client applications realized using Swing. So that's the background...
And now the questions:
After doing some research on J2EE best practise topics I found the TransferObject-Pattern (http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html) which we certainly want to apply to the J2EE sub project and to one of the standalone client applications also. To avoid code duplications I like the "Entity Inherits Transfer Object Strategy" approach outlined in the document referenced above. But why does the entity bean inherit from the transfer object class and not vice versa? In my opinion the tranfer object adds additional functionality (coarse grained getData()-method) to the class and isn't it a design goal in OO languages that the class that extends a base class has more functionality than the base class?
For the standalone application we want to use a similar approach and the first idea is to desgin the entitys and let the TO classes extend these entitys.
When I get it right the basic idea behind all of these design schemes is the "Proxy pattern" but when I design it using the previously mentioned way (Entity <-- EntityTO) I will have a very mighty prox beeing able to execute all operations the base class is able to execute.
Any tips and comments welcome!
Thanks in advance!
Henning

Hello Kaj,
at first - thanks for your fast response and sorry for coming back to this topic so late.
After reading a bit more on patterns in general what about avoiding inheritance
completely and using the proxy pattern instead (As explained eg.
http://www.javaworld.com/javaworld/jw-02-2002/jw-0222-designpatterns.html here) - so moving the design to a "has a" relationship rather than an "is a" relationship.
In the previous post you said that the client shouldn't be aware that there are entity beans and therefore the mentioned implementation was chosen - But if I implement it vice versa (Entity is base class, TO extends entity) and do not expose any of the methods of the entity bean I would achieve the same effect, or not? Clients are only able to work with the TOs.
I have some headaches implementing it in SUN's recommended way because of the Serialization support necessary within the TOs. Implemented in SUN's way the Entity bean would also have serialization support which isn't necessary because they're persisted using Hibernate.
Thanks in advance
Henning

Similar Messages

  • Best practise BW Query design for Crystal Reports integration

    Hi all,
    I am looking for a guide on best practices when designing a BW Query to be used as data foundation for a Crystal Report.
    The scenario is that I am responsible for developing the Crystal Reports part, but not the BW Query part, therefore I would like to provide a list of best practises to the person who is responsible for the Query, this way make sure that the integration will work as good as possible. The setup is of course using BO Integration Kit for SAP.
    An example is how to use authorization variables in the query to provide data security. This is just one example, there are problably a number of other things to be aware of. A document containing suggestions for best practices is what I am looking for, or if the document does not exist, input to what should be on such a list.
    Thank you in advance.
    Regards,
    Rasmus

    Hi Rasmus,
    in regards to the Best Practices for Crystal Reports you can leverage all the knowledge you have on the Query Design today already. if you not the person for designing the query I think it is important to make sure people designing the queries do understand how Crystal Reports is leveraging the elements from the BI Query.
    /people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
    You should try to put as much as possible into the BI query from the logic point of view.
    and you can also build common BI queries - there is no need to build a BI query for each report.
    ingo

  • PetStore doc, domain model, design decisions, etc

    Hello,
    I've downloaded the PetStore from http://java.sun.com/developer/releases/petstore/ . I installed it and it was ok.
    As it is an example project, I would like to get detailed documentation about this. I mean if a project like this starts what kind of decisions we have, what is the domain model look like, why?, etc.. So a complate description of the project.
    I have checked the web with google but I have not find anything related to this. Would you help me, please?

    Any one know where we can get Business Model, Domain Model and Object Model for Pet store app?
    Thanks.

  • Data Modeling Best Practise

    Hi Friends !
    When designing a system, what are the best practise for Data Modeling? Please share few tips. Thanks.
    With Regards
    Rekha

    Hi,
    below link can be usefull ,
    BI Data Modeling and Frontend Design
    Also you can get the best practive(config guide) from service.sap.com.
    Best practicess
    http://help.sap.com/bestpractices
    http://help.sap.com/bp_bblibrary/600/html/
    Regards,
    Satya

  • Best practises Subversion and Data modeler

    hello, i'am looking for some best practises regarding subversion and datamodeler.
    A team of 10 analysts create several releases of our product over time.
    Within one release you'll find several change requests.
    The application itself contains about 700tables so performance is important.
    I want to establish a lean working method were analyst can focus on their job - design.
    Till now I think to create one trunk containing the db model let's call it v17.00
    An analyst could create their designs in separate projects grouped by change request eg CR1234.
    When development starts i would compare the trunk model with their change request to generated the alter script.
    Afterwards i would import their design CR1234 into the trunk.
    Note : it's possible that a change request got cancelled - that's why i opt for a design per change request.
    This way of working seems much leaner than the setup of branches and merging.
    My opinion, being a novice subversion user, is that setting up branches and merging is "more complex" and might causes frustration for designers.
    Anyone having a simular setup or advice ?
    kr
    chris

    Hi Sam,
    Let me add my two cents here, when speaking about MAN deployments the name of the game is MPLS, so I guess you are using the same on your Cat 6500s and connecting your customers on 3550s using Vlans.
    Regarding your questions:
    a) Upgrading Ethernet to L3 for traffic shaping: This is basically done at 3550, so I suppose that's what you intend to do, plus you will be letting Spokes talk to only Hub site, so inter Vlan, atleast between Hub and each spoke will be required, hence inter valn routing. Other way is to configure P2P circuits between Hub site with Vlan mapping (per spoke) and Spoke sites with Port mapping, in this scenario Inter Vlan routing is not a necessity.
    b) Security: This depends on what exact architecure you have deployed, in my case I have simply installed a Gateway router with BGP peering with PEs, a separate VRF alongwith redistribution does the trick.
    Hope I addresses the query correctly, let me know if that helped..
    Cheers
    ~sultan

  • Process modelling : Design patterns & Best Practices

    Hi
    Could some one please suggest/share any technical information or documents tha's related to 'Process modelling - Design Patterns & Best Practices'
    Thanks in Advance
    Santosh K.
    Edited by: Santosh539 on Jul 29, 2010 4:07 PM

    Hi Santosh,
    There is no specific site with all the information you asked for.
    But I think these links would be helpful...
    on Work Flow Patterns: http://www.workflowpatterns.com/
    on BPM Service Pattern: http://enterprisearchitecture.nih.gov/ArchLib/AT/TA/WorkflowServicePattern.htm
    HTH
    Sharma

  • SDO_PC, multiple SRIDs - best practise for data model?

    Hi,
    im using UTM and I am getting data covering two zones.
    all my existing data is from zone A.
    tables:
    pointcloud
    pointcloud_blk
    now im getting data with very few points from zone A and most points from zone B. It was agreed that the data delivery will be in SRID for zone B.
    so I tested whether this would work. I had two pointclouds. One with SRID A, another with SRID B. As soon as I put SRID B pointcloud inside, I could NO LONGER QUERY pointcloud with SRID A.
    So it seems to be necessary to use at least another pointcloud_blk, f.e. pointcloud_blk_[srid].
    Question: does another pointcloud_blk for each SRID suffice or do i also need a pointcloud table per SRID. the pointcloud table seems only interesting due to its EXTENT column. But on the other hand this could be queried by "function", since there are only 10 or so records (pointclouds) inside.
    PLZ share your best practises. What does work, what not.

    It is necessary to have one pointcloud_blk table for each SRID since there is a spatial index on that table.
    As for the PointCloud table itself, it is up to you. You can have pointclouds with different SRIDs in that table.
    But if you want to create spatial index on it, you have to use some function based index so that the index
    sees one SRID for the table.
    Since this table usually does not have many rows, this should work fine with one table for different SRIDs.
    siva

  • Best practice for GSS design

    Please advice as to what records needs to go in Public DNS server in a scenario where i have url say x.y.com which is listed in the Domain List of the GSS-P, sot that GSS-P or GSS-S can handout the respective external VIP to the clients requesting the url in case one of the GSS/site (GSS_P and GSS-S) goes unavailable
    Please also specify the communication path of a client accessing x.y.com.
    Advice the best practice
    Thanks in advance
    ~EM

    Hi,
    I am new to GSS. I would appreciate if some can help me with the deisgn. I want to know if I need to put the GSS inline after the inernet facing firewall and befor the ACE module. OR use it as one arm mode. Trying to figure out the best fit in the design.
    FWSM1 >>> GSS >>> ACE
    or
    just put the GSS as one arm mode between the FWSM1 >>> ACE
                                                                                                         |
                                                                                                    GSS
    Thanks in advance,
    Nav

  • What is the best MVC approach for designing Swing application

    Hi...
    I am designing an client/server application. In this I am using java swing for the front-end development. We decided on using MVC approach for the front-end design. I found that there are more than one approachs for designing in MVC.
    Which is the best way to model. To create your model taking View into consideration or Creating the Model taking the tables into consideration.
    Can anybody give help me out in this this is urgent. Thanks
    sai

    I'm not sure what you are asking, so I'll just ramble a bit and hope it helps.
    Create your model taking the view and the data into consideration. :-)
    Design a class to hold instances of the rows in your database that correspond (more or less) to the structure of the data. Add any needed methods to that data object to support the data that you might need for the view.
    For example, suppose your database stores a name in two columns (firstname and lastname). You pull that data from the database into a collection of Person objects into your model. Your Person class has two fields (and set/get methods) to hold that data. Now, in your view, you want to display the name as one string, so add a method to the Person object to get the full name (just by concatenating the two data elements).
    You have to take everything into consideration. How you are going to view the data as well as how it might be structured.

  • Best Practises for Email Addresses?

    Hi Guys,
    Are there any best practise guides / documents / etc. for configuring user's E-mail addresses? We have a large turnaround of users and obviously sometimes they have the same name as previous/current employees (we
    do not delete any old accounts / mailboxes.) My question is whether or not it is OK to use numbers in an email address (i.e. [email protected])?
    Thanks
    Stephen

    Hi,
    It's OK to use numbers in an email address.
    The format of email addresses is local-part@domain where the local-part may be up to 64 characters long and the domain name may have a maximum of 253 characters.
    The local-part of the email address may use any of these ASCII characters RFC 5322
    Uppercase and lowercase English letters (a–z, A–Z) (ASCII: 65-90, 97-122)
    Digits 0 to 9 (ASCII: 48-57)
    Characters !#$%&'*+-/=?^_`{|}~ (ASCII: 33, 35-39, 42, 43, 45, 47, 61, 63, 94-96, 123-126)
    Character . (dot, period, full stop) (ASCII: 46) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively (e.g. John..[email protected] is not allowed.).
    Special characters are allowed with restrictions. They are:
           Space and "(),:;<>@[\] (ASCII: 32, 34, 40, 41, 44, 58, 59, 60, 62, 64, 91-93)
           The restrictions for special characters are that they must only be used when contained between quotation marks, and that 3 of them (The space, backslash \ and quotation mark " (ASCII: 32, 92, 34)) must also
    be preceded by a backslash \ (e.g. "\ \\\"").
    For more information, please refer to this similar thread.
    https://social.technet.microsoft.com/Forums/exchange/en-US/69f393aa-d555-4f8f-bb16-c636a129fc25/what-are-valid-and-invalid-email-address-characters
    Best Regards.

  • Liquid: What are the suggested best practises for multiple languages?

    Right now we are doing this:
    {% if globals.country == "EU" %}
    {% assign login = "Log in" %}
    {% assign userName = "Username" %}
    {% assign password = "Password" %}
    {% assign rememberMe = "Remember me?" %}
    {% assign confirmLogout = "You are now logged out!" %}
    {% endif %}
    {{login}} would output "Log in"
    Another thought would be to have it all in a string with commas and split it, like this:
    {% if globals.country == "EU" %}
    {% assign strings = "Log in;Username;Password;Remember me?;You are now logged out!" %}
    {% assign lang = strings | split: ";" %}
    {% endif %}
    {{lang[0]}} Would output "Log in".
    What are the best practises here?
    I would imagine either being slower than the other as well, maybe Adobe have some input?

    Hi Machinette,
    Use your first option in my opinion:
    A webapp where each item would contain a field for each language. i.e.  item 1 name login; en -> Log in; es -> Iniciar sesion. item 2 name logout; en -> Log iout; es -> Cerrar sesion....
    Here's an example of my multilingual web apps:
    FAQs:
    EN Question
    JP Question
    EN Answer
    JP Answer
    Testimonials:
    Title-NZ
    Title-JP
    Quote-Preview-NZ
    Quote-Preview-JP
    Quote-Full-JP
    How did you hear about us:
    Title_En
    Title_JP
    Multilingual Text:
    Text_En
    Text JP
    As you can see above, the items in the web apps form the different multilingual text - the different FAQs, the different Testimonials, the different Multilingual Text. The domain name needs to determine the language. Very important. And use a globals.site.countryCode to determine the language.
    The key is when you want to reference that item. I think Abhishek was onto it using JSON files, easy to select the text you want. If JSON files don't work, here's what you do:
    {module_webapps id="Multilingual Text" filter="i" itemId="4951580"}<!-- login -->
    {module_webapps id="Multilingual Text" filter="i" itemId="4951611"}<!-- Try Lesson 1 -->
    {module_webapps id="Multilingual Text" filter="i" itemId="4951612"}<!-- Join for free -->
    Else place everything into a collection, but I have hundreds of items, so I don't want to collect too many records. Only the ones I need per page.
    Finally, here's my code for one of the web apps, FAQs.
    {% assign countrycode = globals.site.countryCode -%}
    {% case countrycode -%}
    {% when 'JP' -%}
    <div class="faq-question">
        <h4>{{this['JP Question']}}</h4>
        <div class="faq-details">
            <div class="answer"><p>{{this['JP Answer']}}</p></div>
        </div>
    </div>
    {% else -%}
    <div class="faq-question">
        <h4>{{this['EN Question']}}</h4>
        <div class="faq-details">
            <div class="answer"><p>{{this['EN Answer']}}</p></div>
        </div>
    </div>
    {% endcase -%}
    http://www.samandmelenglish.com/faqs
    http://www.samandmelenglish.jp/faqs
    Hope this helps.
    Stephen - Fuel Design

  • Best practises for install BPEL

    We are planning to start to use BPEL, but we are having problems finding any documents on best practise on the install of the product.
    1. Sould we install in Lunix or Windows.
    2. In prodcution we will need fault tollerance can BPEL do this well.
    3. Does the BPEL monitoring work well.
    We want to install this right first time rather than just install from the CD's then try to fix the issues we wrong design later, we have been burnt by do this way before.
    Regards
    Sean Bell

    Hi,
    1) install it on the platform you know best. because
    2) you can only get fault tolerance or high availability on a platform you know how to administer.
    for HA look at
    http://www.oracle.com/technology/products/ias/bpel/pdf/bpel-admin-webinar.pdf
    3) BAM is the word you are searching for:
    http://www.oracle.com/technology/products/integration/bam/index.html

  • SQL protection - best practises

    I need some help to understand the difference between Express full backup vs. syncronization for SQL protection. I have always thought that the SQL logs were truncated during a Express full backup, but have read several articles that claim the opposite.
    What is best practise in order to protect SQL DB's in general? And which recovery models should be used (full/simple)?
    /Amir

    Please read below
    Backing up SQL with DPM
    Why DPM 2010 and SQL are Better Together?
    SQL Logs not getting truncated ?
    (comments)
    SCDPM: Backup SQL and Truncate SQL Logs
    Have a nice day !!!
    DPM 2012 R2: Remove Recovery Points

  • Regarding best practise

    Hi ,
    Is it best practise to do all filed validation using java...or could field validation be done using java beans in JSP ?
    Thanks
    Vivek

    2. There's nothing wrong with what you have there,
    this is a custom tag library.Yes, for small applications, that would suffice. Remember that you are going away from an MVC model while using jstl sql tags.
    Consider having a dao layer if your app is medium/big or destined to grow with time.
    You simply cannot maintain all the complexities in your application (and by extrapolation, your queries) - read
    1. http://www.onjava.com/pub/a/onjava/2002/03/13/jsp.html?page=2
    2. http://today.java.net/pub/a/today/2003/11/27/jstl2.html
    There's some good points for and against here
    1. http://weblogs.java.net/blog/johnm/archive/2003/11/the_community_i.html
    There's some support here
    1. http://acroyear.blog-city.com/a_reasonable_reason_for_the_sql_tags.htm
    2. file:///C:/Documents%20and%20Settings/ramprasadmr/Local%20Settings/Temporary%20Internet%20Files/Content.IE5/WL2JCD6Z/300,42,SQL tags: the debate
    cheers,
    ram.

  • Wats the best practise for performance

    Hi all,
    In my out line i have 15 dimensions and for one dimension i have 39000 members so wat is the best practise for performance , If we have more dimensions and more meebers is there any problem for performance
    so wat is the best practise for dimensions and members??
    Thanks in advance??

    If it is ASO application it is not a problem.
    If it is a BSO application surely it will hit the performance.
    More dimensions will create performance issues.
    If the said 39000 members dimension is a Flat dimension. It will be another issue.
    If BSO is obvious try to split into two models.
    Create intermediate groupings for the Filat dimension.

Maybe you are looking for