310 likes | 538 Views
Department of Computer Science and Engineering CS – 452 : 8 TH SEMESTER PROJECT Super Browsing – “Introducing Superlinks to the Web” Final Internal Demo. Nitish Shangari – 1PI07CS071 Harshita Agarwal – 1PI07CS042 Saurabh Shekhar – 1PI07CS098 Project Guide Dr. Kavi Mahesh Professor
E N D
Department of Computer Science and EngineeringCS – 452 : 8TH SEMESTER PROJECTSuper Browsing – “Introducing Superlinks to the Web”Final Internal Demo Nitish Shangari – 1PI07CS071 Harshita Agarwal – 1PI07CS042 Saurabh Shekhar – 1PI07CS098 Project Guide Dr. Kavi Mahesh Professor Department of CSE, PESIT
Current Scenario of WWW “spice” + = + = • What do the links have? • Definitions? • Examples? • Uses? • Images?
Drawbacks of Hyperlinks • Intrinsically binary in nature. No provision for multiple targets. • No way to capture author’s intent behind inserting a link between two documents. • Can point only to an approximate portion in target document. • Limits the author from defining varied behaviour on the click of a link. • No logical separation between the content and linkages of a web page. • They are unidirectional. Their context is lost on reaching the target.
Superlinks • A superlink is a link among ‘n’ different points, which allows the web developer to: • Define multiple targets from the same source link. • Specify semantics of the relationship between the source and every target. • Specify how the browser should respond to the click of a superlink. • Idea proposed by our project guide, Dr. Kavi Mahesh in his publication. • Paper Title: “Knowledge Browsing with Superlinks.” • Conference: International Conference on Digital Libraries and Knowledge Organization 2011.
How Superlinks Work Semantics Attached to Link Define Browser’s Response <superlink xlink:type=“extended” xlink:show=“mashup” id=“id75”> <locator xlink:role=“Composition” xlink:href=“File_1.xml//para[@id=\’id5\’]” id=“id751” /> <locator xlink:role=“Some Interesting Facts” xlink:href=“File_2.xml//body[@id=\’id43\’]” id=“id752” /> <locator xlink:role=“Names of Turmeric” xlink:href=“File_3.xml//tag1[@id=\’id5\’]” id=“id753” /> User Clicks Here </superlink> Multiple Target Locations Point to a Part of the Target
The Problem • No web browser at present supports rendering of a self-defined tag like the <superlink>. • Browsers fail to recognize and respond to tags outside the HTML standards. PROBLEM STATEMENT • Project aims at introducing superlinks to the web so that web browser(s) can recognize, render and support superlinks.
XML Styling Language • XSL is the present W3C recommendation for XML document transformation and presentation. • Reason(s) of Rejection • A point of reference between the XML and XSL file was required and hence, the source XML file had to be modified. • Issues when multiple XSL files for single XML document exist. Transformed XML on Browser XSL XML Source File
Using <a href=“foo()”> • Calling a JavaScript function from the href attribute of the <a> tag could be the nearest solution. • Reason(s) of Rejection • The idea is to natively make browsers understand superlinks and not having to modify the source files to achieve the same. • The browsers still worked on the <a> tag only. It did not know what a <superlink> is. <superlink> …. </superlink> <a href=“foo()”> Some Text Here </a>
Browser Extensions • A browser extension is a computer software that enhances the functionalities of a web browser. • Most modern browsers, namely, Microsoft Internet Explorer , Mozilla Firefox, and Google Chrome support extensions (also sometimes called “add-ons”) • As part of this project, we chose to develop extensions for Google Chrome. Content Scripts
Why Google Chrome? • Much faster than other browsers. • More stable than IE and Firefox. • Standard tests indicate dominance of Google Chrome. Content Scripts
Google Chrome Extensions • Developed using web development technologies like JavaScript, HTML/XHTML and CSS. • Can be packaged as apps and are bundled with all their constituent components. • Typically run inside the Chrome browser and provide additional functionality, integration with web services, and customized browsing experiences.
Basic Structure – Chrome Extensions • A compulsory manifest.jsonfile, the meta-data file of the extension which specifies files and the capabilities that the extension might use. • Optional JavaScript files, HTML pages, CSS files that are part of the extension’s logic. • Additional resources like images, icon files, cursors that the extension uses.
Goals • To develop a Google Chrome extension which simultaneously opens all target links of a superlink in one click. • To develop a Google Chrome extension which makes the browser enter into a dialogue with the user asking him/her to choose between alternatives based on the semantics attached to the targets of the superlink. • To develop a Google Chrome extension which visits each target of a superlink and presents a mash-up of information gathered from them.
4 Design and Implementation
Design – I • CONTENT SCRIPTS – A JavaScript was specified as a content script for the extension. A content script runs in the context of the web page being opened. Programmatic Injection possible. BROWSER Content Scripts Chrome Extensions DOM Elements Page Scripts The XML Source Document
Design – Multiple Link Opener • This extension fetches all targets of a superlink clicked by the user and opens them in new tabs/windows.
Design – II • To implement the other two extensions, there was a need for establishing an interaction between the extension and the user. • Also, there was a need for an intermediate entity that would fetch the information bound with a superlink in the XML document and pass it on the component that would interact with the user. • This issue was overcome by using the concept of Message Passing in a Chrome extension.
Design – Semantic Role Selector • This extension allows the user to have a choice to select a target of a superlink based on the semantic role associated with it.
Design – III • For the third extension, a mash-up of information was to be generated. • This meant that traversal of these documents withoutopening them in the browser was required. • To meet this end, an XMLHTTPRequest was sent to fetch the DOM object of the target document. • This was done for all targets of the clicked superlink.
Design – Super Mash Up • This extension provides the user with a mash-up containing text from the targets of a superlink without actually having to visit them.
The Fourth Deliverable • Besides the three extensions discussed, a fourth extension was developed. • Using the xlink:show attribute of the superlink, this extension would allow the author of a web page to define the way the browser would respond on the click of a superlink. • Depending upon what the author intends, the browser would either open all target links simultaneously or enter in a dialogue with the user or present the user with a mash-up of information.
Conclusion • The extensions developed in this project have overcome four of the six drawbacks of hyperlinks mentioned earlier. • The Multiple Link Opener allows browsers to support one-to-many links, not only binary. • The Semantic Role Selector allow web page authors to associate semantics with the target links. • The Super Mash Up, besides providing aggregated content, also allows web page authors to point to an exact location in the target links. • Finally, the integrated Super Link Extension, allows the web page authors to provide and define varied behaviour by the browser in response to the click of a superlink.
Future Work • There could be support for bi-directional links in the future. • It could also be possible to implement a logical separation between the content and the links of a web page. • By tracking an individual user’s browsing patterns, intelligence could be incorporated into browsers, and then the browsers could themselves define their behaviour to the click of a superlink.