Comparing Dynamic and Static Language Approaches to Web Frameworks
|
|
|
- Alexina Cunningham
- 10 years ago
- Views:
Transcription
1 Comparing Dynamic and Static Language Approaches to Web Frameworks Neil Brown School of Computing University of Kent UK 30 April 2012
2 Comparing Dynamic and Static Language Approaches to Web Frameworks Comparing Dynamic and Static Language Approaches to Web Frameworks Neil Brown School of Computing University of Kent UK 30 April 2012 Slides with blue headers are original slides, these grey pages are notes pages. I should point that out that my opinion in this talk is biased: I ve been using Rails for a few years, and suffering with maintaining our Rails sites. I believe in static typing, powerful compilers, and making as many errors as possible into compile-time errors (hence I like Haskell). So I was interested to try Yesod and see how far it was able to use these static features, compared to Rails, for the same end result. That led to this talk. I m partly comparing Yesod to Rails, but I m more interested in comparing the use of Haskell s static approach (and Template Haskell meta-programming) to Ruby s dynamic approach, and Yesod and Rails provide good exemplars for this.
3 Web Frameworks Web Frameworks
4 Comparing Dynamic and Static Language Approaches to Web Frameworks Web Frameworks Web Frameworks Web Frameworks Many websites are ultimately ways to read and write to a database. Web frameworks offer support for common website designs (as in structure/software, not visuals) They are vaguely MVC, with: models stored in database, read by views, written to by forms, with all the wiring to URLs accomplished by routing.
5 Web Frameworks Web Frameworks
6 Web Frameworks: Yesod vs Rails Web Frameworks Yesod (Haskell) I m using 1.0 (most recent) Ruby on Rails (Ruby) I m using 2.3 (not most recent)
7 Comparing Dynamic and Static Language Approaches to Web Frameworks Web Frameworks Web Frameworks: Yesod vs Rails Web Frameworks: Yesod vs Rails Yesod (Haskell) Ruby on Rails (Ruby) I m using 1.0 (most recent) I m using 2.3 (not most recent) Ruby is an OOP language with dynamic typing (lots of duck typing). Haskell is a functional language with static typing. Rails uses a lot of dynamic features, Yesod uses a lot of static features, so they are at opposite ends of the scale, yet accomplishing almost exactly the same thing. I gather Rails 3.0 has many changes over 2.3, but we have not yet migrated our sites. I don t think many changes alter this presentation much.
8 Web Frameworks Software Engineering Challenges To make life easier, need lots of boilerplate helper functions, e.g. username_for_id(int user_id), show_user_url(int user_id) Formulaic, yet specific to each project Best to auto-generate using meta-programming...
9 Comparing Dynamic and Static Language Approaches to Web Frameworks Web Frameworks Software Engineering Challenges Software Engineering Challenges To make life easier, need lots of boilerplate helper functions, e.g. username_for_id(int user_id), show_user_url(int user_id) Formulaic, yet specific to each project Best to auto-generate using meta-programming... The following examples of meta-programming in Ruby and Haskell are not what you would see when you use Rails or Yesod, but I wanted to give a quick idea of the key points of what is happening underneath.
10 Low-Level Metaprogramming: Ruby Web Frameworks Add new methods at run-time using blocks, something like: class Example def add_method self. class.send(:define_method, :get_const) do return 6 end end end Body is a standard block of code (like closure), added at run-time.
11 Comparing Dynamic and Static Language Approaches to Web Frameworks Web Frameworks Low-Level Metaprogramming: Ruby Low-Level Metaprogramming: Ruby Add new methods at run-time using blocks, something like: class Example def add_method self.class.send(:define_method, :get_const) do return 6 end end end Body is a standard block of code (like closure), added at run-time. The :blah syntax is a symbol, which is like an interned string. The method is added to the Example class at run-time, when you execute add method This dynamic method addition is precisely what makes so many errors run-time errors in Ruby: you can t tell if you re calling a non-existent method at compile -time, because that method might get added later on. It also complicates code completion and so on.
12 Web Frameworks Low-Level Metaprogramming: Haskell Add source code at compile-time, using Template Haskell functions that return Haskell AST: $(return <$> fund (mkname "getconst") [return $ Clause [] (NormalB $ LitE $ IntegerL 6) []]) Normally use higher-level functions! Run during compilation, then outputted AST is compiled.
13 Comparing Dynamic and Static Language Approaches to Web Frameworks Web Frameworks Low-Level Metaprogramming: Haskell Low-Level Metaprogramming: Haskell Add source code at compile-time, using Template Haskell functions that return Haskell AST: $(return <$> fund (mkname "getconst") [return $ Clause [] (NormalB $ LitE $ IntegerL 6) []]) Normally use higher-level functions! Run during compilation, then outputted AST is compiled. As a Yesod user, you never see any of this! But the point is, the metaprogramming generates a piece of abstract syntax tree (AST) which is then compiled. So the Haskell compiler effectively has several phases: 1. Run any Template Haskell code, between $(blah) (or the quasi-quote notation, which I don t happen to use in this presentation) 2. This Template Haskell produces Haskell AST as its output, which is spliced into that location in the file, as if it had always been there. 3. Compile the complete source file). You can think of Template Haskell as a preprocessor, like the C preprocessor, but it uses full Haskell as its language, produces AST instead of text, and I believe has access to information from the compiler.
14 Web Frameworks Models
15 Models Models A model is an entity like user, blog post, comment, etc. Both frameworks offer persistence for models.
16 Models Models A model is an entity like user, blog post, comment, etc. Both frameworks offer persistence for models. The model persistence usually uses an RDBMS. However, the models are not a relational database.
17 Rails Models
18 Models in Rails Models create_table : blog_posts do t t. text : title t. text :content t. integer :author_id end create_table :authors do t t. string :name end
19 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Models in Rails Models in Rails create_table :blog_posts do t t.text : title t. text :content t. integer :author_id end create_table :authors do t t. string :name end This is part of a migration, rather than a model definition as such, but this is how you define new models in Rails. I ve chosen not to cover migrations in this talk, because they are not that interesting in terms of the dynamic/static language divide.
20 Models in Rails Models class Author < ActiveRecord::Base validates_uniqueness_of :name has_many :blog_posts # implicit public field : name, blog_posts # inherited methods: new, create, save end class BlogPost < ActiveRecord::Base belongs_to :author # implicit public fields : author, title, content # inherited methods: new, create, save end
21 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Models in Rails Models in Rails class Author < ActiveRecord::Base validates_uniqueness_of :name has_many :blog_posts # implicit public field : name, blog_posts # inherited methods: new, create, save end class BlogPost < ActiveRecord::Base belongs_to :author # implicit public fields : author, title, content # inherited methods: new, create, save end The fields that the migration added are then inserted (somehow!) into the classes by Rails. The save (etc) methods store these fields of the model into the database and handle the associations (links to other models) automatically. Note that the classes and migrations and tables in the RDBMS and matched by name: the class Author is stored in the table authors, and BlogPost in blog posts, with Rails handling the conversion from camel-case to underscore. Also, the blog post to author link automatically picks up author id as the reference.
22 Yesod Models
23 Models in Yesod Models The models are written in their own file: Author name Text UniqueAuthor name BlogPost author AuthorId title Text content Text
24 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Models in Yesod Models in Yesod The models are written in their own file: Author name Text UniqueAuthor name BlogPost author AuthorId title Text content Text This model file (much like the routes file later on) is not Haskell code (whereas Rails migrations are Ruby code), but instead is a simple Domain-Specific Language (DSL) for expressing models. This DSL is parsed by some Template Haskell, and turned into code for the data types, and for handling the persistence.
25 Models in Yesod Models Generated code from the models file: data Author = Author {authorname :: Text, authorpassword :: Maybe Text} type AuthorId = Key Author data BlogPost = BlogPost {blogpostauthor :: AuthorId, blogposttitle :: Text, blogpostcontent :: Text} type BlogPostId = Key BlogPost
26 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Models in Yesod Models in Yesod Generated code from the models file: data Author = Author {authorname :: Text, authorpassword :: Maybe Text} type AuthorId = Key Author data BlogPost = BlogPost {blogpostauthor :: AuthorId, blogposttitle :: Text, blogpostcontent :: Text} type BlogPostId = Key BlogPost I ve simplified the types slightly, because the generated types (and keys) are also parameterised by the persistence backend. However, that s a bit too much detail for this talk, and the extra type parameter doesn t alter much during your use of Yesod.
27 Fetching Model in Rails Models blog_post = BlogPost.find_by_id(blog_post_id) author = blog_post.author Implicit database access (and association load)
28 Fetching Model in Yesod Models rundb $ do blogpost <- get blogpostid author <- get (blogpostauthor blogpost) Explicit database access (and association load)
29 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Fetching Model in Yesod Fetching Model in Yesod rundb $ do blogpost <- get blogpostid author <- get (blogpostauthor blogpost) Explicit database access (and association load) Having the database transaction in its own monad makes it a bit clearer what will happen on rollback (because there can t have been any IO side-effects).
30 Models Fetching Model in Yesod rundb $ do blogpost <- get blogpostid author <- get (blogpostauthor blogpost) Explicit database access (and association load) Polymorphic get!
31 Models Models DB access more explicit (and more fiddly) in Yesod Wrong field error: Rails run-time, Yesod compile-time Each ID has distinct type in Yesod: avoids errors, allows conciseness
32 Association Helper Function Models Type-safe, no reflection: getand :: Key a -> (a -> Key b) -> DB (a, b) getand parentkey subkeyfunc = do parent <- get parentkey sub <- get (subkeyfunc parent) return (parent, sub) getand blogpostid blogpostauthor
33 Comparing Dynamic and Static Language Approaches to Web Frameworks Models Association Helper Function Association Helper Function Type-safe, no reflection: getand :: Key a -> (a -> Key b) -> DB (a, b) getand parentkey subkeyfunc = do parent <- get parentkey sub <- get (subkeyfunc parent) return (parent, sub) getand blogpostid blogpostauthor This is an example of defining a function that works for any persistent type, without using reflection, etc. This means that you can write functions that are closer to Rails association loading, if you want.
34 Web Frameworks Routing
35 Routing Routing Routing is about mapping URLs to actions, and actions to URLs For example:
36 Routing Routing Routing is about mapping URLs to actions, and actions to URLs For example: displays blog post with ID=1
37 Routing Routing Routing is about mapping URLs to actions, and actions to URLs For example: displays blog post with ID=1 blog_post(1) helper function returns
38 Rails Routing
39 Routing in Rails Routing map.resources :blog_posts roughly short for: map.resources :blog_posts, :member => {:show => :get, :edit => :get, :update => :put}, : collection => {:index => :get, :new => :get, :create => :post}
40 Comparing Dynamic and Static Language Approaches to Web Frameworks Routing Routing in Rails Routing in Rails map.resources :blog_posts roughly short for: map.resources :blog_posts, :member => {:show => :get, :edit => :get, :update => :put}, : collection => {:index => :get, :new => :get, :create => :post} The second code portion is not identical to the first, but it s the same idea. The table is the actual output of the first code.
41 Routing in Rails Routing map.resources :blog_posts roughly short for: map.resources :blog_posts, :member => {:show => :get, :edit => :get, :update => :put}, : collection => {:index => :get, :new => :get, :create => :post} sets up: Helper Stem Method URL Handler blog posts GET /blog posts(.:format) :controller=>"blog posts", :action=>"index" POST /blog posts(.:format) :controller=>"blog posts", :action=>"create" new blog post GET /blog posts/new(.:format) :controller=>"blog posts", :action=>"new" edit blog post GET /blog posts/:id/edit(.:format) :controller=>"blog posts", :action=>"edit" blog post GET /blog posts/:id(.:format) :controller=>"blog posts", :action=>"show" PUT /blog posts/:id(.:format) :controller=>"blog posts", :action=>"update"
42 Yesod Routing
43 Routing in Yesod Routing / BlogIndexR GET /new blog post NewBlogPostR GET POST /blog posts/#blogpostid BlogPostR GET /blog posts/#blogpostid/edit EditBlogPostR GET POST
44 Routing in Yesod Routing / BlogIndexR GET /new blog post NewBlogPostR GET POST /blog posts/#blogpostid BlogPostR GET /blog posts/#blogpostid/edit EditBlogPostR GET POST generates: data Route =... Handler BlogIndexR getblogindexr NewBlogPostR getnewblogpostr, postnewblogpostr BlogPostR BlogPostId getblogpostr, postblogpostr EditBlogPostR BlogPostId geteditblogpostr
45 Comparing Dynamic and Static Language Approaches to Web Frameworks Routing Routing in Yesod Routing in Yesod / BlogIndexR GET /new blog post NewBlogPostR GET POST /blog posts/#blogpostid BlogPostR GET /blog posts/#blogpostid/edit EditBlogPostR GET POST generates: data Route =... Handler BlogIndexR getblogindexr NewBlogPostR getnewblogpostr, postnewblogpostr BlogPostR BlogPostId getblogpostr, postblogpostr EditBlogPostR BlogPostId geteditblogpostr The Yesod routes don t quite have identical URLs to the Rails ones, but they are accomplishing the same idea. Also, the Route type is actually an associated data type of the class instance, but that doesn t really change things.
46 Routing Routing Both similar, using DSL to generate routing table and helpers Missing handler error: Rails run-time, Yesod compile-time
47 Web Frameworks Views
48 Views Views View: code that dynamically generates the actual HTML. Mix of text, HTML markup, and dynamic content, e.g. <p>this page has been viewed <b><% page_count() %></b> times</p>
49 Rails Views
50 Views in Rails: Showing a Blog Post Views Controller sets up variables ready for view: class BlogPostsController < ApplicationController def = BlogPost.find(params[:id]) end end
51 Views in Rails: Showing a Blog Post Views View has interspersed Ruby code: <p> <b>author:</b> %> </p> <p> <b>content:</b> %> </p> <%= link_to Edit, edit_blog_post_path(@blog_post) %> <%= link_to Index, root_path %>
52 Comparing Dynamic and Static Language Approaches to Web Frameworks Views Views in Rails: Showing a Blog Post Views in Rails: Showing a Blog Post View has interspersed Ruby code: <p> <b>author:</b> %> </p> <p> <b>content:</b> %> </p> <%= link_to Edit, edit_blog_post_path(@blog_post) %> <%= link_to Index, root_path %> The Rails view is loaded in, substituted and compiled at run-time.
53 Yesod Views
54 Views in Yesod: Showing a Blog Post Views Handler sets up variables ready for view: getblogpostr :: BlogPostId -> Handler RepHtml getblogpostr blogpostid = do (blogpost, author) <- rundb $ do blogpost <- get404 blogpostid author <- get404 (blogpostauthor blogpost) return (blogpost, author) defaultlayout $(widgetfile "blog_post_view") The last line loads and compiles the view.
55 Comparing Dynamic and Static Language Approaches to Web Frameworks Views Views in Yesod: Showing a Blog Post Views in Yesod: Showing a Blog Post Handler sets up variables ready for view: getblogpostr :: BlogPostId -> Handler RepHtml getblogpostr blogpostid = do (blogpost, author) <- rundb $ do blogpost <- get404 blogpostid author <- get404 (blogpostauthor blogpost) return (blogpost, author) defaultlayout $(widgetfile "blog_post_view") The last line loads and compiles the view. The get404 function is one that fails (and exits the handler, rendering a 404 page) if the database item is not found. The last line is a Template Haskell call which renders the view from the blog post view file (i.e. the file is explicitly named, rather than implicitly named by the controller action, as in Rails). The Template Haskell call reads in the file at compile-time, generates Haskell code based on the file, and then compiles that. So the template is completely compiled into code, and thus the splicing process is potentially optimised.
56 Views in Yesod: Showing a Blog Post Views View is Hamlet (indentation-based HTML), with interspersed Haskell code: <p> <b>author: #{authorname author} <p> <b>title: #{blogposttitle blogpost} <p> <b>content: #{blogpostcontent blogpost} <a href=@{editblogpostr blogpostid}>edit <a href=@{blogindexr}>index
57 Comparing Dynamic and Static Language Approaches to Web Frameworks Views Views in Yesod: Showing a Blog Post Views in Yesod: Showing a Blog Post View is Hamlet (indentation-based HTML), with interspersed Haskell code: <p> <b>author: #{authorname author} <p> <b>title: #{blogposttitle blogpost} <p> <b>content: #{blogpostcontent blogpost} <a href=@{editblogpostr blogpostid}>edit <a href=@{blogindexr}>index Hamlet is like HTML, but has no closing tags, and uses indentation to indent tag-scoping. The #{blah} markup encloses Haskell code that returns text (which is then HTML escaped). markup encloses a Haskell expression of Route type, and generates the URL for that item.
58 Views Views Hamlet is odd choice (and not necessary) Bad code in view error: Rails run-time, Yesod compile-time Haskell s field names are annoying (blogposttitle vs title)
59 Comparing Dynamic and Static Language Approaches to Web Frameworks Views Views Views Hamlet is odd choice (and not necessary) Bad code in view error: Rails run-time, Yesod compile-time Haskell s field names are annoying (blogposttitle vs title) Haskell s field names (you must have unique field names across the program, not just unique per class like in OOP languages) are caused by the type inference in the language. It s a hot topic right now, with several proposals on how to fix it, but it does get irritating in applications like this.
60 Web Frameworks Forms
61 Forms Forms HTML forms are needed to enter data
62 Rails Forms
63 Forms in Rails Forms Controller sets up variables for view: class BlogPostsController < ApplicationController def = BlogPost.find(params[:id]) end end
64 Forms in Rails: Editing a Blog Post Forms Form is a view with form-related code/idiom: <% form_for(@blog_post) do f %> <p> <%= f.label : title %><br /> <%= f.text_area : title %> </p> <p> <%= f.label :content %><br /> <%= f.text_area :content %> </p> <%= f.submit Update %> <% end %>
65 Forms in Rails: Editing a Blog Post Forms Submitted form comes back to controller: class BlogPostsController < ApplicationController def = BlogPost.find(params[:id]) redirect_to (@blog_post) else render :action => "edit " end end end
66 Yesod Forms
67 Forms in Yesod: Editing a Blog Post Forms Handler gets variables and creates form, which is passed to view: geteditblogpostr :: BlogPostId -> Handler RepHtml geteditblogpostr blogpostid = do blogpost <- rundb (get404 blogpostid) ( result, bpform) <- fst <$> runformpost (renderdivs (blogpostform blogpost)) case... of _ -> defaultlayout $(widgetfile "blog_post_edit")
68 Forms in Yesod: Editing a Blog Post Forms Form is generated from code: blogpostform :: BlogPost -> AForm App App BlogPost blogpostform blogpost = BlogPost (blogpostauthor blogpost) <$> areq textfield " Title " ( blogposttitle blogpost) < > areq textfield "Content" (blogpostcontent blogpost) Then spliced into view: <form method=post action=@{editblogpostr blogpostid}> ^{bpform} <input type=submit>
69 Comparing Dynamic and Static Language Approaches to Web Frameworks Forms Forms in Yesod: Editing a Blog Post Forms in Yesod: Editing a Blog Post Form is generated from code: blogpostform :: BlogPost -> AForm App App BlogPost blogpostform blogpost = BlogPost (blogpostauthor blogpost) <$> areq textfield " Title " (blogposttitle blogpost) < > areq textfield "Content" (blogpostcontent blogpost) Then spliced into view: <form method=post action=@{editblogpostr blogpostid}> ^{bpform} <input type=submit> The splice syntax shown here, ˆ {blah}, splices in HTML content, which is not escaped.
70 Forms in Yesod: Editing a Blog Post Forms Submitted form comes back to handler: posteditblogpostr :: BlogPostId -> Handler RepHtml posteditblogpostr = geteditblogpostr
71 Forms in Yesod: Editing a Blog Post Forms Submitted form comes back to handler: geteditblogpostr :: BlogPostId -> Handler RepHtml geteditblogpostr blogpostid = do blogpost <- rundb (get404 blogpostid) ( result, bpform) <- fst <$> runformpost (renderdivs (blogpostform blogpost)) case result of FormSuccess blogpost -> do rundb (replace blogpostid blogpost ) redirect (BlogPostR blogpostid) _ -> defaultlayout $(widgetfile "blog_post_edit")
72 Comparing Dynamic and Static Language Approaches to Web Frameworks Forms Forms in Yesod: Editing a Blog Post Forms in Yesod: Editing a Blog Post Submitted form comes back to handler: geteditblogpostr :: BlogPostId -> Handler RepHtml geteditblogpostr blogpostid = do blogpost <- rundb (get404 blogpostid) ( result, bpform) <- fst <$> runformpost (renderdivs (blogpostform blogpost)) case result of FormSuccess blogpost -> do rundb (replace blogpostid blogpost ) redirect (BlogPostR blogpostid) _ -> defaultlayout $(widgetfile "blog_post_edit") The runformpost function both creates the form, and attempts to parse the results of the form, which are stored in the environment (technically: in the state monad part of the Handler monad stack). Thus you can act on form success during the POST submit action, or just show the view during the original GET action. On the one hand, it makes sense for the GET and POST handler to be the same because they tend to share a lot of code (one builds the form from content, the other tears the form apart to get similar content back), but it is a little bit subtle that runformpost has these two different functionalities.
73 Forms Forms Single-handler is neat trick in Yesod, but overall Yesod generally takes more code to do forms Bad form field error: Rails run-time, Yesod compile-time
74 Final Notes Errors Yesod has compile-time errors where Rails has run-time errors How likely are mis-spelt names, etc? Flipping Rails plurals! Use of strong typing (in Yesod or Rails) confers other benefits, e.g. protection from XSS through data-tagging.
75 Comparing Dynamic and Static Language Approaches to Web Frameworks Final Notes Errors Errors Yesod has compile-time errors where Rails has run-time errors How likely are mis-spelt names, etc? Flipping Rails plurals! Use of strong typing (in Yesod or Rails) confers other benefits, e.g. protection from XSS through data-tagging. Yesod has a different type for plain text and HTML data. The #{blah} splice takes plain text, and escapes it, whereas the ˆ {blah} splice takes HTML and does not escape it. Conversion between the types must be done explicitly (typically with pre-supplied functions). I gather Rails 3.0 has similar protection, but done dynamically.
76 Final Notes Development Want fast edit-test cycle in dev mode: Rails: reload source files before handling each request Yesod: watchdog recompiles after every change
77 Final Notes Overall Summary You can accomplish very similar results with static and dynamic approaches Metaprogramming and DSLs have lots of practical applications in web frameworks Lots of interesting uses of Haskell s type system in Yesod Rails: easy start, high maintenance 1 Yesod: tougher (even taking Haskell into account), lower maintenance (e.g. easier to refactor) 2 1 Speaking from experience! 2 Educated guess!
Project Group Applied Functional Programming
Project Group Applied Functional Programming Web Development with Haskell Meike Grewing, Lukas Heidemann, Fabian Thorand and Fabian Zaiser Informatik, Universität Bonn, Germany Abstract The goal of the
Rails 4 Quickly. Bala Paranj. www.rubyplus.com
Rails 4 Quickly Bala Paranj 1 About the Author Bala Paranj has a Master s degree in Electrical Engineering from The Wichita State University. He has over 15 years of experience in the software industry.
Advanced Tornado TWENTYONE. 21.1 Advanced Tornado. 21.2 Accessing MySQL from Python LAB
21.1 Advanced Tornado Advanced Tornado One of the main reasons we might want to use a web framework like Tornado is that they hide a lot of the boilerplate stuff that we don t really care about, like escaping
YouTrack MPS case study
YouTrack MPS case study A case study of JetBrains YouTrack use of MPS Valeria Adrianova, Maxim Mazin, Václav Pech What is YouTrack YouTrack is an innovative, web-based, keyboard-centric issue and project
Deep in the CRUD LEVEL 1
Deep in the CRUD LEVEL 1 Prerequisites: TryRuby.org TwitteR for ZOMBIES {tweets Columns (we have 3) DB TABLE Rows { (we have 4) id status zombie Zombie Challenge #1 Retrieve the Tweet object with id =
Evaluation. Chapter 1: An Overview Of Ruby Rails. Copy. 6) Static Pages Within a Rails Application... 1-10
Chapter 1: An Overview Of Ruby Rails 1) What is Ruby on Rails?... 1-2 2) Overview of Rails Components... 1-3 3) Installing Rails... 1-5 4) A Simple Rails Application... 1-6 5) Starting the Rails Server...
Building Dynamic Web 2.0 Websites with Ruby on Rails
Building Dynamic Web 2.0 Websites with Ruby on Rails Create database-driven dynamic websites with this open-source web application framework A.P. Rajshekhar Chapter 5 "Gathering User Comments" In this
Progressive Enhancement With GQuery and GWT. Ray Cromwell [email protected]
Progressive Enhancement With GQuery and GWT Ray Cromwell [email protected] Web Application Models Web 1.0, 1 Interaction = 1 Page Refresh Pure JS, No Navigation Away from Page Mixed Model, Page Reloads
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections
Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.
Web Frameworks web development done right Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.ssa Anna Corazza Outline 2 Web technologies evolution Web frameworks Design Principles
So you want to create an Email a Friend action
So you want to create an Email a Friend action This help file will take you through all the steps on how to create a simple and effective email a friend action. It doesn t cover the advanced features;
The Django web development framework for the Python-aware
The Django web development framework for the Python-aware Bill Freeman PySIG NH September 23, 2010 Bill Freeman (PySIG NH) Introduction to Django September 23, 2010 1 / 18 Introduction Django is a web
UNIVERSITY OF MALTA THE MATRICULATION CERTIFICATE EXAMINATION ADVANCED LEVEL COMPUTING. May 2011
UNIVERSITY OF MALTA THE MATRICULATION CERTIFICATE EXAMINATION ADVANCED LEVEL COMPUTING May 2011 EXAMINERS REPORT MATRICULATION AND SECONDARY EDUCATION CERTIFICATE EXAMINATIONS BOARD AM Computing May 2011
CS169.1x Lecture 5: SaaS Architecture and Introduction to Rails " Fall 2012"
CS169.1x Lecture 5: SaaS Architecture and Introduction to Rails " Fall 2012" 1" Web at 100,000 feet" The web is a client/server architecture" It is fundamentally request/reply oriented" Web browser Internet
Gluing things together with Haskell. Neil Mitchell http://nmitchell.co.uk/
Gluing things together with Haskell Neil Mitchell http://nmitchell.co.uk/ Code Elegantly designed Build system Test harness Continuous integration Release bundling Installer generator Release distribution
Outline. Lecture 18: Ruby on Rails MVC. Introduction to Rails
Outline Lecture 18: Ruby on Rails Wendy Liu CSC309F Fall 2007 Introduction to Rails Rails Principles Inside Rails Hello World Rails with Ajax Other Framework 1 2 MVC Introduction to Rails Agile Web Development
A Model of the Operation of The Model-View- Controller Pattern in a Rails-Based Web Server
A of the Operation of The -- Pattern in a Rails-Based Web Server January 10, 2011 v 0.4 Responding to a page request 2 A -- user clicks a link to a pattern page in on a web a web application. server January
Advanced Functional Programming (9) Domain Specific Embedded Languages
Advanced Functional Programming (9) Domain Specific Embedded Languages Advanced Functional Programming (9) Domain Specific Embedded Languages, Universiteit Utrecht http://www.cs.uu.nl/groups/st/ February
The programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is
Chris Panayiotou Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is the current buzz in the web development
Lecture 9. Semantic Analysis Scoping and Symbol Table
Lecture 9. Semantic Analysis Scoping and Symbol Table Wei Le 2015.10 Outline Semantic analysis Scoping The Role of Symbol Table Implementing a Symbol Table Semantic Analysis Parser builds abstract syntax
Design and Functional Specification
2010 Design and Functional Specification Corpus eready Solutions pvt. Ltd. 3/17/2010 1. Introduction 1.1 Purpose This document records functional specifications for Science Technology English Math (STEM)
Clojure Web Development
Clojure Web Development Philipp Schirmacher We'll take care of it. Personally. groups.google.com/group/clojure-dus 2012 innoq Deutschland GmbH Agenda Clojure Basics Web Development Libraries Micro Framework
Pentesting Web Frameworks (preview of next year's SEC642 update)
Pentesting Web Frameworks (preview of next year's SEC642 update) Justin Searle Managing Partner UtiliSec Certified Instructor SANS Institute [email protected] // @meeas What Are Web Frameworks Frameworks
How to Build a Model Layout Using Rails
Modular Page Layouts in Ruby on Rails How to use views, partials, and layouts in a modular approach to page assembly Greg Willits Rev 2 Oct 21, 2007 http://gregwillits.wordpress.com/ In this article we
Avaya Inventory Management System
Avaya Inventory Management System June 15, 2015 Jordan Moser Jin Oh Erik Ponder Gokul Natesan Table of Contents 1. Introduction 1 2. Requirements 2-3 3. System Architecture 4 4. Technical Design 5-6 5.
WHITE PAPER. Peter Drucker. intentsoft.com 2014, Intentional Software Corporation
We know now that the source of wealth is something specifically human: knowledge. If we apply knowledge to tasks we already know how to do, we call it productivity. If we apply knowledge to tasks that
What s really under the hood? How I learned to stop worrying and love Magento
What s really under the hood? How I learned to stop worrying and love Magento Who am I? Alan Storm http://alanstorm.com Got involved in The Internet/Web 1995 Work in the Agency/Startup Space 10 years php
Ruby on Rails Secure Coding Recommendations
Introduction Altius IT s list of Ruby on Rails Secure Coding Recommendations is based upon security best practices. This list may not be complete and Altius IT recommends this list be augmented with additional
Intruduction to Groovy & Grails programming languages beyond Java
Intruduction to Groovy & Grails programming languages beyond Java 1 Groovy, what is it? Groovy is a relatively new agile dynamic language for the Java platform exists since 2004 belongs to the family of
THE ROAD TO CODE. ANDROID DEVELOPMENT IMMERSIVE May 31. WEB DEVELOPMENT IMMERSIVE May 31 GENERAL ASSEMBLY
THE ROAD TO CODE WEB DEVELOPMENT IMMERSIVE May 31 ANDROID DEVELOPMENT IMMERSIVE May 31 GENERAL ASSEMBLY GENERAL ASSEMBLY @GA_CHICAGO WWW.FACEBOOK.COM/GENERALASSEMBLYCHI @GA_CHICAGO GENERAL ASSEMBLY GENERAL
Web Framework Performance Examples from Django and Rails
Web Framework Performance Examples from Django and Rails QConSF 9th November 2012 www.flickr.com/photos/mugley/5013931959/ Me Gareth Rushgrove Curate devopsweekly.com Blog at morethanseven.net Text Work
Ruby on Rails. Computerlabor
Ruby on Rails Computerlabor Ablauf Einführung in Ruby Einführung in Ruby on Rails ActiveRecord ActionPack ActiveResource Praxis Ruby Stichworte 1995 erschienen, Open Source Entwickelt von Yukihoro Matsumoto
Web development with Lua Programming Language
Web development with Lua Programming Language Introducing Sailor, a web MVC framework in Lua Etiene Dalcol @etiene_d Web development with Lua Programming Language Introducing Sailor, a web MVC framework
1/20/2016 INTRODUCTION
INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We
10CS73:Web Programming
10CS73:Web Programming Question Bank Fundamentals of Web: 1.What is WWW? 2. What are domain names? Explain domain name conversion with diagram 3.What are the difference between web browser and web server
Developers Guide. Designs and Layouts HOW TO IMPLEMENT WEBSITE DESIGNS IN DYNAMICWEB. Version: 1.3 2013.10.04 English
Developers Guide Designs and Layouts HOW TO IMPLEMENT WEBSITE DESIGNS IN DYNAMICWEB Version: 1.3 2013.10.04 English Designs and Layouts, How to implement website designs in Dynamicweb LEGAL INFORMATION
Moving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
Web Programming Languages Overview
Web Programming Languages Overview Thomas Powell [email protected] Web Programming in Context Web Programming Toolbox ActiveX Controls Java Applets Client Side Helper Applications Netscape Plug-ins Scripting
Enterprise Recipes with Ruby and Rails
Extracted from: Enterprise Recipes with Ruby and Rails This PDF file contains pages extracted from Enterprise Recipes with Ruby and Rails, published by the Pragmatic Bookshelf. For more information or
DTD Tutorial. About the tutorial. Tutorial
About the tutorial Tutorial Simply Easy Learning 2 About the tutorial DTD Tutorial XML Document Type Declaration commonly known as DTD is a way to describe precisely the XML language. DTDs check the validity
Parrot in a Nutshell. Dan Sugalski [email protected]. Parrot in a nutshell 1
Parrot in a Nutshell Dan Sugalski [email protected] Parrot in a nutshell 1 What is Parrot The interpreter for perl 6 A multi-language virtual machine An April Fools joke gotten out of hand Parrot in a nutshell
New Generation of Software Development
New Generation of Software Development Terry Hon University of British Columbia 201-2366 Main Mall Vancouver B.C. V6T 1Z4 [email protected] ABSTRACT In this paper, I present a picture of what software development
GUI and Web Programming
GUI and Web Programming CSE 403 (based on a lecture by James Fogarty) Event-based programming Sequential Programs Interacting with the user 1. Program takes control 2. Program does something 3. Program
Developing ASP.NET MVC 4 Web Applications MOC 20486
Developing ASP.NET MVC 4 Web Applications MOC 20486 Course Outline Module 1: Exploring ASP.NET MVC 4 The goal of this module is to outline to the students the components of the Microsoft Web Technologies
1. Comments on reviews a. Need to avoid just summarizing web page asks you for:
1. Comments on reviews a. Need to avoid just summarizing web page asks you for: i. A one or two sentence summary of the paper ii. A description of the problem they were trying to solve iii. A summary of
HOUR 3 Creating Our First ASP.NET Web Page
HOUR 3 Creating Our First ASP.NET Web Page In the last two hours, we ve spent quite a bit of time talking in very highlevel terms about ASP.NET Web pages and the ASP.NET programming model. We ve looked
Guides.rubyonrails.org
More at rubyonrails.org: Overview Download Deploy Code Screencasts Documentation Ecosystem Community Blog Guides.rubyonrails.org Ruby on Rails Guides (v3.2.2) These are the new guides for Rails 3.2 based
How to Choose the Right Web Design Company for Your Nonprofit
How to Choose the Right Web Design Company for Your Nonprofit wiredimpact.com 1 A new website can very easily be the kind of can that gets kicked down the road. Many nonprofits are swamped with things
Hello. What s inside? Ready to build a website?
Beginner s guide Hello Ready to build a website? Our easy-to-use software allows to create and customise the style and layout of your site without you having to understand any coding or HTML. In this guide
INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011
INTRODUCTION TO OBJECTIVE-C CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 12 09/29/2011 1 Goals of the Lecture Present an introduction to Objective-C 2.0 Coverage of the language will be INCOMPLETE
Ruby on Rails. Object Oriented Analysis & Design CSCI-5448 University of Colorado, Boulder. -Dheeraj Potlapally
Ruby on Rails Object Oriented Analysis & Design CSCI-5448 University of Colorado, Boulder -Dheeraj Potlapally INTRODUCTION Page 1 What is Ruby on Rails Ruby on Rails is a web application framework written
Two new DB2 Web Query options expand Microsoft integration As printed in the September 2009 edition of the IBM Systems Magazine
Answering the Call Two new DB2 Web Query options expand Microsoft integration As printed in the September 2009 edition of the IBM Systems Magazine Written by Robert Andrews [email protected] End-user
opalang - Rapid & Secure Web Development
opalang - Rapid & Secure Web Development Syllabus Brief History of Web Development Ideas and Goals The Language itself Community Reason for Development Services and Apps written in OPA Future of OPA OPA
Drupal CMS for marketing sites
Drupal CMS for marketing sites Intro Sample sites: End to End flow Folder Structure Project setup Content Folder Data Store (Drupal CMS) Importing/Exporting Content Database Migrations Backend Config Unit
Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P.0-20080901
Introduction to Ingeniux Forms Builder 90 minute Course CMSFB-V6 P.0-20080901 Table of Contents COURSE OBJECTIVES... 1 Introducing Ingeniux Forms Builder... 3 Acquiring Ingeniux Forms Builder... 3 Installing
RESTful Rails Development. translated by Florian Görsdorf and Ed Ruder
RESTful Rails Development Ralf Wirdemann [email protected] Thomas Baustert [email protected] translated by Florian Görsdorf and Ed Ruder March 26, 2007 Acknowledgments Many thanks go
Content Management System (Dokument- og Sagsstyringssystem)
Content Management System (Dokument- og Sagsstyringssystem) Magloire Segeya Kongens Lyngby 2010 IMM-B.Eng-2010-45 Technical University of Denmark DTU Informatics Building 321,DK-2800 Kongens Lyngby,Denmark
Programming in Access VBA
PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010
Chapter 7: Functional Programming Languages
Chapter 7: Functional Programming Languages Aarne Ranta Slides for the book Implementing Programming Languages. An Introduction to Compilers and Interpreters, College Publications, 2012. Fun: a language
HOW TO CREATE THEME IN MAGENTO 2
The Essential Tutorial: HOW TO CREATE THEME IN MAGENTO 2 A publication of Part 1 Whoever you are an extension or theme developer, you should spend time reading this blog post because you ll understand
Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102
Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102 Interneer, Inc. Updated on 2/22/2012 Created by Erika Keresztyen Fahey 2 Workflow - A102 - Basic HelpDesk Ticketing System
Programming Languages
Programming Languages Qing Yi Course web site: www.cs.utsa.edu/~qingyi/cs3723 cs3723 1 A little about myself Qing Yi Ph.D. Rice University, USA. Assistant Professor, Department of Computer Science Office:
Agent s Handbook. Your guide to satisfied customers
Agent s Handbook Your guide to satisfied customers Introduction LiveChat is a tool that facilitates communication between a company and its customers. Agents who wield that tool use it to make customers
Grails 1.1. Web Application. Development. Reclaiming Productivity for Faster. Java Web Development. Jon Dickinson PUBLISHING J MUMBAI BIRMINGHAM
Grails 1.1 Development Web Application Reclaiming Productivity for Faster Java Web Development Jon Dickinson PUBLISHING J BIRMINGHAM - MUMBAI Preface Chapter 1: Getting Started with Grails 7 Why Grails?
Lecture 3 ActiveRecord Rails persistence layer
Lecture 3 ActiveRecord Rails persistence layer Elektroniczne Przetwarzanie Informacji 9 maja 2013 Aga ActiveRecord basics Query language Associations Validations Callbacks ActiveRecord problems Alternatives
Developing ASP.NET MVC 4 Web Applications
Course M20486 5 Day(s) 30:00 Hours Developing ASP.NET MVC 4 Web Applications Introduction In this course, students will learn to develop advanced ASP.NET MVC applications using.net Framework 4.5 tools
Jos Warmer, Independent [email protected] www.openmodeling.nl
Domain Specific Languages for Business Users Jos Warmer, Independent [email protected] www.openmodeling.nl Sheet 2 Background Experience Business DSLs Insurance Product Modeling (structure) Pattern
Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages. Corky Cartwright Swarat Chaudhuri November 30, 20111
Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages Corky Cartwright Swarat Chaudhuri November 30, 20111 Overview I In OO languages, data values (except for designated non-oo
Dynamic website development using the Grails Platform. Joshua Davis Senior Architect Cognizant Technology Solutions joshua.davis@cognizant.
Dynamic website development using the Grails Platform Joshua Davis Senior Architect Cognizant Technology Solutions [email protected] Topics Covered What is Groovy? What is Grails? What are the
Page Editor Recommended Practices for Developers
Page Editor Recommended Practices for Developers Rev: 7 July 2014 Sitecore CMS 7 and later Page Editor Recommended Practices for Developers A Guide to Building for the Page Editor and Improving the Editor
web frameworks design comparison draft - please help me improve it focus on Model-View-Controller frameworks
web frameworks design comparison draft - please help me improve it focus on Model-View-Controller frameworks Controllers In Rails class MyTestController < ApplicationController def index render_text Hello
Slides from INF3331 lectures - web programming in Python
Slides from INF3331 lectures - web programming in Python Joakim Sundnes & Hans Petter Langtangen Dept. of Informatics, Univ. of Oslo & Simula Research Laboratory October 2013 Programming web applications
How to set up a scoring algorithm and automatic email triggers for Qualtrics measures
How to set up a scoring algorithm and automatic email triggers for Qualtrics measures Purpose: This is a useful tool for prescreening participants for Sona. In Sona you can direct the participants to the
KITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php [email protected] [email protected] Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
MASTERTAG DEVELOPER GUIDE
MASTERTAG DEVELOPER GUIDE TABLE OF CONTENTS 1 Introduction... 4 1.1 What is the zanox MasterTag?... 4 1.2 What is the zanox page type?... 4 2 Create a MasterTag application in the zanox Application Store...
Semantic Analysis: Types and Type Checking
Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors
MEAP Edition Manning Early Access Program Nim in Action Version 1
MEAP Edition Manning Early Access Program Nim in Action Version 1 Copyright 2016 Manning Publications For more information on this and other Manning titles go to www.manning.com Welcome Thank you for purchasing
Instructor: Betty O Neil
Introduction to Web Application Development, for CS437/637 Instructor: Betty O Neil 1 Introduction: Internet vs. World Wide Web Internet is an interconnected network of thousands of networks and millions
Top 10 Oracle SQL Developer Tips and Tricks
Top 10 Oracle SQL Developer Tips and Tricks December 17, 2013 Marc Sewtz Senior Software Development Manager Oracle Application Express Oracle America Inc., New York, NY The following is intended to outline
Chapter 12 Programming Concepts and Languages
Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Paradigm Publishing, Inc. 12-1 Presentation Overview Programming Concepts Problem-Solving Techniques The Evolution
Apache Thrift and Ruby
Apache Thrift and Ruby By Randy Abernethy In this article, excerpted from The Programmer s Guide to Apache Thrift, we will install Apache Thrift support for Ruby and build a simple Ruby RPC client and
JRuby Now and Future Charles Oliver Nutter JRuby Guy Sun Microsystems
JRuby Now and Future Charles Oliver Nutter JRuby Guy Sun Microsystems Except where otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution Share Alike 3.0 United
Semester Review. CSC 301, Fall 2015
Semester Review CSC 301, Fall 2015 Programming Language Classes There are many different programming language classes, but four classes or paradigms stand out:! Imperative Languages! assignment and iteration!
The Guide to: Email Marketing Analytics"
The Guide to: Email Marketing Analytics" This guide has been lovingly created by Sign-Up.to we provide email marketing, mobile marketing and social media tools and services to organisations of all shapes
Developer Guide To The. Virtual Merchant
Developer Guide To The Virtual Merchant March 1, 2010 2 Virtual Merchant Developer s Guide THIS VIRTUAL MERCHANT DEVELOPER S GUIDE WILL FAMILIARIZE YOU WITH ALL THE TRANSACTION TYPES AND PROCEDURES YOU
Using XACML Policies as OAuth Scope
Using XACML Policies as OAuth Scope Hal Lockhart Oracle I have been exploring the possibility of expressing the Scope of an OAuth Access Token by using XACML policies. In this document I will first describe
Smartphone garage door opener
http://tuxgraphics.org/electronics Smartphone garage door opener Abstract: Nobody leave these days the house without keys and mobile phone. Wouldn't it be nice if you could use your mobile phone to open
DSL Design. Model Transformations. Model Transformations. Language g Implementation Strategies
DSL Design Generic Language g Technology 2IS15 Model Transformations Language g Implementation Strategies Stand-alone Marcel van Amstel Embedding Translation / Software Engineering and Technology 9-1-2012
