Best practice for moving portal solution using content db from UAT to PROD

Hi,
 Would like to know can we backup the database from UAT env. and restore the  same to  PROD. if all of my functionality is working fine in UAT env.
I have event receivers[web level features], site collection level features,custom web parts, custom permissions, saved site templates, custom discussion forums etc.
Assuming that I have my custom solution deployed on the Prod. which will activate features for those web parts and my custom application page features.
Is there any issues I can anticipate in PROD.env, if i perform this activity.
or
Is this approach not recommended by Microsoft ? if yes , whats the best approach for deploying portal solution in PROD?
Should I create teh web application, site collections, everything in PROD.from scratch.
any links regarding this approach and the bext practices / helpful info is appreciated.

Thanks Trveor for the reply.
so, I can go ahead and  create the web applns, site collections and  deploy my web parts, item event receivers, appln pages and my timer jobs in UAT and take the  backup of the same and restore it in PROD env.
But, i ahve a doubt here , as I have few site pages created it in my site template and when i take the backupof this web apppln's content db --- [ i think i can take the backup of web appln content db through power shell] ---- 
will the site pages also be part of this backup?
I had some experience in prev.version of SP, wherein i have few site pages and saved site template I have taken the backup of the  web appln and  restore it in another farm and  associate the restored content db to the
newly created web appln in the targeted farm.
But when I navigated to thsoe restored site pages, it gave me "resource not found /file not found " error.
 I had  deployed the custom web parts as a custom wsp and added into those site pages.
and it failed to load those web parts UI.
I was not sute whether this happened because of backup or restore from source  spfarm to the  targeted sp farm .

Similar Messages

  • Business Package for SAP Best Practices for Enterprise Portal

    Hi,
    We are implementing EP for ECC 5.0 and we have to web enable some FI transactions like FB50/fb60 etc. We want to use standard business package for this. The only business package that caters this requirement is "Business Package for SAP Best Practices for Enterprise Portal 60.1". When i checked the data source for this business package, the specification is for "SAP R/3 4.6B and above". Does this work for ECC 5.0 as well? In general does the R/3 specific business packages work for ECC versions? Please let me know. Thanks for the help.  I promise rewards.
    Regards
    Hari

    Hari,
    When you download the BPO via Portal Content Portfolio,
    each bpo has additional information on the release.
    For example for the one you are inquiring about - Business Package for SAP Best Practices for Enterprise Portal, the additional release information is provided on the following links;
    https://www2.iviewstudio.com/sdn/info/index.cfm?action=faqs&part=#QSR03
    https://www2.iviewstudio.com/sdn/detail_view/index.cfm?action=package_information&CatalogSet=SAP%20Content&ItemID=17212&CFID=7544845&CFTOKEN=99283970
    Regards,
    James

  • Best Practice For Referencing JPEG Path Using Servlets To Prepare HTML IMG

    I am migrating a legacy app from Tomcat 5 to Weblogic 11g (10.3). In the legacy app, servlets write HTML that uses relative paths for <IMG src="../images/img.jpeg"> and <script src="../javascript/js.js">. The app is deployed as an exploded archive. Unfortunately, none of the images or script are being loaded. I've tried using http://serverIP:portNum/contextName/images/img.jpeg"> but it doesn't work. I've also checked to get the name of the context in the servlet and it's the root context. Could it have something to do with me having to append .war onto the application when I deploy it? Would it help if I deployed it as a war inside an ear? Basically, I want some best practices for doing this on Weblogic 11g. There are a lot of images and javascript and I'm really hoping they don't have to be inserted using ClassLoader.getResourceAsStream()... thank you.

    Best Practice:
    1. Move Static files like images, css, java scripts to a web server infrastructure if available.
    2. If this is not your case, then please send your directory information how you have packaged your EAR. I can advice :)

  • Best practice for moving from a G5 to a new Mac with SL

    I am receiving my new iMac today (27") and am very excited
    However I want to move over using the best practices to assure that I remain excited and not frustrated
    My initial thoughts are to boot it up and doe the initial set up - to move my iPhoto library over and to use migration assistance to move the rest of my data files
    Then to install all of the extra software that I can find the packages for from the original installation disks
    And then finally to use migration assistant again to move over any software that I can not find original disks for (I've moved from Mac to Mac to Mac over and over and some of the software goes back to OS 9 (and won't run anymore I guess)
    Is this a good way
    OR
    will I mess up doing it this way
    OR
    am I spending far too much time worrying about moving old problems over and would be better off to just turn MA loose and let it do its thing form the beginning?
    BTW - mail crashes a lot on my existing system - pretty much everything else seems ok - except iPhoto is slow - hoping that the new Intel dual core will help that
    LN

    Migration Assistant is not a general file moving tool. MA will migrate your Applications and Home folders transferring only your third-party applications. MA will transfer any application support folders required by your applications, your preferences, and network setup. You do not have a choice of what will be migrated other than the above. MA cannot determine whether anything transferred is compatible with Snow Leopard. I recommend you look at the following:
    A Basic Guide for Migrating to Intel-Macs
    If you are migrating a PowerPC system (G3, G4, or G5) to an Intel-Mac be careful what you migrate. Keep in mind that some items that may get transferred will not work on Intel machines and may end up causing your computer's operating system to malfunction.
    Rosetta supports "software that runs on the PowerPC G3, G4, or G5 processor that are built for Mac OS X". This excludes the items that are not universal binaries or simply will not work in Rosetta:
    Classic Environment, and subsequently any Mac OS 9 or earlier applications
    Screensavers written for the PowerPC
    System Preference add-ons
    All Unsanity Haxies
    Browser and other plug-ins
    Contextual Menu Items
    Applications which specifically require the PowerPC G5
    Kernel extensions
    Java applications with JNI (PowerPC) libraries
    See also What Can Be Translated by Rosetta.
    In addition to the above you could also have problems with migrated cache files and/or cache files containing code that is incompatible.
    If you migrate a user folder that contains any of these items, you may find that your Intel-Mac is malfunctioning. It would be wise to take care when migrating your systems from a PowerPC platform to an Intel-Mac platform to assure that you do not migrate these incompatible items.
    If you have problems with applications not working, then completely uninstall said application and reinstall it from scratch. Take great care with Java applications and Java-based Peer-to-Peer applications. Many Java apps will not work on Intel-Macs as they are currently compiled. As of this time Limewire, Cabos, and Acquisition are available as universal binaries. Do not install browser plug-ins such as Flash or Shockwave from downloaded installers unless they are universal binaries. The version of OS X installed on your Intel-Mac comes with special compatible versions of Flash and Shockwave plug-ins for use with your browser.
    The same problem will exist for any hardware drivers such as mouse software unless the drivers have been compiled as universal binaries. For third-party mice the current choices are USB Overdrive or SteerMouse. Contact the developer or manufacturer of your third-party mouse software to find out when a universal binary version will be available.
    Also be careful with some backup utilities and third-party disk repair utilities. Disk Warrior 4.1, TechTool Pro 4.6.1, SuperDuper 2.5, and Drive Genius 2.0.2 work properly on Intel-Macs with Leopard. The same caution may apply to the many "maintenance" utilities that have not yet been converted to universal binaries. Leopard Cache Cleaner, Onyx, TinkerTool System, and Cocktail are now compatible with Leopard.
    Before migrating or installing software on your Intel-Mac check MacFixit's Rosetta Compatibility Index.
    Additional links that will be helpful to new Intel-Mac users:
    Intel In Macs
    Apple Guide to Universal Applications
    MacInTouch List of Compatible Universal Binaries
    MacInTouch List of Rosetta Compatible Applications
    MacUpdate List of Intel-Compatible Software
    Transferring data with Setup Assistant - Migration Assistant FAQ
    Because Migration Assistant isn't the ideal way to migrate from PowerPC to Intel Macs, using Target Disk Mode, copying the critical contents to CD and DVD, an external hard drive, or networking
    will work better when moving from PowerPC to Intel Macs. The initial section below discusses Target Disk Mode. It is then followed by a section which discusses networking with Macs that lack Firewire.
    If both computers support the use of Firewire then you can use the following instructions:
    1. Repair the hard drive and permissions using Disk Utility.
    2. Backup your data. This is vitally important in case you make a mistake or there's some other problem.
    3. Connect a Firewire cable between your old Mac and your new Intel Mac.
    4. Startup your old Mac in Target Disk Mode.
    5. Startup your new Mac for the first time, go through the setup and registration screens, but do NOT migrate data over. Get to your desktop on the new Mac without migrating any new data over.
    If you are not able to use a Firewire connection (for example you have a Late 2008 MacBook that only supports USB:)
    1. Set up a local home network: Creating a small Ethernet Network.
    2. If you have a MacBook Air or Late 2008 MacBook see the following:
    MacBook (13-inch, Aluminum, Late 2008) and MacBook Pro (15-inch, Late 2008)- Migration Tips and Tricks;
    MacBook (13-inch, Aluminum, Late 2008) and MacBook Pro (15-inch, Late 2008)- What to do if migration is unsuccessful;
    MacBook Air- Migration Tips and Tricks;
    MacBook Air- Remote Disc, Migration, or Remote Install Mac OS X and wireless 802.11n networks.
    Copy the following items from your old Mac to the new Mac:
    In your /Home/ folder: Documents, Movies, Music, Pictures, and Sites folders.
    In your /Home/Library/ folder:
    /Home/Library/Application Support/AddressBook (copy the whole folder)
    /Home/Library/Application Support/iCal (copy the whole folder)
    Also in /Home/Library/Application Support (copy whatever else you need including folders for any third-party applications)
    /Home/Library/Keychains (copy the whole folder)
    /Home/Library/Mail (copy the whole folder)
    /Home/Library/Preferences/ (copy the whole folder)
    /Home /Library/Calendars (copy the whole folder)
    /Home /Library/iTunes (copy the whole folder)
    /Home /Library/Safari (copy the whole folder)
    If you want cookies:
    /Home/Library/Cookies/Cookies.plist
    /Home/Library/Application Support/WebFoundation/HTTPCookies.plist
    For Entourage users:
    Entourage is in /Home/Documents/Microsoft User Data
    Also in /Home/Library/Preferences/Microsoft
    Credit goes to Macjack for this information.
    If you need to transfer data for other applications please ask the vendor or ask in the Discussions where specific applications store their data.
    5. Once you have transferred what you need restart the new Mac and test to make sure the contents are there for each of the applications.
    Written by Kappy with additional contributions from a brody.
    Revised 1/6/2009
    In general you are better off reinstalling any third-party software that is PPC-only. Otherwise update your software so it's compatible with Snow Leopard.
    Do not transfer any OS 9 software because it's unsupported. You can transfer documents you want to keep.
    Buy an external hard drive to use for backup.

  • Best practice for Video over IP using ISDN WAN

    I am looking for the best practice to ensure that the WAN has suffient active ISDN channels to support the video conference connection.
    Reliance on load threshold either -
    Takes to long for the ISDN calls to establish causing the problems for video setup
    - or is too fast to place additional ISDN calls when only data is using the line
    What I need is for the ISDN calls to be pre-established just prior to the video call. Have done this in the past with the "ppp multilink links minimum commmand but this manual intervention isn't the preferred option in this case
    thanks

    This method is as secure as the password: an attacker can see
    the hashed value, and you must assume that they know what has been
    hashed, with what algorithm. Therefore, the challenge in attacking
    this system is simply to hash lots of passwords until you get one
    that gives the same value. Rainbow tables may make this easier than
    you assume.
    Why not use SSL to send the login request? That encrypts the
    entire conversation, making snooping pointless.
    You should still MD5 the password so you don't have to store
    it unencrypted on the server, but that's a side issue.

  • Best practice for weblogic portal

    While creating a portal application , what is the best approach, use jsp or jsr-168 portlets and minimum proprietary tags from weblogic or should use all those custom controls and stuff from weblogic

    Hi,
    There is no such best practices given by the Bea Systems.But if you are creating a weblogic portal application and you want to have portlet rendered on the portal,the pageFlow portlet is the best way to render your web application on the portal.There are advantanges of the pageFlow:
    (1)Easy in development of web application
    (2)Graphical view of your navigation
    (3)J2EE Resources can be accessed easily with use of controls.
    (4)Can use Behive Netui tags which is having lots of tags which can be used without writing complex logic.
    (5)Complex j2ee logic can be written in the form of Annotation which can help the developer to write complex j2ee coding
    Thx

  • Best Practices for SAP, connections to use without BW

    Hello,
    Could you help me to solve a problem with Best Practices 4.31?
    SAP Integration Kit XI 3.1 SP3 has 4 options  :
    u2022     SAP Infosets
    u2022     SAP BW MDX Query
    u2022     SAP BW Query
    u2022     Table, cluster ou function
    When I install SAP Integration Kit XI 3.1 SP3 for serveur, I have one additional service in my CCM,  BW Publisher 12. This service is from SAP BW.
    From the article /people/glen.spalding/blog/2010/08/04/the-full-montypart-13bobj-integration-kit-sp3-install-configure and installation guide for IIntegration Kit XI 3.1 SP3 I've learned that I need SAP BW to use Infosets dans Crystal Reports.
    Dans notre installation nous avons
    u2022     SAP ERP système without BW,
    u2022     BOBJ Server Setup,
    u2022     BOBJ Edge Integration Kit for SAP XI 3.1 SP3 server
    u2022     BOBJ Client Setup,
    u2022     BOBJ Edge Integration Kit for SAP XI 3.1 SP3 client
    u2022     Crystal Reports 2008
    u2022     Xcelsius 2008
    I've got Best Practices reports via « Table, cluster ou fonction » connection. There is no problem with this type of connection !
    I suppose that « SAP Infosets », « SAP BW MDX Query » et « SAP BW Query » connections should be used with SAP BW.
    Could you give me your opinion about this question?
    Thanks beforehand,
    Malika

    Hi,
    the InfoSets are a connection option for the classic InfoSets in an ERP system. Would suggest you take a look at the user guide for the SAP Integration Kit
    ingo

  • Best practice for moving images between projects?

    Hey all,
    I have a project that has an album inside of it. I want to move the album, containing all of the photographs to a new project. If I drag the photos individually to the new project it moves them successfully although they now don't belong to an album in their new project. If I drag the album itself it moves the album and photographs but leaves the photos in the original project as well.
    Does anyone have some best practice ideas for this scenario?
    Thanks in advance for any help!

    As you have discovered if the drop target is the project the images move projects. If the drop target is an album the images show up in the album but do not actually move anywhere. Moving albums does nothing to move masters. So...
    Select all of the images in the album. Drag them to the new project and then drag the album to the new project. Simple enough.
    RB

  • Best Practice for serving static files (gif, css, js) from front web server

    I am working on optimization of portal performance by moving static files (gif, css, js) to my front web server (apache) for WLP 10 portal application. I end up with moving whole "framework" folder of the portal WebContent to file system served by apache web server (the one which hosts WLS plugin pointing to my WLP cluster). I use <LocationMatch> directives for that:
    Alias /portalapp/framework "/somewhere/servedbyapache/docs/framework"
    <Directory "/somewhere/servedbyapache/docs/framework">
    <FilesMatch "\.(jsp|jspx|layout|shell|theme|xml)$">
    Order allow,deny
    Deny from all
    </FilesMatch>
    </Directory>
    <LocationMatch "/partalapp(?!/framework)">
         SetHandler weblogic-handler
         WLCookieName MYPORTAL
    </LocationMatch>
    So, now browser gets all static files from apache insted of the app server. However, there are several files from bighorn L&F, which are located in the WLP shared lib: skins/bighorn/ window.css, wsrp.css, menu.css, general.css, colors.css; skins/bighorn/borderless/window.css; skeletons/bighorn/js/ util.js, buttons.js; skeleton/bighorn/css/layout.css
    I have to merge these files into the project and physically move them into apache served file system to make mentioned above apache configuration works.
    However, this approach makes me exposed bunch of framework resources, which I do not to intend to change and they should not be change (only custom.css is the place to make custom changes to the bighorn skin). Which is obviously not very elegant solution. The other approach would be intend to create more elaborate expression for LocationMatch (I am not sure it's entirely possible giving location of these shared resources). More radical move - stop using bighorn and create totally custom L&F (skin, skeleton) - which is quire a lot of work (plus - bighorn is working just fine for us).
    I am wondering what is the "Best Practice Approach" approach recommended by Oracle/BEA - giving the fact that I want to serve all static files from my front end apache server instead fo WLS app server.
    Thanks,
    Oleg.

    Oleg,
    you might want to have a look at the official WLP performance support pattern (Metalink DocID 761001.1 ) , which contains a section about "Configuring a Fronting Web Server Serving WebLogic Portal 8.1 Static Artifacts ".
    It was written for WLP 8.1, but most of the settings / recommendations should also to WLP 10.
    --Stefan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SX20 and SX10 best practices for small conference rooms using built in Display Speakers

    Hi, 
    Im planning to deploy some small meeting rooms using SX10 and SX20 codecs, I was wondering if someone could give me some key points to consider: 
    1. Display recommendation, nice built in speakers, low delay (goog performance with codec echo canceller) I wish to use a 60 - 70 inch Led TV (not yet defined which brand and model)  I would like to receive some feedback about nice performance displays with nice audio and echo cancellation performance based on your experience. 
    2. What would be the drawbacks of using SX10 and SX20 in larger meeting rooms maybe 10 or 12 people?
    3. When to use external microphone? or when is recommended to use only  internal microphone?
    Thanks in advance for your help. 
    Best Regards,  have a nice day!

    Pretty well any modern display should work well - different people are going to have different ideas about whether the speakers are any good or not, so you'll have to listen to a few yourself and make up your mid what you think is "better".  The echo cancellation can be tweaked manually on the codec to suit the display if required (rather than leaving it on the "auto" setting which, in our installations, has caused more troubles than it's worth).
    The main drawback of using the SX10, or the cheaper of the range of the SX20s, is the camera and the amount of zoom.  In a larger room, you're not going to get a good close up view with a 2.5x camera.  I'd suggest for a bigger room, you look at the 12x cameras.
    As a general rule - use additional microphone(s) when you can't get someone within a 3m radius one of the other microphones.  So in a larger room, you may need many.
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • Best practices for moving from my iMac to my new MacBook Pro without carrying along a lot of junk?

    Some suggestions are welcome!
    I have been using an iMac late 2009 21.5" for the last few years. Recently I received a new MacBook Pro. The MacBook Pro has better specs (better cpu, more RAM, SSD drive) and is overall faster. I got an external 27" IPS monitor to hook up to the HDMI port and going forward I would like to use the new MBP with external monitor as my main desktop computer and keep my iMac as a backup machine if the MBP ever needs repairs.
    Anyway, I have two backups of my iMac: (1) Time Machine, which does its usual incremental backup, but excludes some things, like Parallels VMs and (2) A CCC bootable clone that runs every night at 3:30 am while I'm asleep. And as I'm writing this I'm updating that clone copy.
    The thing is, I don't want to move everything over to my new MBP. Over the years I've accumulated a lot of junk, and currently am using about 450 GB of the 512 GB disk space. My new MBP also has 512 GB of space, but I figure why not just bring over what I think is necessary and later on, if I'm missing something, I can get it from the CCC backup or the Time Machine backup. (I will get new backup drives for the MBP). My guess is I don't really need even half of what I've currently got on my iMac HD.
    So I don't think I want to use the Time Machine migration assistant. And I don't want to restore the new computer from the CCC clone. But I do want to add in enough applications and documents and settings so I can continue running much like I am running on my iMac. I'd like my installed software (BBEdit, Office, Parallels, CCC, etc.) to be licensed and avoid a new install of each app if possible. I'd like the apps with open documents to remember which docs were open, and when I start them again have things open up like they did on my iMac.
    Are there some strategies people can recommend for this? Like for each application, copy over the application, and related preference files from ~/Library? Or are there some applications which just plain have to be re-installed to work right?
    If what I'm thinking of doing is too complicated, the alternative would be to do a complete restore to the MBP and then try an extensive hash-and-slash and attempt to delete old, unneeded things.
    But I have old preference files going back years and I figure why not start afresh, since everything is so incredibly speedy on my new MBP.
    What do people here usually do when they get a new computer that will replace the old one?
    Thanks,
    Doug

    Well, I've been trying this for a while. By my calculations, at this rate, installing all the applications one by one and trying to restore all the data manually will take me about six years. I would finished just in time for the Tokyo 2020 Olympics.
    The main problem is, I don't know where all the bodies are buried. Just one example, I'm using Cornerstone for an svn client. I have working copies of multiple repositories on my computer. I really don't want to set them all up again, and I can't figure out where the Cornerstone preferences and all settings are stored. I couldn't find them in the Library anywhere.
    And that's just one case.
    I haven't done much with my MacBook Pro yet, I think in retrospect the easiest course of action is to reinstall OS X as though it were new MacBook Pro, start from scratch, and use my Time Machine backup with the migration assistant and go from there.
    And that's what I'm doing right now. I'm in the middle of reinstalling OS X.
    Afterwords I'll use a clean app uninstaller application to get rid of all the applications that I'm not using. And I'll just hack away at directories that I know I haven't looked at for years, with the confidence that I have a backup both in Time Machine and in CCC and also on my iMac. That's three backups.
    I would rather start out "light", but I can see it's just going to take forever and a day to get it done. Anyway, fortunately nothing is carved in stone, and I can always try again if I want to. But dealing with all the documents and all the applications one by one separately was just obviously going to take too much time.
    I'll report back on my results. And I appreciate your suggestion.
    Doug

  • Best Practice for Portal Patches and effort estimation

    Hi ,
    One of our client is applying the following patches
    1. ECC 6.0 SP15(currently SP14)
    2. ESS MSS SP15(currently SP14 with some level of functional customization )
    3. EP 7 SP18(currently SP14)
    We would like to kwow the best practice for applying portal patches and the effort estimation for redoing the portal devt on the new patch.
    o   What is the overall level of effort with applying Portal patches?
    o   How are all the changes to SAP objects handle?  Do they have to be
         manually re-entered?
    o  What is the impact of having a single NWDI instance across the
        Portal Landscape during the Patch process?
    Regards,
    Revathi Raju.

    Hi Revathi,
    o What is the overall level of effort with applying Portal patches?
    overall effort to apply the patch is apprx 1/2-1 days for NW7 system. This is exclude the patch files download because it's based on your download speed.
    o How are all the changes to SAP objects handle? Do they have to be
    manually re-entered?
    Depending on your customization. Normally it wont effect if you created the customzation application apart from SAP standard application
    o What is the impact of having a single NWDI instance across the
    Portal Landscape during the Patch process?
    Any change that related to NWDI, you might be need to re-deployed from NWDI itself.
    Thanks
    Regards,
    AZLY

  • Best practices for loading swf's

    Greetings,
    Using CS5 AS2
    I'm creating a website in flash (all the files will be in one directory/folder on SharePoint) and want to make sure that what seems to be working fine is best practice.
    I have an index.swf with many buttons which will take the user to landing pages/content/other swfs. On these different buttons I have the script...
    on (release) {loadMovieNum("name.swf", 0);}                I could also do just {loadMovie("name.swf", 0);} ??
    The movie transitions nicely to name.swf and on this page I have a button that returns the user to the index.swf...
    on (release) {loadMovieNum("index.swf", 0);}   Things move back to index.swf nicely and user can chose to go to another landing page.
    It looks like I'm on the right track, bc nothing is going awry? but want to check. Am I following best practices for moving from one swf to another within a website?
    Thanks for help or confirmation!!

    loading into _level0 (and you should use loadMovieNum, not loadMovie, when loading into a level) undermines some of the benefits of a flash application:  all the assets must load with each display change and the user sees a flash instead of appearing to transition seamlessly from one display to the next.

  • Best Practices for standardizing long text for EP GUI version

    Hello, I have a question that is related to standardizing best practices for all portal applications that use EP
    1) The portal team has recommended activating the GUI version from portal to allow the long text to have the same features as the standard GUI.  Since this solution is per transaction, we will need to identify what transactions need to have this temporary solution built in.  Also, business users will need to remember which transactions they will access via portal or GUI.
    (2) Even though the long text function is activated via GUI per transaction, the system will prompt a message of u201CRuntime Error!  Program C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXEu201D.  This may create frustrations to the users each time they maintain the long text.  The risk of this may be losing the use of long text throughout the maintenance orders, production orders, notifications, material masters, equipment masters, maintenance task lists, production routings, etc.
    All feedback welcomed
    Thanks Mark

    I found the solution, make everything in Illustrator (well text anyway) at a big size then bring it ibto Photoshop in a dicument 1024 x 576 (so no widescreen pixel ratio) then when saving document bring size of Image to 720 x 576 then you get great anti aliased pictures.
    Solved.

  • Best practice for hierarchical DTOs?

    Hi!
    Can someone tell me the best practice for hierarchical DTOs?
    Use case: I've got a User object which holds one Folder object, which in turn holds a Set of Folder objects (children).
    class User {
      Folder rootFolder;
    class Folder {
    Set children;
    }Normally, I'd fetch the user data with the help of a DAO from the database, copy the requested properties into a User-DTO, which will be transfered to the view. But what about the Folder objects?
    Should I create a Folder-DTO class and copy each Folder property into the respective DTO object - in other words: rebuild the whole hierarchy? Or is there a better solution?
    Thanks a lot!
    Walter

    Normally, I'd fetch the user data with the help of a
    DAO from the database, copy the requested properties
    into a User-DTO, which will be transfered to the view.
    But what about the Folder objects?
    Should I create a Folder-DTO class and copy each
    Folder property into the respective DTO object - in
    other words: rebuild the whole hierarchy? Or is there
    a better solution?It isn't recursive right?
    So this is just a standard association.
    How you handle it depends on usage.
    As a guess perhaps you are thinking that you can only have one User DTO class. That isn't true. You can have several. For example one that contains the association and one that does not.
    Or you have just one. And either it contains the association or you provide another mechanism that returns just the association given a specific instance of a User DTO (or some other identifier to the specific User.)

Maybe you are looking for