Good one to file away:
http://developer.yahoo.com/performance/rules.html
Sunday, September 05, 2010
Thursday, August 26, 2010
Project Server 2010 Integration
Someone was asking about a Project Server 2010 integration with a third party app at her company so I thought of documenting this on this post.
API
Project Server 2010 has an API called the Project Server Interface (PSI). Project Professional 2010, Project Web App, LOB, and other third-party applications use the PSI to access Project Server data in the Draft, Published, and Archive databases. The PSI is available through WCF services and through ASMX Web service calls by back-end LOB applications, or through a PSI proxy. Project Server 2010 public events enable development of custom processes such as adding and enforcing business rules, validation, data processing, notification services, and workflow. Note: It is highly recommended to use the WCF services instead of the older ASMX services as it supports a lot of the WS-* standards.
How To
To get a DEV environment setup, see this link.
In order to have a continuously running client to respond to events from Project Server follow these steps:
1. Create a Windows Service
2. Create a proxy for the Project Server WCF web service
3. Add code to respond to events
4. Do your stuff
5. Add a setup project to your final project and build an MSI to deploy the Windows Service
References
Projectd Server 2010 SDK
Project Server Interface Overview
http://msdn.microsoft.com/en-us/library/ms504195.aspx#pj14_Programmability_Scheduling
API
Project Server 2010 has an API called the Project Server Interface (PSI). Project Professional 2010, Project Web App, LOB, and other third-party applications use the PSI to access Project Server data in the Draft, Published, and Archive databases. The PSI is available through WCF services and through ASMX Web service calls by back-end LOB applications, or through a PSI proxy. Project Server 2010 public events enable development of custom processes such as adding and enforcing business rules, validation, data processing, notification services, and workflow. Note: It is highly recommended to use the WCF services instead of the older ASMX services as it supports a lot of the WS-* standards.
How To
To get a DEV environment setup, see this link.
In order to have a continuously running client to respond to events from Project Server follow these steps:
1. Create a Windows Service
2. Create a proxy for the Project Server WCF web service
3. Add code to respond to events
4. Do your stuff
5. Add a setup project to your final project and build an MSI to deploy the Windows Service
References
Projectd Server 2010 SDK
Project Server Interface Overview
http://msdn.microsoft.com/en-us/library/ms504195.aspx#pj14_Programmability_Scheduling
| Reactions: |
Tuesday, August 24, 2010
Startup with no venture capital
I was thinking about how to form successful startups that succeed without venture capital. What is that elusive formula that only some have managed to master to turn a struggling startup into a profitable powerhouse?
After some thought on this, I have picked out the following points:
Innovation
Possibly the single most important thing that will drive a startup to profitability. Lacking significant funds, a startup needs to out-innovate its competitors so that it can cement itself as the leading pioneer in its field.
Before starting a startup it is also important to research whether the target market is already over-saturated with the intended product or service. An overly saturated market obviously makes innovation difficult.
Talent
Try and get the best people your money can buy. If you do not have the money to compensate them appropriately, try and lure them by giving shares in the company.
Smart people working together make beautiful music, so get the smarted you can afford.
Patents
With ground breaking innovation, it is also important to protect your ideas. For a nominal fee, you can patent your idea with the US Patent & Trademark Office.
Relationships
Apart from award winning products, a strong ecosystem is essential. It is important to seek and cultivate strong relationships with some of the leading companies that will be potential users of your product.
Try and cultivate these relationships initially by out manevouring your competitors. Do not worry about profitability too much, at this stage it is important to get an ecosystem in place.
Expansion
Once your product starts selling in the domestic market, it is important to think global and start to build relationships on a global scale. Use the domestic market as a test bed of your ideas and if it works, stick to the formula and expand.
Profitability
It is very important to keep a tight eye on the balance sheet and try to get profitable as soon as possible. Without venture capital, there is only so much your own money will take you.
Always focus your efforts on reducing waste, consolidating efforts, making early decisions to eliminate potentials dead-ends and intruct your employees to do the same.
Recognition
Once your product gains traction, make sure to nominate your ideas/products for recognition in your target field. Awards and reviews from leading commentators are invaluable if you have a small marketing budget.
A positive review from a leading body such as a blog site, magazine or even a formal award will give you much needed PR.
Conclusion
These ideas above represent some points to keep in mind in the highly competetive world of startups.
A large percentage of startups fail every year, but with proper thought and foresight, you can maximize your chance of success.
After some thought on this, I have picked out the following points:
Innovation
Possibly the single most important thing that will drive a startup to profitability. Lacking significant funds, a startup needs to out-innovate its competitors so that it can cement itself as the leading pioneer in its field.
Before starting a startup it is also important to research whether the target market is already over-saturated with the intended product or service. An overly saturated market obviously makes innovation difficult.
Talent
Try and get the best people your money can buy. If you do not have the money to compensate them appropriately, try and lure them by giving shares in the company.
Smart people working together make beautiful music, so get the smarted you can afford.
Patents
With ground breaking innovation, it is also important to protect your ideas. For a nominal fee, you can patent your idea with the US Patent & Trademark Office.
Relationships
Apart from award winning products, a strong ecosystem is essential. It is important to seek and cultivate strong relationships with some of the leading companies that will be potential users of your product.
Try and cultivate these relationships initially by out manevouring your competitors. Do not worry about profitability too much, at this stage it is important to get an ecosystem in place.
Expansion
Once your product starts selling in the domestic market, it is important to think global and start to build relationships on a global scale. Use the domestic market as a test bed of your ideas and if it works, stick to the formula and expand.
Profitability
It is very important to keep a tight eye on the balance sheet and try to get profitable as soon as possible. Without venture capital, there is only so much your own money will take you.
Always focus your efforts on reducing waste, consolidating efforts, making early decisions to eliminate potentials dead-ends and intruct your employees to do the same.
Recognition
Once your product gains traction, make sure to nominate your ideas/products for recognition in your target field. Awards and reviews from leading commentators are invaluable if you have a small marketing budget.
A positive review from a leading body such as a blog site, magazine or even a formal award will give you much needed PR.
Conclusion
These ideas above represent some points to keep in mind in the highly competetive world of startups.
A large percentage of startups fail every year, but with proper thought and foresight, you can maximize your chance of success.
| Reactions: |
Tuesday, August 10, 2010
High Performing VM
A lot of my colleagues (including myself) make heavy use of VMs for software development, testing, configuration and presentation. As the complexity of a solution grows, the need of the number of simulataneous machines grows and performance suffers.
There are 3 major bottlenecks to performance:
Tweaks
Credit: http://www.bryonbrewer.com/?p=223
In VMWare, an instance shutdown may be slow. To improve shutdown speed:
In C:\ProgramData\VMware\VMware Workstation\config.ini AND C:\ProgramData\VMware\VMware Player
Memory
On a typical consultants laptop, memory is capped at 8G for now. There seems to be some support in Windows 7 for using flash drives to extend memory which I am still researching.
This post holds potential: http://windows.microsoft.com/en-US/windows7/Using-memory-in-your-storage-device-to-speed-up-your-computer
The Transport Channel
USB 3.0
With the advent of USB 3.0, we are promised a theoretical top speed of 5Gbit/sec. versus USB 2.0's 480Mbit/sec. The cable length is recommended to be less than about 9 feet long, down from the USB 2.0 16-foot limit.)

There are some good USB 3.0 Express cards available for laptops.
Drive Speed
With the availability of solid state drives and USB 3.0, speed has definitely had a boost. Although pricey now, the hope is that these drives will drop to an affordable price in the near future.
Solid State Drives
Some SSD drives available at the time of writing are given below:
There are 3 major bottlenecks to performance:
- Memory
- Drive Speed
- Transport Channel (transfer spees, bus size etc.)
- Tweaks (tips on squeezing the last drop of performance juice out of your VM host)
Tweaks
Credit: http://www.bryonbrewer.com/?p=223
In VMWare, an instance shutdown may be slow. To improve shutdown speed:
In C:\ProgramData\VMware\VMware Workstation\config.ini AND C:\ProgramData\VMware\VMware Player
prefvmx.minVmMemPct = "100"
mainMem.useNamedFile = "FALSE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE
Memory
On a typical consultants laptop, memory is capped at 8G for now. There seems to be some support in Windows 7 for using flash drives to extend memory which I am still researching.
This post holds potential: http://windows.microsoft.com/en-US/windows7/Using-memory-in-your-storage-device-to-speed-up-your-computer
The Transport Channel
USB 3.0
With the advent of USB 3.0, we are promised a theoretical top speed of 5Gbit/sec. versus USB 2.0's 480Mbit/sec. The cable length is recommended to be less than about 9 feet long, down from the USB 2.0 16-foot limit.)

There are some good USB 3.0 Express cards available for laptops.
| Brand | Cost |
|---|---|
2-Port ExpressCard 34mm Laptop SuperSpeed USB 3.0 Adapter Card![]() | $31.95 |
LaCie USB 3.0 ExpressCard/34 130998![]() | $59.13 |
Drive Speed
With the availability of solid state drives and USB 3.0, speed has definitely had a boost. Although pricey now, the hope is that these drives will drop to an affordable price in the near future.
Solid State Drives
Some SSD drives available at the time of writing are given below:
| Drive | Speed | Cost | Description |
|---|---|---|---|
ADATA Nobility![]() | R/W up to 200/170 MB/s | $414.99 | Equipped with blazing fast USB 3.0 8 Channel architecture offering extraordinary performance USB3.0 performance R/W up to 200/170 MB/s Free Download applications: UFD to GO,OS to GO, and Norton Internet Security 2010 (60 days trial version) Hot Plug & Play. |
| Reactions: |
Monday, August 09, 2010
Microsoft Code Samples
http://1code.codeplex.com/
Microsoft All-In-One Code Framework delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented to demonstrate one frequently-asked, tested or used coding scenario based on our support experience in MSDN newsgroups and forums. If you are a software developer, you can fill the skeleton with blood, muscle and soul. If you are a software tester or a support engineer like us, you may extend the sample codes a little to fit your specific test scenario or refer your customer to this project if the customer's question coincides with what we collected.
| Reactions: |
Thursday, August 05, 2010
SharePoint 2010 Development
Getting Started
You will need Visual Studio 2010 with a local instance of SharePoint 2010. You will also need to install Visual Studio 2010 SharePoint Powertools to get additional templates for SharePoint.
Getting Started
You will need Visual Studio 2010 with a local instance of SharePoint 2010. You will also need to install Visual Studio 2010 SharePoint Powertools to get additional templates for SharePoint.Best Practices for SharePoint Development
Best Practices Resource Center
Articles
Link | Description |
|---|---|
Visual Studio 2010 Tools for SharePoint Development | Introduction to SharePoint tools in VS 2010 |
| Site Definition Walkthrough | Step by step article to creating a site definition |
Ted Patterson Videos
Getting Started
How to create project and deploy
Adding SharePoint Project Items
Creating Site DefinitionsHow to create project and deploy
Adding SharePoint Project Items
MSDN Videos
| Link | Description |
|---|---|
Starter Master Pages | Starter Master Pages for SharePoint 2010 are a clean, commented starting point for creating your own SharePoint 2010 branding. |
Patterns and Practices Guidance for SharePoint 2010(PDF) or Direct Home Page | SharePoint 2010 introduces new ways of developing applications for the SharePoint platform. With SharePoint 2010, you can build multi-tenant, hosted applications on an infrastructure that is scalable, secure, and stable. You can create powerful, data-driven solutions using SharePoint lists or external data. You can create client-side functionality that takes advantage of modern browser capabilities and Silverlight to provide a rich user experience. These new features, operational models, and development tools make SharePoint a more complete application platform, and it also introduces new design and development decisions for customers. This guidance helps customers understand the decision points, tradeoffs, and performance implications that the new functionality introduces; it also helps customers learn how to take best advantage of the new capabilities that SharePoint 2010 provides. It includes a written guide, eight reference implementations, source code for a resuable library, and 25 How-to topics |
SharePoint Manager 2010 | The SharePoint Manager 2010 is a SharePoint object model explorer. It enables you to browse every site on the local farm and view every property. It also enables you to change the properties. |
| Starter code samples | Microsoft Project Server 2010 Solution Starters demonstrate the power and extensibility of SharePoint 2010 and Project 2010 and help you getting started qucikly! Both installable binaries and source code are available. |
Best Practices for SharePoint Development
Best Practices Resource Center
| Reactions: |
Thursday, July 29, 2010
ADFS 2.0 and SharePoint Client OM
The Issue
Recently we implemented a series of innovative SharePoint 2010 websites for a high profile client, which is secured by ADFS 2.0.Login via the browser works great and the user is re-directed to an ADFS login page, which presents a variety of login methods.
However, we encountered an issue when trying to login via the Client OM. For example, the following code throws a forbidden error:
ClientContext ctx = new ClientContext(webUrl); ctx.Credentials = CredentialCache.DefaultCredentials; ctx.RequestTimeout = 30000; var web = ctx.Web; var lists = ctx.LoadQuery(web.Lists); /* Execute the query */ ctx.ExecuteQuery(); StringBuilder sb = new StringBuilder(); sb.Append("Lists in " + webUrl + ":" + Environment.NewLine); sb.Append("---------------------------------------------------------------------" + Environment.NewLine); foreach (var list in lists) { sb.Append(list.Title + Environment.NewLine); } new frmDialog(sb.ToString(), "Success!!!").ShowDialog();
The solution to this problem was not so obvious.
I will first post the solution and then discuss the theory behind it in another detailed post.
The Solution
1. Download the helper dll from here
2. Add it to yor primary project.
3. Add a few exrta lines to your object model invocation code:
ClientContext ctx = new ClientContext(webUrl); ctx.Credentials = CredentialCache.DefaultCredentials; ctx.RequestTimeout = 30000; /* Configuire the handler that will pick up the authenticated cookie */ ctx.ExecutingWebRequest += new EventHandler<WebRequestEventArgs>(ctx_ExecutingWebRequest); var web = ctx.Web; var lists = ctx.LoadQuery(web.Lists); /* Execute the query */ ctx.ExecuteQuery(); StringBuilder sb = new StringBuilder(); sb.Append("Lists in " + webUrl + ":" + Environment.NewLine); sb.Append("---------------------------------------------------------------------" + Environment.NewLine); foreach (var list in lists) { sb.Append(list.Title + Environment.NewLine); } new frmDialog(sb.ToString(), "Success!!!").ShowDialog();...
void ctx_ExecutingWebRequest(object sender, WebRequestEventArgs e)
{try{e.WebRequestExecutor.WebRequest.CookieContainer = Helper.AttachCookie(txtWctx.Text, txtWtrealm.Text, txtWreply.Text, txtcorpStsUrl.Text, txtUserId.Text,
txtPassword.Text);
}
catch (Exception ex){Helper.InValidateCookie();
new frmDialog(ex.ToString(), "Error Setting Auth Cookie").ShowDialog();
}
}
Tools and Resources
I created a demo client which can be used to test SharePoint Client OM access to a SharePoint url. It is configurable and will accept the Wctx, Wtream, Wrepy and STS Role parameters. It also has a helper to build those urls by specifying a Web url and STS Root url.
Download it from here.
The complete source code can be downloaded from here.
| Reactions: |
Subscribe to:
Posts (Atom)



