SlideShare una empresa de Scribd logo
1 de 23
DATA BINDING
 Session 15
Objectives
   Data binding architecture.
   Sorting and filtering data.
Database
   A database is an organized collection of related data, which
    allows easy access and manipulation of data. The data
    from a database can be accessed using three different
    types of architectures:
       Single-tier architecture: works with databases that reside on
        a single machine. This manipulates the data within the database
        immediately.
       Two-tier architecture: stores and maintains database
        information on a centralized server. Thus, the client accesses the
        database by connecting to the database server. The kind of
        architecture is also referred as client/server.
       Three-tier architecture: is a multi-tier client/server
        architecture that consists of three parts namely client
        machine, application logic, and the database. The client connects to
        one or more application servers, which in turn connects to the
        database server.
Data binding
   Data binding is a process of associating data from the database with
    appropriate HTML elements. It helps to display the data from the
    database in HTML elements and controls.
   Data binding allows to retrieve data from the database. There are
    some features:
        On-demand content management: allows retrieving data from the
         DB on demand.
        Platform-independent access: allows accessing, updating, and
         retrieving data, irrespective of the browser version or the type of DB.
        Asynchronous processing: performing multiple tasks at the same
         time. While requesting or updating data from the DB, can continue
         interacting with the web page to perform another task.
        Sorting and filtering data: allows to access and retrieve data
         by reordering the data in the database. In addition, filtering of data
         allows to retrieve only the data that meet the specified criteria.
Architecture of data binding
       Data binding helps you to link data from the database with the
        elements of a web page using its various built-in components.
       Data binding architecture consists of four main components:
       Data source object(DSO): acts as an intermediary between
        HTML elements and DB. The DSO establishes a connection with the
        DB, fetches the data from the DB, and allows HTML elements to
        display the fetched data.
       Data consumers: are the elements of an HTML page that display
        data provides by DSO.
       Binding agent: determines the DSOs and data consumers from
        the elements contained within the web page. After this, the binding
        agent checks the synchronization of data transmitted from the DSO
        to the consumer.
       Table repetition agent: generally deals with an HTML table
        for data repetition. It displays the data supplied by DSO in a table.
Data source object
   You can display the data provided by DSOs
    by binding the HTML elements to DSOs. To
    implement the DSO, you need to consider
    certain points such as:
       Determining the means of data transmission
        to an HTML page. To transmit the data, DSO
        can use different protocols such as the
        Hypertext Transfer Protocol (HTTP).
       Checking whether the transmission of data is
        synchronous or asynchronous.
       Verifying whether updates are allowed.
       Specifying the data by using a Structured
        Query Language (SQL) statement or simple
        Uniform Resource Locator (URL).
Tabular Data Control
   The tabular data control (TDC) is a data
    source object that allows you to display data
    accessing the delimited text files. A delimited
    text file is a simple file that contains records
    of data separated by commas, tabs, …
   The benefits of TDC:
       Display data of simple types.
       Access and retrieve data offline. This can be
        done since the delimited file transmitted by
        TDC can be stored in your system that
        enables you to read data online.
       Avoid access to DB system. This can be done
        by writing server side scripts to fetch the data
        from the DB into a delimited text file.
“.CSV” File
   Delimited text files that are separated by commas are also
    known as .csv files (comma separated values or variables).
   The size of a .csv file is very small. The largest .csv file is about
    100Kb. These files are widely accessed by another applications.
    This is because the overall format of a .csv file is same as it
    stores the data as text.
Creating a “.CSV” File
   Steps to create a .csv file:
    1.   Open the spreadsheet application.
    2.   Define at least three fields that are separated by
         commas and placed within double quotes. These
         fields are mandatory and case-sensitive.
    3.   Declare additional fields besides these fields as per
         your requirements.
    4.   Save the file with a proper name followed by .csv file
         type.
Data binding
    Data binding allows you to link data over
     the Internet or Intranet. The steps involved
     in the process of data binding are:
    1.   Adding a data source object on an HTML
         page. This allows you to transmit the data
         over the internet.
    2.   Binding HTML elements to the data source
         object. This allows you to either display one
         record at a time or multiple records in a
         tabular format.
    3.   Writing scripts to enable user interactivity.
         This allows you to
         navigate, add, update, sort, and filter
         records. This step is optional.
Properties of TDC
1. AppendData: determines whether the data is appended or the current
   data is replaced. Returned type is true or false.
2. CaseSensitive: determines whether the casing should be avoided
   while comparing the data.
3. CharSet: recognizes the character set of the data within a text file.
4. DataURL: describes the file location.
5. EOF: determines whether the end of file is reached.
6. EscapeChar: describes a character that specifies the end of data fields.
7. Filter: specifies the way the data is filtered.
8. Language: describes the language of data within the file such as eng-us.
9. recordset: refers to the text file in TDC to fetch data.
10.RowDelim: describes a character that specifies the end of each row.
11.sort: describes the columns to be sorted and the sorting order.

12.UseHeader:   determines the file contains the header information.
Methods of TDC
1.   moveFirst(): moves to the first data in the
     data field.
2.   moveNext(): moves to the next data from
     the current position.
3.   moveLast(): moves to the last data in the
     data field.
4.   Reset(): filters or sorts the data as per the
     specified condition.
Binding HTML elements
   The different HTML elements that support data
    binding are text boxes, frames, tables, lists, and
    so on. There are certain attributes that allows
    you to bind to your HTML elements.
   Some attributes to bind data:
        DATAFLD: specifies the field of s DSO that should be
         bound to an HTML element.
        DATAFORMATAS: specifies the format of data in an
         HTML page.
        DATASRC: specifies the source of data for binding an
         HTML page.
Data binding - Demo




Demo: S15_DataBinding.html
Sorting data with TDC
        The TDC implements the mechanism of sorting by providing the
         Sort property. The value of this property is the column name
         based on which the sorting task will take place.
        Steps to sort the data:
    1.    The TDC control is embedded in the web page and is linked to
          Students.csv file.
    2.    The table is linked with the TDC and each table column is bound to the
          appropriate column in the Students.csv file.
    3.    A button is created, and when the user click on button the sort() function
          is invoked.
    4.    The sort() function takes the column name parameter that is the key to
          sort.
    5.    The Sort property of TDC is set to the column name passed as the
          parameter to the function.
    6.    The Reset() method of TDC displays the sorted data of the Students.csv file.
Sorting - Demo




Demo: S15_SortData.html
datapagesize attribute
        A .csv file might contain huge of records, which might not fit
         in a table when it loads in the browser. Therefore, you might
         want to display only a specific number of records at a time in a
         web page to improve readability. This is done by using the
         datapagesize attribute in DHTML.
        Steps to use datapagesize attribute :
    1.   The TDC control is embedded in the web page and is linked to
         Students.csv file.
    2.   The table is linked with the TDC and the datapagesize attribute is set as
         10. This means that the details of only 5 records will be displayed in the
         browser.
    3.   A button is created whose value is set to previous. When the user clicks it
         the previousPage() of TDC is invoked that displays the previous 10
         records.
    4.   A button is created whose value is set to next. When the user clicks it the
         nextPage() of TDC is invoked that displays the previous 5 records.
datapagesize - Demo




Demo: S15_PageSize.html
Data filtering using TDC
    Data filtering is the means by which you can block or
     restrict the display of the data to the users. Data
     filtering allows viewing only selected data based on a
     criterion.
    Some operators you can use to filter the data:
       =: denotes the equal to operator.
       >: denotes the greater than operator.
       >=: denotes the greater than or equal to operator.
       <: denotes the less than operator.
       <=: denotes the less than or equal to operator.
       <>: denotes the not equal to operator.
       & (AND): denotes whether both the conditions are true.
       | (OR): denotes whether at least one of the conditions is
        true.
Data filtering using TDC
   Steps to specify the criteria to filter:
    1.   The TDC control is embedded in the web page and is linked to
         Students.csv file.
    2.   The table is linked with the TDC and is bound to appropriate
         columnf of the Students.csv file.
    3.   A button is created, and when the user clicks on it the
         showAll() is invoked to display the records satisfied the
         criteria.
    4.   The Filter property is assigned the value as “StuID > 12”.
         This means that the program will filter all records have the ID
         greater 12.
Filter - Demo




Demo: S15_FilterData.html
Summary
   Data binding refers to accessing the text file and
    database to fetch and display data from them
    dynamically.
   The data binding architecture allows access any
    database from any browser, irrespective of the
    software and hardware platform.
   Can sort data and filter it to view only limited
    data.
Summary…
   There are some of features:
       On-demand content Management
       Platform - Independence access
       Asynchronuos Processing
       Sorting and filtering data
   Data binding architecture consists of four main
    components:
       Data Source Object (DSO)
       Data consumer
       Binding Agents
       Table repetition Agents

Más contenido relacionado

La actualidad más candente (20)

Dhtml chapter2
Dhtml chapter2Dhtml chapter2
Dhtml chapter2
 
Dhtml
DhtmlDhtml
Dhtml
 
Dhtml
DhtmlDhtml
Dhtml
 
Dhtml
DhtmlDhtml
Dhtml
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
Document object model
Document object modelDocument object model
Document object model
 
Dhtml
DhtmlDhtml
Dhtml
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Dom(document object model)
Dom(document object model)Dom(document object model)
Dom(document object model)
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascript
 
Web Development Introduction to jQuery
Web Development Introduction to jQueryWeb Development Introduction to jQuery
Web Development Introduction to jQuery
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Document Object Model (DOM)
Document Object Model (DOM)Document Object Model (DOM)
Document Object Model (DOM)
 
Dom structure
Dom structureDom structure
Dom structure
 
Understanding the dom by Benedict Ayiko
Understanding the dom by Benedict AyikoUnderstanding the dom by Benedict Ayiko
Understanding the dom by Benedict Ayiko
 
Introduction to DOM
Introduction to DOMIntroduction to DOM
Introduction to DOM
 
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web TechnologyInternet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-7) [XML and AJAX] | NIC/NIELIT Web Technology
 
DOM Quick Overview
DOM Quick OverviewDOM Quick Overview
DOM Quick Overview
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 

Destacado

Tabular Data Stream: The Binding Between Client and SAP ASE
Tabular Data Stream: The Binding Between Client and SAP ASETabular Data Stream: The Binding Between Client and SAP ASE
Tabular Data Stream: The Binding Between Client and SAP ASESAP Technology
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript ObjectsReem Alattas
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objectsPhúc Đỗ
 
javascript objects
javascript objectsjavascript objects
javascript objectsVijay Kalyan
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objectsPhúc Đỗ
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstccmcsubho
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event ModelReem Alattas
 

Destacado (8)

Dynamic HTML
Dynamic HTMLDynamic HTML
Dynamic HTML
 
Tabular Data Stream: The Binding Between Client and SAP ASE
Tabular Data Stream: The Binding Between Client and SAP ASETabular Data Stream: The Binding Between Client and SAP ASE
Tabular Data Stream: The Binding Between Client and SAP ASE
 
JavaScript Objects
JavaScript ObjectsJavaScript Objects
JavaScript Objects
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objects
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objects
 
Intro webtechstc
Intro webtechstcIntro webtechstc
Intro webtechstc
 
Dynamic HTML Event Model
Dynamic HTML Event ModelDynamic HTML Event Model
Dynamic HTML Event Model
 

Similar a 15. session 15 data binding

Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net ArchitectureUmar Farooq
 
Data.dcs: Converting Legacy Data into Linked Data
Data.dcs: Converting Legacy Data into Linked DataData.dcs: Converting Legacy Data into Linked Data
Data.dcs: Converting Legacy Data into Linked DataMatthew Rowe
 
Database Concepts 101
Database Concepts 101Database Concepts 101
Database Concepts 101Amit Garg
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii07HetviBhagat
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)07HetviBhagat
 
Connected data classes
Connected data classesConnected data classes
Connected data classesaspnet123
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questionsAkhil Mittal
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#Michael Heron
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4Syed Ariful Islam Emon
 
A N S I S P A R C Architecture
A N S I  S P A R C  ArchitectureA N S I  S P A R C  Architecture
A N S I S P A R C ArchitectureSabeeh Ahmed
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseWanBK Leo
 

Similar a 15. session 15 data binding (20)

Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
 
Ado.Net Architecture
Ado.Net ArchitectureAdo.Net Architecture
Ado.Net Architecture
 
Database Systems Concepts, 5th Ed
Database Systems Concepts, 5th EdDatabase Systems Concepts, 5th Ed
Database Systems Concepts, 5th Ed
 
Data.dcs: Converting Legacy Data into Linked Data
Data.dcs: Converting Legacy Data into Linked DataData.dcs: Converting Legacy Data into Linked Data
Data.dcs: Converting Legacy Data into Linked Data
 
Easily Serving and Accessing HDF-EOS2 Datasets Using DODS Technologies
Easily Serving and Accessing HDF-EOS2 Datasets Using DODS TechnologiesEasily Serving and Accessing HDF-EOS2 Datasets Using DODS Technologies
Easily Serving and Accessing HDF-EOS2 Datasets Using DODS Technologies
 
Ado.net
Ado.netAdo.net
Ado.net
 
Database Concepts 101
Database Concepts 101Database Concepts 101
Database Concepts 101
 
Introduction to database with ms access.hetvii
Introduction to database with ms access.hetviiIntroduction to database with ms access.hetvii
Introduction to database with ms access.hetvii
 
Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)Introduction to database with ms access(DBMS)
Introduction to database with ms access(DBMS)
 
Connected data classes
Connected data classesConnected data classes
Connected data classes
 
Asp.net interview questions
Asp.net interview questionsAsp.net interview questions
Asp.net interview questions
 
Database Management Systems
Database Management SystemsDatabase Management Systems
Database Management Systems
 
PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#PATTERNS07 - Data Representation in C#
PATTERNS07 - Data Representation in C#
 
M.sc. engg (ict) admission guide database management system 4
M.sc. engg (ict) admission guide   database management system 4M.sc. engg (ict) admission guide   database management system 4
M.sc. engg (ict) admission guide database management system 4
 
Lecture 3 note.pptx
Lecture 3 note.pptxLecture 3 note.pptx
Lecture 3 note.pptx
 
A N S I S P A R C Architecture
A N S I  S P A R C  ArchitectureA N S I  S P A R C  Architecture
A N S I S P A R C Architecture
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
TID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To DatabaseTID Chapter 10 Introduction To Database
TID Chapter 10 Introduction To Database
 
Session x(ado.net)
Session x(ado.net)Session x(ado.net)
Session x(ado.net)
 

Más de Phúc Đỗ

14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filterPhúc Đỗ
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arraysPhúc Đỗ
 
09. session 9 operators and statements
09. session 9   operators and statements09. session 9   operators and statements
09. session 9 operators and statementsPhúc Đỗ
 
08. session 08 intoduction to javascript
08. session 08   intoduction to javascript08. session 08   intoduction to javascript
08. session 08 intoduction to javascriptPhúc Đỗ
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css propertiesPhúc Đỗ
 
06. session 06 css color_andlayoutpropeties
06. session 06   css color_andlayoutpropeties06. session 06   css color_andlayoutpropeties
06. session 06 css color_andlayoutpropetiesPhúc Đỗ
 
05. session 05 introducing css
05. session 05   introducing css05. session 05   introducing css
05. session 05 introducing cssPhúc Đỗ
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframesPhúc Đỗ
 
03. session 03 using lists and tables
03. session 03   using lists and tables03. session 03   using lists and tables
03. session 03 using lists and tablesPhúc Đỗ
 
02. session 02 working with html elements
02. session 02   working with html elements02. session 02   working with html elements
02. session 02 working with html elementsPhúc Đỗ
 
15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data bindingPhúc Đỗ
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to htmlPhúc Đỗ
 

Más de Phúc Đỗ (12)

14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filter
 
10. session 10 loops and arrays
10. session 10   loops and arrays10. session 10   loops and arrays
10. session 10 loops and arrays
 
09. session 9 operators and statements
09. session 9   operators and statements09. session 9   operators and statements
09. session 9 operators and statements
 
08. session 08 intoduction to javascript
08. session 08   intoduction to javascript08. session 08   intoduction to javascript
08. session 08 intoduction to javascript
 
07. session 07 adv css properties
07. session 07   adv css properties07. session 07   adv css properties
07. session 07 adv css properties
 
06. session 06 css color_andlayoutpropeties
06. session 06   css color_andlayoutpropeties06. session 06   css color_andlayoutpropeties
06. session 06 css color_andlayoutpropeties
 
05. session 05 introducing css
05. session 05   introducing css05. session 05   introducing css
05. session 05 introducing css
 
04. session 04 working withformsandframes
04. session 04   working withformsandframes04. session 04   working withformsandframes
04. session 04 working withformsandframes
 
03. session 03 using lists and tables
03. session 03   using lists and tables03. session 03   using lists and tables
03. session 03 using lists and tables
 
02. session 02 working with html elements
02. session 02   working with html elements02. session 02   working with html elements
02. session 02 working with html elements
 
15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

15. session 15 data binding

  • 2. Objectives  Data binding architecture.  Sorting and filtering data.
  • 3. Database  A database is an organized collection of related data, which allows easy access and manipulation of data. The data from a database can be accessed using three different types of architectures:  Single-tier architecture: works with databases that reside on a single machine. This manipulates the data within the database immediately.  Two-tier architecture: stores and maintains database information on a centralized server. Thus, the client accesses the database by connecting to the database server. The kind of architecture is also referred as client/server.  Three-tier architecture: is a multi-tier client/server architecture that consists of three parts namely client machine, application logic, and the database. The client connects to one or more application servers, which in turn connects to the database server.
  • 4. Data binding  Data binding is a process of associating data from the database with appropriate HTML elements. It helps to display the data from the database in HTML elements and controls.  Data binding allows to retrieve data from the database. There are some features:  On-demand content management: allows retrieving data from the DB on demand.  Platform-independent access: allows accessing, updating, and retrieving data, irrespective of the browser version or the type of DB.  Asynchronous processing: performing multiple tasks at the same time. While requesting or updating data from the DB, can continue interacting with the web page to perform another task.  Sorting and filtering data: allows to access and retrieve data by reordering the data in the database. In addition, filtering of data allows to retrieve only the data that meet the specified criteria.
  • 5. Architecture of data binding  Data binding helps you to link data from the database with the elements of a web page using its various built-in components.  Data binding architecture consists of four main components:  Data source object(DSO): acts as an intermediary between HTML elements and DB. The DSO establishes a connection with the DB, fetches the data from the DB, and allows HTML elements to display the fetched data.  Data consumers: are the elements of an HTML page that display data provides by DSO.  Binding agent: determines the DSOs and data consumers from the elements contained within the web page. After this, the binding agent checks the synchronization of data transmitted from the DSO to the consumer.  Table repetition agent: generally deals with an HTML table for data repetition. It displays the data supplied by DSO in a table.
  • 6. Data source object  You can display the data provided by DSOs by binding the HTML elements to DSOs. To implement the DSO, you need to consider certain points such as:  Determining the means of data transmission to an HTML page. To transmit the data, DSO can use different protocols such as the Hypertext Transfer Protocol (HTTP).  Checking whether the transmission of data is synchronous or asynchronous.  Verifying whether updates are allowed.  Specifying the data by using a Structured Query Language (SQL) statement or simple Uniform Resource Locator (URL).
  • 7. Tabular Data Control  The tabular data control (TDC) is a data source object that allows you to display data accessing the delimited text files. A delimited text file is a simple file that contains records of data separated by commas, tabs, …  The benefits of TDC:  Display data of simple types.  Access and retrieve data offline. This can be done since the delimited file transmitted by TDC can be stored in your system that enables you to read data online.  Avoid access to DB system. This can be done by writing server side scripts to fetch the data from the DB into a delimited text file.
  • 8. “.CSV” File  Delimited text files that are separated by commas are also known as .csv files (comma separated values or variables).  The size of a .csv file is very small. The largest .csv file is about 100Kb. These files are widely accessed by another applications. This is because the overall format of a .csv file is same as it stores the data as text.
  • 9. Creating a “.CSV” File  Steps to create a .csv file: 1. Open the spreadsheet application. 2. Define at least three fields that are separated by commas and placed within double quotes. These fields are mandatory and case-sensitive. 3. Declare additional fields besides these fields as per your requirements. 4. Save the file with a proper name followed by .csv file type.
  • 10. Data binding  Data binding allows you to link data over the Internet or Intranet. The steps involved in the process of data binding are: 1. Adding a data source object on an HTML page. This allows you to transmit the data over the internet. 2. Binding HTML elements to the data source object. This allows you to either display one record at a time or multiple records in a tabular format. 3. Writing scripts to enable user interactivity. This allows you to navigate, add, update, sort, and filter records. This step is optional.
  • 11. Properties of TDC 1. AppendData: determines whether the data is appended or the current data is replaced. Returned type is true or false. 2. CaseSensitive: determines whether the casing should be avoided while comparing the data. 3. CharSet: recognizes the character set of the data within a text file. 4. DataURL: describes the file location. 5. EOF: determines whether the end of file is reached. 6. EscapeChar: describes a character that specifies the end of data fields. 7. Filter: specifies the way the data is filtered. 8. Language: describes the language of data within the file such as eng-us. 9. recordset: refers to the text file in TDC to fetch data. 10.RowDelim: describes a character that specifies the end of each row. 11.sort: describes the columns to be sorted and the sorting order. 12.UseHeader: determines the file contains the header information.
  • 12. Methods of TDC 1. moveFirst(): moves to the first data in the data field. 2. moveNext(): moves to the next data from the current position. 3. moveLast(): moves to the last data in the data field. 4. Reset(): filters or sorts the data as per the specified condition.
  • 13. Binding HTML elements  The different HTML elements that support data binding are text boxes, frames, tables, lists, and so on. There are certain attributes that allows you to bind to your HTML elements.  Some attributes to bind data:  DATAFLD: specifies the field of s DSO that should be bound to an HTML element.  DATAFORMATAS: specifies the format of data in an HTML page.  DATASRC: specifies the source of data for binding an HTML page.
  • 14. Data binding - Demo Demo: S15_DataBinding.html
  • 15. Sorting data with TDC  The TDC implements the mechanism of sorting by providing the Sort property. The value of this property is the column name based on which the sorting task will take place.  Steps to sort the data: 1. The TDC control is embedded in the web page and is linked to Students.csv file. 2. The table is linked with the TDC and each table column is bound to the appropriate column in the Students.csv file. 3. A button is created, and when the user click on button the sort() function is invoked. 4. The sort() function takes the column name parameter that is the key to sort. 5. The Sort property of TDC is set to the column name passed as the parameter to the function. 6. The Reset() method of TDC displays the sorted data of the Students.csv file.
  • 16. Sorting - Demo Demo: S15_SortData.html
  • 17. datapagesize attribute  A .csv file might contain huge of records, which might not fit in a table when it loads in the browser. Therefore, you might want to display only a specific number of records at a time in a web page to improve readability. This is done by using the datapagesize attribute in DHTML.  Steps to use datapagesize attribute : 1. The TDC control is embedded in the web page and is linked to Students.csv file. 2. The table is linked with the TDC and the datapagesize attribute is set as 10. This means that the details of only 5 records will be displayed in the browser. 3. A button is created whose value is set to previous. When the user clicks it the previousPage() of TDC is invoked that displays the previous 10 records. 4. A button is created whose value is set to next. When the user clicks it the nextPage() of TDC is invoked that displays the previous 5 records.
  • 18. datapagesize - Demo Demo: S15_PageSize.html
  • 19. Data filtering using TDC  Data filtering is the means by which you can block or restrict the display of the data to the users. Data filtering allows viewing only selected data based on a criterion.  Some operators you can use to filter the data:  =: denotes the equal to operator.  >: denotes the greater than operator.  >=: denotes the greater than or equal to operator.  <: denotes the less than operator.  <=: denotes the less than or equal to operator.  <>: denotes the not equal to operator.  & (AND): denotes whether both the conditions are true.  | (OR): denotes whether at least one of the conditions is true.
  • 20. Data filtering using TDC  Steps to specify the criteria to filter: 1. The TDC control is embedded in the web page and is linked to Students.csv file. 2. The table is linked with the TDC and is bound to appropriate columnf of the Students.csv file. 3. A button is created, and when the user clicks on it the showAll() is invoked to display the records satisfied the criteria. 4. The Filter property is assigned the value as “StuID > 12”. This means that the program will filter all records have the ID greater 12.
  • 21. Filter - Demo Demo: S15_FilterData.html
  • 22. Summary  Data binding refers to accessing the text file and database to fetch and display data from them dynamically.  The data binding architecture allows access any database from any browser, irrespective of the software and hardware platform.  Can sort data and filter it to view only limited data.
  • 23. Summary…  There are some of features:  On-demand content Management  Platform - Independence access  Asynchronuos Processing  Sorting and filtering data  Data binding architecture consists of four main components:  Data Source Object (DSO)  Data consumer  Binding Agents  Table repetition Agents