SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

12
i EIGHTH EDITION SERVICE-ORIENTED COMPUTING AND SYSTEM INTEGRATION SOFTWARE, IOT, BIG DATA, AND AI AS SERVICES YINONG CHEN AND GENNARO DE LUCA ARIZONA STATE UNIVERSITY

Transcript of SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

Page 1: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

i

EIGHTH EDITION

SERVICE-ORIENTED COMPUTING AND

SYSTEM INTEGRATION

SOFTWARE, IOT, BIG DATA, AND AI AS SERVICES

YINONG CHEN AND GENNARO DE LUCA

ARIZONA STATE UNIVERSITY

Page 2: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

ii

Cover image and all interior photos courtesy of Yinong Chen.

www.kendallhunt.com Send all inquiries to: 4050 Westmark Drive Dubuque, IA 52004-1840

Copyright © 2008, 2010, 2011, 2014, 2015, 2018, 2020, 2022 by Kendall Hunt Publishing Company

PAK ISBN: 978-1-7924-9417-8

Text alone ISBN: 978-1-7924-9416-1

All rights reserved. No part of this publication may be reproduced,

stored in a retrieval system, or transmitted, in any form or by any means,

electronic, mechanical, photocopying, recording, or otherwise,

without the prior written permission of the copyright owner.

Published in the United States of America

Page 3: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

iii

Table of Contents

Preface xiii

Part I Distributed Service-Oriented Software Development and Web Data Management ... 1

Chapter 1 Introduction to Distributed Service-Oriented Computing ..................................... 3

1.1 Computer Architecture and Computing Paradigms .............................................................. 3

1.1.1 Computer Architecture ........................................................................................................................ 3 1.1.2 Software Architecture .......................................................................................................................... 4 1.1.3 Computing Paradigms ......................................................................................................................... 4

1.2 Distributed Computing and Distributed Software Architecture ............................................ 7

1.2.1 Distributed Computing ........................................................................................................................ 7 1.2.2 N-Tier Architecture ............................................................................................................................. 8 1.2.3 Distributed Object Architecture......................................................................................................... 10

1.3 Service-Oriented Architecture and Computing ................................................................... 12

1.3.1 Basic Concepts and Terminologies ................................................................................................... 12 1.3.2 Service-Oriented Computing ............................................................................................................. 15 1.3.3 Object-Oriented Computing versus Service-Oriented Computing .................................................... 17 1.3.4 Service-Oriented System Engineering ............................................................................................... 18

1.4 Service-Oriented Software Development and Applications ............................................... 20

1.4.1 Traditional Software Development Processes ................................................................................... 20 1.4.2 Service-Oriented Software Development .......................................................................................... 20 1.4.3 Applications of Service-Oriented Computing ................................................................................... 24 1.4.4 Web Application Composition .......................................................................................................... 25

1.5 Enterprise Software Development ...................................................................................... 27

1.6 Discussions ......................................................................................................................... 30

1.7 Exercises and Projects ......................................................................................................... 33

Chapter 2 Distributed Computing with Multithreading ......................................................... 39

2.1 Introduction to C# and .Net ................................................................................................. 39

2.1.1 Getting Started with C# and .Net....................................................................................................... 39 2.1.2 Comparison between C++ and C# ..................................................................................................... 41 2.1.3 Namespaces and the “using” Directive ............................................................................................. 42 2.1.4 Class and Object in C# ...................................................................................................................... 44 2.1.5 Parameters: Passing by Reference with ref & out ............................................................................. 47 2.1.6 Base Class and Base Calling Class Constructor ................................................................................ 47 2.1.7 Constructor, Destructor, and Garbage Collection .............................................................................. 48 2.1.8 Pointers in C# .................................................................................................................................... 48

Page 4: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

iv

2.1.9 C# Unified Type System ................................................................................................................... 49

2.2 Memory Management and Garbage Collection .................................................................. 50

2.2.1 Static Variables and Static Methods .................................................................................................. 51 2.2.2 Runtime Stack for Local Variables ................................................................................................... 51 2.2.3 Heap for Dynamic Memory Allocation ............................................................................................. 54 2.2.4 Scope and Garbage Collection .......................................................................................................... 54

2.3 General Issues in Multitasking and Multithreading ............................................................ 55

2.3.1 Basic Requirements ........................................................................................................................... 55 2.3.2 Critical Operations and Synchronization ........................................................................................... 56 2.3.3 Deadlock and Deadlock Resolving .................................................................................................... 58 2.3.4 Order of Execution ............................................................................................................................ 59 2.3.5 Operating System Support for Multitasking and Multithreading ...................................................... 60

2.4 Multithreading in Java ........................................................................................................ 62

2.4.1 Creating and Starting Threads ........................................................................................................... 62 2.4.2 Thread Synchronization..................................................................................................................... 66 2.4.3 Synchronized Method ........................................................................................................................ 66 2.4.4 Synchronized Statements................................................................................................................... 70

2.5 Multithreading in C# ........................................................................................................... 71

2.5.1 Thread Classes and Properties ........................................................................................................... 71 2.5.2 Monitor .............................................................................................................................................. 72 2.5.3 Reader and Writer Locks ................................................................................................................... 81 2.5.4 Mutexes ............................................................................................................................................. 85 2.5.5 Semaphore ......................................................................................................................................... 86 2.5.6 Coordination Event ............................................................................................................................ 86

2.6 Event-Driven Programming ................................................................................................ 89

2.6.1 Exception Handling ........................................................................................................................... 89 2.6.2 Event-Driven Programming Concepts and Mechanisms ................................................................... 93 2.6.3 Case Study: An Electronic Commerce Application in Event-Driven Approach ............................... 98

2.7 Multithreading Performance ............................................................................................. 104

2.7.1 Amdahl’s Law ................................................................................................................................. 104 2.7.2 Multithreading Experiments ............................................................................................................ 105

2.8 Discussions ....................................................................................................................... 110

2.9 Exercises and Projects ....................................................................................................... 111

Chapter 3 Essentials in Service-Oriented Software Development ....................................... 121

3.1 Service-Oriented Software Development Environments .................................................. 121

3.1.1 Overview ......................................................................................................................................... 121 3.1.2 Windows Communication Foundation ............................................................................................ 123 3.1.3 Service Interface: Address, Binding, and Contract.......................................................................... 124

3.2 Service Provider: Creating and Hosting Services ............................................................. 125

3.2.1 Getting Started with Developing WCF Services ............................................................................. 126 3.2.2 Testing Web Services in WCF Test Client ...................................................................................... 130 3.2.3 Writing a Console Application to Consume a WCF Service ........................................................... 133 3.2.4 File Service and Data Management ................................................................................................. 135 3.2.5 Hosting Your Web Services as a Service Provider.......................................................................... 136 3.2.6 Source Code Deployment and Precompiled Code Deployment ...................................................... 138

3.3 Service Brokers: Publishing and Discovering Services .................................................... 140

Page 5: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

v

3.3.1 An Ideal Service Broker with All Desired Features ........................................................................ 141 3.3.2 UDDI Service Registry.................................................................................................................... 144 3.3.3 ebXML Service Registry and Repository ........................................................................................ 151 3.3.4 Ad Hoc Registry Lists ..................................................................................................................... 153

3.4 SOAP and HTTP ............................................................................................................... 153

3.4.1 SOAP Format .................................................................................................................................. 153 3.4.2 HTTP ............................................................................................................................................... 154 3.4.3 SOAP over HTTP ............................................................................................................................ 156

3.5 WSDL: Web Services Description Language ................................................................... 157

3.5.1 Elements of WSDL Documents ...................................................................................................... 157 3.5.2 WSDL Document Example ............................................................................................................. 159

3.6 Service Requesters: Building Applications Using Services .............................................. 161

3.6.1 Connecting Endpoint and Proxy ...................................................................................................... 161 3.6.2 Creating a Windows Forms Application in ASP.Net ...................................................................... 162 3.6.3 Developing a Website Application to Consume WCF Services ...................................................... 167

3.7 Web Service Testing and Dynamic Service Invocation .................................................... 170

3.7.1 Get Web Content from URL ........................................................................................................... 171 3.7.2 Analyze WSDL Document .............................................................................................................. 171 3.7.3 Test Web Service through Dynamic Proxy ..................................................................................... 172 3.7.4 Test Web Service Using Independent Tools ................................................................................... 172 3.7.5 Dynamic Web Services and Web Applications ............................................................................... 173

3.8 Java-Based Web Service Development ............................................................................ 173

3.8.1 Web Application Building Using AJAX Programming .................................................................. 173 3.8.2 Java-Based Web Service Development and Hosting ....................................................................... 175

3.9 Discussions ....................................................................................................................... 177

3.10 Exercises and Projects ....................................................................................................... 179

Chapter 4 XML and Web Data Formats ................................................................................ 185

4.1 XML Fundamentals .......................................................................................................... 185

4.1.1 XML versus HTML ......................................................................................................................... 186 4.1.2 XML Syntax .................................................................................................................................... 187 4.1.3 XML Namespaces ........................................................................................................................... 190

4.2 XML Data Processing ....................................................................................................... 191

4.2.1 DOM: Document Object Model ...................................................................................................... 191 4.2.2 SAX: Simple API for XML ............................................................................................................. 194 4.2.3 XML Text Writer ............................................................................................................................ 195 4.2.4 XML Processing in Java .................................................................................................................. 196

4.3 XPath ................................................................................................................................. 198

4.4 XML Type Definition Languages ..................................................................................... 200

4.4.1 XML Document Type Definition (DTD) ........................................................................................ 201 4.4.2 XML Schema .................................................................................................................................. 203 4.4.3 Namespace ...................................................................................................................................... 205 4.4.4 XML Validation .............................................................................................................................. 207

4.5 Extensible Stylesheet Language ........................................................................................ 209

4.6 Other Web Data Formats .................................................................................................. 214

Page 6: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

vi

4.6.1 XHTML ........................................................................................................................................... 214 4.6.2 RSS .................................................................................................................................................. 216 4.6.3 Atom ................................................................................................................................................ 218 4.6.4 JSON ............................................................................................................................................... 220 4.6.5 HTML5............................................................................................................................................ 223 4.6.6 Google Protocol Buffers and BigTable ........................................................................................... 226

4.7 Discussions ....................................................................................................................... 227

4.8 Exercises and Projects ....................................................................................................... 229

Chapter 5 Web Application and State Management ............................................................. 235

5.1 Models of Web Applications ............................................................................................ 235

5.1.1 Pure HTML-Based Web Application .............................................................................................. 235 5.1.2 Client-Side Scripting ....................................................................................................................... 236 5.1.3 Server-Side Scripting and Code-Behind Page Computing .............................................................. 237 5.1.4 Client-Side Out-of-Browser Computing.......................................................................................... 238

5.2 Web Application Structure and Architecture .................................................................... 239

5.2.1 Components of Web Applications ................................................................................................... 239 5.2.2 Server Controls ................................................................................................................................ 242 5.2.3 User Controls ................................................................................................................................... 245 5.2.4 Web Application Configuration ...................................................................................................... 248 5.2.5 Global Application Class ................................................................................................................. 252 5.2.6 Dynamic Link Library and Package ................................................................................................ 253

5.3 State Management ............................................................................................................. 254

5.3.1 Overview of State Management Techniques ................................................................................... 254 5.3.2 View State ....................................................................................................................................... 255 5.3.3 View State Security and Machine Key ............................................................................................ 259 5.3.4 Session State .................................................................................................................................... 260 5.3.5 Cookies ............................................................................................................................................ 264 5.3.6 Session State and Cookies ............................................................................................................... 265 5.3.7 Application State and Service Execution Model ............................................................................. 266

5.4 Save User Data to Server File System .............................................................................. 267

5.4.1 File System and Standard File Operations ...................................................................................... 267 5.4.2 Reading and Writing XML Files ..................................................................................................... 269

5.5 Caching and Recommendation ......................................................................................... 273

5.5.1 Output Caching................................................................................................................................ 274 5.5.2 Fragment Caching ........................................................................................................................... 275 5.5.3 Data Caching ................................................................................................................................... 276

5.6 Dynamic Graphics Design and Generation ....................................................................... 283

5.6.1 Dynamic Graphics ........................................................................................................................... 283 5.6.2 Getting Started with Dynamic Graphics Generation ....................................................................... 284 5.6.3 Generating Dynamic Graphics in User Control ............................................................................... 287

5.7 Discussions ....................................................................................................................... 292

5.8 Exercises and Projects ....................................................................................................... 293

Chapter 6 Dependability of Service-Oriented Software........................................................ 299

6.1 Basic Concepts .................................................................................................................. 299

6.1.1 Dependability .................................................................................................................................. 299

Page 7: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

vii

6.1.2 Dependability Attributes and Quality of Service ............................................................................. 300 6.1.3 Security Issues in SOA Software..................................................................................................... 301 6.1.4 Reputation Management System ..................................................................................................... 303

6.2 Access Control in Web Applications ................................................................................ 304

6.2.1 IIS and Windows-Based Security Mechanisms ............................................................................... 304 6.2.2 Forms-Based Security ..................................................................................................................... 306 6.2.3 Forms-Based Security with Self-Registration ................................................................................. 310 6.2.4 User Registration Using the Built-in Account Management ........................................................... 315

6.3 Encryption and Decryption ............................................................................................... 318

6.3.1 Developing Encryption and Decryption Service in WCF ............................................................... 318 6.3.2 Developing a Secure Hashing Service in WCF ............................................................................... 320 6.3.3 WCF Service Client ......................................................................................................................... 322 6.3.4 Error Control Code .......................................................................................................................... 324 6.3.5 Secure Sockets Layer Cryptographic Protocols .............................................................................. 325

6.4 Dependable Computing in Windows Communication Foundation .................................. 326

6.4.1 WS-Security .................................................................................................................................... 326 6.4.2 WS-Reliability ................................................................................................................................. 327 6.4.3 Transactions .................................................................................................................................... 329

6.5 Discussions ....................................................................................................................... 331

6.6 Exercises and Projects ....................................................................................................... 333

Part II Advanced Service-Oriented Computing and System Integration ........................... 337

Chapter 7 Advanced Services and Application Development .............................................. 339

7.1 Self-Hosting Services ........................................................................................................ 339

7.1.1 Developing a Service and a Hosting Service ................................................................................... 339 7.1.2 Developing Clients to Consume Self-Hosting Services .................................................................. 342

7.2 Advanced WCF Services .................................................................................................. 347

7.2.1 Advanced Communication Models ................................................................................................. 347 7.2.2 Advanced Bindings ......................................................................................................................... 350 7.2.3 Service Behavior and State Management ........................................................................................ 351

7.3 REST Concept and RESTful Services .............................................................................. 355

7.3.1 REST Concept and REST Architecture ........................................................................................... 355 7.3.2 RESTful Services ............................................................................................................................ 356 7.3.3 Microservices .................................................................................................................................. 360 7.3.4 Developing RESTful Service .......................................................................................................... 362 7.3.5 Developing an Image Verifier in RESTful Service ......................................................................... 365 7.3.6 Consuming Simple RESTful Service .............................................................................................. 368 7.3.7 Google RESTful Services: Map Services ........................................................................................ 370 7.3.8 Making Asynchronous Calls to RESTful Services .......................................................................... 373 7.3.9 RESTful Service-Based Web Application Description Language .................................................. 374

7.4 Advanced Web Application Architecture ......................................................................... 376

7.4.1 ASP .Net Forms-Centric Architecture ............................................................................................. 377 7.4.2 HTML5 on ASP .Net Core Framework ........................................................................................... 377 7.4.3 MVC Architecture on ASP .Net Core Framework .......................................................................... 384 7.4.4 MVC Web Application Development Example .............................................................................. 389

7.5 Discussions ....................................................................................................................... 393

Page 8: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

viii

7.6 Exercises and Projects ....................................................................................................... 395

Chapter 8 Enterprise Software Development and Integration ............................................ 401

8.1 Overview of Composition Languages ............................................................................... 401

8.2 Workflow Foundation ....................................................................................................... 404

8.2.1 Architecture and Components ......................................................................................................... 405 8.2.2 Creating a WF Flowchart Application ............................................................................................. 407 8.2.3 Creating Custom Code Activity for Workflow Application ............................................................ 409 8.2.4 Implementing Finite State Machine in Workflow ........................................................................... 412 8.2.5 Creating Services and Persistence Services Using Workflow ......................................................... 413

8.3 BPEL ................................................................................................................................. 422

8.3.1 BPEL Activities and Constructs ...................................................................................................... 423 8.3.2 BPEL Process .................................................................................................................................. 423 8.3.3 WSDL Interface Definition of BPEL Process ................................................................................. 426 8.3.4 BPEL Process .................................................................................................................................. 428 8.3.5 An Example Invoking Real Web Services ...................................................................................... 430

8.4 Stateless versus Stateful Web Services ............................................................................. 436

8.4.1 BizTalk’s Singleton Object Approach ............................................................................................. 437 8.4.2 BPEL’s Correlation Approach ........................................................................................................ 437

8.5 Frameworks Supporting BPEL Composition.................................................................... 440

8.5.1 Oracle SOA Suite ............................................................................................................................ 440 8.5.2 ActiveBPEL .................................................................................................................................... 442 8.5.3 BizTalk ............................................................................................................................................ 443 8.5.4 Simple Workflow Service ............................................................................................................... 444

8.6 Message-Based Integration ............................................................................................... 445

8.6.1 Java Message Service ...................................................................................................................... 446 8.6.2 Microsoft Message Queue ............................................................................................................... 447 8.6.3 Database-Supported Messaging ...................................................................................................... 449 8.6.4 E-mail Supported Messaging .......................................................................................................... 450 8.6.5 Enterprise Service Bus .................................................................................................................... 451

8.7 Other Composition Languages .......................................................................................... 451

8.7.1 SCA/SDO ........................................................................................................................................ 451 8.7.2 WSFL: Web Services Flow Language ............................................................................................ 452

8.8 Discussions ....................................................................................................................... 454

8.9 Exercises and Projects ....................................................................................................... 455

Chapter 9 IoT, Robotics, and Device Integration via Visual Programming ....................... 463

9.1 Introduction ....................................................................................................................... 463

9.1.1 Internet of Things ............................................................................................................................ 463 9.1.2 Service-Oriented Robotics Computing ............................................................................................ 465 9.1.3 Event-Driven Robotics Applications ............................................................................................... 467

9.2 Robot as a Service ............................................................................................................. 470

9.2.1 Robot as a Service Definition .......................................................................................................... 470 9.2.2 Robot as a Service Design ............................................................................................................... 471 9.2.3 Robot as a Service Implementation ................................................................................................. 473

9.3 Robotics Developer Studio and Visual Programming Language ...................................... 476

Page 9: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

ix

9.3.1 MRDS and VPL Overview .............................................................................................................. 476 9.3.2 Application Development in MRDS and VPL ................................................................................ 478

9.4 VIPLE: A New Visual Programming Language ............................................................... 480

9.4.1 ASU VIPLE versus Microsoft VPL ................................................................................................ 481 9.4.2 Service-Oriented Computing: RESTful, WSDL, and VIPLE Service............................................. 482 9.4.3 Workflow with Code Activities ....................................................................................................... 485 9.4.4 Finite State Machine ........................................................................................................................ 489 9.4.5 Event-Driven Programming ............................................................................................................ 495

9.5 Robot Programming and Maze Navigation ....................................................................... 498

9.5.1 VIPLE Robot Services .................................................................................................................... 498 9.5.2 Maze Navigation Algorithms in Finite State Machine .................................................................... 500 9.5.3 Maze Navigation Algorithms Using Unity Simulator ..................................................................... 502 9.5.4 Maze Navigation Algorithms Using Web Simulator ....................................................................... 506 9.5.5 Maze Navigation Using Lego EV3 Robot ....................................................................................... 511

9.6 Different Platforms Supported by VIPLE ......................................................................... 516

9.6.1 Open Interface between VIPLE and Device.......................................................................................... 517 9.6.2 Connecting VIPLE to Open Architecture Robots ................................................................................. 517 9.6.3 Using Robot Motion Service to Control Complex Robots .................................................................... 521

9.7 Autonomous Driving in Simulation Environment ............................................................ 522

9.7.1 A Simple Autonomous Driving Program .............................................................................................. 522 9.7.2 An Improved Autonomous Driving Program ........................................................................................ 524 9.7.3 Traffic Simulation and Programming .................................................................................................... 527

9.8 Discussions ....................................................................................................................... 529

9.9 Exercises and Projects ....................................................................................................... 531

Chapter 10 Interfacing Service-Oriented Software with Databases .................................... 535

10.1 Database Systems and Operations .................................................................................... 535

10.2 Relational Databases in Service-Oriented Software ......................................................... 537

10.2.1 Installing a Database ....................................................................................................................... 537 10.2.2 Interface between Database and Software ....................................................................................... 541 10.2.3 SQL Database in ADO .Net ............................................................................................................ 543 10.2.4 DataAdapter and DataSet in ADO .Net ........................................................................................... 549

10.3 LINQ, Language Integrated Query ................................................................................... 551

10.3.1 What Is the Purpose of LINQ? ........................................................................................................ 551 10.3.2 Lambda Expressions ........................................................................................................................ 552 10.3.3 LINQ to Object ................................................................................................................................ 555 10.3.4 LINQ to SQL ................................................................................................................................... 557 10.3.5 LINQ to XML ................................................................................................................................. 560 10.3.6 GraphQL .......................................................................................................................................... 563

10.4 XML-Based Database and Query Language XQuery ....................................................... 565

10.4.1 Expressing Queries .......................................................................................................................... 565 10.4.2 Transforming XML Document ........................................................................................................ 567 10.4.3 XQuery Discussions ........................................................................................................................ 568

10.5 Discussions ....................................................................................................................... 569

10.6 Exercises and Projects ....................................................................................................... 571

Page 10: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

x

Chapter 11 Big Data Processing and Cloud Computing ....................................................... 577

11.1 Big Data Systems and Management ................................................................................. 577

11.1.1 Big Data Concepts ........................................................................................................................... 577 11.1.2 Big Data Management ..................................................................................................................... 579

11.2 Big Data Processing and Analytics ................................................................................... 580

11.2.1 Map and Reduce .............................................................................................................................. 580 11.2.2 Hadoop and Cassandra .................................................................................................................... 581 11.2.3 Big Data Simulation in VIPLE ........................................................................................................ 586 11.2.4 Apache Pig ...................................................................................................................................... 592 11.2.5 Big Data Analytics .......................................................................................................................... 593

11.3 Big Data Applications and Case Studies ........................................................................... 594

11.3.1 Big Data Applications in Different Domains .................................................................................. 595 11.3.2 Recommender System ..................................................................................................................... 596

11.4 Cloud Computing .............................................................................................................. 599

11.4.1 Definitions ....................................................................................................................................... 600 11.4.2 Software Engineering and Software Architecture Leading to Cloud Computing............................ 602 11.4.3 Software as a Service and Multitenancy .......................................................................................... 605 11.4.4 Platform as a Service ....................................................................................................................... 608 11.4.5 Infrastructure as a Service and Data Center .................................................................................... 613

11.5 Discussions ....................................................................................................................... 617

11.6 Exercises and Projects ....................................................................................................... 619

Chapter 12 Artificial Intelligence and Machine Learning .................................................... 625

12.1 Development of Artificial Intelligence and Machine Learning ........................................ 625

12.2 From Traditional Programming to AI Programming ........................................................ 629

12.3 Machine Learning Case Study on Traffic Sign Recognition ............................................ 632

12.3.1 Using Traditional Programming ...................................................................................................... 633 12.3.2 Using Machine Learning ................................................................................................................. 634 12.3.3 Machine Learning Experiments....................................................................................................... 636

12.4 Machine Learning Case Study on Flight Path Recognition .............................................. 639

12.4.1 Flight Activity Recognition ............................................................................................................. 640 12.4.2 Implementation ................................................................................................................................ 644 12.4.3 Experiment and Configurations ....................................................................................................... 646

12.5 Machine Learning Case Study on Network Traffic Monitoring ....................................... 648

12.6 Ontology ........................................................................................................................... 651

12.6.1 Ontology Language RDF ................................................................................................................ 652 12.6.2 RDF Schema ................................................................................................................................... 654 12.6.3 Reasoning and Verification in Ontology ......................................................................................... 660 12.6.4 Web Ontology Language OWL ....................................................................................................... 661 12.6.5 OWL-S and Semantic Web Services ............................................................................................... 665 12.6.6 Linked Data ..................................................................................................................................... 666 12.6.7 Ontology Development Environments ............................................................................................ 667

12.7 Discussions ....................................................................................................................... 668

12.8 Exercises and Projects ....................................................................................................... 669

Page 11: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

xi

Chapter 13 Mobile Computing and Application Development ............................................ 673

13.1 Introduction ....................................................................................................................... 673

13.2 Xamarin ............................................................................................................................. 673

13.3 Mobile Application Architectures ..................................................................................... 677

13.3.1 Three-Layer Architecture ................................................................................................................ 677 13.3.2 MVC Architecture ........................................................................................................................... 679 13.3.3 MVVM Architecture ....................................................................................................................... 680

13.4 XAML ............................................................................................................................... 684

13.4.1 XAML Basics .................................................................................................................................. 684 13.4.2 Xamarin Layouts ............................................................................................................................. 686 13.4.3 Xamarin Controls ............................................................................................................................ 689 13.4.4 Animations ...................................................................................................................................... 693

13.5 VIPLE Connection Example ............................................................................................. 695

13.6 Encrypt-Decrypt App Example ......................................................................................... 699

13.7 Discussions ....................................................................................................................... 701

13.8 Exercises and Projects ....................................................................................................... 703

Part III Appendices: Tutorials on Service-Oriented System Development ........................ 707

Appendix A Web Application Development........................................................................... 709

A.1 Design of Graphical User Interface................................................................................... 709

A.2 Discovering Web Services Available Online .................................................................... 714

A.3 Access Web Services in Your Program: ImageService .................................................... 716

A.4 Access Web Services in Your Program: Weather Forecasting Service ............................ 721

A.5 Access Web Services in Your Program: USZip Service................................................... 723

A.6 Exercises and Projects ....................................................................................................... 725

Appendix B Visual IoT/Robotics Programming Language Environment........................... 729

B.1 Introduction to VIPLE ...................................................................................................... 729

B.1.1 Basic Activities in VIPLE Toolbox ................................................................................................. 730 B.1.2 Built-in VIPLE Services .................................................................................................................. 732

B.2 Getting Started with VIPLE Programming ....................................................................... 733

Ex. 1. “Hello World” in VIPLE ................................................................................................................. 733 Ex. 2. Favorite Movie ................................................................................................................................ 734 Ex. 3. Create While Loop Block Using Merge and If Activities ............................................................... 736 Ex. 4. Creating While Loop Block Using the While Activity .................................................................... 739 Ex. 5. Creating an Activity ........................................................................................................................ 740 Ex. 6. Creating Counter Activity ............................................................................................................... 742 Ex. 7. Build a 2-1 Multiplexor ................................................................................................................... 743 Ex. 8. Convert an Activity into a Service .................................................................................................. 745

B.3 Building Larger Systems Using Modules ......................................................................... 747

Ex. 1. Creating an AND Gate in VIPLE .................................................................................................... 751 Ex. 2. Creating OR, NOT, and XOR Gates ............................................................................................... 752

Page 12: SERVICE-ORIENTED COMPUTING SYSTEM INTEGRATION

xii

Ex. 3. Build a 1-bit Adder .......................................................................................................................... 752 Ex. 4. Build a 2-1 Multiplexor and a 4-1 Multiplexor ............................................................................... 754 Ex. 5. Build a 1-Bit ALU ........................................................................................................................... 755 Ex. 6. Automated Testing .......................................................................................................................... 756 Ex. 7. Create Automated Testing for ALU ................................................................................................ 758 Ex. 8. Create a 4-Bit ALU ......................................................................................................................... 758 Ex. 9. Drive-by-Wire Simulation ............................................................................................................... 759

B.4 Exercises and Projects ....................................................................................................... 761

Appendix C ASU Repository of Services and Applications .................................................. 763

References 769

Index 777