Daily Archives

Articles indexed Friday November 23 2012

Page 5/16 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • use Amazon EC2 tools in Capistrano to get the servers to push the code

    - by APZ
    I am trying to use EC2 tools to get all the machines with a particular tag in some type of array in /config/deploy/prod.rb file in Capistrano. Something like this: In prod.rb file: //untested command workers-array[]=$(ec2-describe-instances -F vpc-id=1234 -F tag:Env=prod -F tag:SystemType=worker) for(i=0;i<workers-array.len;i++){ role :worker-A, workers-array[i] } I am not sure how we can do this in capistrano, am new to ruby too. Guys any help on this would be really appreciated.

    Read the article

  • Running multiple versions of PostgreSQL on the same Ubuntu server

    - by user51938
    I have PostgreSQL 8.4 and 9.0 running on the same server (Ubuntu Lucid). I installed them both via apt-get (8.4 with the default package sources, and 9.0 after adding the ppa from https://launchpad.net/~pitti/+archive/postgresql). When I run a command like "createdb" from the command line or start up the "psql" shell, PostgreSQL version 8.4 is used by default on my system. So, how do I force these commands to use PostgreSQL 9.0 instead of 8.4?

    Read the article

  • Apache Unclean shutdown of previous apache run

    - by Jakub Arnold
    I'm having problem with running Apache2.2 on my Vista machine. When I clean install Apache it works just fine, but after I installed PHP, I'm getting this error message in logs. [Fri Oct 23 21:29:02 2009] [warn] pid file C:/Dev/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? Apache service was stopped when installing PHP. I did only one shutdown before instalation via Apache Service Monitor. Deleting httpd.pid and starting again doesn't help. I even tried to lookup process with PID in that file, but there is no such process.

    Read the article

  • Why isn't VIM storing macros across sessions?

    - by dotancohen
    In VIM 7.3 on Ubuntu Server 12.04.1, VIM forgets macros and registers after closing. I do have set nocompatible in .vimrc and the command :set viminfo? gives this result: viminfo='100,<50,s10,h What might be preventing the macros and registers from being stored across close / open? Note that I am not interested in storing mappings for long term use in .vimrc. Rather, sometimes (such as during refactoring) I need to perform a simple operation on a few files and I find it easier to do in VIM than with Perl. I just need the macros and registers stored across open / close, which I do have working on other servers. Thanks.

    Read the article

  • Best usb storage for my router, Asus RT-AC66U?

    - by Jason94
    I have the ASUS RT-AC66U and I want to add a USB storage to it. It has 2x USB, and Im already using one for my printer. So the last one I want to use to attach a USB storage, and I've read some reviews stating the throughput of the USB could be up to 18 mb/s. So in regard of USB storage, should I care about hard disk cache? Simple powered-over-usb seems to have 8 mb cache, other (externally powered) has 16 for instance.

    Read the article

  • Win7 backup fails with "The system cannot find the file specified" 0x80070002 - has worked before

    - by Thorbjørn Ravn Andersen
    I have a 500 GB USB-disk which has been used as a backup device for a few years now, but now fails without telling me why. This is a Dell box with Intel USB-controllers (so the NVIDEA problem does not apply here). I have previously had problems with a Git package marking a non-existent directory for backup (adding it make the backup succeede). The inaccessible boot partition problem described in Windows Backup fails with 0x80070002: "The system cannot find the file specified" does not apply to me. I would appreciate hints on where to look to identify why my backup fails so I can fix it.

    Read the article

  • Able to ping but does not get the data

    - by Dany
    I am facing a problem in my client server program; when using wireless I can ping but not receive any data. There is a source which receives a streaming request from client via server. This works fine when all the machines are connected through LAN cable but when I put all the computers in wi-fi network, all the machine are able to ping each other but when the client send the stream request to the server the ping request between server and client says destination unreachable. It works all well until the client does not send the streaming request. What might be the issue?

    Read the article

  • When disabling the firewire-driver in Windows will this too disable firewire connected through a PCMCIA device?

    - by Christoffer
    The broader overarching question (not seeking an answer to this, but wanted to provide context) is how do I ensure that laptops running Microsoft Windows 7 and exposing DMA-ports (eg. firewire) are disabled once the operating system have loaded. Preventing the Firewire-driver from loading once Windows have booted works as expected, but I've been unable to confirm whether this too will disable a Firewire-port exposed through a PCMCIA-card. My question is hence whether disabling the Firewire-driver will also prevent a Firewire-port exposed through a PCMCIA from functioning?

    Read the article

  • Cannot send or receive files over Bluetooth

    - by denise
    I have a Lenovo ThinkPad laptop and running Windows Vista. Previously I could send and receive files between my phone and my laptop but now it won't work. Every time I select a file, right-click and select "Send to", and select "Bluetooth devices", the box appears but there's nothing there. Even if I turn my laptop's Bluetooth on, my phone can't find it and vice versa. What could be the problem and how can I fix this?

    Read the article

  • I can't set the resolution to that recommended by my monitor

    - by F4r-20
    Firstly, I have looked here but didn't find what I needed. I have a Dell Optiplex 380 only using the on-board graphics (believe its the Intel G41 Express Chipset) but I can't seem to get the resolution right. The monitor I'm using (HP LE1901w) wants me to use 1440x900 but the only options I get are: 1600 x 1200 1366 x 768 1360 x 768 1280 x 1024 1280 x 960 1152 x 864 1024 x 768 800 x 600 So it will allow me to go higher or lower but not 1440x900. I've tried getting the driver from various different sources (Dell, Intel, Windows 7 Update) but still can't get that option. Does anybody know what else I can try?

    Read the article

  • Chrome Problems on Windows 8

    - by Akshat Mittal
    There are a lot of problems with Chrome (24.0.1312.14 beta || But all this happened before update also) on Windows 8. Problems and explanations are listed below: Google Chrome re-draw time: When I switch tabs, the window retains the content of the previous tab and displays that even if I move my mouse, if only refreshes (re-draws) when there is a change on the webpage (like on hover) or I do a select all (or scroll). One thing to note is that the hover and select happens on the real page and not the retained image-like thing of the older webpage. Chrome is slow and laggy: Websites such as Facebook and Twitter (and more) have gone extremely laggy on Chrome (Win 8). When I was using Windows 7, I never experienced a lag or something. Also when using HTML-5 Websites, the transition (the -webkit-transition in CSS) goes extremely slow at times. Plugins Crash: Plugins like Flash Player, Shockwave Player, and more that are in-built into Chrome Crashes a lot, even when doing simple tasks like playing YouTube Videos, displaying ads or something. Chrome Crashes: Chrome has crashed over 100 times in the past month. Google Chrome just crashes randomly or I don't know the reason. Random Page crashes: Chrome results chrome://crash/(Copy-Paste this in address bar) on random pages even when the page is just loaded, I understand that this can happen on heavy HTML5 or JS websites but what about HTML only websites! Most of the things above happens on Super User also, Super User never had any problem when using Chrome on Windows 7. UPDATE 1: @magicandre1981 Commented for trying to disable Hardware Acceleration. I tried it, it somewhat solved the problem but din't fix it. I am still experiencing all the above issues but less frequently (maybe because Chrome Restarted Completely) UPDATE 2: @avirk asked me to try a Stable Version of Chrome and Firefox, I din't experience any lag in Firefox, a little (negligible) lag in Chrome 22 (Maybe because its a new copy of Chrome, I haven't used it much). Is anybody else experiencing such issues? Does anybody has a solution to any of these? Any Help is appreciated! Thank You!

    Read the article

  • SSH connect error

    - by DMDGeeker
    I use a notebook with Ubuntu 12.10 and try to connect a server with Ubuntu 12.04. The server has already installed openssh-server. And allow publick key and password to login. But I connect the server sometime well but after minutes it will be error. First, it will show me these messages:    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!    ......    Add correct host key in /home/myname/.ssh/known_hosts to get rid of this message. but I never reinstall system and the openssh-server. Both are never changed! The server nerver shutdown or reboot. Second, after I remove the relative key from my known_hosts and use ssh connect the server again, it will let me type my password. then my nightmare coming... Permission denied (publickey,password) But I typed the correct password! PS: I used password and public key both success. But the problem will appear again after i logout then login.

    Read the article

  • Change User Folder

    - by sazpaz
    So I had a backup and when restored it to my computer the User folder didn't actually change to use the backed-up folder, so now I have an owner folder (which is pretty much empty) and a my_username folder below C:\Users. How can I make my account use the my_username folder as the user folder? EDIT: I've tried creating a new account and then changing the name of my old folder to the name of the new account, but somehow Windows still knows it's not the 'real' user folder and creates a TEMP folder. In which registry is this configured?

    Read the article

  • Preserve embedded album art when converting from .flac to .ogg

    - by Profpatsch
    I want to convert my archived .flac library to .ogg for daily use. Using find ./ -iname '*.flac' -print0 | xargs -0 -n1 oggenc -q6 on the root music folder and then deleting every .flac (having copies of them in archive) seems straight forward, after trying it with one file it worked and all of the tags were transfered, too, except for one: Embedded album art! I always prefer emedded covers over folder images, since I have some albums with varying covers. One possible solution is discussed here, but the script only works if the image is already extracted: Embed album art in OGG through command line in linux One possible solution I thought about was extracting album art from every song (not every song has one, though, and some even 2 or 3!), temporarily saving it and then using the script to include it into the finished .ogg. But then I want to increase the number of processes xargs runs simultaniously to save time, so the temp images need to have a distinct name. Is there a (linux) program that knows how to handle this? Or is there a finished script floating around somewhere? It would be nice if oggenc supported adding embedded coverart and it really is a shame, since these two formats should (in theory) share the same tag format. Edit: 15 days and noone even tries to answer. It’s funny, most of my questions don’t get answered. Too hard? Wrong SE site?

    Read the article

  • Computer not booting, black screen, no beeps

    - by Michael Gaddass
    I bought a pre-owned computer on Ebay. It booted fine, had to reset due to it not detecting USB mouse, but it detected the USB keyboard. Booted fine again, then I tried to install Ubuntu Desktop, when it was installing I got a phone call, when I'm answering it, I find a Blue screen of Death. I reboot the computer and nothing, no BIOS boot, no beeping, but one of the fans was on. I opened the cover and found a large amount of dust, removed it, still not booting. I'm a complete novice with computer repairs, the most advanced thing I did was take a 286 harddrive and replace a 486's damaged harddrive with it (put the drive into the 486 that is), what could possibly be causing this?

    Read the article

  • How to Change the Default Save Location for Office 2013

    - by Taylor Gibb
    The new version of Office comes complete with SkyDrive integration, but sadly SkyDrive is the default save location. Here’s how to make your Office apps save documents to your PC by default instead of SkyDrive. Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Firefox : abandon du développement de la version 64 bits pour Windows, trop buggée pour Mozilla

    Firefox : abandon du développement de la version 64 bits Sous Windows, trop buggée pour Mozilla Un des responsables de la Fondation Mozilla en charge de « l'engineering » - Benjamin Smedberg - vient d'appeler à mettre fin au développement de la version 64 bits de Firefox pour Windows. La raison ? Cette déclinaison serait une « source continue d'incompréhension et de frustration » pour les utilisateurs et la communauté. Incompréhension parce que les extensions ne sont que rarement compatibles avec cette version. Frustration, parce que le navigateur serait truffé de bugs inextricables et non corrigés (ce qui, d'après Benjamin Smedberg, ferait que ses utilisateu...

    Read the article

  • Spotlight on an office - Nairobi, Kenya

    - by Maria Sandu
    Hi everyone, my name is Joash Mitei. I am a graduate Intern at Oracle Systems Kenya and I will briefly take you through our offices and the working environment here in Nairobi, Kenya. I’ve been with Oracle since February 2012 and I’m responsible for Applications Pre-sales focusing on Oracle EPM and E-Business Suite. My background is Finance and Accounting therefore joining Oracle was almost a totally a different ball game but the transition has been smooth. The Oracle offices here are located on the second floor of Mebank Towers. We moved to the 2nd floor just three months ago from the 5th floor mainly because of the growing workforce. We are covering the whole Eastern Africa region hence diversity in culture is evident. This is a plus since you get to interact with people of very different backgrounds, cultures and ways of thinking. The building itself is on the outskirts of the CBD hence free from the hustle and bustle of the town. The office is split into different sections; there is a main working area which has an open desk design that fosters interaction between colleagues, there are 4 conference rooms for meetings and presentations, there are 3 quiet rooms for a little privacy when needed and there is a dining area for meals and ‘hanging out’. The working environment is world-class, to say the least. The employees are very professional, quite smart and needless to say, very busy. There are 4 interns covering sales and pre-sales in both Tech and Apps. As an intern you get support from your supervisor but you are required to show initiative yourself and thus the need to be very pro-active and inquisitive. The local management is well structured and communicative to ensure effectiveness and efficiency in the office. Apart from the daily work, we usually have events to boost staff morale such as ‘TGIF hang -out’, football matches against each other or versus other companies, and team building retreats. All these are monumental in fostering the RED POTENTIAL. We also do numerous CSR activities in the local communities . Well, that’s the Kenyan office for you. Glad to be your tour guide. Have a superb day!

    Read the article

  • Top tweets SOA Partner Community – November 2012

    - by JuergenKress
    Dear SOA partner community member Too many different product from Oracle, no idea how do they fit together? Get a copy of the Oracle catalog, an excellent overview of the Oracle middleware portfolio. BPM is a key solution to this portfolio. To position BPM to your customers you can find many use case ideas in the paper BPM 11g Patterns and industry specific value propositions for Financial Services & Insurance & Retail. Many more Process Accelerators (11.1.1.6.2) have become available. It is an excellent demo and starting point for BPM projects. Our SOA Suite team published the most important OOW presentation at the OTN website. The Oracle SOA proactive support team is running a series of blog posts about SOA and JMS Introductory. To become an expert in SOA, Bob highlighted the latest list of SOA books. For OSB projects we recommend the EAIESB OSB poster. Thanks to all the experts who contributed and shared their SOA & BPM knowledge this month again. Please feel free to send us the link to your blog post via twitter @soacommunity: Undeploy multiple SOA composites with WLST or ANT by Danilo Schmiedel Fault Handling Slides and Q&A by Vennester Installing Oracle Event Processing 11g by Antoney Reynolds Expanding the Oracle Enterprise Repository with functional documentation by Marc Kuijpers Build Mobile App for E-Business Suite Using SOA Suite and ADF Mobile By Michelle Kimihira A brief note for customers running SOA Suite on AIX platforms By Christian ACM - Adaptive Case Management by Peter Paul BPM 11g - Dynamic Task Assignment with Multi-level Organization Units By Mark Foster Oracle Real User Experience Insight: Oracle's Approach to User Experience Hope to see you at the Middleware Day at UK Oracle User Group Conference 2012 in Birmingham. Jürgen Kress Oracle SOA & BPM Partner Adoption EMEA To read the newsletter please visit http://tinyurl.com/soanewsNovember2012 (OPN Account required) To become a member of the SOA Partner Community please register at http://www.oracle.com/goto/emea/soa (OPN account required) If you need support with your account please contact the Oracle Partner Business Center. Blog Twitter LinkedIn Mix Forum Technorati Tags: SOA Community newsletter,SOA Community,Oracle SOA,Oracle BPM,BPM Community,OPN,Jürgen Kress

    Read the article

  • Oracle Enterprise Manager Cloud Control 12c: Die Verwendung von Gruppen

    - by Ralf Durben (DBA Community)
    Mit Oracle Enterprise Manager Cloud Control 12c können Sie eine Vielzahl von Zielsystemen verwalten, sowohl was die Vielfältigkeit als auch die pure Anzahl betrifft. Eine große Anzahl von Zielsystemen wirft die Frage auf, wie diese Menge effizient verwaltet werden kann. Dazu gehören die Kontrolle des Zugriffs, die möglichst automatische Einstellung des Monitorings und die Bildung von benutzerorientieren Sichten. Zu diesem Zweck gibt es das Konzept der Gruppen, in denen Zielsysteme (Targets) zusammengefasst werden können. In Oracle Enterprise Manager Cloud Control 12c gibt es drei verschiedene Typen von Gruppen, die im aktuellen Tipp erklärt und voneinander abgegrenzt werden.

    Read the article

  • Web Application Integration Steps in OAM 11gR2 (High Level)

    - by Venkata Srikanth
    Install OAM, Webtier (OHS) and WebGate as per the standard installation steps. Create a WebGate instance (i.e deploy WebGate) A WebGate instance must be created that will copy required bits of agent from WEBGATE_HOME to WebGate instance location that shares the same INSTANCE_HOME with OHS ./deployWebGateInstance.sh –w /Oracle/Middleware/Oracle_WT1/instances/instance1/config/ohs1 –oh /Oracle/Middleware/Oracle_OAMWebGate1 Note: Here –w flag indicates OHS instance folder and –oh indicates the WebGate Oracle home Configure WebGate In the webgate configuration the EditHttpdConf utility will copy OUI instantiated apache_webgate.template from WEBGATE_HOME to webgate instance location (renamed to webgate.conf), and update httpd.conf with one additional line to include webgate.conf. export LD_LIBRARY_PATH=$ LD_LIBRARY_PATH:/Oracle/Middleware/Oracle_WT1/lib Navigate to /Oracle/Middleware/Oracle_OAMWebGate1/webgate/ohs/tools/setup/InstallTools ./EditHttpdConf –w /Oracle/Middleware/Oracle_WT1/instances/instace1/config/OHS/ohs1 –oh /Oracle/Middleware/Oracle_OAMWebGate1 –o webgate.conf Register WebGate Use RREG tool to register the OAM 11G WebGate Navigate to /Oracle/Middleware/Oracle_IDM1/oam/server/rreg/input Edit OAM11Grequest.xml. Change the specific xml content to include the weblogic admin URL, agentBaseURL, host identifier etc.. Navigate to /Oracle/Middleware/Oracle_IDM1/oam/server/rreg/bin Set permissions to oamreg.sh à chmod 777 oamreg.sh Edit oamreg.sh and set OAM_REG_HOME=/Oracle/Middleware/Oracle_IDM1/oam/server/rreg ./oamreg.sh inband input/OAM11Grequest.xml Enter the WebLogic admin credentials when prompted. After performing the above steps, there will be two artifcats created under Oracle/Middleware/Oracle_IDM1/oam/server/rreg/output, namely ObAccessClient.xml (Stroing webgate config parameters) and cwallet.sso (storing the agent key). These files must be copied to WebGate instance config folder (/Oracle/Middleware/Oracle_WT1/instances/instance1/config/ohs1/webgate/config) Restart OHS Deploy the web application (myApp) in WebLogic application server Proxy Configuration in OHS The mod_wl_ohs module enables requests to be proxied from Oracle HTTP Server 11g to Oracle WebLogic Server. Navigate to /Oracle/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1 Edit mod_wl_ohs.conf file to include the following: <IfModule weblogic_module> WebLogicHost <WEBLOGIC_HOST> WebLogicPort <WEBLOGIC_PORT> # Debug ON # WLLogFile /tmp/weblogic.log MatchExpression *.jsp </IfModule> <Location /myApp> SetHandler weblogic-handler # PathTrim /weblogic # ErrorPage http:/WEBLOGIC_HOME:WEBLOGIC_PORT/ </Location> Note: Here WEBLOGIC_HOST and WEBLOGIC_PORT are the WebLogic admin server host and port respectively Restart OHS. Now if we access the web application URL with OHS host and port (Ex: http://OHS_HOST:<OHS_PORT>/myApp) so that the requests will be proxied to WebLogic server. Create a new application domain Login to OAM Admin Console Navigate to Shared Componentsà Authentication Schemesà Create Authentication Scheme (Ex: LDAP Auth Scheme. Here the scheme is assoicated with LDAP Authentication Module) Navigate to Policy Configuration à Application Domain à Create Application Domain Enter the Application Domain Name and Click Apply. Navigate to Resources tab and add the resource urls (Web Application URLs that needs to be protected) Navigate to Authentication Policy tab à Create a new authentication ploicy by providing the Resource URLs (The sample Web Application URLs) and Authentication Scheme. Navigate to Authorization Policy tab à Create a new authorization policy à Enter authorization policy name and navigate to Resource Tab à Attach the Reource URL, Host Identifiers here. Navigate to Conditions tab à Add the conditions like whom to allow and whom to deny access. Navigate to Rules tab à Crate the Allow Rule and Deny Rule with the available conditions from the previous step so that the Authorization Policy may authorize the logins. Navigate to Resources tab and attach the Authentication and Authorization plocies created in the above steps. Test the Web Application Integration.

    Read the article

  • ??????????

    - by Steve He(???)
    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 7.8 ? 0 2 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:????; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} ???????????Oracle????????! ??????,??????????????????????,?????????Oracle??????????????????,??,???????????????????????? ??????: PowerView ??????? PowerView???My Oracle Support?????????,??????????????????????(Dashboard),?????????,?????????????????????,???,??ID,??,???,?????????????PowerView???PowerView?,????????? ?????????????????? ?????????????,????????,?????????? PowerView ???My Oracle Support???,???? ?? PowerView is Off??????PowerView on?? PowerView is On, ???????,????????PowerView? ??????????????????,??/?????,???????????? 3????????? PowerView ! ?? PowerView ????????? New?  ?Select Filter Type ????????????,????2??????????? ??: ???????????,???????????????????????? ??(+) ?????????(-)??????? ??Create ?????????? ?????? PowerView is On ???????? ?? PowerView ???,?????? Learn more about PowerView… ??? short video. ???????:???????????????? ?????Dashboard ?? Knowledge Base??,??????,??????,??????(??????)??????????????? - ??????????????????????? - ?????????? ?????????,??“Information Center” ??????,????????,?????????????????24????,????????????? ?: ???????? “information centers”,??????,???Search ??????? ??? information center,?????????????????????,???????? ?????????????????! ??,??????,??????,??????,??????,???????,?? Search. ??: ??????,???PowerView?????? PeopleSoft Enterprise??PowerView??,???????????????,????????PowerView??????? ???????????????? ?????! ????: My Oracle Support - User Resource Center [ID 873313.1] My Oracle Support Community

    Read the article

  • Apply WCF For Large Projects

    - by svlytns
    We have a large projects that have nearly 20 modules on it.We want to use WCF for business layer. We think three way to implement WCF our project: Use only one datacontract and one operation contract. Send ClassName, MethodName to operation and create class by reflaction then invoke the method in WCF side. Second way put all modules in one wcf application, and create their data contracts, operation contracts. Third way is create seperate wcf application for each module and host them seperatly. Which one is the best way? I need your ideas. TIA!

    Read the article

  • What type of application is this called?

    - by boatingcow
    I am working on a web-based application which combines elements of what my client would call a CMS (content management system) and CRM (customer relations management) but also adds in many other business-specific features such as bookings management, staff task allocation management, wages calculations, document version control etc. However, I'm struggling to find a catch-all term for this type of application so I can research how other people have gone about creating such an integrated solution. Can anyone recommend a term I can use to refer to this, both internally in our team, for the client so they know what to call the 'system' and also for me personally, so that I can ask the Stack community further questions?

    Read the article

  • Hierarchical View/ViewModel/Presenters in MVPVM

    - by Brian Flynn
    I've been working with MVVM for a while, but I've recently started using MVPVM and I want to know how to create hierarchial View/ViewModel/Presenter app using this pattern. In MVVM I would typically build my application using a hierarchy of Views and corresponding ViewModels e.g. I might define 3 views as follows: The View Models for these views would be as follows: public class AViewModel { public string Text { get { return "This is A!"; } } public object Child1 { get; set; } public object Child2 { get; set; } } public class BViewModel { public string Text { get { return "This is B!"; } } } public class CViewModel { public string Text { get { return "This is C!"; } } } In would then have some data templates to say that BViewModel and CViewModel should be presented using View B and View C: <DataTemplate DataType="{StaticResource local:BViewModel}"> <local:BView/> </DataTemplate> <DataTemplate DataType="{StaticResource local:CViewModel}"> <local:CView/> </DataTemplate> The final step would be to put some code in AViewModel that would assign values to Child1 and Child2: public AViewModel() { this.Child1 = new AViewModel(); this.Child2 = new BViewModel(); } The result of all this would be a screen that looks something like: Doing this in MVPVM would be fairly simple - simply moving the code in AViewModel's constructor to APresenter: public class APresenter { .... public void WireUp() { ViewModel.Child1 = new BViewModel(); ViewModel.Child2 = new CViewModel(); } } But If I want to have business logic for BViewModel and CViewModel I would need to have a BPresenter and a CPresenter - the problem is, Im not sure where the best place to put these are. I could store references to the presenter for AViewModel.Child1 and AViewModel.Child2 in APresenter i.e.: public class APresenter : IPresenter { private IPresenter child1Presenter; private IPresenter child2Presenter; public void WireUp() { child1Presenter = new BPresenter(); child1Presenter.WireUp(); child2Presenter = new CPresenter(); child2Presenter.WireUp(); ViewModel.Child1 = child1Presenter.ViewModel; ViewModel.Child2 = child2Presenter.ViewModel; } } But this solution seems inelegant compared to the MVVM approach. I have to keep track of both the presenter and the view model and ensure they stay in sync. If, for example, I wanted a button on View A, which, when clicked swapped the View's in Child1 and Child2, I might have a command that did the following: var temp = ViewModel.Child1; ViewModel.Child1 = ViewModel.Child2; ViewModel.Child2 = temp; This would work as far as swapping the view's on screen (assuming the correct Property Change notification code is in place), but now my APresenter.child1Presenter is pointing to the presenter for AViewModel.Child2, and APresenter.child2Presenter is pointing to the presenter for AViewModel.Child1. If something accesses APresenter.child1Presenter, any changes will actually happen to AViewModel.Child2. I can imagine this leading to all sorts of debugging fun. I know that I may be misunderstanding the pattern, and if this is the case a clarification of what Im doing wrong would be appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >