<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Djzager</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Djzager"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Djzager"/>
	<updated>2026-08-09T04:50:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/oss_M1456_kdv&amp;diff=90563</id>
		<title>CSC/ECE 517 Fall 2014/oss M1456 kdv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/oss_M1456_kdv&amp;diff=90563"/>
		<updated>2014-10-29T17:24:07Z</updated>

		<summary type="html">&lt;p&gt;Djzager: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Implement MIME sniffing - spec'''=&lt;br /&gt;
&lt;br /&gt;
This article is about the open source project M 1456: Implement MIME&amp;lt;ref&amp;gt;https://mimesniff.spec.whatwg.org/&amp;lt;/ref&amp;gt; sniffing - spec &amp;lt;ref&amp;gt;https://github.com/servo/servo/issues/3144&amp;lt;/ref&amp;gt;, which is part of the Servo Parallel Browser Project. Servo is prototype web browser engine which is currently under development and is written in [http://doc.rust-lang.org/guide.html Rust] language. Here you can find a brief Background information about MIME sniffing in servo, rust programming language, the initial step and the first step implemented in the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== '''Background Information''' ==&lt;br /&gt;
When we do a HTTP web request which declares the type of its content (using the Content-Type header), it's very easy to decide how to present it - if it's an image, decode it; if it's an HTML page, parse and display it. When no such header is present, Servo currently falters (such as loading an image file or video file from disk, as in [https://github.com/servo/servo/pull/3131 #3131]). In this case, we want to implement the &amp;quot;sniffing&amp;quot; specification, which looks at the starting byte content of the resource and guesses what manner of content is being received. For example, If its an image we can use image rendering and a video rendering can be used for a video file. &lt;br /&gt;
&lt;br /&gt;
==='''What is Servo?'''===&lt;br /&gt;
Servo&amp;lt;ref&amp;gt;https://www.mozilla.org/en-US/research/projects/&amp;lt;/ref&amp;gt; is an experimental browser layout engine supported by Mozilla Research. It is being actively developed in the Rust programming language with the main purpose being to rethink what the modern browser layout engine should do, how it performs, and how well it renders pages.&lt;br /&gt;
&lt;br /&gt;
The use of the Rust programming language, discussed later, allows the engine to break down the problem of page layout into small isolated tasks that can be performed in parallel, for speed and efficiency, and isolated from each other. With the security features of the Rust programming language like memory safety, an important goal for the Servo project is to build on top of a solid, secure, and safe computing base&lt;br /&gt;
&lt;br /&gt;
The best resource to learn more about Servo, and the Servo Project is the GitHub project page: [https://github.com/servo/servo Servo] Project.&lt;br /&gt;
&lt;br /&gt;
==='''Rust Programming Language'''=== &lt;br /&gt;
Rust&amp;lt;ref&amp;gt;https://www.mozilla.org/en-US/research/projects/&amp;lt;/ref&amp;gt; is a research project supported by Mozilla Research. It is a systems programming language designed to take full advantage of modern hardware. What makes Rust special is its emphasis on security and parallelism. The language has syntax similar to C and C++, as can be seen in the snippet below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fn main() {&lt;br /&gt;
    println!(&amp;quot;hello, world&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rust programming language supports object-orientation and the language's design has refined through the development of Servo, previously mentioned. As was said previously, it is the security features that set Rust apart. First of all, Rust is designed to be memory-safe, meaning that it does not allow null or dangling pointers. Second, Rust has an ownership system existing entirely at compile time adding safety without inhibiting run time efficiency. Third, the Rust programming language assumes that things are immutable unless specifically stated otherwise. As an example, below we create a variable x and store the integer value of 5 and attempt to reassign it the integer value of 10:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
let x = 5i;&lt;br /&gt;
x = 10i;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This would result in an error at compile time because you are not allowed to reassign the values of immutable variables. The beauty of this is that variables are only mutable when the programmer specifically states that they should be. &lt;br /&gt;
&lt;br /&gt;
The best resource for more about the Rust programming language is the documentation: [http://doc.rust-lang.org/guide.html Rust Documentation]&amp;lt;ref&amp;gt;http://doc.rust-lang.org/guide.html&amp;lt;/ref&amp;gt; or the GitHub project page: [https://github.com/rust-lang/rust Rust language].&lt;br /&gt;
&lt;br /&gt;
=='''Implement MIME sniffing'''==&lt;br /&gt;
&lt;br /&gt;
==='''Initial Step'''===&lt;br /&gt;
As part of initial step we first [https://github.com/servo/servo Build Servo]. Learned how to create tasks in Rust, then spawn a new sniffer [http://doc.rust-lang.org/guide.html#tasks task] in the load method in resource_task.rs, by creating a sender and receiver pair as well - this task would read all the available data from the new receiver, and send it immediately via the original sender, while the new sender gets handed off to the factory function that is executed. All web pages continued to load unchanged after rebuilding our code.&lt;br /&gt;
&lt;br /&gt;
==='''Classes'''===&lt;br /&gt;
As part of OSS Servo project we worked on below Class files.&lt;br /&gt;
&lt;br /&gt;
'''Modify'''&lt;br /&gt;
* components/net/resource_task.rs&lt;br /&gt;
&lt;br /&gt;
'''Create'''&lt;br /&gt;
* components/net/sniffer_task.rs&lt;br /&gt;
&lt;br /&gt;
'''Delete'''&lt;br /&gt;
* none&lt;br /&gt;
&lt;br /&gt;
==='''Step 1'''===&lt;br /&gt;
* For every resource request (Example: file, http, data or any kind of request) in load method, it would interpose a sniffer task which sniffs all the data, parse the headers if required and return it. Below is the code snippet of the modified &amp;lt;code&amp;gt; resouce_task.rs &amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    fn load(&amp;amp;self, load_data: LoadData, start_chan: Sender&amp;lt;LoadResponse&amp;gt;) {&lt;br /&gt;
        let mut load_data = load_data;&lt;br /&gt;
        load_data.headers.user_agent = self.user_agent.clone();&lt;br /&gt;
&lt;br /&gt;
        // Create new communication channel, create new sniffer task,&lt;br /&gt;
        // send all the data to the new sniffer task with the send&lt;br /&gt;
        // end of the pipe, receive all the data.&lt;br /&gt;
&lt;br /&gt;
        let sniffer_task = sniffer_task::new_sniffer_task(start_chan.clone());&lt;br /&gt;
&lt;br /&gt;
        let loader = match load_data.url.scheme.as_slice() {&lt;br /&gt;
            &amp;quot;file&amp;quot; =&amp;gt; file_loader::factory,&lt;br /&gt;
            &amp;quot;http&amp;quot; | &amp;quot;https&amp;quot; =&amp;gt; http_loader::factory,&lt;br /&gt;
            &amp;quot;data&amp;quot; =&amp;gt; data_loader::factory,&lt;br /&gt;
            &amp;quot;about&amp;quot; =&amp;gt; about_loader::factory,&lt;br /&gt;
            _ =&amp;gt; {&lt;br /&gt;
                debug!(&amp;quot;resource_task: no loader for scheme {:s}&amp;quot;, load_data.url.scheme);&lt;br /&gt;
                start_sending(start_chan, Metadata::default(load_data.url))&lt;br /&gt;
                    .send(Done(Err(&amp;quot;no loader for scheme&amp;quot;.to_string())));&lt;br /&gt;
                return&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
        debug!(&amp;quot;resource_task: loading url: {:s}&amp;quot;, load_data.url.serialize());&lt;br /&gt;
&lt;br /&gt;
        loader(load_data, sniffer_task);&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The function which gets called in the load method is &amp;lt;code&amp;gt; new_sniffer_task&amp;lt;/code&amp;gt;. The sniffer task creates a channel and then call &amp;lt;code&amp;gt; SnifferManager &amp;lt;/code&amp;gt; which creates SnifferManager struct with channel information. &amp;lt;code&amp;gt; SnifferManager &amp;lt;/code&amp;gt;  waits for input on the new receiver and passes it on to the old sender, while handing off the new sender to the factory function. Below is the code snippet of the new &amp;lt;code&amp;gt;sniffer_task.rs&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct SnifferManager {&lt;br /&gt;
  data_receiver: Receiver&amp;lt;LoadResponse&amp;gt;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
impl SnifferManager {&lt;br /&gt;
  fn new(data_receiver: Receiver &amp;lt;LoadResponse&amp;gt;) -&amp;gt; SnifferManager {&lt;br /&gt;
    SnifferManager {&lt;br /&gt;
      data_receiver: data_receiver,&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
impl SnifferManager {&lt;br /&gt;
  fn start(&amp;amp;self, next_rx: Sender&amp;lt;LoadResponse&amp;gt;) {&lt;br /&gt;
    loop {&lt;br /&gt;
      self.load(next_rx.clone(), self.data_receiver.recv());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  fn load(&amp;amp;self, next_rx: Sender&amp;lt;LoadResponse&amp;gt;, snif_data: LoadResponse) {&lt;br /&gt;
    next_rx.send(snif_data);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
We used the [http://en.wikipedia.org/wiki/Command_pattern command design pattern] in our project. As Wikipedia states, command pattern is a design pattern that in which an &amp;quot;object is used to represent and encapsulate all the information needed to call a method at a later time&amp;quot;. &amp;lt;ref name=&amp;quot;commandDesignPatternWiki&amp;quot;&amp;gt;http://en.wikipedia.org/wiki/Command_pattern&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In our specific case, the object is the Sniffer Task. A new Sniffer Task is created via the &amp;lt;code&amp;gt; new_sniffer_task&amp;lt;/code&amp;gt; function. When the sniffer task is created, it is isolated and it encapsulates all the information needed to sniff the MIME data out of the URI/file. Since it's isolated, the only way to communicate between the Sniffer Task and the main servo process is by using channels and using &amp;lt;code&amp;gt;send&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;receive&amp;lt;/code&amp;gt; functions to pass data around. For example, in the load function in SnifferManager in &amp;lt;code&amp;gt;sniffer_task.rs&amp;lt;/code&amp;gt;, we use &amp;lt;code&amp;gt;send&amp;lt;/code&amp;gt; to send the data back to the next processing pipeline.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
fn load(&amp;amp;self, next_rx: Sender&amp;lt;LoadResponse&amp;gt;, snif_data: LoadResponse) {&lt;br /&gt;
  next_rx.send(snif_data);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few benefits that command design pattern provides. Firstly, since the code block is encapsulated, it is independent and can be modified and switched out easily. This makes maintaining the code very easy. Secondly, because the code blocks has all the resources it needs to perform it's task (in our case, sniffing the MIME), we can easily take it and run it in a different process parallel to the main servo process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Sniffer Task Project Build==&lt;br /&gt;
&lt;br /&gt;
* After the code changes we Build servo project by running below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./mach build &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Tested the code by passing html webpage request.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./mach run tests/html/about-mozilla.html &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
As part of OSS Servo project we have created a new &amp;lt;code&amp;gt;sniffer_task.rs&amp;lt;/code&amp;gt; and modified &amp;lt;code&amp;gt;resource_task.rs&amp;lt;/code&amp;gt; load method. Then created a merge request [https://github.com/servo/servo/pull/3766 M1456-Implement MIME sniffing initial Step] and got feedback from Josh were we addressed the issues. Few open issues would be addressed as part of Final OSS project.&lt;br /&gt;
&lt;br /&gt;
==Future Development Scope==&lt;br /&gt;
&lt;br /&gt;
==='''Step 2'''===&lt;br /&gt;
Move from a 1:1 sniffer:request task model to a shared sniffer task - create the sniffing task in ResourceTask::start, store the created sender in a field, and hand off clones of this sender to the factory function. The sniffer task will now also have to be sent the original sender as well, since it is not available at task creation.&lt;br /&gt;
&lt;br /&gt;
==='''Step 3'''===&lt;br /&gt;
When the headers are received, implement the [https://mimesniff.spec.whatwg.org/#handling-a-resource sniffing heuristic algorithm].&lt;br /&gt;
&lt;br /&gt;
==='''Step 4'''===&lt;br /&gt;
Implement the mime type matching algorithm, one category at a time - look for a good way to store the patterns and resulting types to minimize code duplication.&lt;br /&gt;
&lt;br /&gt;
==='''Step 5'''===&lt;br /&gt;
Ensure that the resulting mime type is present in the load that the consumer receives&lt;br /&gt;
&lt;br /&gt;
==='''Step 6'''===&lt;br /&gt;
Write tests that demonstrate working sniffing (for example, loading images with no/wrong extension)&lt;br /&gt;
&lt;br /&gt;
=='''Appendix'''==&lt;br /&gt;
==='''Setting up Servo'''===&lt;br /&gt;
There are two main steps to set up the environment for this project. Linux environment is preferred for setting up the environment as it is simple and easy.&lt;br /&gt;
&lt;br /&gt;
:* [https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust Build Rust] &amp;lt;ref&amp;gt; https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust &amp;lt;/ref&amp;gt;&lt;br /&gt;
:* [https://github.com/servo/servo Build Servo] &amp;lt;ref&amp;gt; https://github.com/servo/servo &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=='''References'''==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88553</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88553"/>
		<updated>2014-09-26T00:36:00Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py has design principles similar to that of other popular web application frameworks. Simply put, web2py embraces the principles of don't repeat yourself &amp;lt;ref name=&amp;quot;dryWiki&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Don't_repeat_yourself],&amp;quot;Wikipedia entry for Don't Repeat Yourself&amp;quot;. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt;, there should only be one way of doing things (form processing, managing sessions, and handling cookies), and explicit is better than implicit. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py's Free Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; [http://www.web2py.com/book/default/chapter/01 Web2py Online Book] is an excellent start for those who wish to learn more.&lt;br /&gt;
&lt;br /&gt;
Web2py is considered a full-stack framework, which simply means that the individual components of the framework were designed and built to work together. &amp;lt;ref name=&amp;quot;webAppFrameworkwiki&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Web_application_framework], &amp;quot;Web Application Framework Wiki&amp;quot;. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt; &amp;quot;Almost all of its components are built from scratch and are designed to work together, but they function just as well outside of the complete web2py framework. For example, the Database Abstraction Layer (DAL) or the template language can be used independently of the web2py framework by importing gluon.dal or gluon.template into your own Python applications. gluon is the name of the web2py module that contains system libraries. Some web2py libraries, such as building and processing forms from database tables, have dependencies on other portions of web2py. web2py can also work with third-party Python libraries, including other template languages and DALs, but they will not be as tightly integrated as the original components.&amp;quot;  &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some popular websites powered by web2py are&amp;lt;ref name=&amp;quot;web2PyPoweredWebsites&amp;quot;&amp;gt;[http://web2py.com/poweredby ], ''Sites Powered by Web2py''. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt;: &lt;br /&gt;
* [http://eden.sahanafoundation.org SahanaEden]&lt;br /&gt;
* [https://chique.pt/?lang=en CHIQUE]&lt;br /&gt;
* [http://campus.tableless.com.br Campus]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
=== Model Example ===&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'person',&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('email'),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# ONE (person) TO MANY (products)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'product',&lt;br /&gt;
    Field('seller_id',db.person),&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('description', 'text'),&lt;br /&gt;
    Field('picture', 'upload', default=''),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# MANY (persons) TO MANY (purchases)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'purchase',&lt;br /&gt;
    Field('buyer_id', db.person),&lt;br /&gt;
    Field('product_id', db.product),&lt;br /&gt;
    Field('quantity', 'integer'),&lt;br /&gt;
    format = '%(quantity)s %(product_id)s -&amp;gt; %(buyer_id)s')&lt;br /&gt;
&lt;br /&gt;
purchased = (db.person.id==db.purchase.buyer_id)&amp;amp;(db.product.id==db.purchase.product_id)&lt;br /&gt;
&lt;br /&gt;
db.person.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.person.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'person.email')]&lt;br /&gt;
db.product.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From web2py's online reference &amp;lt;ref name=&amp;quot;web2pyExamples&amp;quot;&amp;gt;[http://www.web2py.com/init/default/examples#database_examples], &amp;quot;Web2py Quick Examples&amp;quot;, Retrieved 19 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Tables are created if they do not exist (try... except). Here &amp;quot;purchased&amp;quot; is an Query object, &amp;quot;db(purchased)&amp;quot; would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.&lt;br /&gt;
&lt;br /&gt;
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename). &lt;br /&gt;
&lt;br /&gt;
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table migrate=False.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wiki Creation Example ===&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authorization Example ===&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
=== Model View Controller ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
==== Model ====&lt;br /&gt;
In web2py, the model is the &amp;lt;code&amp;gt;db.py&amp;lt;/code&amp;gt; file. This is where you define the type of database engine you are using and any table and fields. For example, if you wanted to define a &amp;lt;code&amp;gt;sqlite&amp;lt;/code&amp;gt; database with a table with car make and models, you would have the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db = DAL('sqlite://production.sqlite')&lt;br /&gt;
db.define_table('cars',&lt;br /&gt;
   Field('make'),&lt;br /&gt;
   Field('model'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Controller ====&lt;br /&gt;
Controllers are functions that will be run when a user tries to access a certain URL. A controller can have different actions it can call. For example, if you want to define a &amp;lt;code&amp;gt;cars&amp;lt;/code&amp;gt; controller that has an &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; action, your &amp;lt;code&amp;gt;cars.py&amp;lt;/code&amp;gt; would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def all():&lt;br /&gt;
    grid=SQLFORM.grid(db.cars, user_signature=False)&lt;br /&gt;
    return locals()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== View ====&lt;br /&gt;
The final portion of the user request pipeline is the view. When the &amp;lt;code&amp;gt;all()&amp;lt;/code&amp;gt; function in &amp;lt;code&amp;gt;cars.py&amp;lt;/code&amp;gt; finishes running it calls a view to render the data. In our case, since our controller is &amp;lt;code&amp;gt;car&amp;lt;/code&amp;gt; and our action is &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;, the view file would be &amp;lt;code&amp;gt;cars/all.html&amp;lt;/code&amp;gt; and this is how it could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Car Make and Models&amp;lt;/h1&amp;gt;&lt;br /&gt;
{{=grid}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Portability ===&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
=== Components ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;/&amp;gt; Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
=== Django ===&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rails ===&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88551</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88551"/>
		<updated>2014-09-26T00:35:24Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py has design principles similar to that of other popular web application frameworks. Simply put, web2py embraces the principles of don't repeat yourself &amp;lt;ref name=&amp;quot;dryWiki&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Don't_repeat_yourself],&amp;quot;Wikipedia entry for Don't Repeat Yourself&amp;quot;. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt;, there should only be one way of doing things (form processing, managing sessions, and handling cookies), and explicit is better than implicit. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; [http://www.web2py.com/book/default/chapter/01 Web2py Online Book] is an excellent start for those who wish to learn more.&lt;br /&gt;
&lt;br /&gt;
Web2py is considered a full-stack framework, which simply means that the individual components of the framework were designed and built to work together. &amp;lt;ref name=&amp;quot;webAppFrameworkwiki&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Web_application_framework], &amp;quot;Web Application Framework Wiki&amp;quot;. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt; &amp;quot;Almost all of its components are built from scratch and are designed to work together, but they function just as well outside of the complete web2py framework. For example, the Database Abstraction Layer (DAL) or the template language can be used independently of the web2py framework by importing gluon.dal or gluon.template into your own Python applications. gluon is the name of the web2py module that contains system libraries. Some web2py libraries, such as building and processing forms from database tables, have dependencies on other portions of web2py. web2py can also work with third-party Python libraries, including other template languages and DALs, but they will not be as tightly integrated as the original components.&amp;quot;  &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some popular websites powered by web2py are&amp;lt;ref name=&amp;quot;web2PyPoweredWebsites&amp;quot;&amp;gt;[http://web2py.com/poweredby ], ''Sites Powered by Web2py''. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt;: &lt;br /&gt;
* [http://eden.sahanafoundation.org SahanaEden]&lt;br /&gt;
* [https://chique.pt/?lang=en CHIQUE]&lt;br /&gt;
* [http://campus.tableless.com.br Campus]&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Key Features ==&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
=== Model Example ===&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'person',&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('email'),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# ONE (person) TO MANY (products)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'product',&lt;br /&gt;
    Field('seller_id',db.person),&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('description', 'text'),&lt;br /&gt;
    Field('picture', 'upload', default=''),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# MANY (persons) TO MANY (purchases)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'purchase',&lt;br /&gt;
    Field('buyer_id', db.person),&lt;br /&gt;
    Field('product_id', db.product),&lt;br /&gt;
    Field('quantity', 'integer'),&lt;br /&gt;
    format = '%(quantity)s %(product_id)s -&amp;gt; %(buyer_id)s')&lt;br /&gt;
&lt;br /&gt;
purchased = (db.person.id==db.purchase.buyer_id)&amp;amp;(db.product.id==db.purchase.product_id)&lt;br /&gt;
&lt;br /&gt;
db.person.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.person.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'person.email')]&lt;br /&gt;
db.product.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From web2py's online reference &amp;lt;ref name=&amp;quot;web2pyExamples&amp;quot;&amp;gt;[http://www.web2py.com/init/default/examples#database_examples], &amp;quot;Web2py Quick Examples&amp;quot;, Retrieved 19 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Tables are created if they do not exist (try... except). Here &amp;quot;purchased&amp;quot; is an Query object, &amp;quot;db(purchased)&amp;quot; would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.&lt;br /&gt;
&lt;br /&gt;
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename). &lt;br /&gt;
&lt;br /&gt;
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table migrate=False.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wiki Creation Example ===&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authorization Example ===&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
=== Model View Controller ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
==== Model ====&lt;br /&gt;
In web2py, the model is the &amp;lt;code&amp;gt;db.py&amp;lt;/code&amp;gt; file. This is where you define the type of database engine you are using and any table and fields. For example, if you wanted to define a &amp;lt;code&amp;gt;sqlite&amp;lt;/code&amp;gt; database with a table with car make and models, you would have the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db = DAL('sqlite://production.sqlite')&lt;br /&gt;
db.define_table('cars',&lt;br /&gt;
   Field('make'),&lt;br /&gt;
   Field('model'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Controller ====&lt;br /&gt;
Controllers are functions that will be run when a user tries to access a certain URL. A controller can have different actions it can call. For example, if you want to define a &amp;lt;code&amp;gt;cars&amp;lt;/code&amp;gt; controller that has an &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; action, your &amp;lt;code&amp;gt;cars.py&amp;lt;/code&amp;gt; would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def all():&lt;br /&gt;
    grid=SQLFORM.grid(db.cars, user_signature=False)&lt;br /&gt;
    return locals()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== View ====&lt;br /&gt;
The final portion of the user request pipeline is the view. When the &amp;lt;code&amp;gt;all()&amp;lt;/code&amp;gt; function in &amp;lt;code&amp;gt;cars.py&amp;lt;/code&amp;gt; finishes running it calls a view to render the data. In our case, since our controller is &amp;lt;code&amp;gt;car&amp;lt;/code&amp;gt; and our action is &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;, the view file would be &amp;lt;code&amp;gt;cars/all.html&amp;lt;/code&amp;gt; and this is how it could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Car Make and Models&amp;lt;/h1&amp;gt;&lt;br /&gt;
{{=grid}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Portability ===&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
=== Components ===&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;/&amp;gt; Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
=== Django ===&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rails ===&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88511</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=88511"/>
		<updated>2014-09-25T23:47:27Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Narration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Some popular websites powered by web2py are&amp;lt;ref name=&amp;quot;web2PyPoweredWebsites&amp;quot;&amp;gt;[http://web2py.com/poweredby ], ''Sites Powered by Web2py''. Retrieved 25 September 2014.&amp;lt;/ref&amp;gt;: &lt;br /&gt;
* [http://eden.sahanafoundation.org SahanaEden]&lt;br /&gt;
* [https://chique.pt/?lang=en CHIQUE]&lt;br /&gt;
* [http://campus.tableless.com.br Campus]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
=== Model Example ===&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'person',&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('email'),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# ONE (person) TO MANY (products)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'product',&lt;br /&gt;
    Field('seller_id',db.person),&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('description', 'text'),&lt;br /&gt;
    Field('picture', 'upload', default=''),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# MANY (persons) TO MANY (purchases)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'purchase',&lt;br /&gt;
    Field('buyer_id', db.person),&lt;br /&gt;
    Field('product_id', db.product),&lt;br /&gt;
    Field('quantity', 'integer'),&lt;br /&gt;
    format = '%(quantity)s %(product_id)s -&amp;gt; %(buyer_id)s')&lt;br /&gt;
&lt;br /&gt;
purchased = (db.person.id==db.purchase.buyer_id)&amp;amp;(db.product.id==db.purchase.product_id)&lt;br /&gt;
&lt;br /&gt;
db.person.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.person.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'person.email')]&lt;br /&gt;
db.product.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From web2py's online reference &amp;lt;ref name=&amp;quot;web2pyExamples&amp;quot;&amp;gt;[http://www.web2py.com/init/default/examples#database_examples], &amp;quot;Web2py Quick Examples&amp;quot;, Retrieved 19 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Tables are created if they do not exist (try... except). Here &amp;quot;purchased&amp;quot; is an Query object, &amp;quot;db(purchased)&amp;quot; would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.&lt;br /&gt;
&lt;br /&gt;
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename). &lt;br /&gt;
&lt;br /&gt;
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table migrate=False.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wiki Creation Example ===&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authorization Example ===&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Architecture ==&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;/&amp;gt; Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
=== Django ===&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rails ===&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86885</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86885"/>
		<updated>2014-09-19T20:45:25Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
=== Model Example ===&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'person',&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('email'),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# ONE (person) TO MANY (products)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'product',&lt;br /&gt;
    Field('seller_id',db.person),&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('description', 'text'),&lt;br /&gt;
    Field('picture', 'upload', default=''),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# MANY (persons) TO MANY (purchases)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'purchase',&lt;br /&gt;
    Field('buyer_id', db.person),&lt;br /&gt;
    Field('product_id', db.product),&lt;br /&gt;
    Field('quantity', 'integer'),&lt;br /&gt;
    format = '%(quantity)s %(product_id)s -&amp;gt; %(buyer_id)s')&lt;br /&gt;
&lt;br /&gt;
purchased = (db.person.id==db.purchase.buyer_id)&amp;amp;(db.product.id==db.purchase.product_id)&lt;br /&gt;
&lt;br /&gt;
db.person.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.person.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'person.email')]&lt;br /&gt;
db.product.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From web2py's online reference &amp;lt;ref name=&amp;quot;web2pyExamples&amp;quot;&amp;gt;[http://www.web2py.com/init/default/examples#database_examples], &amp;quot;Web2py Quick Examples&amp;quot;, Retrieved 19 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Tables are created if they do not exist (try... except). Here &amp;quot;purchased&amp;quot; is an Query object, &amp;quot;db(purchased)&amp;quot; would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.&lt;br /&gt;
&lt;br /&gt;
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename). &lt;br /&gt;
&lt;br /&gt;
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table migrate=False.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Wiki Creation Example ===&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authorization Example ===&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86882</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86882"/>
		<updated>2014-09-19T20:44:00Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'person',&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('email'),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# ONE (person) TO MANY (products)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'product',&lt;br /&gt;
    Field('seller_id',db.person),&lt;br /&gt;
    Field('name'),&lt;br /&gt;
    Field('description', 'text'),&lt;br /&gt;
    Field('picture', 'upload', default=''),&lt;br /&gt;
    format = '%(name)s')&lt;br /&gt;
&lt;br /&gt;
# MANY (persons) TO MANY (purchases)&lt;br /&gt;
&lt;br /&gt;
db.define_table(&lt;br /&gt;
    'purchase',&lt;br /&gt;
    Field('buyer_id', db.person),&lt;br /&gt;
    Field('product_id', db.product),&lt;br /&gt;
    Field('quantity', 'integer'),&lt;br /&gt;
    format = '%(quantity)s %(product_id)s -&amp;gt; %(buyer_id)s')&lt;br /&gt;
&lt;br /&gt;
purchased = (db.person.id==db.purchase.buyer_id)&amp;amp;(db.product.id==db.purchase.product_id)&lt;br /&gt;
&lt;br /&gt;
db.person.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.person.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, 'person.email')]&lt;br /&gt;
db.product.name.requires = IS_NOT_EMPTY()&lt;br /&gt;
db.purchase.quantity.requires = IS_INT_IN_RANGE(0, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From web2py's online reference &amp;lt;ref name=&amp;quot;web2pyExamples&amp;quot;&amp;gt;[http://www.web2py.com/init/default/examples#database_examples], &amp;quot;Web2py Quick Examples&amp;quot;, Retrieved 19 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Tables are created if they do not exist (try... except). Here &amp;quot;purchased&amp;quot; is an Query object, &amp;quot;db(purchased)&amp;quot; would be a Set objects. A Set object can be selected, updated, deleted. Sets can also be intersected. Allowed field types are string, integer, password, text, blob, upload, date, time, datetime, references(*), and id(*). The id field is there by default and must not be declared. references are for one to many and many to many as in the example above. For strings you should specify a length or you get length=32.&lt;br /&gt;
&lt;br /&gt;
You can use db.tablename.fieldname.requires= to set restrictions on the field values. These restrictions are automatically converted into widgets when generating forms from the table with SQLFORM(db.tablename). &lt;br /&gt;
&lt;br /&gt;
define_tables creates the table and attempts a migration if table has changed or if database name has changed since last time. If you know you already have the table in the database and you do not want to attempt a migration add one last argument to define_table migrate=False.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86871</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86871"/>
		<updated>2014-09-19T20:38:43Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:8000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86870</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86870"/>
		<updated>2014-09-19T20:38:13Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2pySampleWorkflow.png|frame|Fig 1: Typical workflow in web2py ]]&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
After downloading web2py, starting the server, and navigating to http://localhost:3000 you will be greeted by web2py's default home page. An excellent feature of web2py, the admin interface (pictured below) can quickly be accessed by clicking, &amp;quot;administrative interface&amp;quot; from the default home page.&lt;br /&gt;
&lt;br /&gt;
[[File:Web2py_admin_interface.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 2: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Web2py_admin_interface.png&amp;diff=86865</id>
		<title>File:Web2py admin interface.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Web2py_admin_interface.png&amp;diff=86865"/>
		<updated>2014-09-19T20:35:52Z</updated>

		<summary type="html">&lt;p&gt;Djzager: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:En500.png&amp;diff=86860</id>
		<title>File:En500.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:En500.png&amp;diff=86860"/>
		<updated>2014-09-19T20:30:05Z</updated>

		<summary type="html">&lt;p&gt;Djzager: Welcome page for web2py&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome page for web2py&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86852</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86852"/>
		<updated>2014-09-19T20:22:13Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 1: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) Python]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Web_application_framework Web Application Framework]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Django_(web_framework) Django]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby-On-Rails]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database_abstraction_layer Database Abstraction Layer (DAL)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller Model-View-Controller (MVC)]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Database Database Management System (DBMS)]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86851</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86851"/>
		<updated>2014-09-19T20:18:25Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 1: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Python_(programming_language) | Python]&lt;br /&gt;
* Full-Stack Framework&lt;br /&gt;
* Django&lt;br /&gt;
* Ruby-On-Rails&lt;br /&gt;
* Database Abstraction Layer (DAL)&lt;br /&gt;
* Model-View-Controller (MVC)&lt;br /&gt;
* Database Management System (DBMS)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86850</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86850"/>
		<updated>2014-09-19T20:17:13Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png|frame|Fig 1: Overview of the architecture of web2py]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
*[[Wikipedia:Python|Python]]&lt;br /&gt;
* Full-Stack Framework&lt;br /&gt;
* Django&lt;br /&gt;
* Ruby-On-Rails&lt;br /&gt;
* Database Abstraction Layer (DAL)&lt;br /&gt;
* Model-View-Controller (MVC)&lt;br /&gt;
* Database Management System (DBMS)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86628</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86628"/>
		<updated>2014-09-18T18:19:30Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* Python&lt;br /&gt;
* Full-Stack Framework&lt;br /&gt;
* Django&lt;br /&gt;
* Ruby-On-Rails&lt;br /&gt;
* Database Abstraction Layer (DAL)&lt;br /&gt;
* Model-View-Controller (MVC)&lt;br /&gt;
* Database Management System (DBMS)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86627</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86627"/>
		<updated>2014-09-18T18:18:55Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* python&lt;br /&gt;
* full-stack framework&lt;br /&gt;
* django&lt;br /&gt;
* ruby-on-rails&lt;br /&gt;
* database abstraction layer (DAL)&lt;br /&gt;
* Model-View-Controller (MVC)&lt;br /&gt;
* Database Management System (DBMS)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86626</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86626"/>
		<updated>2014-09-18T18:18:39Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Hyperlinks to important terms */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot;&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”. &amp;lt;ref name=&amp;quot;web2PyOnlineBook&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot;&amp;gt;[http://www.web2py.com/init/default/what], &amp;quot;What is web2py?&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt;. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. &amp;lt;ref name=&amp;quot;aboutWeb2Py&amp;quot; /&amp;gt; This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: right;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Web2PyArchSlide.png]]&amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot;&amp;gt;[https://dl.dropboxusercontent.com/u/18065445/Slides/PySFTalkSlides.pdf], &amp;quot;web2py, ideas we stole - ideas we had&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
According to the slide seen on the right, web2Py is split into a few major components. &amp;lt;ref name=&amp;quot;web2PyArchSlide&amp;quot; /&amp;gt;The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.&lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). Web2py has a few unique features that it’s competitors don’t have. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via a admin web interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package and download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to properly adopt the Web 2.0 paradigm. It is also very lightweight compared to most other web frameworks that have similar feature lists. &lt;br /&gt;
&lt;br /&gt;
==== Django ====&lt;br /&gt;
	Django and web2py have a lot of things in common. Firstly, they are both Python web MVC frameworks, which means the basic flow of control is the same. A user request gets routed to the controller, which will consult the model(s) and generate some kind of output. Django is the more popular framework out of the two. A few popular sites built using Django are Mozilla, Pinterest and Instagram. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot;&amp;gt;[http://news.dice.com/2014/05/28/three-popular-python-frameworks/], &amp;quot;Comparing Django, TurboGears2 and Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; However, Web2py supports a more variety of database engines than Django does and is a lot more lightweight to install and run. &amp;lt;ref name=&amp;quot;djangoWeb2PyCompare&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Rails ====&lt;br /&gt;
	Rails and web2py both follow the MVC architectural pattern. However, Rails applications are written in Ruby and web2py applications are written in Python. One of the main advantages of web2py vs Rails is the installation process. To install Rails, you have to install Ruby, gems and other database and database plugins; installation of web2py is as easy and installing Python and unzipping a zip file. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot;&amp;gt;[http://www.slideshare.net/jonromero/rails-vs-web2py], &amp;quot;Rails vs Web2py&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Other things such as user/role support, uploading files are supported by web2py but plugins are needed for them for Rails. &amp;lt;ref name=&amp;quot;railsVsWeb2Py&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
* python&lt;br /&gt;
* full-stack framework&lt;br /&gt;
* django&lt;br /&gt;
* ruby-on-rails&lt;br /&gt;
* database abstraction layer (DAL)&lt;br /&gt;
* Model-View-Controller&lt;br /&gt;
* Database Management System (DBMS)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86487</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86487"/>
		<updated>2014-09-18T04:49:16Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.”&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web2py ], ''Web2py''. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&amp;lt;ref&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&amp;lt;ref&amp;gt;[http://www.web2py.com/books/default/chapter/29/01/introduction],&amp;quot;Web2py Online Book&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification.&amp;lt;ref&amp;gt;[http://en.wikipedia.org/wiki/Web_2.0], &amp;quot;Web 2.0&amp;quot;. Retrieved 18 September 2014.&amp;lt;/ref&amp;gt; Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture [x]. In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. [x]. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. [x] This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
Web2Py is split into a few major components. The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.  &lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). &lt;br /&gt;
&lt;br /&gt;
However, unlike Django and Rails, Web2py is a lot more lightweight. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via an admin interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package the download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to adopt the Web 2.0 paradigm. [x] &lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86485</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86485"/>
		<updated>2014-09-18T04:45:24Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.” Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification. Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture [x]. In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. [x]. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. [x] This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
Web2Py is split into a few major components. The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.  &lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). &lt;br /&gt;
&lt;br /&gt;
However, unlike Django and Rails, Web2py is a lot more lightweight. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via an admin interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package the download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to adopt the Web 2.0 paradigm. [x] &lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86482</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86482"/>
		<updated>2014-09-18T04:42:28Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.” Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification. Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture [x]. In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. [x]. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. [x] This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
Web2Py is split into a few major components. The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.  &lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). &lt;br /&gt;
&lt;br /&gt;
However, unlike Django and Rails, Web2py is a lot more lightweight. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via an admin interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package the download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to adopt the Web 2.0 paradigm. [x] &lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
# http://www.web2py.com/init/default/what&lt;br /&gt;
# http://en.wikipedia.org/wiki/Web2py &lt;br /&gt;
# http://www.web2py.com/books/default/chapter/29/01/introduction&lt;br /&gt;
# https://www.digitalocean.com/community/tutorials/how-to-use-the-web2py-framework-to-quickly-build-your-python-app&lt;br /&gt;
# http://www.web2py.com/init/default/examples#database_examples&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86479</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86479"/>
		<updated>2014-09-18T04:41:13Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.” Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification. Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
   def f(): ....&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture [x]. In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. [x]. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. [x] This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
Web2Py is split into a few major components. The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.  &lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). &lt;br /&gt;
&lt;br /&gt;
However, unlike Django and Rails, Web2py is a lot more lightweight. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via an admin interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package the download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to adopt the Web 2.0 paradigm. [x] &lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86477</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86477"/>
		<updated>2014-09-18T04:39:30Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.” Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification. Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Through the use of a DAL, web2py provides for simple ways to create database tables for web applications. In this example, a database table called person is created with two fields. What is powerful is that if the table already exists and does not match this definition, it is updated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
db.define_table('person', Field('name'), Field('image', 'upload'))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following example code embeds a fully working wiki.&lt;br /&gt;
def index(): return auth.wiki()&lt;br /&gt;
The following example prevents a visitor from accessing a function unless the member has read permissions.&lt;br /&gt;
@auth.requires_permission('read','person')&lt;br /&gt;
def f(): ....&lt;br /&gt;
&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
Like most popular web frameworks, web2py uses a Model View Controller (MVC) architecture [x]. In an MVC architecture the user’s request goes through the controller, which requests information from the model (usually some type of database) and then passes it along to the view for renderer. This type of architecture separates the data, logic and the user interfaces into separate components, making them more modular and maintainable. &lt;br /&gt;
&lt;br /&gt;
The framework itself is very portable. It can run on any operating system that supports Python which means it will work on most cloud services like Amazon EC2 and Google App Engine. It also supports numerous databases including SQLite, MySQL, MSSQL, MariaDB, Oracle etc.. [x]. Not only that, it can speak multiple protocols like REST, XML/HTML, and JSON among others. [x] This is a great example of web2py’s MVC architecture coming into play. The database (model) or the protocol (view) can be switched around with very little work. &lt;br /&gt;
Web2Py is split into a few major components. The lowest component in the python interpreter. Right above that there is a web server to serve web pages. By default, web2py comes with rocket, but it can be switched for third party web server like Apache or nginx. Running on top of that are the web2py core libraries. This contains the code that handles HTTP requests, responses, cookies, the database APIs (ORM), templating engine and other helpers. Finally, on top of that is where all the applications the developer writes will go. By default, web2py comes with a few example and admin applications, but they can be removed and new ones can be added either through the admin GUI or through the actual codebase itself.  &lt;br /&gt;
&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
Web2py most often gets associated with Django, another Python web framework, and Rails, a web framework based on Ruby. Web2py is heavily inspired by both of those frameworks. [x] Like Rails and Django, web2py also follows a MVC architecture, has a templating engine and an ORM (Object Relational Mapper). &lt;br /&gt;
&lt;br /&gt;
However, unlike Django and Rails, Web2py is a lot more lightweight. One of the most appealing features of web2py is that web2py “applications” can be created and imported into the server via an admin interface. [x] Unlike Rails and Django, you do not have to open up a text editor and create models by hand, you can do it using a graphical interface. You can also package the download applications from the server so you can import it elsewhere. Web2py is also one of the few frameworks to adopt the Web 2.0 paradigm. [x] &lt;br /&gt;
&lt;br /&gt;
In summary, web2py has a lot of things common with other framework like Rails and Django. The syntax for the ORM and the templating might be different between the different frameworks, but they all use the MVC framework and have the same underlying concept. Where web2py really beats the other frameworks is it’s size; it’s very lightweight, but still contains all the features the other ORMs have!&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86457</id>
		<title>CSC/ECE 517 Fall 2014/ch1a 7 kz</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2014/ch1a_7_kz&amp;diff=86457"/>
		<updated>2014-09-18T04:24:44Z</updated>

		<summary type="html">&lt;p&gt;Djzager: /* Background */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Background ==&lt;br /&gt;
“Web2py is an open source web application framework written in the Python programming language.” Web2py originally started as an educational tool when, in October 2007, Massimo Di Pierro developed web2py as a way to introduce his students to web programming. From this, it quickly grew through user adoption to become a strong competitor to Django, another python based web framework. Web2py is described as a “full-stack framework” which means that everything to necessary to build a functioning web application is contained in the framework.&lt;br /&gt;
&lt;br /&gt;
=== Key Features ===&lt;br /&gt;
&lt;br /&gt;
==== Security ====&lt;br /&gt;
Web2py addresses many issues related to security vulnerabilities. &lt;br /&gt;
# Validates all input to prevent database injections&lt;br /&gt;
# Escapes all output to prevent cross-site scripting&lt;br /&gt;
# Renames uploaded files to prevent directory traversal attacks&lt;br /&gt;
By following established web security practices, web2py helps prevent some of the most popular security attack, “so developers have less chances of introducing vulnerabilities”.&lt;br /&gt;
&lt;br /&gt;
==== Database Abstraction Layer ====&lt;br /&gt;
Web2py includes, by default, a Database Abstraction Layer (DAL) that is capable of dynamically writing SQL for the most popular database management systems (DBMS) including, among others: &lt;br /&gt;
# SQLite&lt;br /&gt;
# MySqL&lt;br /&gt;
# Oracle&lt;br /&gt;
&lt;br /&gt;
==== Web 2.0 ====&lt;br /&gt;
According to web2py’s own documentation, it is the only web framework to fully embrace the Web 2.0 paradigm. Web 2.0 describes changes to the way that web pages are created and used rather than an update to any technical specification. Web2py accomplishes this by not requiring any installation or configuration and running on any architecture that can run python.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
== Narration ==&lt;br /&gt;
=== Architecture ===&lt;br /&gt;
=== Comparison ===&lt;br /&gt;
&lt;br /&gt;
== Hyperlinks to important terms ==&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Djzager</name></author>
	</entry>
</feed>