Search This Blog

Wednesday, December 3, 2014

What is deployed?

Deploying a Web Part involves the following components:

  • Feature.xml 
    Definition of the customization that is deployed
  • Elements.xml, defining:
    • Which Web Part belongs to the feature
    • Where to upload in the Site Collection
  • Web Part definition, *.webpart or *.dwp  referenced by the elements.xml including e.g.
    • A title
    • An assembly reference
  • Safe Control 
    Web Parts need an entry in the web.config so the code will be executed
  • Assembly
    Code of the Web Part

Where is deployed?

If the feature is deployed to a Web Application it becomes available at the scope Site Collection. The feature.xml, the elements.xml and the Web Part files (*.webpart, *.dwp) are written to the file system in the features folder. 
Deployment process of a Web Part.
Assemblies are deployed to the Global Assembly Cache (GAC) and the web.config is modified with entries in the safe control section.
If you activate the feature the declaration in elements.xml will be executed which contains the upload of the *.webpart and *.dwp files to the Web Parts Gallery on the Site Collection root.
The Web Part definition is uploaded to the Web Parts Gallery.
Only after the upload a Web Part becomes available if you click “Add a Web Part” on your site:
After the upload the Web Part becomes available.

No comments:

Post a Comment