Developing SharePoint web parts
Wilska, Aki (2019)
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2019100619618
https://urn.fi/URN:NBN:fi:amk-2019100619618
Tiivistelmä
Tämän opinnäytetyön aiheena oli tuottaa asiakkaalle henkilöiden hakutyökalu käyttäen Microsoftin SharePoint-ympäristön Web Partia. Web Part sisältää lukuisia eri hakupara-metreja, joiden avulla se hakee henkilöt tietokannasta käyttäen olemassa olevaa rajapin-taa. Haetuista henkilöistä voidaan tämän jälkeen valita henkilö, jonka tiedot siirtyvät ostos-koriin. Ostoskorista voidaan ladata pakattu tiedosto sisältäen henkilöiden tietoja.
Ennen kehitystyötä, piti käydä läpi Web Partin määrittelyt ja vaatimukset. Vaatimuksiin kuului mm. käyttöliittymän yhtenäisyys sekä SharePoint-ympäristön että muiden Web Par-tien kanssa, joita asiakkaalle on kehitetty. Tämä onnistui käyttämällä kehityksessä UI Fab-ric-kirjastoa.
Kehitys alkoi asentamalla virtuaalikone sekä tarvittavat ohjelmistot ja työkalut. Web Partin pohja asennettiin käyttämällä Yeoman-työkalua. Tämän jälkeen piti suunnitella Web Par-tin struktuuria eli miten eri komponentit olisivat toisiinsa liitoksissa. Web Partia päädyttiin rakentamaan kuudesta eri komponentista. Jokaisella komponentilla on omat tehtävänsä. Tärkein näistä on pääkomponentti, joka sisältää kaikki muut komponentit ja jonka tilaa käy-tetään ohjaamaan Web Partia. Hakuparametriarvojen vastausvaihtoehdot haetaan raja-pinnalta, jotka asetetaan pääkomponentin tilaan.
Kehitystyö sujui onnistuneesti. Kirjoittaja oppi React-työkalun käytön nopeasti, joka edes-auttoi kehityksessä. Kehitetty Web Part toimi vaatimusten mukaisesti, ja se tullaan vie-mään asiakkaan testaukseen mahdollisimman nopeasti. Web Partin pohjalta voitaisiin myöhemmin kehittää asiakkaalle lähes vastaava ratkaisu, joka toimisi myös eräänlaisena hakukoneena. The purpose of this thesis was to develop a personnel search tool for a client using the Microsoft SharePoint platform’s web part. The web part would contain numerous different search parameters that would be used to search the correct personnel from the database. The user could then pick the people they wanted to be put to a shopping cart, where they could download the personnel information in a compressed zip-archive.
Before starting development, it was necessary to go through the specifications and re-quirements for the web part. One of these requirements included same look and feel as the other web parts developed for the same client. This was achieved using the UI Fabric library.
The development began by installing a virtual machine and the required software. The web part was first scaffolded using the Yeoman tool. The structure of the web part was designed next. It was decided that the web part would consist of six components. Each of these components would have its own purpose. The main component was the most im-portant. It holds all the other components. Its state holds the possible search parameters fetched from the API, and the parameters that the user would input. The search parame-ters will then be used to fetch the people from the API.
Successful development was achieved. The author quickly learned the use of the React, which helped with the development. The web part functioned as required and would be deployed for testing in the client’s environment. Based on the developed web part, a simi-larly functioning search tool could be developed in the future.
Ennen kehitystyötä, piti käydä läpi Web Partin määrittelyt ja vaatimukset. Vaatimuksiin kuului mm. käyttöliittymän yhtenäisyys sekä SharePoint-ympäristön että muiden Web Par-tien kanssa, joita asiakkaalle on kehitetty. Tämä onnistui käyttämällä kehityksessä UI Fab-ric-kirjastoa.
Kehitys alkoi asentamalla virtuaalikone sekä tarvittavat ohjelmistot ja työkalut. Web Partin pohja asennettiin käyttämällä Yeoman-työkalua. Tämän jälkeen piti suunnitella Web Par-tin struktuuria eli miten eri komponentit olisivat toisiinsa liitoksissa. Web Partia päädyttiin rakentamaan kuudesta eri komponentista. Jokaisella komponentilla on omat tehtävänsä. Tärkein näistä on pääkomponentti, joka sisältää kaikki muut komponentit ja jonka tilaa käy-tetään ohjaamaan Web Partia. Hakuparametriarvojen vastausvaihtoehdot haetaan raja-pinnalta, jotka asetetaan pääkomponentin tilaan.
Kehitystyö sujui onnistuneesti. Kirjoittaja oppi React-työkalun käytön nopeasti, joka edes-auttoi kehityksessä. Kehitetty Web Part toimi vaatimusten mukaisesti, ja se tullaan vie-mään asiakkaan testaukseen mahdollisimman nopeasti. Web Partin pohjalta voitaisiin myöhemmin kehittää asiakkaalle lähes vastaava ratkaisu, joka toimisi myös eräänlaisena hakukoneena.
Before starting development, it was necessary to go through the specifications and re-quirements for the web part. One of these requirements included same look and feel as the other web parts developed for the same client. This was achieved using the UI Fabric library.
The development began by installing a virtual machine and the required software. The web part was first scaffolded using the Yeoman tool. The structure of the web part was designed next. It was decided that the web part would consist of six components. Each of these components would have its own purpose. The main component was the most im-portant. It holds all the other components. Its state holds the possible search parameters fetched from the API, and the parameters that the user would input. The search parame-ters will then be used to fetch the people from the API.
Successful development was achieved. The author quickly learned the use of the React, which helped with the development. The web part functioned as required and would be deployed for testing in the client’s environment. Based on the developed web part, a simi-larly functioning search tool could be developed in the future.