left_top_1
right_bottom_1

Page[11] Template[0] SectionIDs:15,16,17
SectionIDList: 15,16,17

SectionIDList: 15,16,17

Download Padsite 3

Padsite 3.0.1 (MVC)

Padsite has been rewritten as a Model/View/Controller application framework that takes advantage of ColdFusion's application.cfc framework.

Download

Version History

Version 3.0.1
Minor bug fixes

Version 3.0
Completely rewritten as a Model/View/Controller application framework taking advantage of ColdFusion's application.cfc framework

Version 2.0.0 (never released)
Introduction of proprietary CMS, PadsitePLUS which I use for my web design business

Version 1.0.0 (never released)
Not significantly different from the beta and little perceived outside interest at the time

Version 0.4.0 (beta)
Uses the application.cfm framework and lacks the encapsulation of CFCs

Welcome to the Padsite framework.

Padsite takes the C.R.U.D. out of writing CF apps.

Padsite is an open-source ColdFusion framework that provides a graphical user interface for building and managing your site's database — automagically building and maintaining the back-end of your site. Building on ColdFusion's strengths as an agile development language, your database design can be more agile as well.

Sketch: GUI yields a schema which Padsite uses to talk to your database.

Padsite works its magic by maintaining a schema (model) of your database. Using that schema, Padsite provides intelligent 'agents' (reporter and editor) via a service layer that allow you to rapidly design your database while your reporting and editing pages (controllers) are updated automatically. These padsite-generated controllers can be customized and still update automatically as the schema changes. Additionally, you can extend Padsite with your own controllers, services, datatypes and data subtypes.

Padsite is designed to be an 80% solution. While not as full-featured as some frameworks, Padsite automates database administration so you can focus on the logic of your app and not the busywork of building the backend reporting and editing interface.

Additionally, Padsite can be configured to let you delegate control of the data to admins and users - including the ability to create and delete columns and tables (if desired).

 

Watch this video to see how easy it is to get started and what it can do for you.

Watch fullscreen for best results.

 


 

If you'd like to incorporate Padsite into some other framework or port it to some other language, I'd be happy to work with you to accomplish that.

License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started With Padsite v3

Once you've set up your hosting and DSN the rest of this process can easily be done in seconds.

  1. First, download a copy of padsite and unzip it into the root of your web site.
  2. Next, open the application.cfc file and enter your values for the ten or so user-defined variables in onApplicationStart.
  3. Save your changes and upload everything to your web server.
  4. Now, just log in. Load the URL http://yourdomain.tld/padsite/ and log in with your email address and a password. As long as you're the first person to use the login form, the login you enter will be saved as the Webmaster's login.

High-five. You're done! From here, you can now click Setup in the navigation menu and start managing your database.

Using Padsite (A Tutorial)

Once you've completed the setup process, your Setup page should look like this.

setup_screenshot (600 pixels)

From here, you can add new tables and generate reporting and editing pages for those tables.

For example, if you want to add a table for keeping track of your products, click Add A New Table and enter the table name "Products". The table will be created with the table prefix (that you assigned in application.cfm) prepended to the table name.

new table (600 pixels)

Click Create Table and the Setup page reloads showing that the new table has been created.

setup with new table (600 pixels)

Next, you'll want to create a report page for your Products table. Click on the table you just created and you will see a listing of that table's fields and a representation of the schema for that table.

products setup (600 pixels)

Currently, the only field that has been created is the ID field which is used as the primary key for that table. Click Add A New Data Field and enter ProductName and select a type of varchar and set a size of 50 characters.

add a new data field (600 pixels)

Click Add Column and the window will update to allow you to enter more specific details about the data field.

update column details (600 pixels)

Here you can assign a subtype for the field, enter a value for the fieldset label (legend) and control other options such as whether the field should be editable, displayed in reports and sortable. Each data type has its own set of subtypes and options - including the option to enter formulas.

updated products table (600 pixels)

Now your products table has been updated with your new ProductName field. Now let's go ahead and create a reporter page and an editor page for our Products table by clicking Add A New Page at the bottom of the "Admin Pages Associated With This Table" section.

admin page (600 pixels)

This isn't as complicated as it looks at first. Let's start at the top and work our way down.

Page Menu is the Menu that this new page will show up under. Since the navigation supports drop down menus, you can create a drop down menu by simply putting two or more pages under the same Page Menu.

Page Title is the title of the report page. Note that the Page Title and the Page Menu do NOT have to be the same.

File Name is the actual file name for the report page. I generally recommend naming it the plural version of whatever it is to be reporting but since Padsite is not dependent on any naming conventions here, you can name it whatever you want.

Page Subtype currently only supports reporter (I think) but other subtypes are in the works as you can see.

Let's skip summary for now. That's a more advanced feature.

Access Required indicates whether the person requesting this page must be logged in and what level of access they should have.

Record Name is used as a label to refer to individual records.

Editor is the file name of the editor page for this table. I generally recommend naming it the singular version of whatever it is to be editing.

Access is again what level of access is required to access the editor page.

Window Size is the size that the editor window should open up to.

The viewer section is just a read-only version of the editor for detail reporting only - not editing. It is not fully supported just yet.

Now, you click the Update button to save what you've entered so far. The window will refresh and you will see that the Create buttons next to the reporter file name and the editor file name are now active. Click these buttons to create the pages and then you can close this window.

If everything worked, you should now see that the menu has been updated with your new page and if you click on it, you should see a reporter page for your table that is ready to accept new records. 

That pretty much covers the basics but feel free to email me if you have any questions.

Understanding Padsite's Architecture

History and Overview

In my experience, it seems that one of the most time-consuming parts of building a dynamic website is building all the backend reporting that supports it. In fact, a fitting acronym, C.R.U.D., is used among programmers to describe the Create, Read, Update and Delete functions that are written over and over again. It's the least fun part and it represents a large proportion of the code.

Padsite originated from a humble custom tag that was meant to save me some time writing SQL. It would take a list of numeric field names and a separate list of string field names and perform an action (insert, update, delete) given the table's name, the record ID and the scope of the incoming data (url or form). String values were qualified with single quotes and numeric values were passed through ColdFusion's Val() function on their way into the database. This proved to be a good timesaver but I knew more was possible.

Later, that custom tag was expanded into a small app that used a schema to keep track of all my tables and all the fields within those tables. This schema kept track not only of the name and datatype of each field but it also allowed me to assign subtypes as well. For example, a field with a varchar datatype might have one of the following subtypes asssigned to it: email address, phone number, url, formula (for calculations), etc. In addition to the most common, standard data types such as bit, int, money, text and varchar, Padsite adds some of its own data types which i will describe later.

Taking advantage of this schema, I develped two 'agents' (basically just controller templates) named reporter and editor whose job was to generate my reporting and editing pages for the backend. These generated pages were a lot like controllers although I was not yet familiar with MVC architecture when I started this project. Versions 1 and 2 of Padsite were written using cfincludes but with version 3, Padsite was restructured into a full-blown Model-View-Controller architecture utilizing ColdFusion's application.cfc framework.

Padsite still centers around the reporter and editor agents but they are now packaged as CFCs.

 

architecture sketch (diagram)

 

The Reporter Agent at a Glance

The reporter's job, given the name of the table to be read, is to provide the records as well as the table's schema in a structure typically named 'Report'. The Report struct contains all the records and additional information needed to display them. The controller then renders the report page using a set of views that support sorting tabs, row queueing and more.

The reporter agent resides in /padsite/services/reporter.cfc and its main function is psReadRecords.

 

The Editor Agent at a Glance

The editor's job is more complex. It provides the common insert, update and delete functions but it also provides a search function that shares the same basic views as the editor. There are plans to add a read-only viewer but that hasn't really been needed so far.

The editor agent resides in /padsite/services/editor.cfc and its main functions are psReadRecord, psInsertRecord, psUpdateRecord, psDeleteRecord and psSearchRecords.

 

Custom Data Types

As mentioned, Padsite's schema adds some additional higher-level datatypes to your toolbox.

  • filter: allows for a drop down menu in Reporter that allows you to quickly select records with a value based on a list of all distinct values in that column
  • iframe: allows for an inline frame summary (or mini-reporter) inside of an editor controller - for viewing child records (single-to-many)
  • list: allows you to create groups of records as lists of ID numbers
  • custom: allows you to interrupt padsite's normal processing and execute your own custom code for viewing, editing or even calculating a given field