Day 1 | Day 2 | Day 3 | Day 4
Well Day One was a great introduction and overview of some of the things to come and I am looking forward to jumping right in. Day 2 consisted of all breakout sessions.
Advanced Web Part Development
During the Advanced Web Part Development session the speaker bean by discussing the capabilities and direction of the development of web parts in SharePoint 2010. One of the fundamental items of note here is the difference between SharePoint 2010 and MOSS is the ability to create WSS Web Parts and ASP.Net Web Parts for use on your sites. Going forward however WSS Web Parts (.dwp) are going away and ASP.Net Web Parts are now the way to create web parts for SharePoint 2010. Code Access Security has not changes in SharePoint 2010 and the ability to leverage this and throttle resources becomes a big deal in allowing developers to create good web parts and in the case of a “bad web part” throttle them so that in a shared/hosted environment this bad web part does not take down the system. Another point of emphasis in developing web parts in 2010 is ensuring the web parts are deployed using a SharePoint Feature. Another great new feature to web parts is the ability to version web parts on the page. As a developer however you do not have to worry about managing the versions, it just happens on the page. AJAX also becomes a first class citizen for use in your web parts. The Client Object Model is also a new set of APIs that will allow developers to create web parts that can be used via rich client applications. Several new cross-site scripting safeguards are note available as well. Lastly, the demonstration went to developing web parts for Wiki pages. Wiki pages can now have web parts added to them and using special tagging a developer can then determine where in the Wiki these parts manifest themselves.
Scaling SharePoint 2010 Topologies
During this session the speaker began discussions around the various new topologies supported with SharePoint 2010. The key to note here is that the various topology restrictions that we had in MOSS 2007 have been lifted. One of the key restrictions with MOSS was the ability to have only 1 index server per SSP in your farm. With SharePoint 2010 we now have to ability to have multiple index servers in the SSP for the Farm. This means shorter crawl times and the ability to merge and rank multiple content sources. Another major point that was made during this session was the ability to sandbox and throttle various services for sites or solutions within the farm. This then leads to better predictability of the services and physical hardware needed. Lastly, as with MOSS in the past is understanding the ability to spread various services across the farm and scale the system out various topologies and adding web front end servers, application servers, and search servers to the farm to manage the needs of the organization.
Social Computing and My Sites
One of the major themes for SharePoint 2010 is centered around Social Computing and My Sites. Out-of-the-Box each user can be enables with a My Site which will give them a new organizational view using a Silverlight control. One of the cool things about SharePoint 2010 is that Silverlight is now a first class citizen where by several features within SharePoint are now a part of the core system but more on that later in the Silverlight session I attended later on during the conference. My Sites within 2010 also now gives the users searchable feeds that can be exposed via RSS and available via mobile devices as well.
Building Applications with InfoPath and SharePoint 2010
One of the more exciting sessions of the day was the InfoPath 2010 session. In this session the speaker showed us a demo of how to build an application with InfoPath 2010 and SharePoint 2010 using workflows. The great thing about this solution was there was no code used to build the solution! The solution was a procurement request form which users could use to request the purchase of new office equipment. The form was built using InfoPath 2010 with several views. The form leverages some of the new controls in InfoPath one of which is the User Picker control which is now integrated fully into InfoPath. The solution also leverages the External data lists to help manage the product listing and the various categories that was used to manage the products. Lastly, using SharePoint Designer and the new workflow rules including the ability to build Visual Workflows using Visio allowed for the proper routing of the forms to the appropriate approvers. The last piece of the solution was to use various out of the box content query web parts to create an Approver Dashboard and and Request dashboard which allows the users and approvers to manage the request process.
Day 1 | Day 2 | Day 3 | Day 4
On October 19th I had the pleasure of attending the SharePoint Conference 2009. This was the first time the SharePoint product team spoke publicly talk about what we are doing with SharePoint 2010. Nonetheless I was excited and looking forward to some of the cool features and capabilities of the conference, not to mention we are in Las Vegas! I have decided to share a daily review of my days at the conference and share with you what I saw and some of the cool things that are coming down the pike with this product. My track was mostly focused on development so my contribution here will be from the developers eyes and I will try to only share what’s new and improved.
The Keynote
The morning started with Tom Rizzo warming up the crowd for the keynote speaker Steve Ballmer. They then began by introducing SharePoint 2010 to the audience of 7400+. Tom started with a demonstration of some of the cool new development and integration capabilities in SharePoint 2010. He touched on the close integration with Visual Studio 2010 (which went to Beta 2 on this day and is available for download). One of the huge pain points with SharePoint 2007 was the development of Web Parts, Solutions, Features, and debugging SharePoint. With SharePoint 2010 these pain points have been addressed.
There was much discussion about SharePoint Online as well. Ballmer emphasized that SharePoint is currently being hosted in the cloud and SharePoint 2010 is extending our capabilities to provide SharePoint as a Service. Keeping in mind that on premise and cloud can integer mingle within and organization as there might be some areas of the business that it is okay to host in the cloud while other parts of the business should be kept in house.
The Developer Experience
Visual Studio 2010 now contains a Feature Editor and a Package Editor (MOSS 2007 Solutions are now Packages in 2010). These editors get you away from having to manage the various .xml files (elements, manifest, etc) that are required to create Features and Packages. The editors give you a UI to manage these items from within your solution and then generates the proper manifest files required for deployment. There is now a Visual Web Part Designer, which will allow developers to create web parts in a very similar way developers create ASP.Net User Controls today, allowing for dragging and dropping of controls and code behind along with a design view. In the past one would have to manually write all this code using your favorite language (VB, C#, etc.) and then hope you got the HTML correct etc. or use a third party solution like SmartPart, Son of SmartPart or a similar framework, now it is built in! Another major pain point with SharePoint 2007 are the manual steps that are required to deploy and activate a feature before you can run and debug your Solution/Feature. With the integration with Visual Studio 2010 this is automated for you out of the box using one of the project templates that are now available Out-Of-Box. This means once I have written my code and it is ready for testing/debugging all I have to do now is hit F5! This integration will save developers hours of dealing with the debug process. In debug mode the developer can now turn on the “Developer Dashboard” which is a report at the bottom of the SharePoint page which displays processing information, call stack details, and other relevant performance metrics about this page. Allowing the developer to get a quick snapshot at the performance of the current page and where bottlenecks might exist. Lastly, one of the biggest items that was received with great applause was the fact that SharePoint 2010 can now be run on Windows 7 and Windows Vista SP1 or greater in developer mode. This is a stand-alone mode for SharePoint where the SharePoint Services are running on the developers machine and cannot be connected to any other farm, etc and is not avail for production, the caveat here is your machine MUST be x64. This too has been major point of contention whenever I have to help setup a development environment for SharePoint 2007 as you previously needed a Windows 2003 Server to run SharePoint to perform development. This helps get away from having Virtual PCs for development sandboxes or some similar setup which can be clunky and slow.
Tom also showed the cool new integration with the new Office 2010 client integration. One of these highlights was leveraging Visio 2010 to design and create workflow processes which can then be imported into SharePoint Designer which will then generate the appropriate rules and actions for the workflow. Secondly, leveraging the new Business Connectivity Services (formally BDC) with External Lists. The demonstration involved connecting via SharePoint Designer to a SQL Server Database which had customer contact information. With a few clicks the contents of the DB was connected to a SharePoint List, which can be viewed and edited via the SharePoint List in the browser. He then continued to connect the contacts to Outlook 2010 Contacts and surfaced via Outlook. He then open one of the contacts in Outlook and edited some properties and saved. The data was then updated in both the SharePoint List and the SQL Database with a simple edit from Outlook, very powerful keeping users in the applications they know how to use while helping to manage business processes/data. Needless to say the team worked on making SharePoint Designer a great tool for building custom solutions for SharePoint with little to no code.
SharePoint Developer Platform Overview
The first breakout session of the day I attended was the Developer Platform Overview. In this session the speaker discussed the various platform features what make SharePoint 2010 a great platform for development. This session focused on 3 areas of development in SharePoint 2010, Developer Productivity, Platform Services and Deployment.
Developer Productivity
As mentioned earlier developer productivity will be enhanced significantly due to the tight integration with Visual Studio 2010. Developers will be able to build, debug, and deploy thier solutions right from within Visual Studio, no more jumping back and forth between the command line, Central Admin, and Visual Studio. Also, there has been major enhancements to SharePoint Designer to make it a first class citizen when it comes to designing and creating SharePoint Artifacts. IT becomes a kind of “No Code” tool for creating things such as workflows, Business Connectivity Service Entities, managing list schemas and other SharePoint artifacts. Visio also now comes into the fray as a way to visually create workflows which can then be imported into SharePoint designer to add rules. By leveraging the new Visio Services one can also get a visual view into the steps and the current status of a currently running workflow to see its status.
Platform Services
As for platform services some changes to note were the replacement of CAML with XSLT for List Views. Relational Lists which will allow for Transacted Cascade deletes or restricting a delete due to a relational dependency. Using Excel Formulas to validate the entry of list items. Also Business Connectivity Services are now a part of the SharePoint Foundation (formally WSS), this is big because in the past the BDC required the SharePoint Enterprise version to provide this capability, now it is a part of the core system. New Client Object Model (OM) to allow for building of Windows Applications and other applications to get at SharePoint data. A REST API to allow for strongly typed lists via the Client Side OM. Integrated LINQ to SharePoint API allowing strongly types server side lists. Lastly, but definitely not least is the tight integration of Silverlight 3. SharePoint 2010 has a Silverlight web part used as a media player which will allow for improved streaming of video via SharePoint. Also several web parts such as the Organization browser, List and Site Creation wizards are all built using Silverlight. and Finally a Silverlight Web part which allows the user to add any Silverlight application to the SharePoint page.
Deployment
As far as new deployment features go the Sandboxed Solutions Feature of SharePoint 2010 allows you to create and deploy custom code into a production farm with out affecting any other sites/site collections. The Sandbox provides a Site Collection for which this custom code is executed and via Code Access Security (CAS) policies the code is restricted to the capabilities of the CAS policy and the other policies set by the IT Admins such as throttling of resources available for the Sandboxed application. This along this the integration of the feature and package designers allow for a MUCH Easier deployment story and will allow developers to reduce the cycles between building and debugging their application.
Developer Tools Overview
The next session was to take a step deeper into the abyss of how development will be done with SharePoint 2010. The session was a little deeper dive into some of the features that Tom showed in the keynote session and the tools discussed in the Platform Overview. As many in the SharePoint development worlds knows SharePoint 2007 lacked virtually any integration with Visual Studio. Sure there was the templates for SharePoint but there really was no such thing as F5 debugging, as you’d need to know how to attach to an external process manually, not to mention the fact that you needed a server or a copy of the SharePoint.dll file manually added to do any SDK development. Well fans no more! Visual Studio 2010 has all the templates needed and with a little step by step instruction SharePoint 2010 can now be installed on your client machine (Windows 7 or Vista SP1). With the advent of SharePoint running in this developer mode and the integration with Visual Studio 2010 You project is now aware of what needs to be started when you hit F5 from Visual Studio to debug your project based on project settings that are configured when you create your project (or via project settings). When you run in debug mode for these projects Visual Studio will also now package and deploy your project to the SharePoint site so that you can debug/test your solution. Also tight integration with TFS and Team Build now allow you to seamlessly manage your application life cycle and source control without jumping through the many hoops we had to do in the past.
Visual Web Parts also meant that I no longer have to write my web part markup in my code behind. This feature uses the ASP.Net User Control foundation and builds on top of it. It should be noted here that WSS Web Parts are being phased out in SharePoint 2010 and developers are encouraged to use ONLY ASP.Net Web Parts going forward. However being able to drag and drop controls onto a Web Part designed for SharePoint is in itself a MAJOR step forward.
The Business Connectivity Services (BCS) designer is also integrated into Visual Studio. In SharePoint 2007 this tool was a separate application when designing entities for the BDC or you used a completely different 3rd party designer to design you Application Definition files. The tool will allow you to seamlessly create methods for your BCS application for (CRUD) and or other REST operations all while working inside your project.
As for improvements to the development of workflow, we now have the ability to design workflows from Visio import them to SharePoint Designer which can then eventually be imported to Visual Studio. The key here is to insure that your workflow is one of the “Reusable Workflow” type. This is a new workflow concept added to SharePoint 2010 that allows the developer to create a work flow that can truly be reused throughout the farm. Secondly, it should be good to note that Workflows can now be bound to items other than just a List. The import from SharePoint Designer to Visual Studio is a one way import as once code is added to the workflow SharePoint Designer will not be able to manage the workflow.
Event Receivers are now much easier to build and they can be run against the site as well as a list now. The tools integration to make this development task easier is done via a wizard with will give you context sensitive options based on the site you have connected to when you create your project. What this means is the tools will help to guide you in selecting the proper fields, receiver events, and any other related options needed to code your event receiver.
Lastly, an area of SharePoint development that has been a pain in the past is the building of packages (solutions) and features then deploying them throughout the development lifecycle. In the past this was done using batch files or some other scripting mechanism to build the .net code, build the solution, add the solution to SharePoint, Activate the solution, etc. and if you had new code to be deployed these steps had to be reversed. Well now with SharePoint 2010 and Visual Studio 2010 these tasks are now integrated! When you build or Deploy Visual Studio now knows what steps are required. The other nice thing about this is as a part of the project settings you now get a SharePoint Tab which will allow you to create custom actions and integrate them into your build/deploy process. The thing to note here however is that ONLY “Startup” projects in your solution will be build and deployed in this automated fashion. Good news is Visual Studio allows for multiple startup projects in a solution. So you can have all your packages in one big solution and still get the nice integration. The Feature and Package Designers are also integrated to help build the features and packages needed for your solution to be deployed. These tool help build the elements.xml and manifest.xml files required for the .wsp to be built. The goal of the SharePoint team is to keep you from having to manually build these files, also the designers will only give you those options/features available to you based on the project and the scope of the feature/package, so it is context sensitive as well helping to ease the burden of figuring out what is needed. You can add to these elements.xml and manifest.xml files as well as take full control and separate them from the designer if you wish to do so. Things to note however is that there is 1 package per Visual Studio project. When a new item is added to the project a feature is created to associate with the new item and the feature is automatically added to the package for deployment. If a feature or item is removed the feature and package are also updated to reflect the change.
If you have ever browsed to a web site or built a site with AJAX you might have seen some cool features such as pop-ups, context-sensitive search boxes, and all the other cool controls you find in the AJAX Toolkit. However try browsing to that site over an air card or a 3G connection or even worse dial-up, unfortunately there are some still suffering this pain :(, you will quickly notice that the niceties you get with AJAX quickly become a hindrance and annoying sometimes preventing you from getting to where you want to do. Well today I stumbled upon an article on ScottGu’s blog that might help. It is the latest release from the ASP.Net Team “Microsoft AJAX CDN”. At quick glance I was wondering if this meant AJAX Canadian, just my dyslexia mixing with the world of acronyms. Anyway, Microsoft AJAX CDN will allow you to perform caching of content via “edge servers” allowing you to serve content faster. If you have an Microsoft AJAX enabled site, then this is worth a look.
I have been writing custom code for SharePoint sites for several years now. As one knows when writing code testing, testing, testing and a good code review can help to ensure solid code. One of the major issue when writing any SharePoint code is the misuse of the SharePoint API in the failure to Dispose of your objects. As you may guess not disposing, especially with the SharePoint API, can cause memory leaks which you will pay for dearly over time. Well one tool that can aid with ensuring that you catch some of these potential memory leaks is a tool called SPDisposeCheck. It is a command line tool which will allow you to give a path for a set of DLLs and then recursively check all DLLs in the path for violations of the SPDispose best practices as outlined on MSDN. The tool is quick and easy to run and spits out the violations to your console. A quick use of the “>>” operator however will allow one to save this to a text file which can then be shared if necessary. This tool should be a key piece of any SharePoint Developer’s tool set.
Roger Lamb has a great article, and maintains a SharePoint Developer Blog, on many of the patterns and best practices which should be used when leveraging the SharePoint API in your code. You can check out Roger’s blog and article here.
Happy and Safe SharePoint Coding!
Recently I attended a session on ASP.net 4.0 and VS 2010 to see what was coming down the pipe. During this session the speaker discussed some of the areas of improvements in regard to ASP.Net MVC. As he was doing his demo it reminded me of a question I had when I first heard of ASP.Net MVC, why would I as a ASP.Net developer even want or need to use MVC? What are the benefits and how does it help me get the job done better and/or faster? You see I have a long history in writing code, I've been writing code for many years and have seem the likes of SmallTalk, ADA, LISP, C/C++, VB and others. My education throughout my coding career has taught me well and that there are several theoretical principles that should be followed when coding. One of those being what is referred to having "Separation of Concerns" (SOC) or better known as N-Tier design. The idea being that you separate your application into multiple layers typically 3 tiers (presentation, business, and data) so that if at anytime one of those things needs to change for any reason you can switch out the tier that needs changing. The most obvious example being if you want to switch from Oracle to a much friendlier ;) SQL Server platform you can do so quickly by just changing the code in your data tier and not change any of the other tiers in the application. So clearly, when I see MVC I think, ok think this could be great as it will provide me a framework to get to a similar level of design. Frankly, out of the box ASP.Net does not provide a good template for n-tier design and many of the demos when one learns ASP.Net do not show how n-tier is accomplished either. This can be accomplished pretty easily with several projects and/or classes in your solution. I will not get into the specifics of this should be well documented elsewhere (if not, let me know and I will create a post). In fact, MVC is really the only project template I have seen from Microsoft which provides an obvious n-tier structure for which to build your application. Which brings me to the topic of this article which should I use, which is better, and why should I use one over the other?
What you get with Both?
Before I get into the differences between the two models I wanted to quickly point out that they are indeed both ASP.Net. What this means is you get the ASP.Net framework and the related services for free. Things like caching, personalization, profiling, security, session state and any other ASP.Net Server services.
Web Forms
As noted in several articles I read while looking into this topic ASP.Net Web Forms were designed to help the Windows application developer make the switch to the web quickly and easily by providing him/her with a model that is similar to that of a Windows desktop application. ASP.Net provided a model to help deal with the stateless nature of the web and many of the other differences between Web development and Windows Desktop development. With that in mind Web Forms are then:
- Control Rich - Many controls from Microsoft and 3rd Party Vendors are available for use in your application to help complete basic repeatable tasks
- Allows for Rapid Application Development - given the controls and the web form model in conjunction with other features such as master pages once can quickly design and build a web site.
- Provides Data binding to the controls - again another feature to help with rapid application development and with the advent of the ObjectDataSource one can quickly bind a business and/or data object to a control which further allows for the SOC mentioned earlier.
- ViewState/Postback capability to help with keeping state
MVC
MVC has a history which goes back most notable to Ruby on Rails. MVC (per its name, Model View Controller) does indeed provide a very good model for the structure of any application be it web or otherwise. After all the there are plenty of development shops around the globe which use MVC successfully, namely any iPhone developer out there today. As you can see MVC not only has roots in ASP.Net but in many other languages. ASP.Net MVC however ties together all the great services of ASP.Net with MVC model which gives those familiar with MVC a platform for which they can now take advantage. Some of the features of MVC are:
- Obviously clean separation of concerns (SoC)
- Enable full control over the rendered HTML.
- Easy Test Driven Development (TDD) (built with TDD in mind).
- SEO and REST friendly URL.
- Easy integration with JavaScript frameworks.
- Support third-party view engines such as NVelocity, Brail, NHaml.
- No ViewState and PostBack events.
- Follows the stateless nature of web.
- Extensible and Pluggable framework.
Conclusion
There is a brewing debate within the Microsoft camp now about which is better Web Forms or MVC? Which is the future direction? Will one replace the other? It is hard pressed for me to find a good reason for which to use MVC other than my ability to completely replace the view engine with another and the complete control I get from MVC. However ASP.Net was built around the idea that it is a strong platform that will allow developers to easily, quickly and efficiently build web applications. In practice MVC has a VERY long way to go in that what I loose by getting full control over the views/rendering is the whole premise behind ASP.Net quick easy, and efficient development of my application. As pointed out I do still get the many ASP.net services but I am now back to writing FOR loops and HTML that in 90% of the cases I have seem in my career I no longer need to do because I have data-binding and controls I can use out of the box or purchase. The time I would spend writing and hence debugging my views has significantly increased because with MVC I now have to write this code myself. So it would be easier to do TDD but now I am writing a ton more TDD code because I have to test all the View code that I would not have to test is say I were using OOB controls. ASP.Net provides plenty of attributes as well to help be control the use of postbacks and view state and even though postback code might add 20K in JavaScript to my page it saves me a gang of time in not having to worry about state and writing a bunch of code to wire up controls. Not to mention with the standardization of "broadband", 20K is really insignificant, i know ever bite counts but so does my time. Also as for the "full" control feature of MVC I would get most of what I need by using a little known ASP.Net feature called a CSSAdapter. Needless to say if you are a developer that like me does not like to spend time coding things you can simply re-use and configure then MVC is not for you. However if you have to have total control over the view engine and the way your views then MVC might be the way for you. ASP.Net MVC provides a platform for MVC developers to take advantages of a great platform and still create applications using great tools (Visual Studio). However, ASP.Net Web Forms will be a much quicker and simpler route. One thing to note is MVC or Web Forms will not prevent bad design/architecture of an application YOU as a developer must adhere to best practices and always be diligent in making sure your code is as efficient and structurally sound as possible. For this developer Web Forms will be the way to go as to be MVC is taking a 8-10 year step back into the past.
Lastly, a good colleague of mine made a very good point as to one great application of MVC in the .Net world. Many of the .Net Content Management Systems (CMS) today leverage some form of MVC including SharePoint (MOSS). In MOSS your content type is your Model, your View is the ASPX page you Create, and your controller is the code behind for that web page. To my colleague’s point one should consider using ASP.Net MVC WITH Web Forms so that you may leverage the best of both worlds!
SharePoint 2010 hit the Technical Preview milestone a few weeks back. After watchig some of the sneak peak videos I was jazzed, escpecially as a developer with the new integration of Visual Studio 2010 the new Solution Builder features and many of the other tools on the way to help make developing for SharePoint much much easier! Check out the developer video located at
http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx for more details. More to come on this topic soon!
Recently I was working at a customer and had a need to create several custom administration pages to allow users to manage some data that resided in SQL Server. Initially, we created the pages and added the links to the pages to the Actions menu but this menu quickly became long and it seemed more appropriate to add the links on the "Site Settings" page instead. Upon doing so we needed a way to group these pages together so that they can be easily found and add some organization to our links. From this came the need for a custom section in the Site Settings page. My partner in crime at this customer had the dubios taks of making this happen and he has blogged about it at the link below. Please take a look at what Will wrote as I'm sure it will help some of you reading this down the road.
http://blogs.msdn.com/bettertogether/archive/2009/07/01/adding-a-custom-column-to-site-settings.aspx
A while back I developed an application which made requests to several web sites, scraped some data and stored the data into a database. The application worked great for several months without issue. One day the application failed to get a successful response from the sites I was screen scraping. Obviously, the first thing I checked was to insure that the failure was not due to the publisher updating their site and changing any critical HTML on me, no dice. So I began debugging and found that my request was getting hung up when it made the call to request the HTML page I needed. I kept getting a n exception that stated “The remote server returned an error: (404) Not Found.” The object I was using to make my request was “HTTPWebRequest” and as I stated earlier all was fine in paradise. The code below is what I started with and have been running for months:
Private Function GetHTMLData(ByVal source As String) As String
Dim request As HttpWebRequest = CType(WebRequest.Create(source), HttpWebRequest)
Dim encode As Encoding = System.Text.Encoding.UTF8
Dim r As New IO.StreamReader(request.GetResponse.GetResponseStream(), encode)
Dim htmlString As String = r.ReadToEnd().ToUpper(CultureInfo.CurrentCulture)
r.Close()
Return htmlString
End Function
After a couple of days of searching the Internet to find a resolution for this issue I had no luck in resolving the matter. What made matters worse was I was able to take the same exact URL that was being requested in my code and paste it into the my web browser and see the data just fine. So same machine, same network what could be happening. It did not help that a “404” is usually a “Page Not Found Error” but clearly the page exists and contains all the information I am expecting. I finally decided to fire up Fiddler to see what was happening with my request. Shortly, after making the request from my browser and then again from my application I began the comparison of the two requests only to realize the only difference was the “User-Agent” header value. My code did not set this value however the browser clearly does. Turns out I can set the “User-Agent” value to whatever I like as long as it is not blank I get data returned to me. So I inserted 1 line of code and it resolved the matter entirely and now my application runs as smooth as a …. Below is what the code looks like now:
Private Function GetHTMLData(ByVal source As String) As String
Dim request As HttpWebRequest = CType(WebRequest.Create(source), HttpWebRequest)
request.UserAgent = "Fiddler"
Dim encode As Encoding = System.Text.Encoding.UTF8
Dim r As New IO.StreamReader(request.GetResponse.GetResponseStream(), encode)
Dim htmlString As String = r.ReadToEnd().ToUpper(CultureInfo.CurrentCulture)
r.Close()
Return htmlString
End Function
Late yesterday Microsoft released SP2 for WSS 3.0 and MOSS 2007. For more details and link to support articles that describe what is fixed with this update please visit:
http://blogs.msdn.com/sharepoint/archive/2009/04/28/announcing-service-pack-2-for-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0.aspx
Some of the key fixes includes:
- Performance and Availability Improvements
Service Pack 2 includes many fixes and enhancements designed to improve performance, availability, and stability in your server farms, including:
- New Timer job automatically rebuilds content database index to improve database performance.
- When a content database is marked as read-only, the user interface will be modified so users cannot perform tasks that require writing to the database.
- Performance enhancement across nearly all the components.
- Improved Interoperability
Service Pack 2 continues to improve SharePoint interoperability with other products and platforms.
- Broader support of browsers
Internet Explorer 8 is added into Level 1 browser support.
FireFox 2.0/3.0 is added into Level 2 browser support.
- Provide improved client integration user experience with Form Based Authentication. Now the client application can store user credentials instead of asking for them every time. For more technical details please refer to the updated articles on TechNet.
Configure forms-based authentication (Office SharePoint Server
http://technet.microsoft.com/en-us/library/cc262201.aspx
Configure forms-based authentication (Windows SharePoint Services)
http://technet.microsoft.com/en-us/library/cc288043.aspx
- Getting Ready for SharePoint Server 2010
A new preupgradecheck operation is added to stsadm tool. It can be used to scan your server farm to establish whether it is ready for upgrade to SharePoint Products and Technologies "14". It identifies issues that could present obstacles to the upgrade process. It checks for several SharePoint Products and Technologies "14" system requirements, including the presence of Microsoft® Windows Server® 2008 and a 64-bit hardware, and provides feedback and best practice recommendations for your current environment, together with information on how to resolve any issues that the tool discovers.
You can download the bits below:
Service Pack 2 for Windows SharePoint Services 3.0, x86 & x64
http://www.microsoft.com/downloads/details.aspx?FamilyId=79BADA82-C13F-44C1-BDC1-D0447337051B&displaylang=en
Service Pack 2 for Office SharePoint Server 2007, x86 & x64
http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90-5FC6-4347-89B0-A80DEB27A082&displaylang=en
I am excited to see some of the new features that are lined up for Visual Studio 2010 and the .Net Framework 4.0. Of these many new features one that really comes close to home is the "Web.Config Transformations" feature. How many times have you developed an application on your workstation and needed to now deploy your application to staging, and then eventually production, or some other environment only to find out when you move the files that you need to change a bunch of settings in Web.Config to reflect the new environment. Most commonly connection strings. Today you have to remember this before deployment and make the changes manually or take a more proactive approach and create multiple config files write a MSBuild script that copies the correct web.config to the correct environment. Well once VS 2010 and .Net 4.0 comes this is no more! Using Web.config Transformations and the envrionment settings Visual Studio will now take care of this for you. You define the differences in a "Transform" file and depending of the environment settings and the use of "one-click" web deployment you will get your application deployed with the correct settings from the beginning! For more on how this feature will work check out the video from the 10-4 show on Channel 9.
http://channel9.msdn.com/shows/10-4/10-4-Episode-10-Making-Web-Deployment-Easier/
I have been using the IE8 RC1 since it was released a few months ago. One of the features that was highlighted in IE8 is the web accelerators. Initially I thought, oh here we go again with some new fluff tool that I'll never use. However, in recent days I have found this tool to be VERY VERY valuable while reading various blogs, articles, books online, and not to mention when I am communicating with my Spanish friends on FaceBook. The IE8 Accelerators are there for you by highlighting the text you'd like accelerated details about and you then click on the accelerator icon, you then get a menu of accelerators like you see below:

At this point all you have to do is hover over the accelerator you’d like applied to your highlighted text. You then get a nice callout box that provide you with the results of the accelerator you selected. All this without ever leaving the page you are browsing.

If you don’t like the view with the callout you can click on the accelerator and a new tab/page will be opened to your provider with the Accelerator details already entered and you can then view the details in a larger screen. You can highlight an address and get a map from Live Maps, or highlight words you'd like a definition for and get the definition from Encarta or Webster's dictionary. For each Accelerator category you can set a default accelerator which maps you to the provider of your choice.
You can find available Web Accelerators here: http://www.ieaddons.com/en/accelerators
Web Accelerators is one of the cool features that make IE8 a must have. I can't wait for the RTM release.
You can download IE8 RC1 here: http://www.microsoft.com/windows/internet-explorer/beta/
If you are like me when developing you are always on the lookout for reusable nuggets of code to make you life easier. It's even better when that nugget of code comes with support that will aid you when you run into trouble in using that control. One of the things I love about the .Net platform as compared to many other development platforms is the fact that Microsoft publishes controls that are for the most part usable and relevant to the most common things we as developers need. Albiet we do not have all the controls we need but I'd say the 80/20 rule applies. Once again Microsoft has now released a new control for use with the .Net 3.5 framework that is sure to help created fabulous and dynamic data driven web applications, enter the Charting control. Used like any control and added to the VS 2008 toolbox this control will allow you to create static, cached, and dynamic charts in any ASP.Net web page. In the past to get something like this with an OOB tool I'd have to use SQL Reporting Services or some other similar tool. Now with native .Net I can create charts next to data grid and create really dynamic reports all with native ASP.Net! To learn more about the Chart Control you can visit the following:
Download the free Microsoft Chart Controls
Download the VS 2008 Tool Support for the Chart Controls
Download the Microsoft Chart Controls Samples
Download the Microsoft Chart Controls Documentation
Visit the Microsoft Chart Control Forum
You can also visit ScottGu's Blog as this is where I first learned about this cool new tool!
http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx
Comming Soon!
Office Service Pack Team announced Service Pack 2 for 2007 Microsoft Office System. This new service pack will be released between February and April 2009. It will contain both client and server updates. Here are some of the SharePoint related topics that we will be expanding upon in later posts.
- Improved Read-only Content Databases
Whenever a content database is marked read-only, all of the site collections in that database are automatically marked as read-only.
- ECM Performance and Manageability Improvements
Improved performance and manageability in variations, including STSADM commands for repairing links between source and target pages.
- Improved Index Rebuild Timer Jobs
SharePoint content databases running in SQL Server 2005 will undergo an automatic index rebuild, which helps stop defragmentation, and stop the database from degrading in performance.
- Upgrade Checker
This will scan your SharePoint farm in advance of applying SP2 and will provide feedback on the environments readiness to upgrade.
So please stay tuned!
Recently I found myself writing a ton of VB code however I am working on a new gig and it requries me to switch over to C#. The tedeous task of remembering to type "foreach" or not typing "dim" has caused me much frustration. A little tip that will save time and effort and possibly help re-wire my brain so that I can be more efficient is to use Code Snippets. Code Snippets in VS 2005 or VS 2008 is really one of the coolest things to make you productive. To use snippets check out the following straight from the Tips and tricks on MSDN.
http://msdn.microsoft.com/en-us/library/bb245788(VS.80).aspx#vs05idetips_topic3
Code Snippets
Code snippets are one of the best productivity features introduced in Visual Studio 2005. It allows you to quickly insert fragments of code to avoid tedious typing (such as typing a for loop) or to give you a template of how to accomplish a certain task (such as sending data over the network). Most of the built-in C# snippets are of the first type – they help you in minimizing repetitive typing, while most of the built-in VB snippets are of the second type – they let you code up a specific task more easily.
There are two ways to insert a snippet. You can type the snippet's alias in the code editor and press Tab twice (you only need to press Tab once for VB) to insert the snippet immediately. After the code snippet has been inserted, you can press Tab and Shift+Tab to jump to different fields within the snippet. This allows you to quickly change the parts of code that need to be modified. Notice that in C#, code snippet aliases also have IntelliSense. You can tell that an item is a code snippet in the IntelliSense list by its snippet icon.
.gif)
Figure 8. IntelliSense fully supports code snippets
If you don't remember your code snippet's alias, you can also insert it by pressing "Ctrl+K, Ctrl+X" within the code editor or do a mouse right-click with the mouse and select Insert Snippet.... This shows the code snippet picker, which enables you to browse all the snippets that are applicable to your current programming language and to choose the one you want to insert. This method of inserting code snippets works for both C# and Visual Basic. Visual Basic users have yet another way to insert snippets: you can type the first few letters of a snippet alias, followed by "?" and pressing Tab. Visual Studio will display an alphabetical listing of all the code snippet aliases with the one most closely matched highlighted. This feature is available only for Visual Basic users.
.gif)
Happy coding!
Have you ever built a site that contains a page that accepts a parameter like http://mycommecesite/productdetails.aspx?pid=10? What happens when a user tries to enter an invalid product id? It would be nice if you could show them a nice custom error page with very minimal coding. Turns out you can do this with as little as 2 lines of code. The first step is to configure a custom 404 page in web.config file in the <customErrors> section. So whenever user requests non-existent aspx page, ASP.NET run-time returns well formatted message to the user.
The next step is to throw the proper exception and let ASP.Net handle the request for you and display a nice friendly message to your user. All that needs to be done is to throw HttpException like:
throw new HttpException(404, "Article not found");
The ASP.NET run-time will catch the exception and will redirect to the custom 404 page and now your site behaves well and consistent!