SharePoint, XBOX, .NET, Technology - What I am reading

    [Home] [Recent] [Site Map] [SharePoint] [XBOX]

   

SharePoint Blogs

10/16/2007 Can I do this with a solution file?

I have created a number of templates for various types of sites for our internal MOSS. One of these are a customer site that - among other things - has a subsite for all our projects related to this customer.

When I save this site as a template I include all the content as I've created a number of custom web part pages in a document library that we use but there is no way for me to include the project subsite.

Would it be possible to use a solution file for this? According to this MSDN article it doesn't sound like a solution file is the answer.

Is there an easy way to accomplish this or am I forced to create the project subsite manually for each new customer?


Posted on SharePoint Blogs
10/16/2007 SharePoint 2007 - Add a Lookup Field to a List Template Element that references its own List
I had a real hard time coming up for a title for this post. Here is what I am trying to explain in the title. I had a need to create a custom List Template. This can be done via a Feature. The issue I ran across was I needed a Lookup Field in my list Read More......(read more)
10/16/2007 More Community Kit Goodness Released: Announcing Community Kit for SharePoint: Windows Live Authentication!
Body: Lawrence Liu is on a tear over at the SharePoint team blog. Over the last several days he has been posting up all the latest community kit releases including: Announcing Community Kit for SharePoint: Virtual Earth Maps on SharePoint Announcing the Read More......(read more)
10/16/2007 Thoughts on MOSS and Microwaves
Body: Jeff Atwood's blog entry last week on control simplicity made me think of SharePoint. For one thing, one of the common complaints I hear from clients about their SharePoint sites is that they're too "texty:" you hit a page and Read More......(read more)
10/16/2007 Free 411!
Body: Don't you just love technology? I'm just amazed at some of the possibilities we have with technology these days. Of course, I'm most interested when I can: Save money Give less (also read take away) money to phone companies. Point in Read More......(read more)
10/16/2007 SharePoint End User Training Kit - Available Now - No Cost

Information Provided by  Microsoft SharePoint Product & Technologies Team:

The SharePoint End User Training Kit is Microsoft ShairePoint Product & Technologies offering for End User Material and it's available at no cost!

The initial release of the kit includes training content for SharePoint's collaboration capabilities. To be added over the next couple of months are additional modules covering portals and personalization, enterprise content management, search, business processes, and business intelligence. All of the content will have been written by the Office Online User Assistance team.

Grab it Here http://www.codeplex.com/slk The kit will be provided with two deployment options. The first, which is available now, is via the SharePoint Learning Kit ("SLK"), which is SCORM 2004 conformant e-learning delivery and tracking application built as a WSS 3.0 solution. With the SLK, IT personnel can control the look and feel of the training kit, matching it to corporate branding standards, and administrators can add or remove content and customize it as necessary. The SLK also provides a reporting function that shows which topics have been completed and by whom.

The SharePoint End User Training Kit will also have a standalone deployment option, which can be installed on a PC and used by an individual. This version of the kit will be available within the next few weeks.


Posted on SharePoint Blogs
10/15/2007 SharePoint Ajax Toolkit: Reference Application
In preparation for the SharePoint Pro Online Live conference on Wednesday , I've released the LitwareAjaxWebParts reference application on the project site. Download it here . I'll be using the LitwareAjaxWebParts application code for my demos and code walkthroughs, so if you're coming be sure to download the source and get the web parts working prior to the event. Just install the WSPS for SharePointAjax using the provided scripts, and follow the ReadMe text file in the Visual Studio...(read more)
10/15/2007 Creating your own custom Base Class with your own MOSS Web Part

Wink I had a requirement that required me to create a custom base for web parts to provide a common library for web part development within MOSS. I started to research on how this could be done and found very little information that explained the whole process of trying to achieve this and literally any form of reference to this topic in the 3.0 WSS SDK August 2007 did not exist. So I needed to do something to assist the development community.

So lets cut the chase and start showing you how this is done.

Firstly we need to create a new class project within Visual Studio and lets call this WebPartBase. In this example we will retrieve the webpart id and title of the webpart and place this in a protected string called WebPartID and WebPartTitle, I have also included some of the site properties into the base class. Our Base class will inherit from the System.Web.UI.WebControls.WebParts.WebPart base class, which is the base class Microsoft provide you to inherit for developing web parts. Our custom web part will inherit our custom base class, which for the purpose of the blog will only be two properties from the webpart and three properties from the Site object and place them into a strings. As soon as we inherit our base class we automatically inherit these strings into our web part. When we put this into perspective, you have the whole .Net framework their available to you as a developer that could be used as a library for comon tasks that you may require for all your web part development. e.g. Application Logging, Standardise on variable name's across your Line of Business applications for all web parts, custom behaviour across the board for all web parts, etc. I think you get the picture. Wink

Lets Get Started.

1. Create New Class Project within Visual Studio 2005 and call this WebPartBase.

Add the following bit of code into your WebPartBase class so it should like something like this.

using System;
using System.Collections.Generic;
using System.Text;
using System.Web;


using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;


namespace bobby.habib.base
{

    public class PortletBase : System.Web.UI.WebControls.WebParts.WebPart
    {
        /// <summary>
        /// Public default constructor.
        /// </summary>
        public PortletBase()
        {

        }

            #region Web Part Settings

            protected string WebPartID
            {
                get
                {
                    return base.ID;
                }
            }

            protected string WebPartTitle
            {
                get
                {
                    return base.DisplayTitle;
                }
            }

            #endregion

            #region Site Settings

            protected string SiteID
            {
                get
                {
                    try
                    {
                        SPWeb oSite = SPControl.GetContextWeb(Context);
                        try
                        {

                            return oSite.ID.ToString();
                        }
                        catch (Exception exm)
                        {
                            throw new Exception(exm.Message);
                        }
                        finally
                        {
                            oSite.Dispose();
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                   
                }
            }

            protected string SiteTitle
            {
                get
                {
                    try
                    {
                        SPWeb oSite = SPControl.GetContextWeb(Context);
                        try
                        {

                            return oSite.Title;
                        }
                        catch (Exception exm)
                        {
                            throw new Exception(exm.Message);
                        }
                        finally
                        {
                            oSite.Dispose();
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }

                }
            }

            protected string SiteName
            {
                get
                {
                    try
                    {
                        SPWeb oSite = SPControl.GetContextWeb(Context);
                        try
                        {

                            return oSite.Name;
                        }
                        catch (Exception exm)
                        {
                            throw new Exception(exm.Message);
                        }
                        finally
                        {
                            oSite.Dispose();
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }

                }
            }

        #endregion

 

        }
}

2. Complie this code. You will notice that we automatically will inherit a number of values that could be used, as part of your framework library for web part development.

    • WebPartID
    • WebPartTitle
    • SiteID
    • SiteTitle
    • SiteName

3. The next step is to now create a web part that will inherit from the custom base class we have just built, rather then using the System.Web.UI.WebControls.WebParts.WebPart base class. So lets create a new web part using visual studio, when creating your web part you must add a reference in your web part project to the custom base class we have just created.

Your web part project should look like this;

using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

using bobby.habib.base;


namespace Bobby.Habib.WebParts.BaseTest

{
 
    public class BobbyHTest : PortletBase
    {
        public BobbyHTest()
        {
            this.ExportMode = WebPartExportMode.All;
        }
       
        #region GUI Controls
           
            // GUI Panels
            private Panel _MainPanel;

        #endregion
       


        protected override void Render(HtmlTextWriter writer)
        {
            _MainPanel.RenderControl(writer);
        }

        protected override void CreateChildControls()
        {

            #region Control Declaration

                _MainPanel = new Panel();

            #endregion

            Table outerTable = new Table();
            outerTable.CellPadding = 0;
            outerTable.CellSpacing = 0;
            outerTable.Width = 400;

            // Row 1

            TableRow row = new TableRow();
            TableCell cell = new TableCell();
            cell.Width = 800;
            string strTxT = string.Empty;
            strTxT = strTxT + "<b>Web Part Information</b><br>";
            strTxT = strTxT + "base.ID - " + WebPartID + "<br>";
            strTxT = strTxT + "base.Title - " + WebPartTitle + "<br>";
            strTxT = strTxT + "<b>Site Information</b><br>";
            strTxT = strTxT + "Site ID - " + SiteID + "<br>";
            strTxT = strTxT + "Site Name - " + SiteName + "<br>";
            strTxT = strTxT + "Site Title - " + SiteTitle + "<br>";
            strTxT = strTxT + "Display Title - " + WebPartTitle + "<br>";

            cell.Text = strTxT;

            row.Cells.Add(cell);
            outerTable.Rows.Add(row);
            _MainPanel.Controls.Add(outerTable);
            base.CreateChildControls();
        }
    }
}

4. Compile the above code.

5. If you have the Visual Studio 2005 and have installed Visual Studio 2005 extensions for WSS3, you could go into the web part project properties and do the following;

    • In the Debug Tab in the project properties, click on the radio button that says "Start Browser with URL:" and enter the URL for your MOSS environment.
    • Assign a Strong Name Key to your base class and you could assign a Strong Name Key to your web part if you wouyld like to place this in the GAC.
    • In the SharePoint Solution Tab, complete the Solution, Feature and Element information. This behined the scences updates the values you enter in your solution, feature and element xml files that will be used during the deployment mechanism.
    • Hit F5 only and this will rebuild the project and deploy the solution into MOSS by creating a .wsp file and deploys the .wsp file.

6. You may need to copy your custom  base class to the GAC, if you have not configured your solution files to copy the base class into the GAC. If during the time of deployment you find that the project starts error during the deployment. The likely cause is your web part cannot see the custom base class in the GAC and throws a reflection error. Ensure that the base class is in the GAC and is registred as a safe control in the web.config file of the site you are trying to deploy too.

7. Add the web part into a site page in MOSS and you will see the property values being displayed in the web part, that have been inherited from our custom base class.

I hope this helps a developer. Stick out tongue 

 

 

 


Posted on SharePoint Blogs
10/15/2007 Avoiding performance issues in Infopath Forms Servers
Recently I've been doing a lot with IFS. It seems like the ideal solution to create and present forms, far more capable than regular SharePoint list forms and far less complicated than coding forms in  Visual Studio.

But there are some caveats to this beauty, which begin to appear just after you've just got yourself and your client in a good mood by finding all of your requirements covered by Infopath: Performance.

We've ran into a number of problems after publishing some more 'complex' forms, these are some examples:
- A repeating section does not persist more than 9 items
- IE  crashes while filling out the form, totaly random
- Rendering the form takes >60 seconds, taking 99% CPU and +600mb RAM
- Uploading the form results in a error (both Central Admin and STSADM)
- The design checker times-out, InfoPath cannot open the form

Most of these problems occur at the browser. It's interesting to note that the server does not have any trouble serving the forms. Rendering the form in the browser is done fully dynamically. With complex and large forms this can lead to bad performance and functional issues. Uploading complex forms can take up to 30 minutes (depending on the time-outs you've defined in SharePoint).

This is a list of best practices to keep you in control of performance. There's definitely not one golden solution, you should look for a balance throughout your form. 

 1. Use IE7 instead of IE6
IE7 used a new scripting engine, which is far more efficient with resources. While rendering forms this could save you hundreds of mb's and up to 50% CPU. In practice forms will render up to 10x faster in IE7.

2. Deploy the hotfix for conditional formatting issues (must have!)
Conditional visibility logic has some known performance problems.  A hotfix is available http://support.microsoft.com/kb/937206, which is manifested in a modified 250K initial download (de core.js) when accessing Forms Services the first time.  The performance issue is related to the IE Script Engine and occurs at the browser level, not server-side.

I've tested a form before and after installing the hotfix:

  IE6.0* IE7.0*
  Without hotfix With hotfix Without hotfix With hotfix

Rendering

65 sec 15 sec 14 sec 13 sec
CPU Load 99% 99% 50% 50%
RAM 60mb 30mb 68mb 40mb

* IE6 en IE7 installed on different hardware, do not compare the results between browsers


3. Avoid nested elements
Nesting sections, tables, optional sections and especially repeating sections/tables could lead to a extreme rendering time at the client. 

 4. Use multiple views
Try to spread controls over multiple views. This especially counts for complex controls like:
- Rich text editors
- Repeating sections/tables
- Drop down boxes

 5. Minimize the numer of Rich text editors
Try to use regular textfields if possible

 6. Avoid excessive use of validation/rules/conditional formatting
Try to prevent unnecessary roundtripping between the form browser and the server.  There are several round trip switches available on controls.   See the Browser Forms Tab on a given control to expose finer-grained options over the behavior.  Note what the warning messages you receive say about the form's potential round trip behavior when admin deploying the form.  It will tell you when multiple server roundtrips will be likely to occur when using your form.

 7. Run Forms Services on a sererate server
Consider breaking out the server role of Forms Services to another machine on the MOSS farm.  Services such as indexing and query serving, or high file I/O operations can really impact the ability of Forms Services to get a time slice and perform properly. 

 8. Set the optimal Session State
Forms Services supports 2 kinds of session state:
- Session State (data is saved in SQL through the SSP)
- Form View (data is saved in the form itself)

The following articles describe which is best for your situation:
http://technet2.microsoft.com/Office/en-us/library/3c4e8fb1-c3ce-4d27-8c65-6c4ab140f7051033.mspx?mfr=true
http://technet2.microsoft.com/Office/en-us/library/3728d1fa-c1db-4445-8d00-e26f9015dd951033.mspx?mfr=true 

 

Be sure to check Tim Pashmans blogpost on IFS performance:
http://blogs.msdn.com/timpash/archive/2007/08/02/tips-and-tricks-for-tuning-forms-services-performance.aspx


Posted on SharePoint Blogs
10/15/2007 Fancy a Pint, Vegas Style?
Body: Now this is right up my alley. Andrew Connell has wisely offered to arrange an after-conference get together at the Coral Reef Lounge in the Mandalay Bay Hotel on Tuesday, November 6th from 6-8PM. If you are planning to attend the SharePoint Connections Read More......(read more)
上一页 1 2 3 4 5 6 7 8 9 10 下一页

   

Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!

Links:
Jack's Readings

Month Archives:
Oct 2007
Sep 2007

Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News



@2007 All rights Reserved