Software development. Chapter 5 – Data management.

Slides:



Advertisements
Similar presentations
WEB AND WIRELESS AUTOMATION connecting people and processes InduSoft Web Solution Welcome.
Advertisements

Mobile Application Architectures
WSUS Presented by: Nada Abdullah Ahmed.
Web Visualization Technology Horner APG Ver 1.0.
Software development. Chapter 8 – Advanced Topics.
Server-Side vs. Client-Side Scripting Languages
Web Server Administration
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
1 of 2 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Exchange server Mail system Four components Mail user agent (MUA) to read and compose mail Mail transport agent (MTA) route messages Delivery agent.
Interpret Application Specifications
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
V1.00 © 2009 Research In Motion Limited Introduction to Mobile Device Web Development Trainer name Date.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
The Internet & The World Wide Web Notes
Chapter 10 Publishing and Maintaining Your Web Site.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 21: Publishing Your Pages on the Web.
Software Development. Chapter 3 – Your first Windows 8 app.
Software development. Chapter 7 – Application distribution and sales.
Software Development. Chapter 2 – Programming on Windows 8.
Software Development. Chapter 4 – Windows application interfaces.
TC2-Computer Literacy Mr. Sencer February 8, 2010.
CAEL 5012 Rich Internet Applications. What you need For this part of the course you will need access to a server with PHP and MYSQL which will be supplied.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Example XML Applications/Languages. Objectives To Review uses of XML To investigate some Language applications of XML XHTML RSS WML Web Services.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
Introducing Dreamweaver MX 2004
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
1 Web Server Administration Chapter 1 The Basics of Server and Web Server Administration.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
AS Level ICT Selection and use of appropriate software: Interfaces.
XP New Perspectives on The Internet, Fifth Edition— Comprehensive, 2005 Update Tutorial 7 1 Mass Communication on the Internet Using Newsfeeds Tutorial.
M1G Introduction to Database Development 6. Building Applications.
WHAT IS A WEBSITE AND HOW TO GET YOUR BUSINESS ONLINE Anna Gabali – 30/07/ MKLC.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Chapter 9 Publishing and Maintaining Your Site. 2 Principles of Web Design Chapter 9 Objectives Understand the features of Internet Service Providers.
Grid Chemistry System Architecture Overview Akylbek Zhumabayev.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Hands-On Microsoft Windows Server Implementing Microsoft Internet Information Services Microsoft Internet Information Services (IIS) –Software included.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
BIT 285: ( Web) Application Programming Lecture 15: Tuesday, February 24, 2015 Microsoft Azure Instructor: Craig Duckett.
Chapter 4: Working with ASP.NET Server Controls OUTLINE  What ASP.NET Server Controls are  How the ASP.NET run time processes the server controls on.
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
WHAT IS E-COMMERCE? E-COMMERCE is a online service that helps the seller/buyer complete their transaction through a secure server. Throughout the past.
17 Establishing Dial-up Connection to the Internet Using Windows 9x 1.Install and configure the modem 2.Configure Dial-Up Adapter 3.Configure Dial-Up Networking.
Introduction TO Network Administration
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Website Design, Development and Maintenance ONLY TAKE DOWN NOTES ON INDICATED SLIDES.
Configuring and Deploying Web Applications Lesson 7.
(ITI310) By Eng. BASSEM ALSAID SESSIONS 10: Internet Information Services (IIS)
Mr C Johnston ICT Teacher G055 - Lecture 10 Network Protocols.
Internet addresses By Toni Grey & Rashida Swan HTTP Stands for HyperText Transfer Protocol Is the underlying stateless protocol used by the World Wide.
Internet Searching the World Wide Web. The Internet and the World Wide Web The Internet is a worldwide collection of networks that allows people to communicate.
ASP.NET WEB Applications. ASP.NET  Web application framework developed by Microsoft  Build dynamic data driven web applications and web services  Subset.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
Exploring Networked Data and Data Stores Lesson 3.
Stuff to memorise… "A method tells an object to perform an action. A property allows us to read or change the settings of the object."
Stuff to memorise… "A method tells an object to perform an action. A property allows us to read or change the settings of the object."
Introduction ITEC 420.
Introducing the Microsoft® .NET Framework
Quick services Wala Amjad Faqeh. Computer engineering
PHP / MySQL Introduction
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Web Application Development Using PHP
Presentation transcript:

Software development

Chapter 5 – Data management

Contents❷❸ Basics of data binding Using online data SQL databases What is OData? Assignments Questions and answers

Need for data binding The most simple method to display data on screen is to display static data This simple method is suitable for some applications, such as e-readers or some simple games On a larger scale applications like these are not very versatile

Basics of data binding Data binding is an essential method for displaying data in Windows 8 applications You can always write code that sets some interface component to display data as programmed, in larger projects this might get troublesome

Data binding and XAML Data binding can make two things less arduous – Displaying data (from code to screen) – The situation where the user edits displayed data through a component such as TextBox (from screen to code) Data binding is processed in the code through co- operation between classes and XAML strings

Startin point: C# class ”Student” public class Student { public int Student ID { get; set; } public string Name { get; set; } public string Social security ID { get; set; } public string { get; set; } }

XAML definition You need to know two things to write the correct XAML definition 1. Which source file property needs to be set as the source 2. Which property of which interface component should be set as the destination For example – Student.Name --> TextBlock.Text

XAML syntax You can recognize data binding processes in XAML interfaces from the word Binding inside curly brackets { and } {Binding} definition is connected to that target component's property, which will be the destination of the data bond

Example <TextBlock x:Name="StudentIDTextBlock" Text="{Binding Student ID}"... <TextBlock x:Name="NameTextBlock” Text="{Binding Name}"... <TextBlock x:Name="SocialIDTextBlock" Text="{Binding Social security ID}"... <TextBlock x:Name=" TextBlock" Text="{Binding }"...

Defining data contents Once the XAML data bond has been defined, you must still tell the code which object instance the data bond will be connected to This is done by using the XAML page's DataContext property

Creating an object instance Typically an object's data is fetched from a data base, the Internet, or they are formed during processing You can also use static objects as an easy method to try how data binding works

Example Student o = new Student() { Student ID = 12345, Name = "Olli Opiskelija", Social security ID = " A", = };

Connecting the DataContext property You can connect any object to a page's DataContext property Data binding definitions in XAML will start looking for defined properties in the set object Example – this.DataContext = o;

Using online data Your Windows 8 applications will come alive after you connect them to online data The online data feed can take many forms – A Twitter feed, the day's news headlines in an RSS feed, or data produced by some background process in the XML format, etc.

Many possibilities Windows 8 applications are capable of versatile use of online data Usually online data is fetched by using the HTTP protocol – It is also possible to use socket or tcp/ip interfaces or ftp

HttpClient class A class titled HttpClient is available for Windows 8 applications – Found in the namespace Windows.Web.Http The class works asynchronously – The application will not stop and wait for the data to be downloaded, but allows the user to continue using the application Supports also encrypted https protocol connections

Example HttpClient client = new HttpClient(); Uri uri = new Uri(" string data = await client.GetStringAsync(uri);

Application example: RSS reader Let's look at a sample application that reads the Yleisradio main news feed through an RSS feed – RSS = Really Simple Syndication Data can be downloaded with the HTTP protocol and data in RSS format is based on XML

Downloading RSS data with HTTP HttpClient client = new HttpClient(); Uri uri = new Uri( " string data = await client.GetStringAsync(uri); XmlDocument xml = new XmlDocument(); xml.LoadXml(data);

RSS feed's title elements

Fetching titles from RSS feed In the previous example the fetched RSS data was input into an XML component With this kind of component certain elements can be found using the XML file's tree structure

Using an XML component Finding title elements – XmlNodeList nodes = xml.SelectNodes("//channel/item/title"); Listing the contents of title elements, that is the news headlines – List titles = nodes.Select(n => n.InnerText).ToList();

SQL databases SQL is the most important query language especially for database, which can be used to search for and update data in the database – Short for Structured Query Language SQL databases can be accessed in many ways – LAN databases typical, cloud-based SQL databases also widely used If an application is intended to be used If the application is intended to be used outside an intranet, the database connection is generally established through public Internet by using web technologies

Ways to access data Web interfaces Socket connections (tcp/ip) Local installationProxy server SQL database

Options in a nutshell The most simple option is to install the database on the same device as the application The more common solution is to have a Windows 8 application access a separate server running the database over a network

Connection methods Traditional LAN databases may require the use of so called socket connections More modern cloud-era databases allow forming connections through HTTP HTTP can also be used to access the database through the Internet

OData ODataor Open Data is a standard launched by Microsoft and other IT operators Odata can be used to transfer database data (”SQL data”) over the Internet The Odata standard is intended to work especially with HTTP and XML and JSON data formats

OData platform support Odata standard's newest version is 3.0 It is already supported by many different platforms – The device itself is platform and device independent Supported platforms include Windows, Mac OS X and Linux Applications supportin OData include Excel, PHP, Ruby, and naturally Microsoft's.NET ja C# (and therefore Windows 8 applications)

Assignments List at least three different methods to save data in a Windows 8 application. What advantages and disadvantages does each method have? How can you build an application that are functional even when an Internet connection is not available? What advantages do open standards such as OData have for data transfer? What other data transfer standards can you name?

Questions and answers 1 My application requires only simple data saving. What saving methods should I use? For simple programs it can be enough to have a local XML file as a part of the application. You can process XML files for example by using XmlDocument class, which is found in the namespace Windows.Data.Xml.Dom. You can also use some light SQL-based databases, such as SQLite. This database is easily introduced into your application with the so called NuGet package. You can find by using running a search for "SQLite for Windows Runtime" in Visual Studio. You might also want to take a look at the new Windows Azure Mobile Services, which can be used to quickly implement a web background system to your application

Questions and answers 2 I'm developing a Windows 8 application and I'm writing my code using Visual Studio. The application should communicate with the background system by using the HTTP protocol. Do I have to use Visual Studio to also create the background system. The advantage of open technologies (such as HTTP) is that that the used development tools don't matter as long as standards are followed. Therefore your can write your Windows 8 application's interface in Visual Studio and the background system in Python or PHP if you so wish. There are, however, several advantages to writing also the background system in Visual Studio, as you don't need to use two development tools or more. Additionally, you can make use of efficient data transfer methods such as OData. You might want to familiarize yourself with Microsoft's ASP.NET technologies. They can be programmed in, for example, C#.

Questions and answers 3 I've heard that many background systems have been attacked and account names and passwords have been stolen form them. How can I avoid such mistake? This is a multifaceted, but important question. Especially the large background systems and databases of popular applications are alluring targets to criminals. It is important that users' account names and passwords are appropriately encrypted. All encryption method are not equally good, and therefore you should carefully choose the most efficient encryption for your applications. Many other elements affect the security of background applications, and many books have been written on the subject. You can read more on the subject in, for example, "Building Secure ASP.NET Applications," which can be found on Microsoft's developer site at