Back-end development of mobile application for the collection of









Understanding JSON Schema

7 févr. 2022 specification is like learning to drive a car by looking at its ... There are a number of online JSON Schema tools that allow you to run ...
UnderstandingJSONSchema


OPENING BIM IN A NEW DIMENSION A simple OpenBIM standards

Two important OpenBIM standards are Industry Foundation Classes (IFC) and. BIM Collaboration Format (BCF) C-Sharp class to deserialize the JSON file.
caadria


Back-end development of mobile application for the collection of

5 nov. 2012 SQL database Visual Studio Web Service
FULLTEXT


C# 9.0 in a Nutshell Supplement

The (somewhat redundant) data contract serializer (XML and JSON). • The binary serializer (binary) To illustrate suppose we define the following class:.
cs ian supplement





SATO Printer API Reference Guide

3 mai 2021 to Floppy Disks CD-ROM
UM SATOPrinterAPI EN


Fundamentals of Computer Programming with C#

identifiers; variable names; method names; naming classes; Classes in C#. ... online on his personal blog at http://veskokolev.blogspot.com.
Fundamentals of Computer Programming with CSharp Nakov eBook v


REST API Developer Guide

You can use the HTTP ACCEPT header to select either JSON or XML or append json or xml to the Gets all online article fields
api rest


MyGLS API for system integration

5 nov. 2020 Response class GetPrintedLabelsResponse . ... Appendix E: Service parameter examples in JSON format . ... sample codes (C# PHP
mygls api





Learning Management System (LMS) Using C# ASP.Net and SQL

Arora Dipti


AWS Step Functions - Developer Guide

27 juil. 2022 Preprocess data and train a machine learning model . ... I want to return a JSON output from a nested state machine execution.
step functions dg


213270 Back-end development of mobile application for the collection of

Back-end development of mobile

application for the collection of dietary data

Fredrik Back

November 5, 2012

Master's Thesis in Interaction and Design, 30 credits

Supervisor at UmU:Asa Holmner Rocklov

Examiner: Hakan Gulliksson

Ume a University

Department of Applied Physics and Electronics

SE-901 87 UME

A

SWEDEN

Abstract

Smartphones are used by incredibly many people, and in 2011 there where a total of 491.4 million units soled worldwide. Smartphones are known as advanced phones, or personal digital assistants (PDAs). This makes a relevant technique for performing dietary studies when the test patients are on the move. This thesis shows how to create a back end en- vironment for an Android application with existing techniques linked together, using MS SQL database, Visual Studio Web Service, web pages and C# classes and ASP.NET secu- rity. The back end development is used in a dietary study on Gothenburg University, but could be applied on many similar back end projects using databases and server develop- ment. Techniques used in this thesis are: REST (Representational State Transfer) -client implementation and development inside the Android application, using HTTP methods to set and get information from the server and database, and JSON-format to read and trans- fer information in an easy and understandable way, both from the Android application and from the database. FileMaker is also used in this project as a third part programme to visualise the information in the database. ii

Contents

1 Introduction 1

1.1 Gothenburg and Umea university . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.2 Statens livsmedelsverk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.3 Paper outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

2 Background 5

2.1 PhD thesis project plan by

Asa Svensson . . . . . . . . . . . . . . . . . . . .5

2.2 The database from SLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

2.3 Mats Hogdals Android application . . . . . . . . . . . . . . . . . . . . . . . .

6

2.3.1 Application database . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3 Problem Description 15

3.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

3.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4 Technology and software 17

4.1 Limitations in software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.1.1 Choosing software for android . . . . . . . . . . . . . . . . . . . . . . .

17

4.1.2 Choosing software for the database . . . . . . . . . . . . . . . . . . . .

18

4.1.3 Choosing software for the server . . . . . . . . . . . . . . . . . . . . .

18

4.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.2.1 Native vs. Mobile Web applications . . . . . . . . . . . . . . . . . . .

20

4.2.2 Android techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.3 Working with android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.3.1 REST client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.3.2 JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.4 Working with server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.4.1 Web service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.4.2 C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.4.3 Web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.4.4 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27
iii iv CONTENTS

4.5 Working with database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.5.1 Graph databases on social web . . . . . . . . . . . . . . . . . . . . . .

29

5 Methodology 33

5.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

5.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

5.2.1 Web page design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.4 FileMaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.5 User guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

6 Resulting work 35

6.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

6.1.1 Implementing REST-client . . . . . . . . . . . . . . . . . . . . . . . .

35

6.1.2 Programming and design . . . . . . . . . . . . . . . . . . . . . . . . .

37

6.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

6.2.1 Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39

6.2.2 Web page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

6.2.3 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

6.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

6.3.1 Database of dietary study . . . . . . . . . . . . . . . . . . . . . . . . .

46

6.3.2 ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

6.4 FileMaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

7 Conclusions 51

7.1 Future work and changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

8 Acknowledgements 53

References55

A User guide 59

List of Figures

1.1 Smartphones market in quarter 4, 2010 . . . . . . . . . . . . . . . . . . . . .

1

2.1 Start page and registration page. . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.2 Menu page and statistics page. . . . . . . . . . . . . . . . . . . . . . . . . . .

8

2.3 Register intake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

2.4 Search food. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

2.5 Image of food size on plate. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

2.6 Register physical activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

2.7 Android application database. . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.1 Content in ASP.NET web service. . . . . . . . . . . . . . . . . . . . . . . . .

19

4.2 Complete software overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.3 JSON Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.4 ASP Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.5 WebForms round trip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.6 XML request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.7 Comparison between VB and C#. . . . . . . . . . . . . . . . . . . . . . . . .

26

4.8 Security levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.9 Relational database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

Back-end development of mobile

application for the collection of dietary data

Fredrik Back

November 5, 2012

Master's Thesis in Interaction and Design, 30 credits

Supervisor at UmU:Asa Holmner Rocklov

Examiner: Hakan Gulliksson

Ume a University

Department of Applied Physics and Electronics

SE-901 87 UME

A

SWEDEN

Abstract

Smartphones are used by incredibly many people, and in 2011 there where a total of 491.4 million units soled worldwide. Smartphones are known as advanced phones, or personal digital assistants (PDAs). This makes a relevant technique for performing dietary studies when the test patients are on the move. This thesis shows how to create a back end en- vironment for an Android application with existing techniques linked together, using MS SQL database, Visual Studio Web Service, web pages and C# classes and ASP.NET secu- rity. The back end development is used in a dietary study on Gothenburg University, but could be applied on many similar back end projects using databases and server develop- ment. Techniques used in this thesis are: REST (Representational State Transfer) -client implementation and development inside the Android application, using HTTP methods to set and get information from the server and database, and JSON-format to read and trans- fer information in an easy and understandable way, both from the Android application and from the database. FileMaker is also used in this project as a third part programme to visualise the information in the database. ii

Contents

1 Introduction 1

1.1 Gothenburg and Umea university . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.2 Statens livsmedelsverk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

1.3 Paper outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

2 Background 5

2.1 PhD thesis project plan by

Asa Svensson . . . . . . . . . . . . . . . . . . . .5

2.2 The database from SLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

2.3 Mats Hogdals Android application . . . . . . . . . . . . . . . . . . . . . . . .

6

2.3.1 Application database . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3 Problem Description 15

3.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

3.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

4 Technology and software 17

4.1 Limitations in software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

4.1.1 Choosing software for android . . . . . . . . . . . . . . . . . . . . . . .

17

4.1.2 Choosing software for the database . . . . . . . . . . . . . . . . . . . .

18

4.1.3 Choosing software for the server . . . . . . . . . . . . . . . . . . . . .

18

4.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.2.1 Native vs. Mobile Web applications . . . . . . . . . . . . . . . . . . .

20

4.2.2 Android techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.3 Working with android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

4.3.1 REST client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

4.3.2 JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

4.4 Working with server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.4.1 Web service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.4.2 C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.4.3 Web pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

4.4.4 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27
iii iv CONTENTS

4.5 Working with database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.5.1 Graph databases on social web . . . . . . . . . . . . . . . . . . . . . .

29

5 Methodology 33

5.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

5.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

5.2.1 Web page design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.4 FileMaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

5.5 User guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

6 Resulting work 35

6.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

6.1.1 Implementing REST-client . . . . . . . . . . . . . . . . . . . . . . . .

35

6.1.2 Programming and design . . . . . . . . . . . . . . . . . . . . . . . . .

37

6.2 Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

6.2.1 Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39

6.2.2 Web page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

6.2.3 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

6.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

6.3.1 Database of dietary study . . . . . . . . . . . . . . . . . . . . . . . . .

46

6.3.2 ODBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

6.4 FileMaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

7 Conclusions 51

7.1 Future work and changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

8 Acknowledgements 53

References55

A User guide 59

List of Figures

1.1 Smartphones market in quarter 4, 2010 . . . . . . . . . . . . . . . . . . . . .

1

2.1 Start page and registration page. . . . . . . . . . . . . . . . . . . . . . . . . .

7

2.2 Menu page and statistics page. . . . . . . . . . . . . . . . . . . . . . . . . . .

8

2.3 Register intake. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

2.4 Search food. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

2.5 Image of food size on plate. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

2.6 Register physical activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

2.7 Android application database. . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4.1 Content in ASP.NET web service. . . . . . . . . . . . . . . . . . . . . . . . .

19

4.2 Complete software overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

4.3 JSON Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4.4 ASP Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

4.5 WebForms round trip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.6 XML request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

4.7 Comparison between VB and C#. . . . . . . . . . . . . . . . . . . . . . . . .

26

4.8 Security levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

4.9 Relational database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28