Sharing the experience search

Search sharing-the-experience.blogspot.com

Tuesday, June 26, 2012

SharePoint 2010: Best Practices on SharePoint on-premise and Office 365 SharePoint Online

Some best practices on "How to develop SharePoint 2010 applications"

I found useful to know how Yaroslav Pentsarskyy suggested to organize SharePoint 2010 project in Visual Studio 2010:
 - Platform project - core components;
 - Content project;
 - Service project;
 - Branding project.

The first chapter gives you an idea how you can organize SharePoint project structure, including the deployment project.

And absolutely agree with the following:

"There is one more benefit to keeping those artifacts separate; when it comes to bug fixes or functionality upgrades, it’s easier to replace one dll that keeps all of the supporting functionality than replacing core platform dll"

Here is one more note on the book "Top 60 custom solutions build on Microsoft SharePoint Server 2010":
All demonstrated solutions are Farm Solutions.


I have decided not to buy the book, since in the near future I will not work with SharePoint 2010 on-premise.
Maybe I will work with SharePoint Online!
For more best practices on SharePoint 2010 development: SharePoint 2010: Best Practices


So, I needed to investigate what should I know before diving into SharePoint Online development.
I have found a great white paper: "Office 365 SharePoint Online –Architectural considerations" byJeremy Thake
"When considering an activation of SharePoint Online as part of your SharePoint strategy, the main architectural decisions which need to be made should focus on the following areas:
 Capabilities 
 Workloads
 Authentication
 Permissions
 Creation of a cohesive end user experience
 Information Architecture 
 On-boarding and Off-boarding of data
 System Requirements
 Architectural Approaches"
Restrictions for SharePoint Online:
- no farm solution;
- no FAST Search;
- no developer dashboard;
- no SharePoint Timer Jobs;
Business Connectivity Services Profile Page;
Audit Opening and Downloading;
 - Records Center (but you still can use in-place record management);

Good news - you can use SCOM 

"A general pattern in the industry has already been to leverage client side code (ECMAScript) and the client object model or Silverlight to bypass some of the limitations."

The "Architectural consideration" is a great and concise article, but in some places info is not up to date.
For example the article states that you cannot use BCS, but  The service update in November 2011 enables developers to create BCS applications by using SharePoint Online. You need to use WCF service deployed on Windows Azure.


SharePoint Online storage limitations:
SharePoint Online for enterprises: key features and specifications
SharePoint Online Collection Sizing and User Limits



In summary, the aforementioned limitations are outlined below:
 -  Size limit of a site collection (100 GB), number of site collections (300) and maximum storage in 
a tenant (5 TB).
-  Record Center capabilities not offered (but you still can use in-place record management)
-  Mail Enabled Document Libraries are not supported, impacting Scanners & Scanner software
-  PDF documents cannot be opened in the browser
-  Word Automation features not available
-  Auditing does not capture which documents are opened and closed

-  Business Intelligence Center, SharePoint PowerPivot, PerformancePoint Services and integration 
with a reporting server not supported
 - Only Sandboxed Solutions, or browser centric applications based on technologies such as Silverlight, jQuery and Client Object Model can be used.



Further reading:


Appendix B: SharePoint Online and Office SharePoint Server Feature Comparisons



SharePoint Online Developer Resource Center 
SharePoint Online Administration


SharePoint 2010 101 Code Samples

Monday, June 25, 2012

SharePoint: High Availability

Recently, I have been asked to develop a plan to make SharePoint 2010 farm Highly Available.
This short post will outline the main phases that farm needs to undergo in order to be Highly Available.

In my case, we have 2 datacenters. One of them is Primary, and another - Secondary. In case primary goes down, we should provide a seamless switch to the Secondary without loss functionality and preferably performance. 


In my personal opinion, I prefer to give performance boost in case I have resources, even it might mean that end-users will notice some performance degradation in case of failover.

Here is a schema to implement for High Availability:




Here are key notes:

1. Web Front Ends (WFEs) - When Primary is up, all 4 WFEs (primary and secondary) are serving the requests. In case the Primary is out, the Secondary WFEs will be getting all requests.
Here I see, that it may impact performance, since in the usual scenario end-users uses all 4 WFE (that load-balanced via ISA).
One of the option to keep WFE performance steady, is to keep only 2 WFEs available in case Primary is up.
The seamless switch will be provided via ISA

2. SharePoint application server - both of them engaged in case Primary is up. In case of failover, the second application server should have the same services running as in Primary to maintain the same functionality as before. 
The weakest point is a timer job. I can imagine that in some scenarios WFs that been served by primary server at the time of failover will never get back.
One more note on this- plan your search architecture: Search Service Application: Architecture in one page


3. SSRS servers - in case Primary is active, engage both. In case of failover the second SSRS will get all requests. The seamless switch will be provided via ISA


4. Often enterprise SharePoint solution interact with external system via BDC (Trying to figure out what's the difference between 2007 BDC and 2010 BCS?)
We need to plan how we can provide access to these external system in case of failover.
That means extensive communication with teams who support such system.
In my example, we accumulate all external systems calls via web services developed on BizTalk server. From our side, we need to configure ISA to have additional BizTalk availabled on the Secondary datacenter.


5.On SQL side - we are implementing async mirroring. In case primary goes down, we don't have any loss and ready to switch to the Secondary.
I prefer to have a witness on the Secondary based on assumption that we use Secondary in case Primary is down, not vice versa.

In case report db servers fail in the Primary, we need to have extra work from front-ent side. Report connection files have connection information inside them. We need to make sure that all connection files have alias name instead of the actual. In the case of failover, we just modifing alias on Report server side. Keep in the mind that SSAS type of connection file won't work with SQL alias and we can do it via host file.

We need to setup failover settings for SharePoint databases.
Refer to this post for what can be mirrored in SharePoint 2010:
The 2010 SharePoint databases, purposes and mirroring supportability
You will find that some of the SharePoint DBs are not required and are not design to setup for failover since they are not critical and easy to re-create.
Based on what recover time you have , adjust for yourself what needs to be configured with failover and what can be omitted. If a SharePoint db is not configured with failover, plan ahead what necessarily actions you should pefrom to put the bd back in case of failure, and what impact will be if the db is not ready right away. As an example, most likely the StateService will not be in high demand right after switching to the reserved (Secondary) datacenter.


Here is an outline plan how to introduce HA in SharePoint 2010 farm gradually:


1. Decide how many additional servers are needed, and their configuration. 
2. WFE. Test first without including in ISA. Then include in the prod farm.
3. App server. Build the server cautiously. I believe once the app server is joined, it will used by prod WFE. No ISA configuration is needed. All requests goes from the SharePoint farm configuration directly.
4. Work on external systems HA
5. Work on SQL servers, failover settings on SharePoint side 
6. SSRS servers

Wish you happy HA to you.


Friday, June 22, 2012

SharePoint: SharePoint 2007 Administration and PowerShell 2.0



Last months my work with SharePoint 2007, I felt a strong inclination to use PowerShell 2.0.
I envied a happy people who were already with SharePoint 2010 and could enjoy SharePoint 2010 Administration via SharePoint.ps1


PowerShell and SharePoint: What, Why and How
Simple concept: How to use SharePoint cmdlets in PowerShell ISE


I also wanted to have such beautiful commands that have been shipped by SharePoint.ps1 for SharePoint 2010:
Get-SPFarm,
Get-SPWeb,
Get-SPWebApplication


So, my problem was that we don't have SharePoint.ps1 for SharePoint 2007.
To easy up my desire, I have created my functions:
Get-SPFarmV3,
Get-SPWebV3,
Get-SPWebApplicationV3.


And some additional:
Get-SitesWithMissingTemplate, Get-SSProvider, Get-SPVersionV3.


All above I have packed in one SPv3Adapter.mdl module.


Windows PowerShell Module Concepts


Module Installation Best Practices:


Do not install modules for Windows PowerShell in the system location at %Windir%\System32\WindowsPowerShell\v1.0\Modules. Only modules included with Windows are installed to the system location.


http://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx


Module installation
http://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx




And some additional PowerShell files:
Helper functions: Start-CustomTranscript, Get-CustomAPPLog,Get-SolutionDeployed


I have used a lot Get-SolutionDeployed during upgrade SP2007 to SP2010:


The module Helper.mdl has dependency on SPv3Adapter.mdl

Please install  SPv3Adapter.mdl  module first in order to enjoy Sp2007 helper functions.
One of the favorable option for me is to use manifest (you are welcome to use attached customModulesLoader.psm1 and  Manifest.mdl)  to ship the PS modules.


HTML5/jQuery Webinar Week: Building a Real World HTML5&jQuery line of busines App with Infragistics &KnockoutJs


Infragistics organized HTML5/jQuery Webinar Week on 06/19-06/21.http://www.infragistics.com/resources/webinars.aspx

Here are quick notes on the June 21, 2012 - Building a Real World HTML5&jQuery line of busines App with Infragistics &KnockoutJs (Advanced  level)


All demo materials will be posted on  http://blogs.infragistics.com/blogs/jason_beres 
The webinar was totally focused on Infragistics product - netAdvantage for jQuery (based on jQuery, all-in-the-web , no plugin is needed).

In demo material you will see demonstration of CRUD, multiple controls and their interaction.


The whole set of the demonstrated controls aims one goal: Data Visualization

The demonstrated Grid and Chart are developed using:
 - ASP.Net MVC 3
- Infragistics jQuery Grid, Map and Loader
- KnockoutJS



The library also includes controls for line of business: Tree, Players, Upload.

For me the whole series of the Infragistics webinar were useful.
I have been out from web development for almost 2 years.
So, it was a good start for my web development self-education.

Here are the links can be useful in case I have decided to spice my web project up:

http://samples.infragistics.com/jquery
You can click through controls, the feature list is intergactive. So you can check possibilities of the Infragistics controls.

http://blogs.infragistics.com
http://forums.infragistics.com

Visual Studio 2010 and BDCM: How to build and deploy



During upgrade from SP2007 to SP2010, we have decided convert 2007 BDC files into 2010 BDCM files.


We did it using hybrid BDC upgrade approach


The exported BDC files I have added to SharePoint project in VS 2010
Creating a Business Data Connectivity Model


The article says each SharePoint project can contain only one model.


It's not true.


You can have as many models as you want in the one visual studio 2010 SharePoint project. 
Just create one project item per feature.


For an example, if you want shipped 10 BDCM models, create 10 features in the project.
Place one project item with BDCM model in each feature.


Identical feature property values from all project items are merged together in the feature manifest. However, if two different project items specify the same feature property key with non-matching values, a validation error occurs.



<Property Key="ModelFileName" Value="BdcModel1\BdcModel1.bdcm" />
So, remember - One project item per feature.
 
Note:
As you may know 2010 SharePoint Foundation allows to use BDCM. But there is one caviat with developing BDCM models in VS 2010 for SharePoint Foundation:

BDC deployment relies on feature event receiver to take care of actions like model import/feature activation. Unfortunately the assembly where the feature event receiver lives does not ship with  SharePoint Foundation. And the reason for that is same assembly has other functionality Microsoft decided not to ship in Foundation.

But, you have a solution to make it work:
 Deploy a BDC Model project to SharePoint Foundation 2010 using Visual Studio 2010
  Publish BDC Model project to SharePoint Foundation 2010 with Visual Studio 2010

"SharePoint 2007 to 2010 Upgrade" online project (part 10) : Upgrade strategy plan

As it's been recommended by Joel Oleson's, we choose a Hybrid upgrade approach

Here is an actual upgrade strategy plan, that I have created before getting my hands dirty with testing and upgrading:

1. SP 2007 Prod analysis

 - Topology.
Topology review showed us that we need to change topology for a new farm to increase performance.
We moved a SSRS server out of the WFEs.

 - Hardware.
Check if you need to upgrade the hardware before the SP2010 upgrade
We had to upgrade all servers in the farm.
We requested a new VMs with appropriate hardware. The old 2007 farm servers will be upgraded
and we will re-use them to make the farm Highly Available.

 - Configuration (external system dependency, ISA configuration)
For an example, after we rolled SP2010 out, we have discovered that current VPN client won't support popup windows in the IE...and SP2010 extensively uses Dialog forms.
Make sure that you thought over all the systems that are using the SharePoint to avoid our mistake. These dependencies should be tested with test SP2010 farm before going live.

 - Customization
To pull all wsp files use the script spExtractSolutionsFromFarm.
Check if you have third-party tools that you have to migrate over.

 - Recommendation
This chapter helps to formulate the scope of the work to present to project manager\customer.


2.  Preparation for SP2010 upgrade


Here are the actual stages that we gone through to make 2010 Upgrade happen:

Stage I: “Pruning”. We need to prepare Prod environment before the actual upgrade. By pruning I mean removing all rudiments that are not used or not proper installed on the current Prod.

Stage II: "Build a new SP2010 farm"

1. Get new machines that meet hardware requirements for SharePoint 2010 


2. Install SP2010 on the new Prod  farm

3. Build topology


4. Configure service applications
Pay close attention to User Profile Synchronization service .
If you have BDC, decide whether you want to convert them into new BDCM models or not.
Depends on your decision, you need \ don't need to run Application Registry Service.


5. Deploy all custom SP2007 wsp files that needed (use the script spExtractSolutionsFromFarm )
Deploy old 2007 wsp file to check what's needed to be fixed to be compatible with SP2010.
For us, it was a big chunk of the functionality that used old BDC API.


Stage III: Test database attach upgrade on the new SP2010 farm
Document all errors that you have experienced during the upgrade, and their resolution. I have used wiki template in SharePoint for easy reference.

Stage IV: Test phase.

1. Build SP2010 farm in the testing region.
I have re-used old VMs, first requesting the up-scale for them

2. Perform the steps from 2-5 on the Test environment

3. Test\Development cycle
Should include iterations for development and re-testing
It took 3 months for us.

Stage V: Run the full cycle of the SP2010 upgrade sequentially for all environments except Prod
Ex: Development, Staging, Training

3: Prod upgrade to SP2010



Helpful to specify assumptions prior the actual upgrade:
All customizations were delivered on Prod through wsp files.
All custom solutions are SharePoint 2010 compatible
Test-SPContentDatabase check  doesn’t show errors




By this time you can do upgrade with closed eyes.
We didn't get any unknown issues. All have been known before since we ran the scenario 5 times already.



1. Set read-only acces on the old Prod

2 . Backup SP2007 content database

3.  Attach SP2007 database to a new SP2010 Farm

4. Run all actions that are needed after upgrade

We had a action upgrade plan, where we put the action that's needed to be taken during the upgrade and after.We put time to perform the operation and a responsible person for it.
It was like a lauching a shuttle, with only one exception - we knew it will launch without failure)


5. Validation


6. Switch ISA to a new farm

7.  Keep SP2007 prod for several weeks to test issues that will be reported by end-user. It will give you a clear answer if the issue is new in SP2010 or it was present before in 2007.


Voila, you did it!

Thursday, June 21, 2012

SharePoint: How to build SharePoint application wrong. SharePoint Karma



Whenever I refer to SharePoint development strategies, I always end up with SharePoint deployment strategies.


I am aware that in SharePoint world there are people who prefer to do customization via SPD and without a traditional development cycle.


This post for others... who wants to preserve a development cycle and who wants to have a fully automated and predictable deployment:
- via wsp files (or sandbox solution)
- and specific actions (like a feature activation) which is shipped as  PowerShell\stsadm commands. (Best Practices: Sharepoint Application Development Life Cycle)


How do you choose between content customization and code-based approach?
If you need to deploy anything on the server, that's a sign that's your approach is code-based customization.


Here is a quick SharePoint karma guide for code-driven development for SharePoint. Each wrong action will lead to a specific strong deployment reaction.
All described actions I saw done by developers. I hope this quick guide helps you to avoid pain of SharePoint deployment.


Action: Create a site locally manually. And then develop some other features.
Reaction: Deployment will be hard to other environments. You will need to re-create a site manually and hope that you haven't skip any steps.
Recommended action: create a custom site definition(onet file).It was a recommended approach since 2007. But I heard it's not what will be recommended in SharePoint 15. In SharePoint 2010 you have 2 options:
 - a web template that is shipped via sandbox solution and placed in the content db;
 - a site definition that is shipped via wsp file and deployed on the server.
Custom web templates (the preferred approach) and custom site definitions (which in some scenarios you must do)


Action: Create stp to deploy first version of the site. You know that in the future you need to change the site structure.
Reaction: Once you have created a site from a template, there is no way you can change structure via stp
Recommended action: Use site definition and feature stapling approach for further releases. In SP2010 you can make the changes for some features that is shipped via site definition using Feature Upgrade


Action: Build a wsp, place in it only eventreceivers for specific list with expectation that the list will have appropriate structure (someone should change the structure of list and then register the eventreceiver)
Reaction: As you can guess by action, you will not have stable behavior on the environment,since half of the deployment should be performed manually. I can only hope that you keep your deployment documentation up to date.
Recommended action: If you need to develop an eventreciever for the list that should have specific fields or content type, you should describe the list in the list template feature. Package the list template, list template instance and eventreciever register features as a bundle in wsp file.

Action: Every time is time for deployment - create a new site as a blank site - and create all object manually, copy files from original site to the destination and than replace hard-coded id in the file - manually
Reaction: It's messy and prone to errors.  There is no way to make such site automatic deployable
Recommended action: consider best practices of SharePoint development, use packages to deploy and feature upgrade for further releases. In case you need make some data structure changes - use SharePoint object model, write the code and package as a ReleaseFeature ( Feature stapling). This approach will allow you to keep track of all your structure changes on the existing site, plus you still can use the site definition to create a new site, and after the creation the feature stapling will do change work as it did for the existing one.


Action:Write a code to send an email\interact with end-users without environment variables
Reaction: If you miss configuration settings for your interactive logic, you miss control over it. You may end up with end-user notification sent while you are testing the application.
Recommended action: Choose approach that suits your needs best:
- property bag on the specific object (site, list, item ,etc ) (One of the way how to handle the property bag - SharePoint Property Bag Settings 2010)
- hidden list with environment variables.


Action: Manually copy to the environment all custom master pages and customized OTB SPD web parts
Reaction: It's messy and prone to errors.  There is no way to make such site automatic deployable
Recommended action: Package master pages in a feature to deliver to the server.
Regarding OTB SPD web part -there is no easy way, since the web part holds the id of the specific object from where the data is pulled. So this object will not be valid on other environment ( but in case you have developed on the copy of the prod content db, you are fine)
We have decided to develop a custom feature receiver to deploy such web parts - File provisioning: a hard-coded list id replacement


Action: Deploy report files with data source - a list asmx with hard coded List ID
Reaction: If you developed the data source (a list) that doesn't have the same id as in prod, you will have to manually change the data source after deployment.
Recommended action: To make it transportable - you can think of msi installer with parameters to swap hard coded value to a new one.


Action: Create a site groups manually and have the logic that gets these groups by IDs
Reaction: It’s prone to errors. If someone delete the group and then create a new one with the same name. You hardcoded value in the logic will break.
Recommended approach: Try the approach:
- create custom code feature which creates the groups. In the logic verifies if the custom groups exist and the permissions for them are right. If the groups don't exist, re-created them in the code.

Action: Create your own field as a counter that looks at id and has some increment value in the config file. Every time user deletes the records, you have to change the increment value in the config file.
Reaction: What???
Recommendation: I saw such application that works several years in the Prod with regular request from developer to change the increment. Last time I have checked the increment was gravitating to number 42)).
So never do such thing. This is approach is plain wrong. If you need,for some reasons, to keep ids for list items in strict order and you don't want to skip a number even though the user deletes the item and your next SharePoint id will not be subsequent to previous one, consider:
- to create a calculated field;
- to implement event receiver on the updated\created to keep the counter up to date.


And overall bad actions:


Action: Developer's objection: “It’s working on my local machine, so it is supposed to work everywhere”
Reaction: Depends on how you thought about implementation plan (if any), you may end up with the code that will work nowhere except your local machine.
Recommendation: Before you start coding for SharePoint, think through how you see your changes will be deployed.


Action: Administrator's easy fix: “If on the feature on the Prod gives you a headache - uninstall  the feature”
Reaction: Some sites will may lose the functionality that they needed from uninstalled feature.
Recommendation: Analyze what uses this feature 



Action: Project manager accusation\question: "This is sign of careless and sloppy work. How can we fix it?"  
Reaction: A team will not collaborate to fix the issue since they are considered careless and lazy
Recommendation: Respect the work of others, be aware the world is not perfect, we are here to make it work at some extend. Ask you question in the polite way to get a faster and constructive answer.



Good deeds to you and light consequences.

Wednesday, June 20, 2012

SharePoint: Is there life after development? Transition plan for SharePoint support team

Finally, my 2 year project on SharePoint 2007\2010 has been finished!
We started with 9 brave people in the team.
Our tasks were:
1. Build SOA infrastructure;
2. Bring data from disparate data sources into one application for measurement and management;
3. Build SharePoint farm;
4. Organize development and deployment process;
5. Develop custom business solutions based on SharePoint technology;
6. Build a report system to make use of the data in SharePoint;
It took us roughly 8 months of initial and hectic work.

And in another 1 year we have been asked (with 7 people):
 7. Extend functionality;
 8. Maintenance;
6.  Develop mobile solution to work with custom SharePoint sites;
7.  Upgrade 2007 to 2010.

Finished all. Now, it's time to transition support to the support team.
So, here is my a suggested transition plan for SharePoint support team.


The plan should be outlined by a person who holds knowledge. But the content should be filled by support team.  Also support team needs to get an estimate for every phase, the estimate should be recommended by a knowledgeable person.
They need to collaborate with developers to get the document done. 
Once the document is ready, a team lead\ or some other guy who knows the picture, needs to verify the document and to correct if necessarily.

Here are steps for transition plan:

1. Knowledge holders 
A main holder can be a team lead in the project. He should provide contact information to support team.
The contact info should contain all major areas that is needed to fully support the SharePoint farm and a responsible\ knowledgeable person in this area.

Here is an example of areas:
SharePoint Developer
SharePoint Architect
External system (BDC) administrators
DBA
Report developer
AD Administrator
ISA Administrator
SharePoint trainers

2. Environment  awareness
Support team should become aware:
 - what environments were build (ex: Dev, QC, Training, Staging , Prod);
 - the purpose of the environment;
 - the environment topology (how many servers with what roles, load balancing (ex. ISA) configuration)

The access plan should be developed: when to ask access to where. 

It will be milestones for the support team get them up to speed.

3.  Code awareness
- what the custom solutions and where they are;
- solution dependencies;
- how to build and deploy;

4. Development and deployment approaches
- is it possible go with no-downtime deployment and how (SharePoint : Farm solution deployment with no downtime. Update-SPSolution -local)


Approaches to deploy:
Content-based and code-based deployment, hybrid ( refer to previous posts):
When it makes sense to use:
- Sandbox solution - SharePoint 2010: Sandboxed solution restrictions and considerations
Hybrid Sandbox solution ;
- Farm solution;
- Content deployment

Each of these has own appropriate context and their advantages and disadvantages.

Note: This step is  for education purposes. You never know what knowledge a new member in SharePoint support team has.


5. Troubleshooting : common areas
As an example for our farm it is:
- SSRS
- External system check ( BDCM)

6. Backup and restore strategy


Happy supporting


HTML5/jQuery Webinar Week: Getting Data into Your HTML5 & jQuery Apps with the igDataSource Control

Infragistics organized HTML5/jQuery Webinar Week on 06/19-06/21.
http://www.infragistics.com/resources/webinars.aspx


Here are quick notes on the June 20, 2012 - Getting Data into Your HTML5 & jQuery Apps with the igDataSource Control (Intermediate  level)
All demo materials are posted on Webinar Followup: Working with Data in jQuery & HTML with igDataSource


Today's webinar was totally focused on Infragistics controls:
 - igDataSource;
 - igGrid 
 - igChart;
 - igLoader



These controls,a jQuery component, a simplify data access and management.

igDataSouce can work with:


On the Server side : Data (web services), REST GET, WCF REST (JSON&XML), JSONP Service, any Rest Service


On the Client side : binding with:JSON, XML, JavaScrip Object Arrays,Strings of XML or JSON,
JavaScript functions returning data in any of the formats above
 - Existing HTML structures (such as a HTML table filled with data)
-  Mashup scenarios




igGrid:
Supported features:
Local and remote data Paging
Sorting
Filtering
Data schema support: translate data from many
sources into a consistent format
multitouch, can be used in the tablet development;



igLoader:

Minifies the amount of the jscript to load.
You can load only that you need.
If you are interested to try the product, go to http://www.infragistics.com/downloads/default.aspx
and download:
NetAdvantage Reporting 2012 Vol. 1 Product And Samples

Tuesday, June 19, 2012

SharePoint : Farm solution deployment with no downtime. Update-SPSolution -local

Wondering if it's possible to re-deploy farm solution wsp file without downtime? 

In some circumstances, it's possible.


You can do no-downtime deployment if following is true:
 - Your modified wsp file doesn't contain new files or features. The most common scenario, you want to change some code logic that is an existing dll. Once you deploy your modified wsp, the new dll will be placed in GAC (in case you don't have versioning enabled).


- You have load-balanced WFEs. (ISA with SharePoint Farm ( a little bit more complicated scenario with off-box SSL termination))



Here is how it works:
1. ISA test.
Test first if site is up with one server drained. Test for all severs in the ISA farm object for portal.

2. ISA switch.
Drain the first WFE.

3. WFE work. Update-SPSolution
Copy new wsp file on the local drive.
Run
Update-SPSolution -Identity {name}.wsp -LiteralPath "{path}\{name}.wsp" -Local –GACDeployment

Make sure that you specify the parameter –local.
It will deploy files locally and locally restart IIS.

After such update you will see following:


I have 2 boxes in QC env: SOA-MOSS01-QC, SOA-MOSS02-QC.
In the last operation result I see that operation is been performed only on one box SOA-MOSS01-QC.
The second box haven’t been updated yet and at this time actively  serving user requests with old functionality in place.

NOTE:

The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively.

Uninstall-SPSolution also has –local parameter.
But, The Install-SPSolution cmdlet deploys an installed SharePoint solution in the farm. Use the Add-SPSolution cmdlet to install a SharePoint solution package io the farm.
I haven’t tested this option.  And I can see a caveat here, if we need to add-spsolution , we need to remove-spsolution first. And this command doesn’t have –local option. Most likely in the scenario when we need to re-install spsolution instead of update, we have to bring the portal down.

4. Test the result locally on that drained and already updated WFE.

5. ISA Switch
Re-switch the servers.

6. Repeat steps from 3-4.

Done.

P.S.
That is how it looks from an end-user:
He is still accessing the portal while the specific WFE IIS is down.



HTML5/jQuery Webinar Week: HTML5&jQuery - the Fundamentals. HTML5 Cheat Sheet

Infragistics organized HTML5/jQuery Webinar Week on 06/19-06/21.
http://www.infragistics.com/resources/webinars.aspx

Here are quick notes on the June 19, 2012 - Getting Started with HTML5 / jQuery webinar.
It's been announced that all demo materials are posted on jQuery & HTML5 Fundamentals Webinar Followup

What's HTML5 anyway?


HTML5 is "to be standard-based" and plug-in free web experience:
- html tags;
- JavaScript API's
- CSS (CSS3)

HTML5 should be standardized , but still it's in a draft version in W3C


So that means, Not every HTML5 tag is supported by every browser.

The standardization of HTML5 is driven by Microsoft, Apple, Google, which is a really good sign to make it a widespread technology.

Competitors:
 - Adobe Flash;
 - Microsoft Silverlight

HTML4 vs HTML5

Generic tags replaced with semantic tags

<object> = <video>
<div> = <footer>
<span> = <nav>

HTML5 Cheat Sheet tags is a great info  to have when you are coding in HTML5.
You want to escape old tags of old HTML, since they are depreciated.
HTML5 Cheat Sheet - Tags HTML5 Cheat Sheet - Event Handler Attributes HTML5 Cheat Sheet - Browser Support
HTML5 Cheat Sheet By InMotion Hosting - A Dedicated Server Provider

HTML5 Canvas Cheat Sheet

It's claimed that HTML5 is SEO friendly.
Here is a good attitude toward this claim in Is HTML5 Good for SEO?

Syntax of HTML5 controls visual attribute of the elements, has a syntax of animation similar to Silverlight

A few Javascript enhancement in HTML5:
 - Geo location
 -  Local storage - like isolated storage in .Net

jQuery - an open source js library,
VS suppports jQuery intellisense. VS2010\2012 shipped jQuery by default.

jQuery libraries: UI, Core and Mobile

jQuery can :
-Get\Post;
-call WebServices;
- work with oData

UI jQuery library can be downloaded with specific theme via ThemeRoller on jqueryui.com




One of the basics in the jQuery - use of selectors ("$").
You can select element by:
 - controlid  - $("controlid");
-  element type and if necessary select the specific id in those preselected elements - $("element"#"id")

And as a last note on  new element <video> :
<video>
<source 1>
<source 2>
</video>
Since not all codecs are supported by every browser , you can specify multiple elements of <source> to cover major browsers. It will check the right encoded video for the specific browser.

HTML5, here I come!