Anvita Gita Supersite Case Study Nov2000


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Anvita Gita Supersite Case Study Nov2000

  1. 1. Content-wise categorization Portal for Indian Languages Heritage Health Philosophy Literature Gita Upanishads Brahmasutra Ramcharitmanas Complete works of Adi Sankara Yogasutra …
  2. 2. Gita Supersite A Case Study - Anvita Bajpai
  3. 3. Issues Client-side Vs. Server-side Technology File System Vs. Databased System Fonts
  4. 4. Gita Supersite This is an effort to bring the heritage of Indian Scriptures to the Internet. The Supersite is the repository of Classical and Contemporary Commentaries on the Bhagavadgita, together with translations in Hindi and English, and many more texts are on the anvil.
  5. 5. Gita Supersite Features Current Structure Re-engineering the site Reasons Choices for re-engineering Reasons for choosing PHP Comparison for GitaSupersite Version 1: Business logic on Client Re-engineered: Logic on the Server
  6. 6. Features Language scripts The text can be viewed in any one of ten Indian language scripts (Assamese, Bengali, Devanagari, Gujarati, Kannada, Malayalam, Oriya, Punjabi, Tamil,Telegu), or in Roman (English script). Audio The chanting of the Bhagavadgita slokas is from the set of 4 audio cassettes Geeta Chanting by Swami Brahmananda
  7. 7. Version 1: Business logic on Client HTML + JavaScript Local Font
  8. 8. Re-engineering Reasons: Speed Managements of 17,000 objects (likely to be 100,000) Fonts must be installed on client’s machine Higher network traffic 7 hits to the web server to display a page with 6 options.
  9. 9. Choices while re-engineering the site CGI Perl MySQL Apache Zope ASP PHP MySQL Apache Midgard
  10. 10. Re-engineered: Logic on the Server PHP Code MySQL DB HTML Dynamic Fonts (PFR)
  11. 11. Reasons for choosing PHP Platform independent Nice support to MySQL and a no. of databases Works well with Windows, Unix and Linux and no. of web servers, including IIS and Apache Support for PFR Reduced network traffic Almost no investment (besides site hosting) 6% of sites worldwide use PHP Faster to develop Performance very good
  12. 12. Comparison for GitaSupersite Version 1 : Business logic on Client File System Local Fonts Frames Re-engineered: Logic on the Server Databased System Dynamic Fonts (PFR) Table
  13. 13. Client-side Scripting Vs. Server-side Scripting
  14. 14. Client- Vs. Server-side Scripting Static Vs. Dynamic content Client-side Vs. Server-side scripting Client-side scripting Technology Advantages Disadvantages Server-side scripting Technology Advantages Disadvantages Things can be done with server-side scripting only Which should I use? Client- or Server-side Content generation components
  15. 15. Static Vs. Dynamic Content Static Content Traditional HTML pages Simple text, Images, Hyperlinks to other documents Change in content requires manual editing Dynamic Content Page content generated “on the fly” Content stored in a database
  16. 16. Client-side vs. Server-side Client Side Scripting Programming that runs on the PC Basic input, validation, calculations No interaction with database Server Side Scripting Programming that runs on the server Complex algorithms
  17. 17. Client-side Scripting Web Server Http Request Http Response (HTML code with Script) Client Browser interprets HTML and creates the web page Browser
  18. 18. Client-side Scripting Technologies ActiveX Controls VC++ / VB Included in HTML code with <OBJECT> tags Not supported by Netscape without ActiveX plug-in Java Applets Java Included in HTML in same way as image is included Client-side Script and Dynamic HTML JavaScript VBScript (Microsoft only)
  19. 19. Advantages of Client-side Scripting Move Processing Tasks back to the Client Extensibility Using ActiveX Controls Creating Interactive Web Pages Manipulating the User Interface Creating Dynamic Forms Instant Feedback to Users
  20. 20. Disadvantages of Client-side Scripting Browser-Dependent Client-Side Scripts Secure Source Code of Client-Side Scripts. Pages Take Longer to Download Program Scope Is Limited to a Single HTML Page ActiveX Objects Must Be Downloaded by Client You Must Digitally Sign Your Own ActiveX Controls
  21. 21. Limited Debugging Ability No Way Accurately to Determine the Users Screen Mode No Direct Access to System Objects
  22. 22. Server-side Scripting Web Server Script Gets page Http Request Interprets script Client Server Response Browser creates the web page Browser
  23. 23. Server-side Scripting Technologies CGI Programming can be done in any language (mainly in Perl) Biggest disadvantage – doesn’t scale well Separate process for each request Solutions: FastCGI Apache’s mod_perl Proprietary Web Servers API (ISAPI, NSAPI) Platform specific Need to be thread safe Potential of crashing web server
  24. 24. Java Servlets and JSP Java Servlets: Very similar to CGI Like a non-visual applet that runs on web server Runs inside JVM JSP: Like ASP HTML, Java code and JavaBean components Active Server Pages (ASP) HTML, Jscript, VBScript Stuck with Microsoft web server (IIS, PWS) & OS (Win9x, WinNT)
  25. 25. Server-Side Java Script (SSJS) Netscape’s answer to ASP JavaScript Must be compiled before run Supported only by Netscape’s Enterprise Server PHP Works in similar way to JSP and ASP Platform independent Nice support to a no of databases Works well with Windows, Unix and Linux and A no of web servers, including IIS and Apache
  26. 26. Other Server-side Scripting ColdFusion ASP PHP ZOPE MySQL MivaScript Perl C++ SSI/XSSI
  27. 27. Advantages of Server-side Scripting Server-Side Scripts are Browser-Independent Global Variables are Available with Server- Side Scripting. Dynamically Building HTML Pages Based on User Input Provide improved security measures, since we can code the things that can never viewed by the client Server-Side Scripts Interface with Server Databases
  28. 28. HTTP Server Variables with Server-Side scripts. Identify Browser Properties Can provide the client with the data that doesn’t resides at the client Reduces network traffic Quicker loading
  29. 29. Disadvantages of Server-side Scripting No Direct Control over the User Interface No Debugging Tools Available All Server Script Processing is Done Before Anything is Sent to the Browser. Its Hard to Know when a Session Ends
  30. 30. Things can be done with server side scripting only Editing the contents of web page, by keeping it in DB Pages can be displayed as per demand Displaying and Updating of DB contents Creating page that rotate through a series of different graphics. Getting user feedback / returning information to user as per feedback
  31. 31. Which Should I Use? Client- or Server-Side? Use client-side scripting if you want: dynamic client forms with client-side validation your site to have highly interactive pages provide your client with advanced functionality that can be created only using ActiveX controls to control the user's browser
  32. 32. Use server-side scripting if you want: Web site must work with every browser on the market to protect your source code need to track user information across several Web pages to create a quot;Web applicationquot; need to interact with server-side databases need to use HTTP server variables or check the capabilities of the user's browser
  33. 33. Content Generation Components Application generator/Programming language Database engine ODBC Native drivers Web server Operating System
  34. 34. Web Content Management From File System to Databased System Biggest problem with file system: Management as contents grow rapidly (say 100 Thorny problem thousand or so) Concurrency Version Access control Search S-L-O-W-E-R applications
  35. 35. File System vs. Databased System Flat File System Databased System Concurrency No Yes Management Version Control Very difficult Yes (manual) Consistent L&F Have to edit code Provides template based system Access control Manual Access Privilege Fast, effective Not always Yes searches
  36. 36. Some other Points.. Moving content into the database also makes it easier to add features: Interactivity Personalized presentation CMS enables you to: Save time and money Improve communications Strengthen business relationship Increase revenues Scalability Flexibility Enterprise system Interoperability (necessary to meet future site requirements)
  37. 37. Comparison for GitaSupersite Version 1 : Business logic on Client File System Local Fonts Frames Re-engineered: Logic on the Server Databased System Dynamic Fonts (PFR) Table
  38. 38. Version 1 : Business logic on Client HTML + JavaScript Total size of 85 KB Code for data objects is 2148 LOC around 24 MB text display (frames) Local Font
  39. 39. Re-engineered: Logic on the Server PHP Code MySQL DB HTML 21 KB Code for Dynamic Fonts 814 LOC text display (table) (PFR) Total size of DB files is around 25 MB
  40. 40. Major functions in both the scripts (for text display) PHP JavaScript get_max($chap) get_max(chap) validity() detect_options() count_m() selected_options() collect_information() code_for_proceeding($ch show_window() ap, $sloka) display() text($ch, $slk, $txt) change(code,c,s) change($code, $c, $s) go(c,s) go($c, $s) play_audio($c, $s) play_audio(tc,ts) stop_audio() stop_audio()
  41. 41. Lang_frame_generation(fram open_db_connection() e_no,chap,slk) close_db_connection() table_h() table_m() table_b() navigation()
  42. 42. Future Plans On the fly Font Conversion (transliteration) Adding more audio Choice to select the audio Integration of this Supersite with the ISCII Search Engine, developed at IIT Kanpur
  43. 43. On the fly Transliteration Query PHP Code MySQL DB ISCII Data ISFOC Data ISCII Data Font Conversion
  44. 44. Next stage… Many more major commentaries on Gita Upanishads Brahmasutra Ramcharitmanas Complete Works of Adi Sankara Yogasutra Cultural site Hindi literature