SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Ms Access
Ms AccessMs Access
Ms Access
 
Ado.net
Ado.netAdo.net
Ado.net
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
Ms access
Ms accessMs access
Ms access
 
Sql server lesson3
Sql server lesson3Sql server lesson3
Sql server lesson3
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introduction
 
Ado
AdoAdo
Ado
 
Starting ms access 2010
Starting ms access 2010Starting ms access 2010
Starting ms access 2010
 
Database Management
Database ManagementDatabase Management
Database Management
 
Bdc Screens
Bdc ScreensBdc Screens
Bdc Screens
 
Web service
Web serviceWeb service
Web service
 
Metadata harvesting Tools
Metadata harvesting ToolsMetadata harvesting Tools
Metadata harvesting Tools
 
Introduction to ms access
Introduction to ms accessIntroduction to ms access
Introduction to ms access
 
Access introduction
Access introductionAccess introduction
Access introduction
 
Ado.net xml data serialization
Ado.net xml data serializationAdo.net xml data serialization
Ado.net xml data serialization
 
FileTable and Semantic Search in SQL Server 2012
FileTable and Semantic Search in SQL Server 2012FileTable and Semantic Search in SQL Server 2012
FileTable and Semantic Search in SQL Server 2012
 
Word2007 mailmerge
Word2007 mailmergeWord2007 mailmerge
Word2007 mailmerge
 
SQL Server 2012 - Semantic Search
SQL Server 2012 - Semantic SearchSQL Server 2012 - Semantic Search
SQL Server 2012 - Semantic Search
 
B.sc i agri u 4 introduction to ms access
B.sc i agri u 4 introduction to ms accessB.sc i agri u 4 introduction to ms access
B.sc i agri u 4 introduction to ms access
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 

Ähnlich wie 15. session 15 data binding

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
 
Database Design and Implementation
Database Design and ImplementationDatabase Design and Implementation
Database Design and ImplementationChristian Reina
 

Ähnlich wie 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
 
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)
 
Database Design and Implementation
Database Design and ImplementationDatabase Design and Implementation
Database Design and Implementation
 

Mehr von Phúc Đỗ

15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data bindingPhúc Đỗ
 
14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filterPhúc Đỗ
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtmlPhúc Đỗ
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objectsPhúc Đỗ
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objectsPhú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 Đỗ
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to htmlPhúc Đỗ
 

Mehr von Phúc Đỗ (15)

15. session 15 data binding
15. session 15   data binding15. session 15   data binding
15. session 15 data binding
 
14. session 14 dhtml filter
14. session 14   dhtml filter14. session 14   dhtml filter
14. session 14 dhtml filter
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtml
 
12. session 12 java script objects
12. session 12   java script objects12. session 12   java script objects
12. session 12 java script objects
 
11. session 11 functions and objects
11. session 11   functions and objects11. session 11   functions and objects
11. session 11 functions and objects
 
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
 
01. session 01 introduction to html
01. session 01   introduction to html01. session 01   introduction to html
01. session 01 introduction to html
 

Kürzlich hochgeladen

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

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