Domino Designer not syncing properly - xpages

In a rather complex project the entire project team is encountering more and more problems regarding designer, like frequent crashes, exceeding of memory limits and- most annoying - problems with outdated project data:
quite often we observe that two different designer clients are showing different versions of project data (see below for a rough description of the environment).
A simple example: an hour ago a co-worker asked me to open and test a new Xpage she had created 15 minutes ago in her Designer. In my Designer client however the new Xpage was not present yet. right-clicking my application and hitting "refresh" brought up the new Xpage.
The problem hits the ceiling with design elements that we both are working on in turns (as in "are you currently working on xpage XXX? I'd like to add..."). So with this syncing delay the problem is obvious: If I foirget to manually sync my project before adding stuff I will overwrite the co-workers' codings.
We never had this problem before, although I have to admit that we never had to work in a team on such a massive project.
Here's the setup:
all designer clients are 9.0.1 FP6
everyone is working on the same project stored on the same server
everyone is working on the same network withion the same building, just door-to-door
Is there something we could do or check to improve this situation?

Lothar, you have stated three problems at once. I'll try dissect them.
Frequent crashes:
We experienced many, many crashes in our daily work after upgrading to Windows 10. I know it sounds silly, but one way it worked for us and successfully mitigated those crashes was installing IBM Designer into C:\IBM\Notes, instead of C:\Program Files\IBM\Notes.
Granting 'Full Access' to 'All Users' over that folder was also necessary.
Exceeding of memory limits: As jtomas correctly pointed out, default memory settings are not enough for heavy xpages development in Domino Designer. I would suggest going to vmarg.Xmx=-Xmx1024m.
Problems with outdated project data: I think there is no workaround for this problem because there is no problem. Domino Designer 9 is a Eclipse based software, and works like so.
Think about it: When working in Java projects, developers download (checkout) source files from a Source Control System (SVN, Git, etc) and work them locally. Whenever a developer modifies or create a file, another developer can see it only if:
a) The modified/new file has been uploaded (commit) to Source Control Repository; and
b) Other developers have synchronized (refresh) their local projects with the repository.
See, that's how Java development works and that's the way we should do it too. Upon opening a NSF file, Domino Designer breaks it down into many files, just like a Java project. Once locally saved into the Java Virtual File System, those files get updates only when you refresh the project. Silly, but it is what it is.
My recipe to a well succeeded Domino development team include:
1) Design locking: All developers must explicitly lock elements they will work on. We don't rely on implicit locks.
2) Communications: All members of the team must be immediately notified whenever a developer has made major updates to the project.
3) Source Control: Despite its pitfalls, we rely heavily on SVN as code repository. It's far from perfect, and merges don't work properly, but it's better than no control.
Hope it helps.

I'm not sure this will fix your syncing issue but I have found modifying the following 3 lines in your local Notes\framework\rcp\deploy\jvm.properties file to help with Designer performance when developing in XPages especially with large projects:
vmarg.Xmx=-Xmx512m
vmarg.Xms=-Xms48m
vmarg.Xmca=-Xmca512k
These are the memory limits I use. You can increase the limits just make sure they are a multiple of 4. You have to restart Notes & Designer for changes to take effect.

Related

IBM Domino Designer stuck on 'Sync with ODP...'

I am using GitLab in combination with Sourcetree. Every time I want to commit something, I would go to my Domino Designer and right click the database, click Team Development and use 'Sync with ODP...'.
Most of the time everything works perfectly fine but sometimes the synchronization dialog pops up and just wont go away. In my Sourcetree I can see that some files are waiting to be commited but those files are not all.
So the dialog shows up, wont go away and says "Progress information" "Exporting..." and thats it.
There is no "use in background" button there and the 'cancel' button is disabled.
At this point the only thing I can do is to shut down the Designer using the task manager but the problem still wont go away even after restarting my computer and VirtualBox which I am working on (The designer runs on the VM). The only thing that changes: It sometimes gets stuck "later" in the progress.
I have read the designer hangs often due to automatic synchronization. In my case this feature is disabled.
Is there someone who can tell me what causes this problem and how I can fix it?
- Thank you in advance
(The synchronization is in progress for roughly four hours now, with no change)
Are you able to track it down to a specific design element? If there is a corruption in the DXL, the export to the ODP will probably fail. In Package Explorer you can use the "Open With..." right-click menu option to open as XML. Similarly, using the menu options to export as DXL might also highlight any corruption in DXL. Also, is the NSF local or on a server. If it's on a remote server, that may impact the performance of syncing to an ODP (which will be local).
We are using Domino Designer and Sourcetree in combination with Mercurial and Bitbucket for about a year now.
We suffered a lot of difficulties: "hanging" sync, corrupted custom controls, missing files, lot of stress etc.
What I did find out: most of the syncing problems have something to do with the file IconNote in the resources.
Sometimes the associated source contains another version of this resource, so it creates an IconNote.orig. Whenever this file exists, the syncing will go wrong. I guess that IconNote.orig isn't allowed in Resources and so the syncing stops without any warning(!) and often corrupted files.
It took me a very long time find out, but now I know: If IconNote exist in the Git, I delete it instantly! Syncing goes well aftwerwards.

What is your code maintenance strategy for custom SharePoint assemblies?

How do you handle improvements and added functionality to your existing SharePoint code?
Did you deploy your original code as a feature?
Do you create a new feature_V2 and deactivate the original?
What processes have you found that led to problems in the future?
I am specifically interested about WebParts, EventHandlers, and WorkFlows.
From what I can find, MS did not leave a "Best Practices" around updating existing code. (Actually, I'm not sure they left a "Practice" much less a "Best Practices")
You can see other questions around this topic:
how-to-upgrade-a-long-running-sharepoint-workflow-already-in-production
how-to-update-spitemeventreceiver-assembly-version-for-a-list-in-sharepoint
should-i-keep-solutions-and-features-in-a-1-1-ratio
What is your method?
I understand this question may be subjective, but I feel there is a large information gap surrounding this area of SharePoint development.
Thank you,
Keith
We always deploy custom code as features and solutions. When it is time to upgrade the existing code, all you have to do is stsadm -upgradesolution and everything works very nicely. I do not like the idea of having feature_v2 type features around...it makes it extremely difficult to keep track of the current version. I think you should only have one version of each feature in your production environment.
Leave the version control to your source control system.
I'm working at a shop that does a lot of SharePoint development. You want to deploy by feature with a solution package. You can easily upgrade your features as you go along and you will need to upgrade the solution package. This solution package can be created from a TFS Build server with WSPBuilder. As you along, the only thing left is to upgrade the solution and "Force" reactivate your feature to have the new feature of the feature.
Don't forget to do an IIS reset for any new code deployment that is done through the GAC. If you put anything inside like sitemaps and resources inside your 12, you will want to do a stsadm -o copyappbincontent.
If you deploy features that contain application files, you want to unload your application on ALL servers of the farm. It can easily be done by putting an App_Offline.htm at the root of every application on every machine.
When completed, remove App_Offline.htm (or rename it) and you are done. Your site is back online.

Promoting MOSS '07 Sites From Dev To Production

So, maybe I'm a bit old-school, but when we created websites in the past, we'd develop the site on a development server, then publish or promote the pages and files to the production server. This has always seemed to be a good way to go so that users didn't see messed up pages or (God forbid) a downed server because one of us screwed up.
But it doesn't seem that Microsoft had this idea in mind when they created SharePoint...at least, I haven't been able to find a way to do this in the infrastructure as it's defined.
Does anyone know if there's a management strategy for SharePoint development? I've read online that we can make a backup of the development environment and restore to the production server. That might work the first time, but any updates to the production server can't do that without risking data loss on the production server. I've seen some tools out there for migrating list contents, pages and documents from one server to another--although, admittedly, I've not yet investigated them.
But, another concern of mine is custom content types. It seems that once a list is using a content type, you can't update it without deleting the items from the list, disassociating the content type, and reassociating the content type. Shouldn't there be some way to UPGRADE a content type?
Anyway, if you have any suggestions for any of these current dilemas, I would LOVE to hear from you.
Thanks in advance,
Dan
Thank you for your quick reply.
We already have several features created for our site and a solution package bundling features directed at the fundamentals (content types, columns, etc), and another solution for features having to do with branding (page layouts, master pages, etc.)
But it seems like this is a one-time-shot...basically, it gets our server set up, right? Once people have started using the production environment, we're going to have documents, pages, list items all existing in our content database, and it'll be impossible to update things like content types, columns.
Features you have to deactivate and uninstall before you can install and activate the new feature, right? I've seen a Version property on the feature definition, but as near as I can tell, this doesn't do anything. Solutions seem like they can be upgrade by incrementing the version number, but it doesn't seem to modify things like content types and columns--especially if they're in use. Plus, I'm not sure how extensive the upgrade with solutions is.
There's precious-little documentation out there for this sort of thing. It seems like everything I'm reading is how to get your SharePoint server set up initially...not managing it long term.
Do you have any advice or suggestions?
Thank you all for your suggestions.
But we've been working on this site for over a year now. I'm pretty confident that we're already setup according to what most of you are recommending. We already have several features that install things like content types, columns, master pages, page layouts, and workflows. Most of these features are contained within solution packages. We have all of our development environments set up as VPC servers.
So, I have the initial deployment pretty much set. What I'm REALLY hoping to find out is how I can upgrade things like content types and columns and stuff down the road. Is it possible to change content types once they're in use? Because it doesn't seem, based on my initial testing, that this is possible. I'm not to worried about the assemblies because it looks like they swap out just fine, but the only way I've gotten a content type updated is by deleting any items referencing them (i.e. all the pages in my pages library), removing the content type, then re-adding it.
Do any of you know if there's a way to update a content type AFTER the initial deployment? ...when users have already created items based on the content types we've already deployed?
(The other part of my question was actually moving existing pages from the development server to production, but I can live without that. My major worry is the content types.)
The best way to go is developing with features. Once the features are done, you ca deploy them with Solution package (called WSP).
The only thing left to do is to reactivate those features. That way, you can progressively roll-out new features without having to do everything in production.
WSPBuilder is an application that helps you build WSP.
For automating all of this... good luck. There is a lot of work involved.
UPDATE:
Deploying Content Types and Columns are tricky. Once the website has been created, you can't update them anymore through features. You need to go through the code and recursively go through all the sites and modify the specific content type that match the name.
We've tried and it's not possible to do that normally with features. This need to go through something I call "deploying with code".
You really really need to define your content types using a feature because that way each content type will have a set GUID and will be stored in the database using the same name. This becomes important when running CAML queries over the site and there are a few other little gotchas when content types are created "will nilly" if you will.
I prefer STSDev for rolling out solutions using custom content types.
There are two ways to edit pages on the server. You can define the page library to have major and minor versions. This allows editors to edit the page and a defined publisher to publish them. This is good on an internal site, but is not recommended for a public facing site.
For a public facing site you will need to use Content Deployment
I cannot stress enough that before going ahead with a production release you make sure you have features for the content types.
As mentioned here, Chris O'Brian has a post saying that you should not use features unless necessary. One of his reasons is that it slows developement.
I disagree with this. Developement is slower if you are unfamiliar with features, but once a level of knowledge is reached, it is not a major factor.
Do listen to him about the backup and restore method of moving the content.
If you do that, all mess in the content types and fields and webs you may have created during developement (for me that is always quite a bit) will be moved to your production site.
Instead of having a nice clean site where everything is consistent, you will end up with little bugs and some areas of the site behaving differently to others simply because of old development cruft.
I recommend taking a look at Chris O'Briens most recent post, and his great Content Deployment Wizard: it's not all about Features!
Maxim is right in that most items should be deployed via features that are wrapped in solutions (WSP files). Your strategy should be to make sure your solutions and assemblies are broken into related bits of functionality. This is also beneficial in that features can be isolated at certain levels like sites and webs. Feature activation code, deactivation code and feature stapling should be used when updating any content updates. Content deployment can also make sense.
Once thing to remember is that if the updates are only in code then the assemblies can be updated without requiring the feature to be reactivated or the solution retracted and redeployed. All that is required is the Application Pool to be reset.
Microsoft has a couple articles on Dev environments and you can Google many others who recommend environments. We do development on virtual machines and deploy most items to an virtual integration server. Once we smoke test it we then deploy our solutions to QA so on and so forth. The benefit i sthat features and solutions are easy to retract. Once it goes out to production it should be thouroughly tested.
Developing in SharePoint has it's issues, that goes without saying, but so far I have found that the benefits outweight the problems.
Team-Based Development in Microsoft Office SharePoint Server 2007
We developed a custom solution which would update content types and fields for a Site Collection. Underneath the covers, through code, SharePoint allows us to modify the Fields as well as values in the Fields and Site/List Content types.
For moving the actual content from QA to Prod we use Echo

SharePoint Development / Production Environments

One of the biggest challenges that I've encountered with SharePoint is that it doesn't lend itself nicely to the typical project environment, which, at minimum, contain development and production environments. The issues I've run into the most are that content and lists are so tightly coupled that it makes it difficult to perform design changes without performing a content freeze on the production environment. For example, if I have a list with calculated columns and wanted to add some new functionality, I would have to do a content freeze on the production server, create a list template (including content) from the production server, restore that list to the development environment, make my changes, then reverse the list template process. The same holds true for pages and just about anything else in SharePoint. It seems as though once the site is deployed, it's best to work directly on the production box, but that breaks a ton of best practices, for obvious reasons.
How are some of you other SharePoint developers handling this limitation?
There are really two (more?) levels to SharePoint "development". You have the code which gets deployed to the server, such as web parts, content types, workflow actions, etc. This works relatively well in terms of deployment and best practices.
Then you have your example, which is more of a customization of site instances. What we've done when we had to customize a calculated field in the Portal's Site Directory list, is to try and tweak the changes in development. Then write up detailed instructions of the customization to be made, and have a separate person with appropriate permissions use those instructions to make the change on an integration (staging) server. Then have the same person makes the changes live on the production.
I'm not sure if your changes are susceptible to this approach, but it's worth considering.
Then we have another site which is heavily customized with SharePoint designer, and that one we work live on.
You can use Content Deployment Wizard (http://www.codeplex.com/SPDeploymentWizard) to migrate things like lists and libraries quickly. You could also take a backup/restore copy of production, then make your changes on that, and then in the early morning hours, do a content freeze (hopefully no one will care then), import all the changed data from production into your copy, and then restore the copy over production. At least the freeze could be put off and would only be necessary for the duration of the export->import->restore procedure.
In practice, I just make my production changes by hand.
Use FeatureActivation code to deploy changes to the lists' fields. After the code updates the fields then you deactivate the feature and remove it. This allows results to be tested in a QA environment before hand.

Modifying SharePoint System Files

What is the general feeling amongst developers regarding the changing of files in the 12 hive.
For example if you were asked to remove the sign is a different user menu item, you would need to modify the relevent user control on the filesystem. Now if you just go and modify it via notepad or copy over and then if you go and bring a new server into the farm you will need to remember to do the same on the new server.
Obvouisly you could deploy the changed file as a solution and have that done automatically, but I'm just wondering if people are hesitant to make changes to the default installed files?
I have done a bit of SharePoint development, and I must tell you that messing with the 12-hive is a ticket to a world of pain if you ever want to move the app.
I'd rather hack up some javascript to hide it, at least that can be bound to the master page, which is much more portable.
And remember, you never know when the next service pack comes around and nukes your changes :)
I agree with Lars. Sometimes you will not be able to avoid it, depending on your needs. But, in general the best policy is to avoid modification if at all possible.
I know that some of the other menu items in the current user menu (change login, my settings, etc) can be changed by removing permissions from the user. Under Users and Groups there is an option for permissions. I can't remember the exact setting (develop at work, not at home), but there are reasonable descriptions next to each of the 30+ permissions. Remove it and you start hiding menu options. No modifications to the 12-hive needed.
There is a very simple rule: if you want to keep official support from Microsoft, don't change any of the files in the 12 hive that are installed by SharePoint.
I've never encountered a situation where the only solution was to change such a file. For example if you want to change an out-of-the-box user control of SharePoint, you can do so by making use of the DelegateControl, and overriding it in a feature.
More info:
http://msdn.microsoft.com/en-us/library/ms463169.aspx
http://www.devx.com/enterprise/Article/36628
I know it's tempting to quickly change a file, and I have to admit sometimes I just do that on a DEV box, but don't go there on a production server!
Not sure if there is much use pitching in, as everyone else pretty much has it covered, but I would also say don't do it. As tempting as it is, its just impossible to know the full impact of that little change you have made.
From a support perspective you will make it difficult for Microsoft support (patches/hotfixes).
From a maintenance perspective you are also opening yourself up to long term costs.
Go the javascript route.
The way to go about it is to use a Sharepoint Solution (WSP) file.
To change the user control, create a new Sharepoint feature with the new functionality.
Include this feature in your solution.
Deploy the solution either using the stsadm command line, or through Central Site Admin.
This will then get automatically deployed to all the servers in your farm, and it avoids you overwriting anything default sharepoint files.
For more info, check out Sharepoint Nuts and Bolts blog on http://www.sharepointnutsandbolts.com/ which give an introduction to WSP and Sharepoint Features.
I've done this many times and I will speak from experience: Never ever touch the onet.xml files within the 12 hive under any circumstance. Any error that you make in there, and to make the CAML even more complex the file is largely whitespace sensitive, will have an impact on every part of SharePoint.
You should also consider that aside from the substantial risk to the installation, you may well be building in dependencies upon your changes that are then over-written in a future patch or service pack.
Most of the time, you can accomplish everything you want to using features and solution packages without modifying the files. However, there are a few (rather annoying) rare cases where your only option would be to modify a file on the system. I have used it for two particular cases so far. One was to add the PDF iFilter to the docicon.xml file, and the other was to add a theme to the themes.xml file. In both cases, it seemed to be the only way to achieve the goal. Still, we used a solution package to write those files out to all the servers in the farm.

Resources