Mobile app ”Telecom FTTx Survey”
Abstract
Terrain surveys play an important role in the field of telecommunications. In order to expand a fiber optics network, it is fundamental to have knowledge of the area being considered for expansion, especially knowledge about existing structures, and possible limitations of that area. A terrain survey provides a way to collect this information, which can then be examined and acted upon. Survey results can often have issues depending on what tools and methods were used for the collection of data. The main goal of this work is to develop a tool capable of efficiently, and correctly collecting georeferenced data, and outputing that data in a way that is usable in the following stages of expansion of the fiber optics network.
Full text
University of Minho Pedro Manuel Gonçalves de Oliveira Mobile app ”Telecom FTTx Survey” november 2023
University of Minho Pedro Manuel Gonçalves de Oliveira Mobile app ”Telecom FTTx Survey” Masters Dissertation Master’s in Informatics Engineering Dissertation supervised by António Luís Pinto Ferreira Sousa Helena Fernández López november 2023
Copyright and Terms of Use for Third Party Work This dissertation reports on academic work that can be used by third parties as long as the internationally accepted standards and good practices are respected concerning copyright and related rights. This work can thereafter be used under the terms established in the license below. Readers needing authorization conditions not provided for in the indicated licensing should contact the author through the RepositóriUM of the University of Minho. License granted to users of this work: CC BY-SA https://creativecommons.org/licenses/by-sa/4.0/ i
Statement of Integrity I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. University of Minho, Braga, november 2023 Pedro Manuel Gonçalves de Oliveira ii
Abstract Terrain surveys play an important role in the field of telecommunications. In order to expand a fiber optics network, it is fundamental to have knowledge of the area being considered for expansion, especially knowledge about existing structures, and possible limitations of that area. A terrain survey provides a way to collect this information, which can then be examined and acted upon. Survey results can often have issues depending on what tools and methods were used for the collection of data. The main goal of this work is to develop a tool capable of efficiently, and correctly collecting georeferenced data, and outputing that data in a way that is usable in the following stages of expansion of the fiber optics network. Keywords Mobile development, Terrain Survey, Geolocation iii
Resumo Os estudos de terreno desempenham um papel importante na área das telecomunicações. Para expandir uma rede de fibra ótica, é fundamental ter conhecimento da área que está a ser considerada para expansão, especialmente conhecimento sobre as estruturas existentes e possíveis limitações dessa área. Um estudo de terreno é uma forma de recolher estas informações, que podem depois ser analisadas e utilizadas. Os resultados do estudo podem apresentar problemas, dependendo das ferramentas e métodos utilizados para a recolha de dados. O principal objetivo deste trabalho é desenvolver uma ferramenta capaz de recolher dados georreferenciados de forma eficiente e correcta, e de produzir resultados de uma forma que possa ser utilizada nas fases seguintes de expansão da rede de fibra ótica. Palavras-chave Desenvolvimento de aplicações móveis, estudos de terreno, geolocalização iv
Contents 1 Introduction 1 1.1 Objectives ...................................... 2 1.2 Methodology ..................................... 2 1.3 Document Structure .................................. 3 2 State of the Art 4 2.1 Terrain Surveys .................................... 4 2.2 Related Work ..................................... 5 2.2.1 Weezie .................................... 5 2.2.2 OSPInsight .................................. 6 2.2.3 Comparison ................................. 6 2.3 Validation ....................................... 6 3 Problems and Technologies 7 3.1 File Management ................................... 7 3.2 Interactive Maps ................................... 9 3.2.1 Google Maps ................................. 10 3.2.2 MapHub ................................... 10 3.3 Cloud Services .................................... 10 3.3.1 Firebase ................................... 10 3.3.2 Azure .................................... 11 3.3.3 Amazon Web Services ............................ 11 3.4 Development Frameworks ............................... 11 3.4.1 React Native ................................. 11 3.4.2 Xamarin ................................... 12 3.4.3 Flutter .................................... 12 v
3.5 Final Considerations ................................. 12 4 Architecture 13 5 Development 16 5.1 Boilerplate ...................................... 16 5.2 Components ..................................... 17 5.3 Emulation ...................................... 20 5.4 Implementation .................................... 21 5.4.1 Data Structures ............................... 21 5.4.2 Converter .................................. 24 5.4.3 Login Screen ................................. 24 5.4.4 Navigation .................................. 25 5.4.5 User Screen ................................. 26 5.4.6 Project Screen ................................ 28 5.4.7 Map Screen ................................. 42 6 Tests 58 6.1 Automated Tests ................................... 58 6.2 Manual Tests ..................................... 59 7 Conclusions and future work 61 I Appendices 65 A Requirements 66 B Mockups 73 vi
prototypes of the mobile application will be created and shared with users to ensure it fits their needs. •Testing: To ensure the mobile application is working as intended and is of high quality, manual and automated tests will be performed to make sure the application functions correctly, runs smoothly and meets the real world necessities set by its end-users. If any issues arise during testing, the user requirements or prototype should be revised. 1.3 Document Structure This document is divided into the following chapters: •Introduction: The first chapter describes the context and motivation of this dissertation, as well as the objectives and development methodology. •State of the Art: The second chapter examines the current methods being used by the company, and compares similar applications to the one being built, justifying the need for the development of a mobile application. •Problems and Technologies: The third chapter describes the technologies that will be used during the development of the application, and any problems that could arise from their use. It also describes possible issues with the application’s requirements, and which tools are the best fit to answer to those requirements. •Architecture: The fourth chapter describes the proposed architecture for the application, as well as an explanation for the decisions made. •Development: The fifth chapter describes the development process of the application. This includes a description of the tools that were used for development and testing, among with all the features the application has, along with all the different ways to interact with the application. •Tests: The sixth chapter describes the tests performed during the development process to ensure quality and consistency from the application, it describes in detail both manual and automatic tests performed. •Conclusions and future work: The seventh and final chapter provides a reflection on the application developed, and provides insight on what improvements could be made for future versions of the application. 3
Chapter 2 State of the Art The field of mobile development field has made significant advancements in recent years, and with this growth, an extensive number of tools have been created to meet this demand. In this chapter, a study will be made of the current state of the art of the development of mobile applications that collect georeferenced data, including an in-depth review of current methods used by Proef and how these could be improved. 2.1 Terrain Surveys The current data collection method that the company Proef uses when doing a survey in a certain terrain is to request for a team to bring a tablet device with an Android operative system with a third party developed application, and collect data through it. They then send the info collected in the survey to a third party company that creates a KMZ file for them to use in other projects. This process is not only costly, but it’s also slow, instead of having the file readily available as soon as they finish the surveys, they are required to wait for the company to finish creating the final file, check if everything was correctly added to the file, and only then are they able to start using it. Should anything come with issues, the process is restarted, and the team has to wait again for an updated version of the file. They are also dependent on a third party software which could be deprecated or removed, leaving them without a tool to perform their surveys, alternatively, pricing could increase over time, making this costlier and costlier. What follows is an image with an example project provided by Proef: 4
Figure 2: Example project (Software used: Google Earth) As we can see there are hundreds of structures and buildings within the same area, and this is a fraction of the area covered by the whole project, this could easily lead to management and editing issues through current methods. 2.2 Related Work Two applications similar to the one being developed, Weezie[24] and OSPInsight[11], will be analyzed for their features, tools and ease of use. This analysis will allow for a better understanding of what areas might be lacking in current applications which can be improved by the application being developed. This analysis can also provide insight on what tools and features might be expected by current users which might not have been considered for the application in development. 2.2.1 Weezie According to Weezie’s website, ”Weezie develops fiber optic network solutions focused on automation and digitalization of processes and oriented towards CapEx control and OpEx management.” [24]. Weezie provides a multitude of tools, including Weezie Fiber, a cloud SaaS FTTx[1] designed to automate network projects; Weezie Field, a software that allows its users to survey and validate infrastructures in both online and offline modes, and Weezie Tasks, which plans, controls and executes task assignments. Weezie’s business model is subscription based. For our case study, Weezie Field is the most relevant application, 5
because it provides similar features to what is being developed, mainly, real-time surveying capabilities that allow users to collect georeferenced data, and afterward, share the projects created. 2.2.2 OSPInsight According to OSPInsight’s website, its goal is ”Providing regional and private fiber operators with an optimized and cost-effective network management solution.”[11]. OSPInsight is owned by IQGeo, and developed by OSP engineers [11], and its goal is to help users plan, design, build and operate their networks. They also allow users to map their fiber networks, although it is unspecified if this can be done in real-time while surveying an area. OSPInsight’s business model, similar to Weezie is though a monthly or annual subscription. 2.2.3 Comparison Platform Developer Device Support Main Features Web app Intuitive User Interface Weezie Field Weezie Desktop Internal and External plan sharing Mobile browser support Real-time insights Web app Intuitive User Interface OSPInsight IQGeo Desktop Extensive tools and features Mobile browser support Reports for various systems Table 1: Platform comparison 2.3 Validation From the Sections above, it’s clear that there are alternatives to the current methods employed by Proef, but neither of the analyzed applications has a mobile version. For Proef’s project sizes, a native mobile solution is essential, as web applications can significantly impact performance. Therefore, we can confirm the need for a mobile application to efficiently collect georeferenced data while ensuring performance and user-friendliness. 6
Chapter 3 Problems and Technologies Throughout this Chapter, an in-depth analysis will be made of the current technologies available for development, including file management, interactive maps, cloud services, and development frameworks. It will also review any issues that their integration with the application could bring, to make sure the best selection of tools is made. 3.1 File Management In order to accommodate for Proef’s current workflow and file system, kmz files will be used. kmz files are similar to KML files, but are zipped to compress their size. To be able to use these files, they need to be extracted into their KML version, which you can then programmatically read and edit. This is useful, since compressed files can’t be handled directly. Google Earth currently allows for both KML and kmz files to be opened, but with the project sizes that Proef handles, KML files are extremely slow to work on, since they have thousands of structures and buildings within them. Because of this, a converter needs to be created to transform kmz files into KML files, and KML files into kmz files. This converter will allow the application to read KML files, and transform them into a custom structure that can be used within the application. After this transformation, the converter is also able to output a kmz file once Proef wants to open their project in Google Earth to advance their projects. Proef also requested that a converter to CSV from KML or kmz to be developed, so that they are able to more easily read information contained in those files. Since KML files are much easier to be handled programmatically, kmz files will be initially converted into KML files, and only then convert KML files into CSV files. These CSV files will not contain all the information within the KML files since they are only a preview, but CSV files have limits to the kind of information they allow, as such, images would not be displayed, and it would only be possible to display a link to said image. To achieve this behavior, the converter created should follow the logic displayed in the following image: 7
Figure 3: Proposed Converter As displayed in the picture above, the application accepts both KML and kmz files as an input. The KMZ file is first converted into the KML file, before being converter into the generic Project type which the application will be built on. Since the application being developed doesn’t directly support any of these data types, it is required to create our own custom data solution, which should be able to import KML and kmz data through the converter, and later on, when requested by the end user, export that same data to any of the types supported by the converter developed. To do this, it is possible to use generic objects during the application’s runtime, but this is something that can easily lead to mistakes since it would not be static, and thus not being able to take advantage from error validation through the code editor. A better solution exists, which is to use MobX State Tree [25], it provides code structure and common tools that can 8
be found in other programming languages, making Typescript even closer to an Object-Oriented Paradigm (OOP). This tool provides the ability to create models (similar to objects), add properties to those models which can be made private and only accessible through getters, methods, views, among other features. This provides a simple interface that makes use of the MVC[19] pattern and, once again, provides better type security and a faster development environment. This tool also provides a feature to enable persistent data saves, which means that, in case the user closes and reopens the app, all managed data is not lost, it’s instead saved to the disk, and loaded upon the next boot of the application. Without this, a manual save file would have to be created and managed, which, once again, easily leads to mistakes and issues such as checking storage permissions, location, stability, error checking, serialization among many others. The application also requires the storage of temporary data on runtime, even if this data is not saved to the disk, otherwise, when switching screens, pressing toggles, or entering text within the application, this data would not persist between events. React Native[13] provides methods to deal with these issues, such as the useState method. This method provides a simple way to access temporary values and also to edit those temporary values, it’s not limited to what data it allows, and how much data it stores, making it an excellent solution to the issue at hand. As for the output of the converter, we have once again both KML and KMZ file types, of which the KMZ file requires the KML file to be created first, to then be compressed into the KMZ file, and the CSV file which Proef will use with their clients. The converter also has a custom JSON file that does not have any loss of data that can be used as both an input and an output in case the user would like to transfer the data. Other types have loss of data to some degree, since they don’t contain all the fields the base project type has, or only contain very limited information because of their use case. 3.2 Interactive Maps This application requires the creation of an interactive map to display structures and buildings contained within the projects being handled, as well as to allow the creation of new structure without the need to input the location each time and allow the users to use their current position as a reference, Google Maps[7], and MapHub[12] provide such features. Google Maps has a vastly superior tool set and community support due to being developed by Google, MapHub is developed by the MapHub team, having a smaller, more focused community and set of tools. With the amount of data being handled by Proef, these tools require extreme performance in order to maintain a working level of usability, this will require efficient usage of any APIs available, and limit the overhead that the application creates while making these requests. 9
3.2.1 Google Maps Google Maps is an excellent option for the creation of interactive maps, being one of the first tools ever created to handle precise real time location, it stood the test of time, and it’s one of the most effective tools on the market. Google Maps API is a subscription based service which allows users to make requests to their API to fetch location data, users are charged based on their usage of the service, so higher usage leads to higher costs, this service is available for desktop, web, and mobile devices. 3.2.2 MapHub MapHub is a fairly recent alternative to Google Maps, and while it’s only available for the web, its simple user interface and modern looks make using the platform fairly simple and intuitive. MapHub is a subscription based service, but instead of being based on usage like Google Maps, it has a very permissive free tier, with paid monthly plans for increased usage requirements. 3.3 Cloud Services Cloud services such as file storage, authentication are an essential tool for mobile applications. They provide secure access to backend services which otherwise could require entire teams to create and maintain such features, it’s often more cost-efficient to delegate these services to dedicated service provides. Some of the most popular providers of cloud services are Google’s Google Cloud, of which the platform Firebase is based on, Microsoft’s Azure, and Amazon’s Amazon Web Services, or AWS. 3.3.1 Firebase Firebase provides a limited amount of services, but it’s ease of use and integration make it popular among mobile cloud services. It provides user authentication though multiple providers, such as Google, Facebook, Apple, Mobile Number and Email, among many others. It also simplifies the storage of files to the cloud with its bucket system, allowing for different buckets for different storage purposes. It also provides, multiple databases for different goals, a real-time database[4], which is most useful when dealing with real-time data, storage[3], for large files which don’t need to be synced in real time, and FireStore[5], which is a middle term between both options. It also provides other services, such as analytics, crash reporting, among others, but they are not relevant for our case study. Its business model is based on a ’pay as you go’ with a free tier available, which should cover the present application’s requirements. 10
3.3.2 Azure Azure[15] is a robust cloud service provider, developed by Microsoft, it’s used for mobile, web and desktop applications alike. It is easily integrated with other Microsoft products such as Xamarin[18] and Blazor[16], as well as all applications using the .Net Framework Core Framework. Its business model is with payments based on usage. Similarly to Firebase, this service provides cloud storage and authentication, the features most important for the development of the application. 3.3.3 Amazon Web Services Amazon Web Services is one of the most popular web services available, developed by Amazon, it allows developers to create any backend service imaginable, being mainly used for backend services, machine learning and website hosting. Its business model is with payments based on usage. 3.4 Development Frameworks In order to develop the mobile application, a development framework is required. These frameworks help development by providing a set of tools and feature that greatly improve development speed. Three of the most popular options to develop mobile applications[23] are React Native[13], which uses the programming language JavaScript and the React library, Xamarin[18], which uses the programming language C# and the .Net Framework, and Flutter[6], which uses the programming language Dart. In this section, a comparison will be made with React Native,Xamarin, and Flutter[6] in terms of their capabilities and features. 3.4.1 React Native React Native provides the ability to create native apps for both Android and iOS, the codebase can be shared between both versions, making supporting the application on the long term an easier task since it’s not required to be constantly switching projects. It also provides a fast refresh feature, making changes to the code-base visible in the device preview as soon as the file is saved. React Native is component based, which allows for reusability of the building blocks of the application and allows the developers to more easily follow coding conventions such as Do not Repeat Yourself (DRY)[20]. React Native provides an extensive repository of libraries, including a library to handle Firebase requests (React Native Firebase) that provides methods to easily access cloud storage and authentication features, and a library that handles the 11
creation of interactive maps (React Maps), that allows the display of maps of a real-time location collected though the mobile device’s location. 3.4.2 Xamarin Xamarin is very similar to React Native in the way that it allows users to develop native apps for both Android and iOS, it also shares the feature of having the same codebase for both versions. Xamarin is more convoluted to develop when compared to React Native, since HTML and C# code are written together in the same file. Xamarin also provides a repository of libraries through the NuGet Gallery[17], although it doesn’t have Firebase requests support, nor a simple interactive map generation library, to get access to these features custom libraries have to be built, requiring a significant amount of effort due to having to handle HTTP requests manually, as well as making a secure and robust solution to these issues so that malicious third parties are not able to the application through unintended means. 3.4.3 Flutter Flutter, similar to Xamarin, is also very similar to React Native, it supports the same platforms and has the same codebase structure, shared between all versions of the application. The application uses the Dart programming language, an object-oriented programming language developed by Google. Flutters package installations are handled through the dart package manager, or Pub[10]. 3.5 Final Considerations The tools selected for the development of the application were Google Maps,Azure, and React Native. Google Maps was selected as the library for the development of the interactive maps because of its robust engine and development tools available, and because of its existing usage within Proef’s surveying workflow. Microsoft’s Azure was selected as the platform to be used for cloud services due to its pay as you go tier perks being sufficient for the features required by the application, and due to its ease of use, implementation, and integration with the current Proef’s development environment. React Native is the framework selected for the development of the final mobile application due to its use of the JavaScript programming language, the Google Maps library, as well as its strong integration with the company’s (Proef) existing tech stack. 12
Figure 7: Example Custom Component (Search Bar) As we can see, it provides an intuitive interface of a text input field where users can search for information, or filter certain objects, depending on the usage context. It also provides an options button to the right, that can be customized to have any behavior needed. As an example, a popup menu can be shown when pressed, as can be seen in the following example: Figure 8: Example Custom Component Options (Search Bar) Using these components, it’s very simple to make changes to the application, and test multiple looks and layouts without significant code changes. This allows interface changes to be quick and simple, thus improving the end application by allowing to quickly test multiple interfaces and choosing the best, most intuitive one. To create consistency when using styles and colors throughout the application, colors, spacing, timing, and typography files were created, that when used in the main application, if future developers decide to change fonts, colors, or spacing, they can easily change the entire application by changing just these files, instead of having to go through all the files and changing the components one by one. 19
5.3 Emulation In order to continuously test the application during its development, it’s essential to have a development environment, which in the case of a mobile application, it can be a physical device, such as a regular Android or iOS phone, or a virtual device, emulated by third party software. During the development of the present application, Android Studio was used as a tool for emulation and development. A virtual device was created on Virtual Studio with the following specifications: •API Level: 32 •Screen Resolution: 1080x1920 •Pixel Density (dp): 393x830 •CPU: Qualcomm SM8150 Snapdragon 855 (7 nm) •RAM: 1.5Gb •Storage: 5Gb •ABI List: x86_64, arm64-v8a This device allows for testing of the application on an average device, since physical devices can have greatly varying performance, and limited local storage. This also allows us to test the location features more accurately and safely, through location spoofing, allowing us to set the location to any location needed without actually having to move to that location. It also allows us to set routes and simulate the movement of a user. In the following image, we can see an example of the Android Studio location spoofer and route system: 20
Figure 9: Location Spoofing and Routes In the image above, we can see two positions, Aand B, which are the positions in the current route that the fake user will follow. Here we can set the speed of the route, enable or disable the GPS, and create or edit routes among other useful testing features. 5.4 Implementation In this Section, each screen and functionality of the application will be examined in detail, and an explanation will be provided for each of the solutions for the problems at hand. 5.4.1 Data Structures In order to store and handle the data in an efficient and intuitive way, multiple store data structures were created. These stores are able to asynchronously store the data to the device, so that in case the user closes the application, the data is safely stored and loaded back up on the next launch of the application. 21
This behavior was achieved through the async storage package from React Native’s built-in packages, and a wrapper was created so that the storage was performed automatically for any store created, this wrapper is through a root store that includes all the other stores of the application, so that when we store the root store, all the other stores within are also stored. This is the structure of the store: Figure 10: Root Store structure As we can see, it contains the projects store, and the settings store, which is created with default values for the default settings of the marker creation, which will be explained in detail in Section 5.4.5. The project’s structure will be exemplified in the following domain diagram: 22
Figure 11: Domain Diagram With this structure it’s possible to answer to all the requirements set by the project, in a compact, but efficient way, reducing the amount of dependencies between classes, making changes to the code simple and intuitive. 23
5.4.2 Converter The converter has the goal of converting one file type into another file type, to this end, the following conversions are possible on the converter: • KMZ to KML • KML to Project Data Type • Project Data Type to JSON • JSON to Project Data Type • Project Data Type to KML • KML to KMZ What this means is that we are able to have KMZ, KML, Project, and JSON interchangeably, so if at any point we need to convert a KMZ file into a JSON, all we need to do is follow the conversion steps, and we’ll end up with JSON file, without having the need to have a dedicated function just to convert KMZ files into JSON. This greatly reduces the amount of functions needed, and if at any point we decide to add a new file type into the converter, all it’s needed to be done is to create a converter into a known file type, and a converter from a known file type, we’re able to convert that new file type into all other files. The converter module was developed with the goal of easily expanding it in mind, so that future developers of the application would be able to make changes without investing a significant portion of their time understanding the codebase. In order to achieve this goal, the converter doesn’t have any code dependencies from classes outside its own, except for models it receives as arguments. With this, it was possible to develop a powerful tool that is easily modifiable and that the behavior of it propagates throughout the application, since any changes made to the converter are reflected in the main application without any additional changes needed. 5.4.3 Login Screen When first opening the application, the first thing the user is presented with is the login screen. It was created in order to accommodate for possible future use cases of the application. This login screen currently has no functionality other than redirect the user to the main application. It was developed this way as a possible placeholder for future authentication implementations, allowing future developers to easily implement this feature without having to make significant structure or code changes. The login screen is structured as follows: 24
Figure 12: Login Screen As evident in the picture, there is a simple button that redirect the user to the main app. This button could be replaced by an account check, cloud data retrieval to configure the user’s settings, additional app data required for the app to run, or any other functionality that could be required to make the app run correctly. Creating the login screen this way provides safety for future developers, which in turn makes the application more robust and prepared for the changes. 5.4.4 Navigation After clearing away the login screen, the user is presented with the default screen of the application, the projects screen, which will be explained in detail in the following Subsection. To change screens with ease, a navigation menu was created, and is visible at all times. This makes it easy to change what screen the user is on, making in at efficient and intuitive way to use the application. The navigation is split into three tabs, Projects, Maps, and Options, translated into Portuguese from Portugal in the following picture: 25
Figure 13: App Navigation As shown, the selected tab is highlighted in orange, allowing for easy distinction of what screen the user is currently on. This navigation bar was developed with future tabs being added in mind, so it resizes automatically in case a new tab is added, and maintains all the behavior from the other tabs such as changing color when it is selected. This behavior was created with React Native’s default Tab navigators, and customized through the navigator’s parameters. The icon highlighting was created using the tabBarIcon property, which allows us to know if the tab is currently selected or not, and setting the color of the icon as needed. The icon color used is derived from the colors file from the themes folder, as well as the font, the font’s color, and all other settings. 5.4.5 User Screen A screen for the user to tweak its settings, and also view some general information, was also created. This screen provides with an essential feature common to most mobile applications, user settings. These settings provide a simple interface for the user to change the behavior of the application, and to accommodate it to its needs, as such, it’s important to provide a lot of settings for the user to change, but also keep it simple enough so that we don’t overwhelm the user. The User screen was implemented as follows: 26
Figure 14: App Settings As evident, there are a few settings for templates, these are used by the map screen in order to setup the default ids of newly created markers. This functionality will be explained in more detail in Section 5.4.6, along with an example of its usage. Another setting present in the picture above, is a debug mode, this button can be used to conditionally display buttons or settings that only developers or tech-savvy users should see. It currently has no func- 27
tionality, but it was setup as an easy way for future testing should any future developer need it, and it was used extensively during development to log custom data to make sure the app was running as expected. Following those settings, we have a logout button, which returns to the login screen explained in Section 5.4.3. Again, custom authentication functionality could be added in the future by the developers working on the application, but remains as a placeholder should it be needed. Near the bottom of the screen, we have information about who developed the application, the year and copyright information, that when pressed, provides a link to the developer of the application. 5.4.6 Project Screen Main Screen The projects screen was developed with the goal of managing projects. Some functionalities of this screen include importing, or creating a new project, merge, edit and delete projects, and lastly, export projects. All of these functionalities will be explained in detail in a further section. When first opening up the app, the projects screen is the first screen we see, its layout is as follows: 28
Figure 20: Projects Merge Screen As evident in Figure 20, we can provide a new name for the new project being created as a result of merging the selected projects. In case we don’t fill this field out, it is created with a default name. We have four checkboxes, one of which is a conditional checkbox, meaning that it only shows up based on a certain condition being true, in this case, the delete duplicate areas only shows up if the join areas setting is enabled. This behavior is further illustrated through the spacing of the settings, since the other 35
two settings have a bigger spacing than the conditional settings. Each of the settings has the following behavior: •Merge Markers: If selected, it will import the markers from both projects and merge them into the new project. (Enabled by default) •Merge Areas: If selected, it will import the areas from both projects and merge them into the new project. (Enabled by default) •Delete Duplicated Areas: Only shows up if the setting above is enabled. If selected, it deletes any areas being imported which are exactly the same (duplicate). (Enabled by default) •Delete Merged Projects: If enabled, after merging the projects, deletes the old projects that were merged. (Disabled by default) Under the settings there is also a warning of how many projects are being merged, and asks the user to confirm that the information provided is indeed correct, as confirming the merge has permanent consequences. There is also a cancel button in case the user does not wish to continue with the project merge. Edit Project The edit project screen was developed as shown in the following picture: 36
Figure 21: Projects Edit Screen On the edit project screen we are able to edit the name of the project, which comes with the name filled with the previous name by default, if no name is inputted, it keeps the old name as the edited name. Below we have a list of the areas that the project has, it provides a simple interface where the user can check how many positions a certain area has, and on the right, an ’X’ icon, where the user can delete a certain area from the project. Under the area management we have a ’marker management’ area, very 37
similar to the ’area management’ area, but it also has a search bar, so the user is able to filter the name of the marker it wants to display. Similar to the area management, it’s also possible to delete a certain marker by pressing the ’X’ icon on the right of the marker. Near the bottom we have two buttons, a cancel button to cancel the changes made, and a confirm button which solidifies the changes made into the project. Delete Project This is the only option that does not open a new screen. Instead, it opens a popup that requires the user to confirm its choice of deletion, and informs them that the deletion is permanent, and it cannot be restored. 38
Figure 22: Projects Delete Screen As it can be seen in the image above, the user can either cancel or continue with the deletion on the popup, adding another layer of security, so the user doesn’t accidentally delete a project it doesn’t intend to. 39
Export Project The last option we have is the export project option, which requires one single project to be selected. If the user has no projects selected, or more than one project selected, a custom error explaining the issue will appear. The following picture is the interface for the project exportation screen: Figure 23: Projects Export Screen 40
At the top, we have a dropdown that allows us to select the resulting location of the export operation, the options are the following: •Email: Automatically creates an email through the use of the mailto: . A message is shown to the user before creating the email to inform them they just attach the exported file to the email, this file was created when the user exported the project, but due to security restrictions, the user has to manually attach the email. •Local: Exports the file to the local storage, under the Documents folder of the device in question. Under that dropdown, we have yet another dropdown, in which the user is prompted to select the format of the export, in our case, it currently supports the following formats: •CSV: The project is converted into a CSV file, through the use of the converter. The usage of this format result in loss of data, since each converter has different specifications, where some data is needed in some, and not needed in others. •JSON: The whole project data is stringified into a JSON file through the getSnapshot method from MobX-state-tree , which can then be imported through the import option of the project screen’s options. This format doesn’t have any loss of data on exporting, so it is ideal to transfer data from one device to another. •KML: The project data is run through the converter developed and turned into a string with a structure very similar to XML. Once again, the usage of this method results in the loss of some data since not all the project data is converted. •KMZ: This option is very similar to the KML option, in that it is run by the same process, but in the end, it compresses the KML file into a zip file with the KMZ extension. The third and final dropdown is a conditional dropdown, it only shows up if the format selected is the CSV format, since in that case we have to use a custom converter to transform the data of the project into a usable CSV file. •Generic: Uses the converter described in Section 5.4.2 to convert the project data into a file that is usable by Proef. Creating new CSV converters is very simple, and can easily be modified for any of Proef’s clients, since all the data from a project is given to the converter, and we just have to write to the CSV the data which is relevant for that specific client. 41
Under the dropdowns, we also have a button to upload the pictures taken during the survey to the cloud, this is used in case the users making the survey didn’t have internet connection at some point and the pictures could not be uploaded in real-time. In this case, the picture is instead cached as a base64 string, allowing the user to upload the pictures at a later time to save storage. If the user tries exporting with pictures stored as a base64 string, it will present the user with a popup asking if they truly want to continue exporting, and that the recommended action is to upload the pictures to the cloud, otherwise the project is exported when the user presses the button. Similar to other menus, it’s also possible to cancel the exportation of the project. All the exportation process was developed with the goal of making additions and changes as simple as possible, whether those are adding new converters, formats or exporting locations. For example, to add a new converter, all that is required is to add a new option to the converter dropdown, and a method to convert from a project to a string, everything else is handled automatically, from creating the file, to exporting, to formatting. All the exporting options work independently, as modules, making updating them an independent task from the rest of the application, meaning that a new developer doesn’t have to understand the whole application to make changes, reducing the amount of effort necessary to start making significant changes to the behavior of the application. 5.4.7 Map Screen Main Screen The map screen is the screen where the user should spend most of its time, it’s where they will survey the terrain, when opening the map screen for the first time, the user is presented with the screen from Figure 24: 42
Figure 24: Map Screen 43
Displayed in Figure 24, we have a real-life map of the city of Braga , in Portugal , this is the default starting location for the map, with the dynamic display, meaning that it includes the name of streets and local landmarks, while keeping a real-life look of the map. This is useful so that the user that is going to make the survey is able to position himself correctly and has points of reference to help them achieve that goal. The user has the ability to swipe around to move the location displayed, they can also increase and decrease zoom by using two fingers, placing them on the screen, and bringing them together to zoom out, or separate them further, to zoom in. This map is provided by Google Maps through an API key that must be requested in their API console, this key has a cost depending on usage, but during the development of the application, and testing, Proef found the pricing acceptable for their uses. On the picture, we have a button to select a project, which will be explained in the Select Project Section 5.4.7.On the right of that button, we have yet another button, which will be explained in the Real-time Location Section 5.4.7, similar to the select project button. Near the bottom right corner, on top of the options tab, we have two zoom buttons, to increase and decrease the zoom on the map displayed. The areas display will be exemplified in the Figure 25: Figure 25: Project Area As evident in Figure 25, we have a red area with some transparency so that we are able to see the terrain below the area being surveyed, and an outline so that we can more easily distinguish the limits of the terrain being surveyed. In that same picture we’re also able to see, near the bottom, that we actually have more than one area that the user should survey, the application does not limit where the user is able to create pins, this is mainly an indicator for where the survey should be performed. In Figure 26, we have an example of the typescript code that created the area display: 44
Figure 35: New Marker Screen 51
Near the top of the screen, we have a button that only shows up if this is not the first marker the user is creating, that allows the user to copy the information from the previous marker the user created. This is useful because sometimes there is a lot of repetitive information between markers, and this button eliminates a lot of repetitive work, also helping reduce errors that can happen when writing the same information multiple times. The screen in Figure 35 is a scrollable screen, since the information does not fit all of the screen displayed, the user can scroll down to see the rest of the information and buttons. The data the user needs to input varies with the type of marker the user wishes to add, and is present on the Domain Diagram in Figure 11. There are also multiple input restrictions on multiple fields, since some fields should only accept integers, only a numeric keyboard is shown, and a full keyboard is shown for string types. There are four (4) types of markers available for the user to choose from: •Home: Does not have any subtypes, contains generic data. •Building: Can contain multiple homes or stores within, though divisions, exemplified in the following Figure 36: Figure 36: Building divisions The user has the option to create as many fractions as needed, and delete them in case of making a mistake. It also contains generic data similar to a home •Structure: Has the following four (4) subtypes, shown in Figure 37: 52
Figure 37: Structure subtypes Some of the types have further custom data to them, for example the CVP does not have a structure type to it, and the structure does not have any height, nor load, because it can’t exist. On the other types, if the structure type is Wood or Other , it also does not have any height or load as per request of Proef . •Other: Has the following five (5) subtypes, shown in Figure 38: Figure 38: Other subtypes These do not have any extra data to them, but render with different icons on the map depending on the user’s choice. All the markers also have a picture field where the user can select or take a picture to attach it to the marker. The buildings’ marker has 4 picture fields because it requires more information than the other markers. The pictures field is displayed in Figure 39: 53
Figure 39: Pictures Field The user has the option to take a new picture with the device’s camera, or select a picture from the device’s gallery. When the picture is taken or selected, the application tries to upload the picture to the cloud on Proef’s backend, this helps prevent an issue with storage on the user’s device, since if the picture had to be stored locally, it could cause the device’s storage to fill very quickly, due to it being stores as a base64 string on the application, when in the cloud, it is much smaller, as only the link to the picture is stored and not the whole picture. The picture is public so that it can then be visualized after exporting, and it can also be previewed on the app. What follows is an example of how the pictures are stored on the application. 54
Figure 40: Local Picture On Figure 40 above we can see that the picture is on the top bar, this means that the picture is currently locally stored on the device as a base64 string , it then tries to automatically upload to the cloud, and if successfully does so, it is moved to the lower bar, where only cloud pictures are stored as a string of a link to the picture. Delete Marker Upon pressing a created marker on the map, the user is presented with a popup message asking them if they would like to edit or delete the selected marker. This action can be canceled in the cancel button on the left of the popup, the popup is designed as shown in Figure 41: 55
Figure 41: Delete or Edit popup As displayed in Figure 41, the title of the message contains the ID of the marker the user pressed, with a message questioning the user about what the next action is going to be. In case the user decides to delete the marker, it will be removed from the project, and as a result, from the map. Edit Marker Screen Similar to the Delete Marker flow present in Figure 41, if the user presses the edit marker action, a new window will appear where the user will be able to edit any information relative to the current marker. This edit screen shares the same logic as the create new marker screen, but instead of adding a new marker, it edits the marker in question. What follows is a picture of the edit screen: Figure 42: Edit Marker Top 56
Figure 43: Edit Marker Botton As evident in Figure 43, it’s exactly the same as the add new marker screen, but with a different title, and different buttons on the bottom. When pressing the edit button, the marker is updated, otherwise, if the user presses the cancel button, no action is taken. 57
Chapter 6 Tests In order to make sure the application being developed was working correctly, manual and automated tests were performed regularly to find possible issues with the normal work flow, as well making sure all the modules performed as expected. These tests provide an extra security layer so that critical issues are less likely to be shipped to production, and thus avoiding unpleasant issues when the user is working with the application. 6.1 Automated Tests Automated tests allow for better quality control, and make sure that old issues don’t show up again in newer builds of the application. These were developed for most of the models of the application, and they helped prevent a lot of simple issues such as null references to objects, but also prevented reintroduction of old issues, as the expected behaviors of the code were defined by the tests. The amount of automated tests varied greatly from model to model, since some models have a lot more functionality than others, and thus require more testing to make sure everything functions properly. The tests developed sometimes had to be updated, when the intended behavior of the models had to be updated due to changes in the coding approach, or when issues were found and a workaround had to be introduced in order to continue development. To implement these tests, the tool Jest.js was utilized, since it works with typescript, the language utilized for the development of the application developed. This tool provides a simple interface to create automated tests, which can all be run sequentially, as shown in Figure 44: 58
Figure 44: Automated Tests Success (Jest.js) If any test fails, this is how the output to the console would be, displayed in Figure 45: Figure 45: Automated Tests Failed (Jest.js) In Figure 45, the test suites refer to the files that contain the tests, each file aggregates all the tests for a specific model. It also provides information on how many tests were run, the time it took to run the tests, and a message when the tests finished running. In case the tests fail, an error message pointing out the expected output and the actual output is provided so that debugging is easier on the developer. 6.2 Manual Tests Manual testing is helpful in finding workflow issues, and issues that cannot be found through automated tests. It can also be useful to detect edge cases that automated tests are not able to detect, since these can often only be caused by some limitations on the user’s device, connection, storage, or some other hardware fault. These tests were performed extensively throughout the development of the application to make sure everything worked as expected and that no critical issues would be likely to be found once the 59
application was released into production. What follows is a list of categories of tests that were performed during manual testing: •UI Rendering The UI components created would sometimes render in unexpected ways, depending on the context of the layout they were introduced in. •UI Resizing Depending on the size of the screen or the screen orientation, some components wouldn’t render or function correctly, thus making it unusable. •Event Systems Taps would sometimes not register correctly, as some frameworks had different functionality depending on the operative system that was being used. •Async Handling Tapping multiple components at the same time, could break async calls, that would be dispatched at the same time, but have conflicting results. •Third Party modules Some modules used during development had bugs of their own, and would sometimes not work as expected and/or as described by the module’s documentation. In rare instances, an internal fix was developed for these modules and shared with the developers of said modules. •Environment Changes When using a mobile device, users sometimes have other programs running simultaneously which can interfere with the normal functioning of our application, more often than not, this is not something that can be fixed from our side, and it’s an unfortunate side effect of mobile development. •Device Limitations Devices also have their RAM (Random Access Memory), CPU (Central Processing Unit), and Storage limitations. These had to be tested in similar devices to the ones being used by the end users to make sure these limitations are not being hit, and the application is able to run as expected across multiple devices. 60
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 1 de 6 Mestrado em Engenharia Informática UC de Dissertação 2022/2023 Requisitos Versão: 1.3 Data: 14/12/2022 Pedro Oliveira PG47570
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 2 de 6 Índice 1. Introdução .................................................................................................................... 3 2. Requisitos Funcionais .................................................................................................. 3 3. Requisitos Não-Funcionais .......................................................................................... 6
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 3 de 6 1. Introdução O propósito deste documento é definir os requisitos da aplicação final. Define o propósito da aplicação, e o que deve ser alcançado. A aplicação em questão é uma aplicação móvel para recolha de dados georeferênciados de uma determinada localização geográfica, e a posterior conversão desses dados num ficheiro KMZ e CSV. Os clientes finais desta aplicação serão os colaboradores da empresa Proef. 2. Requisitos Funcionais Os requisitos enumerados de seguida estão classificados da seguinte forma: Prioridade (baixa sendo pouco importante para o funcionamento da aplicação, alta sendo essencial para o funcionamento da aplicação); Risco (baixo significando que não tem grandes obstáculos previstos, e alto significando que pode ter obstáculos significantes á sua conclusão); Esforço (0 significando que é estimado que seja concluido rápidamente, e 10 é estimado que será investido grande parte do tempo de desenvolvimento). Identificador RF-02 Título Gestão de Áreas Descrição Como utilizador quero criar, atualizar, consultar e remover áreas. Prioridade alta Risco baixo Esforço 7 Condições de aceitação: 1. Os seguintes dados são armazenados para cada área: nome/número, e opcionalmente edificações e infraestruturas. 2. As áreas devem ter nomes/números diferentes. 3. Os dados das áreas podem ser apresentados na mesma página, com uma descrição breve. 4. Deve ser possível a pesquisa de áreas por nome ou morada. Identificador RF-01 Título Gestão de Projetos Descrição Como utilizador quero criar, atualizar, consultar e remover projetos. Prioridade alta Risco baixo Esforço 5 Condições de aceitação: 1. Os seguintes dados são armazenados para cada projetos: identificação, áreas, edificações e infaestruturas. 2. Os projetos devem ter identificações diferentes. 3. Os dados dos projetos podem ser apresentados na mesma página, com uma descrição breve. 4. Deve ser possível a pesquisa de projetos por identificação.
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 4 de 6 Identificador RF-03 Título Gestão de Edificações Descrição Como utilizador quero criar, atualizar, consultar e remover edificações. Prioridade alta Risco medio Esforço 9 Condições de aceitação: 1. Os seguintes dados são armazenados para cada edificações: Identificação, Morada, Pisos, Rede de acesso, Frações, Nº PD/PDO, Localização PD/PDO, Concorrência FO, Operadores HFC, PDO proposto Localização, PDO Proposto Notas, Completo, Notas, e opcionalmente fotos. 2. As edificações devem ter Identificações diferentes. 3. Os dados das edificações podem ser apresentados na mesma página, com uma descrição breve. 4. Deve ser possível a pesquisa de edificações por identificação, e opcionalmente por arruamento. Identificador RF-04 Título Gestão de Infraestruturas Descrição Como utilizador quero criar, atualizar, consultar e remover infraestruturas. Prioridade alta Risco medio Esforço 9 Condições de aceitação: 1. Os seguintes dados são armazenados para cada infraestrutura: Nome, Id, Operador, Estado, Localização, Estrutura, Equipamentos, Altura/Carga, Notas, e opcionalmente fotos. 2. As infraestruturas devem ter identificações diferentes. 3. Os dados das infraestruturas podem ser apresentados na mesma página, com uma descrição breve. 4. Deve ser possível a pesquisa de infraestruturas por identificação, ou por rua/morada. 5. Deve ser possível conectar infraestruturas. Identificador RF-05 Título Partilha de projetos na cloud Descrição Como utilizador quero poder disponibilizar os ficheiros na cloud Prioridade média Risco alto Esforço 6 Condições de aceitação: 1. Deve ser possível a partilha de projetos na núvem.
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 5 de 6 Identificador RF-06 Título Mapa interativo Descrição Como utilizador quero conseguir vizualizar pontos de interesse e áreas de um determinado projeto num mapa interativo Prioridade alta Risco medio Esforço 10 Condições de aceitação: 1. Deve ser possível visualizar os componentes de um projeto num mapa interativo. 2. Deve ser possível adicionar novos pontos de interesse e áreas a partir do mapa interativo. 3. Deve ser possível dar zoom-in e zoom-out do projeto no mapa. Identificador RF-07 Título Projetos persistentes Descrição Como utilizador quando não tenho internet, quero conseguir guardar um projeto localmente para fazer o upload futuramente Prioridade alta Risco medio Esforço 9 Condições de aceitação: 1. Deve ser possível fechar a aplicação, e ao resumir, manter o estado anterior ao fecho da aplicação. Identificador RF-08 Título Definições da aplicação Descrição Como utilizador quero conseguir alterar as definições da aplicação numa aba dedicada Prioridade alta Risco medio Esforço 4 Condições de aceitação: 1. Deve ser possível alterar quaisquer definições presentes na aplicação numa pagina dedicada para esse fim. Identificador RF-09 Título Conversor KMZ para CSV Descrição Como utilizador quero conseguir converter um ficheiro KMZ num ficheiro CSV Prioridade baixa Risco baixo Esforço 2 Condições de aceitação: 1. Deve ser possível converter uma área de levantamento num ficheiro KMZ. 2. Deve ser possível converter um ficheiro KMZ num ficheiro CSV.
App Móvel FTTx Survey - Requisitos Projeto 2022/2023 Pág. 6 de 6 3. Requisitos Não-Funcionais Identificador RNF-01 Título Fácil utilização Descrição A aplicação deve ser fácil de utilizar, de forma ser acessível a pessoas que tem apenas um conhecimento limitado de informática. Prioridade alta Risco médio Identificador RNF-02 Título Padrão de cores Descrição Deve ser respeitado o padrão de cores definifo pela Proef. Prioridade baixa Risco baixo Identificador RNF-03 Título Desempenho Descrição A aplicação deve ser capaz de correr a uma velocidade aceitável em disposítivos móveis sem consumo exagerado de energia. Prioridade médio Risco alto Identificador RNF-04 Título Operabilidade Descrição A aplicação deverá funcionar com conecção limitada á internet. Para efetuar certas operações será necessária uma conecção estável. Prioridade baixa Risco alto Identificador RNF-05 Título Segurança Descrição Sendo uma aplicação desenvolvida para uso exclusivo interno, não seram adotadas sistemas de segurança para proteção da aplicação. Prioridade baixa Risco baixo Identificador RNF-06 Título Legalidade Descrição A aplicação deverá cumprir todas as necessidades legais para distribuição da aplicação e possível recolhad e dados. Prioridade baixa Risco médio Identificador RNF-07 Título Manutenção Descrição A aplicação deve ser desenvolvida com novos componentes em mente, devendo ser criada documentação simples e completa. Deve ser também criada com módulos independentes sempre que possível. Prioridade baixa Risco alto
Appendix B Mockups 73
Seleção de projetos, depois de selecionados, podem ser apagados, ou partilhados na cloud (talvez seja possível fazer automaticamente).
Menu depois de carregar num projeto, é possível ver todas as estruturas/áreas presentes num projeto, é possível a pesquisa por Id, Localização, tudo, ou outros, ao carregar numa estrutura é possível editar. Após selecionados é possível apagar estruturas.
Interface principal onde será possível adicionar novos dados a um projeto.