Month: August 2009

Hosting WCF in SharePoint 2007

If your MOSS site has controls or webparts based on Silverlight, you may need a WCF service for server side operations. Hosting this WCF service in Sharepoint web application is obvious choice for most of developers, however, SharePoint 2007 does not allow WCF to be hosted inside a web application.  Therefore we need to create a custom VirtualPathProvider and install that using HttpModule. The Steps are: 1) Create a directory in the WSS site virtual directory so that relevant security permissions are simply inherited. Run the following – “%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe” -r –y .This Re-registers the current version of WCF and updates scriptmaps at the IIS metabase root 2) Create a WCF library and install it in GAC. 3) Create the relevant .svc file in the directory created above.put all thwe configurations in the a web.config specific to this folder. 4) Create a Virtual Path Provider and register it using a http Module. SPVirtualPathProvider isn’t coded to handle URLs that start with ‘~’. So we need to have our own as:   public class WCFVirtualPathProvider : VirtualPathProvider { public override string CombineVirtualPaths(string basePath, string relativePath) { return Previous.CombineVirtualPaths(basePath, relativePath); } // all other methods omited, they simply call Previous… like the above. public override bool FileExists(string virtualPath) { string fixedVirtualPath = virtualPath; if ( virtualPath.StartsWith(“~”) && virtualPath.EndsWith(“.svc”) ) { fixedVirtualPath = virtualPath.Remove(0, 1); } return Previous.FileExists(fixedVirtualPath); } protected override...

Read More

Homeschooling Through Technology

The educational process can be tough on kids and parents alike. It can be difficult to prevent it from becoming mundane. That’s why I think apt use of technology is so important—it allows both the student and the educator to remain excited with their educational journey. Having done homeschooling for a while a bit now, I can definitely say that my child is given the opportunity to choose what they want to learn and that we have a wealth of resources to draw from beyond the traditional classroom.   What to learn biology and butterflies?  Order a kit to raise your own butterflies, watch them grow and learn about what a chrysalis is and what metamorphosis is. Google Maps is a great tool to use if you’ve reached a point in your learning path dealing with either geography or history. At this point, I think we’ve all messed around with the satellite or Street View feature in Google Maps (how many images of people “caught out” have we seen Google capture?). However, thanks to tools built into the service, it can also be a rather useful educational resource. History and dates are tough for young children to grasp, but let’s say your currently teaching a unit on the Civil War. Rather than simply looking at static maps, plot out Grant’s march to the South or Lee’s penetration into Union territory....

Read More

Does Recycling Work?

Interesting article.  People are lazy, make it easy for them or they’re not going to do it.  And let’s face it, a little recycling is better than none, right?  Single stream may degrade the materials and amount, but isn’t that offset by the fact that more people will do it? These days, some cities are making recycling as mindless as possible by implementing "single stream" recycling, in which paper, metal, plastic, and glass are all mixed together in one bin. Should this be our standard nationwide? Proponents argue that it makes people more likely to recycle; others counter that the quality suffers. Miller is all for simplicity, but says single stream "degrades the material and reduces the amount that can be made into new products."...

Read More

Compost – Carbon-to-Nitrogen Ratios

A couple of months ago I posted about Compost-What’s In and What’s Out. However, it’s not enough that you throw your organics, food and yard waste into your compost bin (although it’s a good start!)  You must also be aware of the carbon to nitrogen ratio so as to keep your compost happy, healthy, and not stinky!  For best performance, the compost pile, or more to the point the composting microorganisms, require the correct proportion of carbon for energy and nitrogen for protein production. Scientists (yes, there are compost scientists) have determined that the fastest way to produce fertile, sweet-smelling compost is to maintain a C:N ratio somewhere around 25 to 30 parts carbon to 1 part nitrogen, or 25-30:1. If the C:N ratio is too high (excess carbon), decomposition slows down. If the C:N ratio is too low (excess nitrogen) you will end up with a stinky pile. Below are the average C:N ratios for some common organic materials found in the compost bin. For our purposes, the materials containing high amounts of carbon are considered "browns," and materials containing high amounts of nitrogen are considered "greens." Estimated Carbon-to-Nitrogen Ratios Browns = High Carbon C:N Ashes, wood 25:1 Cardboard, shredded 350:1 Corn stalks 75:1 Fruit waste 35:1 Leaves 60:1 Newspaper, shredded 175:1 Peanut shells 35:1 Pine needles 80:1 Sawdust 325:1 Straw 75:1 Wood chips 400:1 Greens = High...

Read More