CSC/ECE 517 Fall 2009/wiki1b 9 ss

From Expertiza_Wiki
Revision as of 15:09, 18 September 2009 by Rezn91 (talk | contribs)
Jump to navigation Jump to search

Scaffolding in Web application frameworks

Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?

The concept of Scaffolding

Scaffolding in web frameworks allow a software developer to create data-driven web applications quickly by automating CRUD (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the MVC architecture of the application that have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order to achieve a final product.

For the young developer, scaffolding has the advantage of quickly and easily building a working database driven application. It also shows the developer what kinds of methods and logic must be present within the applications controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications.

For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this the experienced developer can then customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated build as a rough draft from which they will write their own structure.

Scaffolding has become very popular within in the web development community and therefore is showing up in several web frameworks. This is mostly because it increases work flow and it allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, and .NET.

Dynamic Scaffolding

Dynamic Scaffolding generates the data interfaces at run time. With very little code written and no necessary knowledge of the underpinning data interfaces a developer could get a web application up and running in very little time and with little effort with Dynamic Scaffolding. Young developers loved it because they could get a web application up and running without having to know the gory details, or even much about the framework they were working with. Many experienced developers also like it because it allowed them to quickly prototype an application and wow clients as they see their product come to life in a matter of minutes. There were problems with Dynamic Scaffolding however. Because Dynamic Scaffolding creates the data interfaces at run time, these interfaces are hidden from the developer and to them, it's rather magical in its implementation. This creates some problems. One problem is the developer does not actually learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code that is created is hidden which makes it very difficult to access and work with. Because of these problems, many application development purists see Dynamic Scaffolding as doing more harm than good.

Scaffold Generation

Scaffolding in Ruby on Rails

Ruby on Rails 1.x

Ruby on Rails 2.x

Scaffolding in Python

Scaffolding in PHP

Scaffolding in Java

Scaffolding in .NET

Additional Implementations

Flash

Javacript

GRails