Skip to main content

70-562 Web Parts


After the success of design move in visual studio with dragging and dropping controls to design them, Microsoft brought this to the end user in sharepoint and then to all web applications with Web Parts.

The idea is that users should be able to personalize the page they visit often and tinker to their hearts content.

In this section we will see web parts as a sever control and techniques to make web parts effective.

Authorized users can make site wide changes(shared data) and individual users can override them.

The information is stored in the same database as the membership data, simply in the App_Data directory by default.

In the upper right corner a small arrow can allow to minize the Web Part.

the webParts element in the web.config file contains the security that indicates which users have priviledged access.

Design and Edit mode: are the two modes a web part page can be in. Design is rearange and edit allows to modify behaviors by setting properties.

Users in edit mode have access to the edit menu that allows to edit properties, done in the editor zone.

Web parts can be moved within web part zones, when dragging a web part to a destination, the destination has to be a web part zone.

Catalog mode: allows to add and remove existing parts, import and add parts.

Not all the web parts are the same, menus contain different verbs, web parts coming from catalog will have a delete verb.
It is also possible to add custom verbs, like verify to.

It is possible to provide data from one web part to another.

You can add custom properties and decide if they are editable in shared scope or use scope. Some properties can be made read-only.

How to import and export settings for web parts? Export allows to save data from the webpart to a file on disk in xml data. You can import web parts from the catalog mode.

To edit a web part, you go in edit mode, and select edit from the web part's menu.

The controls are available from toolbox in vs.

WebPartManager: has no UI, just manages behavior, mode, storage, and data exchange between web parts, there is one manager per page, typically in master page or user control.

WebPartZone control: Acts as a container for web parts, lets you embed html, one contains a zone template.

CatalogZone: only when in this mode, DeclarativeCatalogPart, PageCatalogPart, ImportCatalogPart.

EditorZone: contains a zone template, and place any EditorParts you need to customize. PropertyGridEditorPart will add controls for each property, for example, checkbox for boolean etc.

ConnectionZone: Lets the user change connection between webParts

There is alot of features in web parts, and it is a little off beat compared to other asp.net features, but can empower users to make your web page, their own, and that's a very good thing.

Comments

Popular posts from this blog

React JS Patterns

React JS is always evolving, and evolving quickly. These evolutions can be very significant ones, for example, the addition of hooks. React has a lot of code patterns, often these patterns are motivated by the DRY and/or the open-close principle. These patterns sometimes come in to replace a previous one, yet the previous ones still stays in use, as a consequence, the list of patterns keep growing. The goal of the next few posts will be to list the patterns commonly used in React JS developpement. Some patterns are more specific to JSX and I will start with these, and maybe add patterns specific to Redux.

Rxjs Forkjoin vs Zip

These Rxjs combination operators are handy to make Rest calls in parallel and combine their results. Both take n observables and will return the results, with the difference that forkJoin will complete even if one of the nested observables errors of completes.

70-562 Custom Visualizers

Framework objects are clearly viewable in the locals window during debugging. User made class librairies and their object need to provide visualizers for maintenance and debugging. You can create your own visualizers, MS exposes the functionnality through the .Net Framework; and this is relatively easy. Mulitple visualizers can be created per type. You can have tree views, grids; customizing it to the way that is the most usefull for debugging this particular object. The [Serializable()] attribute has to be included to your class to allow the visual studio visualizer to parse the object. A visualizer is a dll, a regular assembly, it requires a windows form to display the data. The visualizer class will be implemented by the form. The visualizer class has to inherit the DialogDebuggerVisualizer class with the DebuggerVisualizer attribute, and also the Microsoft.VisaulStudio.DebuggerVisualizers namespace. The visualizer can be made to only read, or modify existing data. T...