Best Practices for Developing Office Live Small Business Applications

This topic describes best practices for creating Microsoft Office Live Small Business applications.

Lists
  • When working with forms and datasheets, remember that SOAP calls, ISAPI code, and Web Services do not perform server-side validation to see whether a field is required, nor do they validate the data type required for a column. Validation for required columns and column data types is only enforced with appropriate code in the user interface of forms.
  • Do not change the names or URLs for predefined Office Live Small Business lists, such as the Projects list. It is possible to change these names, but we advise that you do not do this. If you change the URLs of lists, at the very least, there will be difficulties when users access the Help system, because the names of the lists will no longer match those referenced in the Help. Also, renaming lists or changing their URLs could create issues when you upgrade to the next version of Office Live Small Business.
Web Parts
  • Web Parts that you have created should not be used in an application that you plan to save as a template and then to create a new application from the template. Custom Web Parts cannot be added to the Office Live Small Business server, and so they will not function correctly in the new application. Instead, use views to provide the same functionality.
  • You should avoid adding the List Rollup Web Part to an application that you plan to save as a template and then to create a new application from the template. If you do so, the List Rollup Web Part will point to the original application in the application that you have created, and it will be necessary to reconfigure the Web Part.
Views
  • Including list views of any kind affects the performance of a Office Live Small Business site. If you include list views in your site, test its performance often. In addition, Gantt charts slow performance to some degree.
Server-side programming
  • Do not add any server-side code when using Microsoft Office SharePoint Designer 2007, because server-side code cannot be interpreted when the page opens on a Office Live Small Business site. You can use client-side scripting with Office Live Small Business applications. However, when these applications run in the HTTPS protocol instead of HTTP, users receive two warnings before the item is displayed.
Client-side programming
  • To improve download performance, Office Live Small Business servers have a handler that caches JavaScript files for as long as 24 hours. This can prevent developers from immediately seeing code changes on Office Live Small Business. Traditional methods for clearing the file cache may fail to solve this problem.

    The easiest way to avoid caching is to rename the file extension, such as JSN or JSX. However, this may prevent your code editor from recognizing the file.

    Another solution is to use the code below to dynamically make your file unique for every server request so that it is perceived as new by the handler. The code uses a function that appends a timestamp as the value for the querystring parameter “version.”

    
         
    <!--
        function includeJS(src)
        {    
            document.write("<script type=\"text/javascript\" 
    language=\"javascript\" src=\"" + src + "?version=" + new Date().getTime() + "\"></script>"); } --> </script> <script type="text/javascript" language="javascript"> includeJS("js/stuff.js"); includeJS("js/goo.js"); </script>
    • To improve download performance, Office Live Small Business servers have a handler that crunches JavaScript files. Crunching is removing unnecessary comments, characters, and white space to reduce weight before a file is transmitted. However, crunching can make script debugging difficult for developers. The simplest solution is to rename the file extension, such as JSN or JSX, before you open the file in your debugger.

    • If you change your JavaScript file extensions or add code to troubleshoot caching or crunching problems, you should remove your changes to optimize the site experience for your visitors.

    • Consider using a method of tracking the versions of your JS files, such as a naming convention like example_1.js and example_2.js. This helps ensure that proxies and browsers do not cache old versions of your JS files.

    Security considerations
    • Use the Data View Web Part only for information for which a high level of security is not necessary. The Data View Web Part retrieves XML data from a data source and then formats it using an Extensible Stylesheet Language Transformation (XSLT). To do so, the Web Part requires that you define a query and data source from which to retrieve XML data, such as an Office Live Small Business list or an external Microsoft SQL Server database. Bear in mind, however, that when the Web Part connects to the database server, the server’s login and password are stored in clear text in the page hosting the Web Part. As a result, any other user who has server-side access to the page can view the server's login and password.
    • Any item that is placed in the root Web of the business applications and workspaces area in Office Live Small Business can be discovered by anyone who is authorized for the business applications and workspaces. Do not place sensitive information in this folder.
    Accessibility