Friday, October 30, 2009

Sharepoint Tools

I have tried to summarise the list of development tools that you require on your day to day development. Please post your comment, if I miss anything here.

* App Pool Manager (http://www.harbar.net/apm/apm2.zip)
* U2U CAML Query Builder (http://www.u2u.info/SharePoint/U2U%20Community%20Tools/U2U%20Caml%20Query%20Builder%202007%20v3.1.0.0%20(windows%20version).zip)
* .NET Reflector (http://reflector.red-gate.com/download.aspx)
* SharePoint Explorer for WSS 3.0 ( )
* SharePoint Log Reader (http://www.blogaboutsharepoint.com/wp-content/plugins/download-monitor/download.php?id=1)
* BDC Meta Man Tool (http://www.lightningtools.com/pages/service/customerdownloads.aspx)
* SharePoint Inspector 1.0.0.0 (http://spi.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=1652#DownloadId=5854)
* SharePoint Explorer for WSS 3.0 (http://download.mondosoft.com/Ontolica/SharePointExplorer_V1_5_1_For_WSS3.zip)
* SharePoint Dispose Checker Tool (http://download.microsoft.com/download/B/4/D/B4D279A0-E159-40BF-A5E8-F49ABDBE95C7/SPDisposeCheck.msi)
* Windows SharePoint Services 3.0 SDK (http://www.microsoft.com/downloads/details.aspx?familyid=05E0DD12-8394-402B-8936-A07FE8AFAFFD&displaylang=en)
* Microsoft Office SharePoint Server 2007 SDK (http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en)
* Microsoft InfoPath 2007
* Microsoft SharePoint Designer 2007
* Microsoft Office 2007
* WSP Builder for SharePoint (http://www.codeplex.com/wspbuilder)
* Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions (http://www.microsoft.com/downloads/details.aspx?FamilyID=3e1dcccd-1cca-433a-bb4d-97b96bf7ab63&DisplayLang=en)
* Windows SharePoint Services 3.0 Tools: Visual Studio 2008 Extensions (http://www.microsoft.com/downloads/details.aspx?familyid=7BF65B28-06E2-4E87-9BAD-086E32185E68&displaylang=en)
* SharePoint Administration Toolkit v2.0
x64: http://www.microsoft.com/downloads/details.aspx?FamilyId=F8EEA8F0-FA30-4C10-ABC9-217EEACEC9CE&displaylang=en
x86: http://www.microsoft.com/downloads/details.aspx?FamilyId=263CD480-F6EB-4FA3-9F2E-2D47618505F2&displaylang=en
* SmartPart (http://www.codeplex.com/smartpart)
* SharePoint Installer (http://www.codeplex.com/sharepointinstaller)
* SOAP calls to the SharePoint web services (http://www.soapui.org/)

Saturday, October 24, 2009

Classes Vs Modules

Both classes and modules are reference types that encapsulate items defined within, but they differ in how these items are accessed from other procedures.
The primary difference between classes and modules is that classes can be instantiated and standard modules cannot. Because there is never more than one copy of a standard module's data, when one part of your program changes a public variable in a standard module, any other part of the program gets the same value if it subsequently reads that variable. Class data, on the other hand, exists separately for each instantiated object. Another difference is that unlike standard modules, classes can implement interfaces.
Classes and modules also employ different scope for their members. Members defined within a class are scoped within a specific instance of the class, and exist only for the lifetime of the object. The practical result is that, to access class members from outside a class, you must use only fully qualified names; for example, Object.Member. Members declared within a standard module, on the other hand, are shared by default, and are scoped to the declaration space of the standard module's containing namespace. This means that public variables in a standard module are effectively global variables because they are visible from anywhere in your project, and they exist for the life of the program. Unlike class members, members of standard modules are implicitly shared and cannot use the Shared keyword.

Tuesday, October 20, 2009

Difference between Physical Architecture and Logical Architecture

When most people talk about n-tier applications, they’re talking about physical models in which
the application is spread across multiple machines with different functions: a client, a web server, an
application server, a database server, and so on. And this isn’t a misconception—these are indeed
n-tier systems. The problem is that many people tend to assume there’s a one-to-one relationship
between the layers (tiers) in a logical model and the tiers in a physical model, when in fact that’s not
always true.

A physical n-tier architecture is quite different from a logical n-layer architecture. An n-layer
architecture has nothing to do with the number of machines or network hops involved in running
the application. Rather, a logical architecture is all about separating different types of functionality.
The most common logical separation is into an Interface layer, a Business layer, and a Data layer.
These may exist on a single machine or on three separate machines—the logical architecture doesn’t
define those details.

Monday, October 19, 2009

Use Client-Side JavaScript to Disable ASP.NET Validators


This came up this week on a project I am working on and now it will transcend to other projects.  I needed to rewrite some functionality utilizing client-side code.  Well, I could've done it server-side but I'm not a fan of unnecessary postbacks (or UpdatePanel"partial postbacks") so I decided to utilize JavaScript.
So I removed all the AutoPostBack="true"'s from the codebase and utilized my favorite property (Control.ClientID) to set the css display style to "none" or "" depending on which option was selected.  After all that was done I decided to test. Uh-oh, myRequiredFieldValidators were firing off since I was only using CSS* to hide / unhide myPanels. Instead of adding values to these controls to satisfy the expressions (which doesn't work all of the time (i.e. input type='file' or asp:FileUpload which don't allow the setting of a posted file as it is a security risk). I found out how to turn off validation.  It only took a little bit to add via codebehind.cs.
For this example, I have a CheckBox for checks that when clicked needs to disable aRequiredFieldValidator for CreditCard.  Stupid example I know.
check.Attributes.Add("onclick"string.Format("disable('{0}')", regexCreditCard.ClientID)); 
That will add the appropriate handler for client-side work. Now that that is out of the way, time for the actual disabling of the validator.
function disable(validatorId)
{
   
var validator = document.getElementById(validatorId);
   ValidatorEnable(validator, 
false);

Easy. Now you can use .NET to implement tamper-proof validation and disable / enable via JavaScript for a richer user experience.
* Using "display: none" is much better than simply using "visibility: hidden" for what's it's worth (at least it was for me).  With "visibility: hidden" you can tell that something issupposed to be there. With "display: none" you can't.  So in summary, "visibility: hidden" results in the page calculating this div as part of the flow.  With "display: none", it's not even accounted for.  It's as if it were never there!

Saturday, October 17, 2009

Microsoft's Live Framework

Microsoft is now positioning the Live Framework as the development framework for all of Microsoft’s Live services, not just Live Mesh. The Live Framework is akin to the .Net Framework, but is aimed to support developers writing mostly consumer-focused applications and services that need online/offline synchronization and work across the PC, Web and devices.

Here at Microsoft Professional Developer Conference (PDC), Microsoft announced that its Live Framework is now “live,” as in Microsoft allowing developers to sign up to test drive it.

Microsoft also made some tweaks to the framework since it first unveiled plans for it. Some of the names of the different subsystems within the framework are different. And the way that Live Mesh and Silver light work together has been fleshed out. The Framework now includes support for contacts, so that developers can build applications that will be designed to spread vi-rally.

We’re unleashing (contacts) in the platform. We’re making social-graph information available to developers to help them make their applications viral,” said Jeff Hansen, General Manager Services Marketing.

Here’s what the Live Framework looked like in April:

And here’s what the Live Framework looks like now:


The infrastructure services layer, even though it’s not visible in the newly revised slide, remains the same: It’s Windows Azure (Red Dog) and the building-block Azure services. The Mesh FX (framework) is now simply called the “programming model.” The Mesh operating environment  is now the Live Operating Environment. The operating environment consists of three pillars: Data, applications and communications.

“We want to make it easy for rich applications to extend to the cloud. But we also want to help Web apps break free of the browser frame and go offline,” explained Abhay Parasnis, General Manager of Live Mesh. “We also want to enable developers of applications inject social-graph data into their applications.”

Developers are going to be able to wrap a Silver-light application with an “invisible” Internet Explorer wrapper and publish an application to Mesh. Through the Mesh synchronization model, developers can enable their applications to run locally on any Mesh-enabled system or device. When users reconnect and go online, these local Silverlight apps will automatically synchronize.

So what’s next for Mesh? Microsoft will be moving more of its Live services onto the base Red Dog cloud operating system, officials said. Right now, Live Mesh is the first of those services that is (partially) hosted in Microsoft’s cloud. Microsoft also will continue to extend its base Live Services platform. Right now, that platform consists of shared identity; directory; communication and presence; search and geospatial; and contacts. Expect Live Workspace, groups, calendars and other core elements to be added to the platform in the coming months.

Microsoft vs Google

Regardless of whether you’re in the Google camp or in the Microsoft camp, I think it’s a fair statement to say that these differences of viewpoint accurately reflect each company’s core strength and focus: Google wants the browser to grow to subsume the desktop; Microsoft wants the desktop to grow to subsume the cloud.