with sp


Published on

ASP.NET Basics for SharePoint 2010.

Published in: Education, Technology
1 Comment
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide with sp

  1. 1. Manisha M. Chothe<br />Junior Solution Developer <br />Parallel Minds Technology Solutions Pvt. Ltd. <br /><br />(o) + 91-20-65000209 <br /><br />Google:<br />|<br />
  2. 2. Agenda<br />1. Introduction<br />2. Architecture<br />3. Web Server Controls<br />4. Page life Cycle<br />5.     Relation with SharePoint 2010<br />8.     User Controls in<br />9.    Ajax in<br />10.   LINQ in<br />11.  WFF<br />12. Relation with SharePoint 2010<br />
  3. 3. Introduction<br /> What is ASP.NET?<br />ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.<br />ASP.NET is a Microsoft Technology<br />ASP stands for Active Server Pages<br />ASP.NET is a program that runs inside IIS<br />IIS (Internet Information Services) is Microsoft's Internet server<br />IIS comes as a free component with Windows servers<br />IIS is also a part of Windows 2000 and XP Professional<br />
  4. 4. Introduction<br /> What is an ASP.NET File?<br />An ASP.NET file is just the same as an HTML file<br />An ASP.NET file can contain HTML, XML, and scripts<br />Scripts in an ASP.NET file are executed on the server<br />An ASP.NET file has the file extension ".aspx“<br /> How Does ASP.NET Work?<br />When a browser requests an HTML file, the server returns the file<br />When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server<br />The ASP.NET engine reads the file, line by line, and executes the scripts in the file<br />Finally, the ASP.NET file is returned to the browser as plain HTML<br />
  5. 5. The Microsoft .NET Framework<br />The .NET Framework is the infrastructure for the Microsoft .NET platform. <br />The .NET Framework is an environment for building, deploying, and running Web applications and Web Services.<br /> .NET Frameworks keywords:<br />Easier and quicker programming<br />Reduced amount of code<br />Declarative programming model<br />Richer server control hierarchy with events<br />Larger class library<br />Better support for development tools<br />
  6. 6. The Microsoft .NET Framework<br /> The .NET Framework consists of 3 main parts:<br />Programming languages:<br />C# (Pronounced C sharp)<br />Visual Basic (VB .NET)<br />J# (Pronounced J sharp)<br />Server technologies and client technologies:<br />ASP .NET (Active Server Pages)<br />Windows Forms (Windows desktop solutions)<br />Compact Framework (PDA / Mobile solutions)<br /> Development environments:<br />Visual Studio .NET (VS .NET)<br />Visual Web Developer<br />
  7. 7. Advantages of ASP.NET<br />Web application exists in compiled form on the server so the execution speed is faster as compared to the interpreted scripts.<br />ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model.<br />Being part of .Framework, it has access to all the features of .Net Framework.<br />Content and program logic are separated which reduces the inconveniences of program maintenance.<br />ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.<br />
  8. 8. Advantages of ASP.NET<br />To develop program logic, a developer can choose to write their code in more than 25 .Net languages including VB.Net, C#, JScript.Net etc.<br />Introduction of view state helps in maintaining state of the controls automatically between the postbacks events.<br />ASP.NET offers built-in security features through windows authentication or other authentication methods.<br />The Web server continuously monitors the pages, components and applications running on it. If it notices any memory leaks, infinite loops, other illegal activities, it immediately destroys those activities and restarts itself.<br />Integrated with ADO.NET.<br />Built-in caching features.<br />
  9. 9. Three Tier Architecture in ASP.NET<br />
  10. 10. Three Tier Architecture in ASP.NET<br />These layers are described below.<br />1. Application layer or Business layer2. Business layer    a. Property layer(Sub layer of business layer)3. data layer<br />
  11. 11. Three Tier Architecture in ASP.NET<br />Application layer is the form where we design using the controls like textbox, labels, command buttons etc.<br />Business layer is the class where we write the functions which get the data from the application layer and passes through the data access layer.<br />Data layer is also the class which gets the data from the business layer and sends it to the database or gets the data from the database and sends it to the business layer.<br />Property layer is the sub layer of the business layer in which we make the properties to sent or get the values from the application layer. These properties help to sustain the value in a object so that we can get these values till the object destroy.<br />
  12. 12. ASP.NET Web Server Controls<br />
  13. 13. ASP.NET Web Server Controls<br />Standard Toolbox Controls<br />Data Toolbox Controls<br />Validation Toolbox Controls<br />Navigation Toolbox Controls<br />Login Toolbox Controls<br />WebParts Toolbox Controls<br />HTML Controls for ASP.NET Web Pages<br />Ajax Server Controls<br />Microsoft Ajax Extender Controls<br />
  14. 14. Page life Cycle<br />
  15. 15. Page life Cycle<br />
  16. 16. General Page life-Cycle Stages<br />Page request:-<br /> The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.<br />Start:-<br /> In the start stage, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. <br />Initialization:-<br /> During page initialization, controls on the page are available and each control's UniqueID property is set. A master page and themes are also applied to the page if applicable. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.<br />
  17. 17. General Page life-Cycle Stages<br />Load:-<br /> During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.<br />Postback event handling:-<br /> If the request is a postback, control event handlers are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page.<br />Rendering:-<br /> Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream object of the page's Response property.<br />Unload:-<br /> The Unload event is raised after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and cleanup is performed.<br />
  18. 18. Life-Cycle Events<br />PreInit :-<br />Raised after the start stage is complete and before the initialization stage begins.<br />Use this event for the following:<br />Check the IsPostBack property to determine whether this is the first time the page is being processed. The IsCallback and IsCrossPagePostBack properties have also been set at this time.<br />Create or re-create dynamic controls.<br />Set a master page dynamically.<br />Set the Theme property dynamically.<br />Read or set profile property values.<br />Init :-<br /> Raised after all controls have been initialized and any skin settings have been applied. The Init event of individual controls occurs before the Init event of the page.<br />Use this event to read or initialize control properties.<br />
  19. 19. General Page life-Cycle Stages<br />InitComplete :-<br /> Raised at the end of the page's initialization stage. Only one operation takes place between the Init and InitComplete events: tracking of view state changes is turned on. View state tracking enables controls to persist any values that are programmatically added to the ViewState collection. Until view state tracking is turned on, any values added to view state are lost across postbacks. Controls typically turn on view state tracking immediately after they raise their Init event.<br />Use this event to make changes to view state that you want to make sure are persisted after the next postback.<br />PreLoad :-<br />Raised after the page loads view state for itself and all controls, and after it processes postback data that is included with the Request instance.<br />
  20. 20. General Page life-Cycle Stages<br />Load :-<br /> The Page object calls the OnLoad method on the Page object, and then recursively does the same for each child control until the page and all controls are loaded. The Load event of individual controls occurs after the Load event of the page.<br />Use the OnLoad event method to set properties in controls and to establish database connections.<br />Control events:-<br /> Use these events to handle specific control events, such as a Button control's Click event or a TextBox control's TextChanged event.<br />LoadComplete :-<br />Raised at the end of the event-handling stage.<br />Use this event for tasks that require that all other controls on the page be loaded.<br />
  21. 21. General Page life-Cycle Stages<br />PreRender :-<br />Raised after the Page object has created all controls that are required in order to render the page, including child controls of composite controls. (To do this, the Page object calls EnsureChildControls for each control and for the page.<br />The Page object raises the PreRender event on the Page object, and then recursively does the same for each child control. The PreRender event of individual controls occurs after the PreRender event of the page.<br />Use the event to make final changes to the contents of the page or its controls before the rendering stage begins.<br />PreRenderComplete:- <br />Raised after each data bound control whose DataSourceID property is set calls its DataBind method.<br />
  22. 22. General Page life-Cycle Stages<br />SaveStateComplete :-<br />Raised after view state and control state have been saved for the page and for all controls. Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback.<br />Render :-<br />This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control's markup to send to the browser.<br />Unload :-<br />Raised for each control and then for the page.<br />In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections.<br />
  23. 23. The following figure illustrates how the server controls on an ASP.NET page is processed by the server<br />
  24. 24.
  25. 25. State Management in<br />
  26. 26. State Management in<br />ASP.NET includes several options that help you preserve data on both a per-page basis and an application-wide basis. These features are as follows:<br />Client Side State Management:-<br /> View state<br /> Control state<br /> Hidden fields<br /> Cookies<br /> Query strings<br /> Server Side State Management:-<br /> Application state<br /> Session state<br />
  27. 27. Client-Based State Management Options<br />View State:-<br /> The ViewState property provides a dictionary object for retaining values between multiple requests for the same page. This is the default method that the page uses to preserve page and control property values between round trips.<br /> When the page is processed, the current state of the page and controls is hashed into a string and saved in the page as a hidden field.<br />View State is a built in feature in web controls to persist data between page post backs. <br /> // Add item to ViewState<br />ViewState["myviewstate"]  = myValue;<br />  //Reading items from ViewStateResponse.Write(ViewState["myviewstate"]);<br />
  28. 28. Client-Based State Management Options<br />Control State:-<br />The ControlState property allows you to persist property information that is specific to a control and cannot be turned off like the ViewState property.<br />Control state can be used to store critical, private information across post backs.<br />Control state is another type of state container reserved for controls to maintain their core behavioral functionality whereas View State only contains state to maintain control's contents (UI).<br />
  29. 29. Client-Based State Management Options<br />Hidden Fields:-<br />A HiddenField control stores a single variable in its Value property and must be explicitly added to the page.<br />It's just like a standard control for which you can set its properties.<br /> protected System.Web.UI.HtmlControls.HtmlInputHidden Hidden1;<br />  //to assign a value to Hidden field<br /> Hidden1.Value="Create hidden fields";<br /> //to retrieve a value<br />string str=Hidden1.Value;<br />
  30. 30. Client-Based State Management Options<br />Cookie: A cookie is a small piece of text stored on user's computer. Usually, information is stored as name-value pairs. Cookies are used by websites to keep track of visitors. Every time a user visits a website, cookies are retrieved from user machine and help identify the user. <br />Let's see an example which makes use of cookies to customize web page.if (Request.Cookies["UserId"] != null)    lbMessage.text = "Dear" + Request.Cookies["UserId"].Value + ", Welcome to our website!";else    lbMessage.text = "Guest,welcome to our website!";<br />If you want to store client's information use the below code<br />Response.Cookies["UserId"].Value=username;<br />
  31. 31. Client-Based State Management Options<br />Query strings:<br />Query strings are usually used to send information from one page to another page. They are passed along with URL in clear text. We can only pass smaller amounts of data using query strings. Since Query strings are sent in clear text, we can also encrypt query values<br /> string productid;productid=Request.Params["productid"];  <br />
  32. 32. Server Side State management:<br />Application object:<br />Application object is used to store data which is visible across entire application and shared across multiple user sessions. Data which needs to be persisted for entire life of application should be stored in application object.<br />In classic ASP, application object is used to store connection strings. It's a great place to store data which changes infrequently. We should write to application variable only in application_Onstart event (global.asax) or application.lock event to avoid data conflicts. Below code sample gives idea<br />Application.Lock();<br /> Application["mydata"]="mydata";<br />Application.UnLock();<br />
  33. 33. Server Side State management:<br />Session object:<br /> Session object is used to store state specific information per client basis. It is specific to particular user. Session data persists for the duration of user session you can store session's data on web server in different ways. <br /> Session state can be configured using the <session State> section in the application's web.config file. <br />Configuration information:<sessionState mode = <"inproc" | "sqlserver" | "stateserver"> timeout = <positive integer indicating the session timeout in minutes> sqlconnectionstring = <SQL connection string that is only used in the SQLServer mode> server = <The server name that is only required when the mode is State Server> port = <The port number that is only required when the mode is State Server>      <br />Mode:This setting supports three options. They are InProc, SQLServer, and State Server<br />
  34. 34. Using Session State in SharePoint 2010<br />SharePoint 2010 uses two services related to session state that have similar names but are separate and have different purposes.<br />ASP.NET session state may be used on SharePoint 2010 pages. This service is automatically disabled in normal installations of SharePoint 2010; it may be enabled using the instructions below. Once enabled, it appears on the Service Applications page as “SharePoint Server ASP.NET Session State Service.”<br />The State Service service application is designed for and only available to Office internal components such as InfoPath Forms Services and Visio Services. This service is automatically enabled in typical installations of SharePoint 2010 and is not related to ASP.NET session state. It appears on the Service Applications page as “State Service.”<br />
  35. 35. User Control in<br /> Refer Parallelminds_Asp.net3.5_with_SP from Solution<br />
  36. 36. User Control in Asp.netWhen a page with a user control is requested <br />The page parser parses the .ascx file specified in the Src attribute in the @ Register directive and generates a class that derives from the System.Web.UI.UserControl class. <br />The parser then dynamically compiles the class into an assembly. <br />If you are using Visual Studio, then at design time only, Visual Studio creates a code behind file for the user control, and the file is precompiled by the designer itself. <br />Finally, the class for the user control, which is generated through the process of dynamic code generation and compilation, includes the code for the code behind file (.ascx.cs) as well as the code written inside the .ascx file.<br />
  37. 37. User Control in Asp.netSol.Exp. ->Add -><br />
  38. 38. User Control in Asp.netDesign view of user control<br />
  39. 39. User Control in Asp.netSol.Exp. ->Add -><br />
  40. 40. User Control in Asp.netOutput screen<br />
  41. 41. AJAX in<br />
  42. 42. AJAX in<br />Ajax enables you to build highly interactive and responsive web applications by doing more in the browser.<br />provides a framework for asynchronously dispatching and processing requests and responses from the server.<br />The ASP.NET Ajax Library enables you to enhance ASP.NET Web Forms applications with Ajax. You don't need to know JavaScript to use the controls in the ASP.NET Ajax Library.<br />The ASP.NET Ajax Library includes the Ajax Control Toolkit. The Ajax Library contains more than 30 controls that enable you to easily create rich, interactive web pages. <br />For example, you can use the Ajax Library controls to display HTML editors, auto-complete textboxes, cascading dropdown lists, picture slide shows, and modal popup dialog boxes.<br />
  43. 43. Ajax Server Controls<br />The topics in this section describe how to work with ASP.NET Web server controls that enable you to add Ajax functionality to an ASP.NET Web page.<br />ScriptManager Control OverviewManages client script for Ajax-enabled ASP.NET pages. By default, the ScriptManager control registers the script for the Microsoft Ajax Library with the page. This enables client script to use the Microsoft Ajax type system extensions and to support features such as partial-page rendering and Web-service calls. In addition, theScriptManager control enables the Microsoft Ajax Library to be loaded from the Microsoft Content Delivery Network (CDN).<br />Timer Control OverviewPerforms tasks at defined intervals. If you use the Timer control with an UpdatePanel control, you can enable partial-page updates at a defined interval. You can also use the Timer control to perform full-page postbacks.<br />
  44. 44. Ajax Server Controls<br />UpdatePanel Control OverviewEnables you to refresh selected parts of the page instead of refreshing the whole page with a postback. An ASP.NET Web page that contains a ScriptManager control and one or more UpdatePanel controls can automatically participate in partial-page updates, without custom client script.<br />UpdateProgress Control OverviewEnables you to provide status information about partial-page updates in UpdatePanel controls.<br />
  45. 45. Use of Ajax in web Parts<br />
  46. 46. Use of Ajax in web Parts<br />
  47. 47. Use of Ajax in web Parts<br />
  48. 48. Use of Ajax in web Parts<br />
  49. 49. Use of Ajax in web Parts<br />
  50. 50. Use of Ajax in web Parts<br />
  51. 51. Use of Ajax in web Parts<br />
  52. 52. AJAX in SharePoint 2010<br />SharePoint Ajax Library for SharePoint 2010, release 1.1.<br />SharePoint Ajax Library 2010 1.1 <br />This is a base framework built on top of the Microsoft AJAX Library and ASP.NET AJAX for deploying client-side AJAX Web Parts and controls that work against web services and Xml feeds utilizing the ASP.NET AJAX framework. <br />
  53. 53. Caching in<br /> Refer Parallelminds_Asp.net3.5_with_SP from Solution<br />
  54. 54. Caching in<br />Caching allows you to use a number of techniques to store page output or application data across HTTP requests and reuse it.<br />ASP.NET provides two types of caching that you can use to create high-performance Web applications<br />The first is called output caching, which allows you to store dynamic page and user control responses on any HTTP 1.1 cache-capable device in the output stream, from the originating server to the requesting browser.<br />The second type of caching is traditional application data caching, which you can use to programmatically store arbitrary objects, such as data sets, to server memory so that your application can save the time and resources it takes to recreate them.<br />
  55. 55. Caching in<br />Caching ASP.NET Pages<br /> Describes the required modifications you must make to a page to take advantage of page output caching. This includes details about how you can vary the caching of page output, dependent upon requesting URIs, GET query string or form POST parameters, and custom strings. <br />Caching Portions of an ASP.NET Page<br /> Describes the techniques you can use to cache regions of your pages using the @ OutputCache directive and user controls. This technique is useful if you do not want to cache entire pages. <br />Caching Application Data<br /> Outlines the concepts behind using the ASP.NET application cache and provides samples of how to use its classes, methods, and properties.<br />
  56. 56. Fragment Caching in<br />
  57. 57. Fragment Caching in<br />
  58. 58. Fragment Caching in<br />
  59. 59. Fragment Caching in<br />
  60. 60. Page/Output Caching in<br />
  61. 61. Page/Output Caching in<br />
  62. 62. Page/Output Caching in<br />
  63. 63. Caching techniques in SharePoint 2010<br />
  64. 64. Caching techniques in SharePoint 2010<br />In SharePoint 2010, there's a few different ways to cache data.<br />Output Caching :-<br /> you can configure your SharePoint 2010 site to cache the Pages it outputs.<br />The page output cache stores the rendered output of a page. It also stores different versions of the cached page, based on the permissions of the users who are requesting the page. <br />Page output cache settings can be configured at the site collection level, at the site level, and for page layouts. By default, the page output cache is turned off.<br />The page output cache uses cache profiles that specify how long items should be held in the cache. You can specify different cache profiles to be used for anonymous and authenticated users, which optimizes the use of the cache based on the authentication methods that are allowed on the site.<br />You can configure cache profile settings for a Web application by editing the Web.config file on the application server<br />
  65. 65. Caching techniques in SharePoint 2010<br />Object Caching :-<br />A mechanism to cache specific page items. This is especially likable if you're playing around with Cross-List data queries and need to cache the results of such a query.<br />Microsoft SharePoint Server 2010 supports caching of certain page items, such as navigation data and data accessed through cross-list queries.<br />Caching page items is fast and eliminates the need to retrieve field data from the database each time a page is rendered.<br />Caching for objects in a page can almost always be used. When users have a document checked out, the cache is bypassed.<br />The object cache reduces the amount of traffic between the Web server and the SQL database by storing objects—such as lists and libraries, site settings, and page layouts—in memory on the front-end Web server computer.<br /> Object cache settings can be configured at the Web application level, and at the site collection level. <br />
  66. 66. Caching techniques in SharePoint 2010<br />BLOB Cache :-<br />The BLOB cache is enabled and configured in the Web.config file in the Web application to which you want to apply the cache.<br />It is a disk-based caching mechanism that caches resources on the disk. Normally these resources are files served by a web page and are named Binary Large Objects (BLOB).<br />Normally the BLOB cache will cache files served by the web request like images and video clips.<br />The first time that a Web page is called, these files are copied from the database to the cache on the server hard disk drive, and all subsequent requests for those files are then served from the hard disk drive cache of the server. <br />By default, the BLOB cache is off and must be enabled to use the functionality it provides. When you enable the BLOB cache on your front-end Web server, you reduce the load on the SharePoint Server 2010 database server created by read requests from Web browsers.<br />
  67. 67. Interacting with Get and Post methods in<br />There are two common ways to pass data from one page to another, using http Get and Post methods. <br />In Get method, data passed to server using URL encoding. So with Get method data added in URL as query string.<br />When we use Post method the URL is still intact, because data passed in HTTP body.<br />In correlation with ASP.NET, retrieving data passed through HTTP Get and Post methods is quite simple. <br />If data passed with Get method we need the following code to retrieve the data:<br />Page.Request.QueryString[<param>];<br />If data passed with Post method we need the following code to retrieve the data:<br />Page.Request.Form[<param>];<br />
  68. 68. How to use GET and POST methods in<br /> Refer Parallelminds_Asp.net3.5_with_SP from Solution<br />
  69. 69. Program using Get and Post methods<br />
  70. 70. Output Screen<br />
  71. 71. Values passed using GET method<br />
  72. 72. Code view for GET method<br />
  73. 73. Output Screen<br />
  74. 74. Values passed using POST method<br />
  75. 75. Code view for POST method<br />
  76. 76. LINQ in<br /> Refer Parallelminds_LINQ_To_Object from Solution<br />
  77. 77. LINQ in<br />Language Integrated Query is the new addition to the .NETfamily and as the name suggests it’s the kind of query style data access.<br /> which is fully supported by the language to effectively unify the way we access data and to make our lives easier.<br />LINQ is able to target a number of different sources namely Oracle,MSSQL, XML and a few others.<br />
  78. 78. LINQ in<br />You can use Language-Integrated Query (LINQ) in Web pages to retrieve and modify data. <br />LINQ applies the principles of object-oriented programming to relational data. It provides a unified programming model for querying data from different types of data sources, and extends data capabilities directly into the C# and Visual Basic languages. <br />This means we can use any relational or XML-specific features to our programming languages and runtime.<br />To display the data in a Web page, you bind a data-bound control to the LinqDataSource control. Examples of data-bound controls are the GridView or DetailsView controls.<br />
  79. 79. LINQ in<br />LINQ to Object<br />LINQ to SQL Server<br />LINQ to XML<br />You can use LINQ through the LinqDataSource control, through the ObjectDataSource control, or by creating LINQ queries.<br />When you retrieve data from a LINQ to SQL data context class, you can also configure a LinqDataSource control to handle update, insert, and delete operations. The control does this without requiring you to write the SQL commands to perform these tasks.<br />
  80. 80. LINQ to Objects<br />LINQ supports the “select”, “from”, “where”, “join”, “group by”and “order by” keywords.<br />The main difference between SQL and LINQ is that the “from” keyword comes before the “select” keyword because we must first define the object we want to operate on.<br />Finally the “select” clause tells the compiler what we wish to extract in this query.<br />The result of LINQ queries is always a collection like datastructure which allows for iterating through it using a loop <br />The LINQ query does not execute until its result isaccessed by some other piece of code, like the “foreach” loop <br />
  81. 81. VS -> Create Project ->Console Appln.<br />LINQ to Objects<br />
  82. 82. Output Screen<br />LINQ to Objects<br />
  83. 83. LINQ to SQL Server<br />
  84. 84. LINQ to SQL ServerVS -> Create Project -> Windows Form<br />
  85. 85. LINQ to SQL ServerSol. Exp. ->Add ->New Item -><br />
  86. 86. LINQ to SQL ServerView of LINQ to SQL class<br />
  87. 87. LINQ to SQL Server Server Exp. -> Add Connection -><br />
  88. 88. LINQ to SQL ServerView of Database in Server Exp.<br />
  89. 89. LINQ to SQL Server VS -> Create Project -> Windows Form<br />
  90. 90. LINQ to SQL Server Code View<br />
  91. 91. LINQ to SQL Server Output Screen<br />
  92. 92. LINQ for SharePoint 2010<br />
  93. 93. LINQ for SharePoint 2010<br />
  94. 94. LINQ for SharePoint 2010<br />The LINQ to SharePoint Provider is defined in the Microsoft.SharePoint.Linq namespace. It translates LINQ queries into Collaborative Application Markup Language (CAML) queries.<br />LINQ to SharePoint is a technology for querying SharePoint lists that relieves the developer from having to write CAML queries.<br /> In this, you will be making use of the new support for LINQ in SharePoint.<br /> In the first step, you will be creating lists for use with LINQ.<br /> In the second step, you will use the SPMETAL utility to create Entities. <br />In the final stage, you will create a web part for accessing the list data using LINQ.<br />
  95. 95. Windows Work Flow Foundation(WFF)<br /> Refer Parallelminds_WorkflowConsoleApplication from Solution<br />
  96. 96. Windows Work Flow Foundation(WFF)<br />Windows Workflow Foundation (WF) is one of the parts of the .NET 3.0 framework as released by Microsoft.<br /> One of the most interesting aspects of Windows Workflow Foundation (WF) is the separation between business process code and the actual implementation, often a requirement in Service Oriented Architecture (SOA).<br />With the release of Windows Workflow Foundation (WF) the business logic can be defined in the workflow while the actual underlying implementation is done in C# or another .NET language.  <br />Windows Workflow Foundation is basically a library consisting of an execution engine, a rules engine, a number of activities, a number of supporting runtime services and a designer allowing developers to design their workflows graphical in Visual Studio.<br />
  97. 97. Sequential WFF<br />
  98. 98. State Machine WFF<br />
  99. 99. Work Flow Foundation(WFF)<br />
  100. 100. Work Flow Foundation(WFF)<br />
  101. 101. Hello World Program using WFF<br />
  102. 102. Hello World Program using WFF<br />
  103. 103. User of IF/Else , Code Activity in WFF<br /> Refer Parallelminds_2EvenAdd from Solution<br />
  104. 104. Program for checking No. Even or Odd <br />
  105. 105. Program for checking No. Even or Odd <br />
  106. 106. Code View<br />
  107. 107. Output Screen<br />
  108. 108. How to Integrate WFF with WFA<br /> Refer Parallelminds_WFAwithWFF from Solution<br />
  109. 109. How to Integrate WFF with WFACreate Project -> Workflow -> Seq. workflow liab. -> Ok<br />
  110. 110. How to Integrate WFF with WFAAdd Reference -> -> Ok<br />
  111. 111. How to Integrate WFF with WFACreate Project -> WFA -> Ok ->Add ->Ref.<br />
  112. 112. How to Integrate WFF with WFAAdd -> Ref -> select dll file of WFF ->Add<br />
  113. 113. How to Integrate WFF with WFACode View<br />
  114. 114. How to Integrate WFF with WFAOutput Screen<br />
  115. 115. SharePoint and Windows WF<br />
  116. 116. SharePoint and Windows WF<br />Windows SharePoint Services (WSS) 2007 is the first Microsoft server that has native support for the Windows WorkFlow Foundation (WF). <br />It provides an infrastructure that drives processes around SharePoint's strong suit: collaboration and sharing of information.<br /> This release focuses on document-centric workflows, the procedures that a particular document goes through in its lifecycle<br /> The new edition enables you to attach and run a process directly in a SharePoint document or list item.<br />The WorkFlow Foundation provides an extensible infrastructure that can be used to create sophisticated workflows. WF provides a powerful platform with a unified programming model, and it works with familiar developmental tools such as Visual Studio 2005.<br />
  117. 117. SharePoint and Windows WF<br />The first step in creating a workflow for SharePoint is crafting a new project in Visual Studio based in the Sequential Workflow Library (or in the State Machine Workflow Library, if you are making a state machine workflow) and assigning it a name. <br />Visual Studio will generate the necessary code and configuration files. <br />Add a reference to Windows SharePoint Services (Microsoft.SharePoint.dll) and,<br /> if you need to work with Microsoft Office SharePoint Server, a reference to Microsoft Office SharePoint Server component (microsoft.sharepoint.portal.dll). This establishes references to the object model of SharePoint, opening the door to interactions with it.<br />
  118. 118. SharePoint and Windows WF<br />You can use workflows to manage a business process or any series of tasks required to get a job done. <br /> for example, to manage expense reporting, the hiring process, or a company event.<br />There are several types of workflows you can choose from, including the Approval workflow, the Collect Feedback workflow, and Collect Signatures workflow. <br />For example, the approval workflow, to get a document approved before sending it out to the rest of the company. <br />Visio 2010 comes with a brand new template; Microsoft SharePoint Workflow. Using this template you can design your workflow and then export it.<br />
  119. 119. Thank You!<br />