1 / 10

CGI::Panel

CGI::Panel. “Create sophisticated event-driven web applications from simple panel objects”. CGI::Panel. Different Approach Distribution of Logic Simple ‘driver’ CGI script + panel classes inherited from CGI::Panel Logical way to write an interface. Application Design. How this could look.

wattan
Download Presentation

CGI::Panel

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CGI::Panel “Create sophisticated event-driven web applications from simple panel objects”

  2. CGI::Panel • Different Approach • Distribution of Logic • Simple ‘driver’ CGI script + panel classes inherited from CGI::Panel • Logical way to write an interface

  3. Application Design

  4. How this could look • Could look like this:

  5. Benefits • Clearly defined separation of code into easily manageable chunks • All the benefits of OO programming – inheritance, polymorphism, encapsulation • Reduced development time • Easy restructuring and maintenance • Application design is implicit in panel hierarchy • Panels are reusable

  6. Provided free • Event trigger and distribution mechanism • Parameter distribution mechanism • Lightweight persistence • Access to ‘parent’ panel • Access to main panel

  7. Events • Triggered by special button or link • Handled by the panel that generated the event • Access to localized parameter list

  8. Parameters • Defined similarly to the CGI module • Special ‘get_localised_name’ method returns a name suitable for use in an HTML form • Panel-specific parameter list then obtained using ‘local_params’ method.

  9. Persistence • Handled by Apache::Session • Complete panel hierarchy stored, along with any attached data • Transparent to the programmer (no extra code needed)

  10. Standard CGI loop { Read http headers Process parameters Retrieve/set up state (Lots of ifs, elsifs etc) Output html } CGI::Panel Set up application loop { Respond to event Display each panel } Comparison

More Related