Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.206.337 Times

CGI::Panel 0.97

Company: Rob Symes
Date Added: July 07, 2013  |  Visits: 657

CGI::Panel

Report Broken Link
Printer Friendly Version


Product Homepage
Download (39 downloads)



CGI::Panel is a Perl module that allows applications to be built out of simple object-based components. It'll handle the state of your data and objects so you can write a web application just like a desktop app. You can forget about the http requests and responses, whether we're getting or posting, and all that stuff because that is all handled for you leaving to you interact with a simple API.<br /><br />An application is constructed from a set of 'panels', each of which can contain other panels. The panels are managed behind the scenes as persistent objects. See the sample applications for examples of how complex object-based applications can be built from simple encapsulated components. To try the demo app, copy the contents of the 'demo' directory to a cgi-bin directory.<br /><br />CGI::Panel allows you to design the logic of your application in an event-driven manner. That is, you set up your application the way you want it, with special buttons and links that trigger 'events'. The application then sits back and when an event is triggered, the code associated with that event is run. The code that responds to an event goes in the same class as the code that generates the event button or link, making the code more readable and maintainable. If the event code changes the state of any of the panels, the panels will then stay in the new state, until their state is changed again.<br /><br />Each panel is encapsulated not only in terms of the code, but in terms of the form data that is passed through. For example a panel class can be defined which has a textfield called 'name'. Three instances of this panel can then exist simultaneously and each will get the correct value of the 'name' parameter when they read their parameters (see the 'local_params' method).<br /><br />SYNOPSIS<br /><br />A very simple working application consisting of a driver cgi and two panel classes...<br /><br />In simpleapp.cgi:<br /><br /> use SimpleApp;<br /> my $simple_app = obtain SimpleApp;<br /> $simple_app->cycle();<br /><br />In SimpleApp.pm:<br /><br /> package SimpleApp;<br /><br /> use base qw(CGI::Panel);<br /> use Basket;<br /><br /> sub init {<br /> my ($self) = @_;<br /> $self->add_panel('basket1', new Basket); # Add a sub-panel<br /> $self->add_panel('basket2', new Basket); # Add a sub-panel<br /> $self->add_panel('basket3', new Basket); # Add a sub-panel<br /> $self->{count} = 1; # Initialise some persistent data<br /> }<br /><br /> sub _event_add { # Respond to the button click event below<br /> my ($self, $event) = @_;<br /> <br /> $self->{count}++; # Change the persistent data<br /> }<br /><br /> sub display {<br /> my ($self) = @_;<br /> <br /> return<br /> 'This is a very simple app.<br /><br />' .<br /> # Display the persistent data...<br /> "My current count is $self->{count}<br /><br />" .<br /> # Display the sub-panels...<br /> "< table >< tr >" .<br /> "< td >" . $self->panel('basket1')->display . "< /td >" .<br /> "< td >" . $self->panel('basket2')->display . "< /td >" .<br /> "< td >" . $self->panel('basket3')->display . "< /td >" .<br /> "< /tr >< /table >" .<br /> # Display a button that will generate an event...<br /> $self->event_button(label => 'Add 1', name => 'add');<br /> }<br /><br /> 1;<br /><br />In Basket.pm:<br /><br /> package Basket;<br /><br /> use base qw(CGI::Panel);<br /> <br /> sub init {<br /> my ($self) = @_;<br /> <br /> $self->{contents} = [];<br /> }<br /> <br /> sub _event_add { # Respond to the button event in 'display'<br /> my ($self, $event) = @_;<br /><br /> # Get panel's localised parameters<br /> # (Many instances of this panel each get<br /> # their own local parameters)<br /> my %local_params = $self->local_params;<br /> <br /> push @{$self->{contents}}, $local_params{item_name};<br /> }<br /> <br /> sub display {<br /> my ($self) = @_;<br /> <br /> return<br /> '< table bgcolor="#CCCCFF" >' .<br /> join('', (map { "< tr >< td >$_< /td >< /tr >" } @{$self->{contents}})) .<br /> '< tr >' .<br /> # Localised text field<br /> '< td >' . $self->local_textfield({name => 'item_name', size => 10}) . '< /td >' .<br /> # Button that will generate an event (handled by _event_add above)<br /> '< td >' . $self->event_button(label => 'Add', name => 'add') . '< /td >' .<br /> '< /tr >' .<br /> '< /table >';<br /> };<br /> <br /> 1;

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Application Applications Basket Button Cgipanel 0 97 Event Event Add Gtquot Panel Panels Parameters Persistent Quotlt Selfgtcontents Simple Simpleapp State Subpanel Table
Users rating: 0/10

License: Freeware Size: 40.96 KB
USER REVIEWS
More Reviews or Write Review


CGI::PANEL RELATED
FTP Clients  -  vProftpd 0.97
vProftpd provides a Perl application to maintain users for a ProFTPD Virtual login system. Virtual ProFTPD Control creates, deletes, and maintains users for a ProFTPD Virtual login system. It uses commandline switches to make it easy to call...
7.17 KB  
Audio Encoders & Decoders  -  Lame Front-End 1.0
Lame Front-End is a graphical interface for MP3 encoder / decoder - lame.exe. This application is designed for LAME 3.97 (last release version in November 2006). Lame Front-End can work in batch mode, so it can be used by external applications...
1012.88 KB  
Desktop Utilities  -  XDG-Menu 1.4
XDG-Menu project is a ROX panel applet that displays an applications menu button. The menus it builds fit the XDG Menu Specification published by freedesktop.org..
27.65 KB  
Networking  -  VKontakte Share Button 1.0.1
VKontakte Share Button plugin brings powerfull way to add VKontakte share button for you posts and pages.It supports all functions of VKontakte API and easy customizable: * You can choose one of seven button appearance types include custom * Place...
10 KB  
Text to Speech Tools  -  RoboBlather 1.2
RoboBlather is a free text-to-speech application written using .NET 3.0. Rendered speech can be saved to a .WAV file and both talking speed and speech synthesis voice are user-selectable. It works on every version of Windows that support .NET...
302 KB  
Utilities  -  Dermi 1.1
Dermi (Decentralized Event Remote Method Invocation) is a peer-to-peer (P2P), decentralized event-based object middleware framework built on top of a structured Distributed Hash Table based overlay network.
1.55 MB  
Calendar  -  WEB Calendar ASP 3.5
This script provides you a database driven daily, weekly and montly event web or intranet calendar with event add, edit and delete. Add a dynamic events calendar to your website or intranet, manage and display daily, weekly or montly events....
 
Development Tools  -  DeltaRule 1.0
Routine accepts input variables, binary target variable (0/1) and a small number of training parameters, and returns discovered coefficients for a single neuron.Technical details:Learning rule: incremental delta ruleLearning Rate: constantTransfer...
10 KB  
Libraries  -  Stratos PHP Framework 1.0 RC1
Stratos PHP Framework is an open-source, object-oriented web application framework that facilitates the rapid development of well-organized, secure, and maintainable PHP web applications. Stratos PHP Framework frees you from working on tedious,...
2 MB  
Libraries  -  Rapid Application Development Library 2.7.0
radlib is a C language library developed to abstract details of interprocess communications and common linux/unix system facilities so that application developers can concentrate on application solutions. It encourages developers (whether expert...
430.08 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB