Reactive Web Programming with Lift

Size: px
Start display at page:

Download "Reactive Web Programming with Lift"

Transcription

1 Lucas Satabin Reactive Web Programming with Lift July 7 th 2010

2 Reactive Web Programming with Lift 2 Lift Books Available April 2011 Early preview: Free online version:

3 Reactive Web Programming with Lift 3 Lift Tutorials The lift maven archetypes! /lift-web-framework-scala-pollack Official website:

4 Lift is the only new framework in the last four years to offer fresh and innovative approaches to web development. It's not just some incremental improvements over the status quo, it redefines the state of the art. If you are a web developer, you should learn Lift. Even if you don't wind up using it everyday, it will change the way you approach web applications. Michael Galpin, Developer, ebay

5 Reactive Web Programming with Lift 5 Lift What is Lift? A framework for writing web applications in Scala Solves elegantly many common problems encountered in web application development Includes the best ideas from all other web frameworks! (Rails, Django, Wicket, ) Write reactive web applications quickly... Once you understood the concepts...

6 Reactive Web Programming with Lift 6 Architecture

7 Reactive Web Programming with Lift 7 Lift Configuration Application configuration in a Boot class Define the website structure Define the data model Configure internationalization, encoding,

8 Reactive Web Programming with Lift 8 Pros View First No logic in the view Unlike JSP, ASP, Supported by standard HTML tools Designer can work without scala development environment Written in Scala Uses Maven

9 Reactive Web Programming with Lift 9 Cons Still HTML to write Written in Scala Uses advanced features Uses Maven But now use of SBT (Simple Build Tool) possible SBT however is also in Scala... Don't be afraid of this!

10 Reactive Web Programming with Lift Scala (Extremely) Short Introduction

11 Reactive Web Programming with Lift 11 A Powerful Language Full support for object-oriented features Also a functional language (higher-order functions, immutable data types,...) Powerful type system (type inference, generics, covariance, ) Mixin composition using traits Compiles to Java bytecode or.net CLR Full compatibility with Java libraries More at

12 Reactive Web Programming with Lift 12 Some Scala Syntax class MyClass(val param1: Int, var param2: String) { def m1(i: Int) = println(i) } def m2(): Boolean = { if(param1 > 0) true else false } object MyObject { def main(args: Array[String]) { val c = new MyClass(2, "test") c.m2() c m1 5 } }

13 Reactive Web Programming with Lift 13 XML in Scala Native support for XML XPath integration val page = <html> <head> <title>example</title> </head> <body> <h1>scala rocks!</h1> </body> </html>

14 Reactive Web Programming with Lift 14 Actor Programming case class Ping(source: Actor) case class Pong() Concurrent programming model No shared memory Message passing style object PingActor extends Actor { def act = { loop { receive { case Ping(source) => source! Pong } } } } PingActor! Ping(actor)

15 Reactive Web Programming with Lift Lift The first application

16 Reactive Web Programming with Lift 16 Create a new Application Run maven and voilà! $ mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \ -DarchetypeArtifactId=lift-archetype-blank \ -DarchetypeVersion=2.0 \ -DgroupId=ctfda -DartifactId=firstApp \ -Dversion=0.0.1-SNAPSHOT Other archetypes available (with user management, JPA,...)

17 Reactive Web Programming with Lift 17 Define The View default.html <html> <head> <title>my first Lift Application</title> </head> <body> <lift:bind name="content" /> </body> </html> index.html <lift:surround with="default" at="content"> <h1>welcome!</h1> <lift:helloworld.sayhello> Welcome to Lift at <hello:date />! </lift:helloworld.sayhello> </lift:surround>

18 Reactive Web Programming with Lift 18 The Snippet part HelloWorld.scala package ctfda.firstapp.snippet import java.util.date import scala.xml.nodeseq import net.liftweb.util.helpers._ <lift:helloworld.sayhello> class HelloWorld { def sayhello(html: NodeSeq): NodeSeq = bind("hello", html, "date" -> new Date().toString) } <hello:date />

19 Reactive Web Programming with Lift 19 And Voilà! $ mvn jetty:run A lot of stuffs [INFO] Starting scanner at interval of 5 seconds.

20 Reactive Web Programming with Lift 20 Adding New Pages All accessible pages configured in the Boot class The SiteMap describes the web application structure

21 Reactive Web Programming with Lift Session Management Problems and Solution

22 Reactive Web Programming with Lift 22 Session Management A general (and ubiquitous) problem Why do I need sessions? HTTP is stateless it makes everything difficult Where should sessions be managed? On the client side On the server side On both sides?

23 Reactive Web Programming with Lift 23 Sessions in Lift Lift is a stateful framework! LiftSession NOT build on top of HttpSession Implemented with an actor managing the lifecycle of sessions Two main classes: SessionVar and RequestVar No direct reference to the session Type-safe access to the data Default value Clean up mechanism

24 Reactive Web Programming with Lift 24 Use of Session Variables class HelloWorld { object name extends SessionVar("anonymous") def identify(html: NodeSeq) = Set the session value bind("id", html, "name" -> text("", n => name.apply(n)), Do nothing "submit" -> submit("change name", () => ())) def sayhello(html: NodeSeq) = Get the session value bind("hello", html, "name" -> <b>{name.is}</b>, "date" -> (new java.util.date).tostring) } <lift:surround with="default" at="content"> <h1>welcome!</h1> <lift:helloworld.sayhello> Welcome to Lift <hello:name /> at <hello:date />! </lift:helloworld.sayhello> <p /> <lift:helloworld.identify form="post"> Please give your name <br /> <id:name /> <id:submit /> </lift:helloworld.identify> </lift:surround>

25 Reactive Web Programming with Lift 25 Session Variable Result

26 Reactive Web Programming with Lift Persistence

27 Reactive Web Programming with Lift 27 The Mapper Component Original persistence framework Closely tied to JDBC Based on two basic traits Mapper per-instance features MetaMapper global operations Inheriting from these traits makes the entity persistent Easy to use for Database Sharding (do you remember?) CRUD features and views using the CRUDify trait

28 Reactive Web Programming with Lift 28 New Entities class Post extends LongKeyedMapper[Post] with IdPK { def getsingleton = Post } object title extends MappedString(this, 140) object content extends MappedString(this, 5000) object author extends LongMappedMapper(this, Author) object Post extends Post with LongKeyedMetaMapper[Post] class Author extends MegaProtoUser[Author] { def getsingleton = Author } This is a really nice class! object Author extends Author with MetaMegaProtoUser[User]

29 Reactive Web Programming with Lift 29 Schemifying the Model package bootstrap.liftweb class Boot { def boot {... val vendor = new StandardDBVendor("org.h2.Driver", "jdbc:h2:lift_proto.db;auto_server=true") LiftRules.unloadHooks.append(vendor.closeAllConnections_! _) DB.defineConnectionManager(DefaultConnectionIdentifier, vendor) } } // add entities to the schemifier Schemifier.schemify(true, Log.infoF _, Post, Author)

30 Reactive Web Programming with Lift 30 Alternative to Mapper Record framework Refactorization of Mapper Backing-store agnostic JDBC JPA XML file Integration of JPA Support for NoSQL (CouchDB and MongoDB)

31 Reactive Web Programming with Lift Ajax and Comet Reactive Web Applications

32 Reactive Web Programming with Lift 32 Classic Web Application

33 Reactive Web Programming with Lift 33 Ajax Application

34 Reactive Web Programming with Lift 34 Lift and Ajax Uses jquery ( No differences in the HTML file Helpers to generate the Ajax elements Object net.liftweb.http.shtml No javascript to write in most cases! Makes heavy use of scala closures and first-class functions

35 Reactive Web Programming with Lift 35 Comment a Post: the Model class Comment extends LongKeyedMapper[Comment] with IdPK { def getsingleton = Comment } object author extends MappedPoliteString(this, 30) object date extends MappedDateTime(this) object content extends MappedText(this) object post extends LongMappedMapper(this, Post) object Comment extends Comment with LongKeyedMetaMapper[Comment] class Post extends LongKeyedMapper[Post] with IdPK with OneToMany[Long, Post] { // unchanged... object comments extends MappedOneToMany(Comment, Comment.post, OrderBy(Comment.id, Ascending)) }

36 Reactive Web Programming with Lift 36 Comment a Post: the Snippet def comments(html: NodeSeq): NodeSeq = { val id = S param "id" map (_.tolong) open_! var author = "" var content = "" Generates all the Ajax code for us! bind("comment", html, "newauthor" -> text("anonymous", a => author = a), "newcontent" -> textarea("", t => content = t), "submit" -> ajaxsubmit("post comment!", () => { savecomment(id, author, content) SetHtml("comments", comments(html))}, "list" -> bindcommentlist _))} <div id="comments"> <h3>new comment</h3> <lift:form> <table> <tr><td>name</td><td><comment:newauthor /></td></tr> <tr><td>comment</td><td><comment:newcontent /></td></tr> <tr><td><comment:submit /></td></tr> </table> </lift:form> <!-- the comment list --> </div>

37 Reactive Web Programming with Lift 37 Comet

38 Reactive Web Programming with Lift 38 Comet: Principles Programming technique Allows a server to send messages to clients Better than classical polling Different approaches for implementation Hidden IFrame Long polling Alternative: HTML5 server-sent DOM events

39 Reactive Web Programming with Lift 39 Comet in Lift Different implementations Sleeping threads Does not scale! Non-Blocking IO Jetty Continuations when running in Jetty Future: Servlet 3.0 Suspended Requests Actor driven development CometActor does almost everything for you!

40 Reactive Web Programming with Lift 40 Comet in Lift: Ideas A dispatcher actor object Publish/Subscribe style Comet actors register with this actor A Comet actor One instance per type per session Update the client content

41 Reactive Web Programming with Lift 41 Comet Flow in Lift Gets a Comet request Checks the CometActors to see if there are any messages. If no messages, request suspended, no response to client When your Comet actor receives a message, response is calculated, request resumed Response sent to client

42 Reactive Web Programming with Lift 42 Comet Comments case class AddComment(postId: Long, author: String, date: Date, content: String) object Blog {... def comments(html: NodeSeq): NodeSeq = {... bind("comment", html, AttrBindParam("cometName", S param "id" open_!, "name"), "newauthor" -> text("anonymous", a => author = a), "newcontent" -> textarea("", t => content = t), "submit" -> ajaxsubmit("post comment!", () => { Commenter! AddComment(id, author, new Date, content) Noop })) } }

43 Reactive Web Programming with Lift 43 Commenter Actor object Commenter extends LiftActor with ListenerManager { var postid = 0L def createupdate = postid override def lowpriority = { case AddComment(postId, author, date, content) => // save the comment... // save the post id this.postid = postid updatelisteners() } }

44 Reactive Web Programming with Lift 44 Comet Actor class Comments extends CometActor with CometListener { override def shouldupdate = { case id: Long if id == name.map(_.tolong).open_! => true case _ => false } def registerwith = Commenter val postid = S.param("id").map(_.toLong).openOr(0L) var comments: List[Comment] = getcomments private def getcomments = Comment.findAll( By(Comment.post, postid), OrderBy(Comment.date, Descending)) } override def lowpriority = { case id: Long => comments = getcomments rerender(false) case _ => Log info "other message" } def render = bindcomments

45 Reactive Web Programming with Lift Security

46 Reactive Web Programming with Lift 46 Authentication Using the MegaProtoUser class Allows use of Realms For example Single Sign-On Abstractions for Basic and Digest HTTP Authentication Hierarchical role structure

47 Reactive Web Programming with Lift 47 XSS Attacks Nonce generated each time a form is loaded Avoid scripting Resistant to the OWASP top 10 vulnerabilities including XSS XSRF parameter tampering

48 Reactive Web Programming with Lift 48 Resources Access Strong control over accessible resources Only pages added to the SiteMap WEB-INF and template-hidden directories never directly accessible Use of container access control Configuration in web.xml Works on all Servlet containers

49 Reactive Web Programming with Lift To be continued...

50 Reactive Web Programming with Lift 50 What Else? Support for RESTful web services A lot of helpers JSON parser Checks Integration with OpenID XMPP (Jabber) Lucene Facebook

51 Reactive Web Programming with Lift 51 And Even More Widgets Calendar Table sorter Tree view Screens and Wizards

52 Reactive Web Programming with Lift Thank you for your attention Any questions?

Overview of Lift Web Framework. Vikas Hazrati

Overview of Lift Web Framework. Vikas Hazrati Overview of Lift Web Framework Vikas Hazrati www.xebiaindia.com Today There is a Wide Choice of Web Frameworks As Developers It is Hard to Make a Choice Every Framework Has its Own Set of Pitfalls But

More information

Petr CZJUG, December 2010

Petr CZJUG, December 2010 Petr Hošek @petrh CZJUG, December 2010 Why do we need another web framework? Foursquare switched over to Scala & Lift last year and we ve been thrilled with the results. The ease of developing complex

More information

Scala, Lift and the Real Time Web

Scala, Lift and the Real Time Web Scala, Lift and the Real Time Web David Pollak Benevolent Dictator for Life Lift Web Framework dpp@liftweb.net All about me (David Pollak) Sometimes strict, mostly lazy Lead developer for Lift Web Framework

More information

Lift. Lift. The Definitive Guide to. A Scala-Based Web Framework. The Definitive Guide to Lift: Derek Chen-Becker, Marius Danciu, and Tyler Weir

Lift. Lift. The Definitive Guide to. A Scala-Based Web Framework. The Definitive Guide to Lift: Derek Chen-Becker, Marius Danciu, and Tyler Weir BOOKS FOR PROFESSIONALS BY PROFESSIONALS The Definitive Guide to Lift: Dear Reader, Derek Chen-Becker, Marius Danciu, and Tyler Weir Lift We would like to welcome you to the exciting world of Lift! Lift

More information

Last year, Debasish Ghosh and Steve Vinoski

Last year, Debasish Ghosh and Steve Vinoski The Functional Web A Chat Application in Lift David Pollak Lift Web Framework Steve Vinoski Verivue Last year, Debasish Ghosh and Steve Vinoski gave an overview of the Scala language, highlighting some

More information

Chapter 1: Welcome to Lift Chapter 2: PocketChange Chapter 3: Lift Fundamentals... 25

Chapter 1: Welcome to Lift Chapter 2: PocketChange Chapter 3: Lift Fundamentals... 25 Contents Chapter 1: Welcome to Lift... 1 Lifting Off!...1 Implementing the MVC Pattern with Lift... 1 Leveraging the Scala Language... 2 Supporting Advanced Features Easily... 3 Getting to Know the Lift

More information

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Simone Bordet sbordet@intalio.com 1 Agenda What are Comet web applications? Impacts of Comet web applications WebSocket

More information

Scala Actors. Scalable Multithreading on the JVM. Philipp Haller. Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland

Scala Actors. Scalable Multithreading on the JVM. Philipp Haller. Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland Scala Actors Scalable Multithreading on the JVM Philipp Haller Ph.D. candidate Programming Methods Lab EPFL, Lausanne, Switzerland The free lunch is over! Software is concurrent Interactive applications

More information

Tapestry. Code less, deliver more. Rayland Jeans

Tapestry. Code less, deliver more. Rayland Jeans Tapestry Code less, deliver more. Rayland Jeans What is Apache Tapestry? Apache Tapestry is an open-source framework designed to create scalable web applications in Java. Tapestry allows developers to

More information

Web 2.0 and AJAX Security. OWASP Montgomery. August 21 st, 2007

Web 2.0 and AJAX Security. OWASP Montgomery. August 21 st, 2007 Web 2.0 and AJAX Security OWASP Montgomery August 21 st, 2007 Overview Introduction Definition of Web 2.0 Basics of AJAX Attack Vectors for AJAX Applications AJAX and Application Security Conclusions 1

More information

Java SE7 Fundamentals

Java SE7 Fundamentals Java SE7 Fundamentals Introducing the Java Technology Relating Java with other languages Showing how to download, install, and configure the Java environment on a Windows system. Describing the various

More information

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP 2013 Empowering Innovation DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP contact@dninfotech.com www.dninfotech.com 1 JAVA 500: Core JAVA Java Programming Overview Applications Compiler Class Libraries

More information

CORE JAVA 1. INTRODUCATION

CORE JAVA 1. INTRODUCATION CORE JAVA 1. INTRODUCATION 1. Installation & Hello World Development 2. Path environment variable d option 3. Local variables & pass by value 4. Unary operators 5. Basics on Methods 6. Static variable

More information

David Pollak CUFP September 26 th, 2008

David Pollak CUFP September 26 th, 2008 Buy a Feature Adventure in Immutability and Actors David Pollak CUFP September 26 th, 2008 David Pollak Not strict, but pretty lazy Lead developer for Lift web framework Scala since November 2006, Ruby/Rails,

More information

Buy a Feature: an Adventure in Immutability and Actors. David Pollak BayFP August 22, 2008

Buy a Feature: an Adventure in Immutability and Actors. David Pollak BayFP August 22, 2008 Buy a Feature: an Adventure in Immutability and Actors David Pollak BayFP August 22, 2008 David Pollak Not strict, but pretty lazy Lead developer for Lift web framework Scala since November 2006, Ruby/Rails,

More information

Apache Wicket. Java Web Application Framework

Apache Wicket. Java Web Application Framework Apache Wicket Java Web Application Framework St. Louis - Java User s Group Luther Baker September 2009 What is Wicket? Web Application Framework Component-based Framework Wicket 1.4 is Java 1.5+ compliant

More information

Given the Web s position as the ubiquitous

Given the Web s position as the ubiquitous The Functional Web Scala and Lift Functional Recipes for the Web Debasish Ghosh Anshinsoft Steve Vinoski Verivue Given the Web s position as the ubiquitous global network for exchanging information and

More information

Table of Contents. Introduction... xxi

Table of Contents. Introduction... xxi Introduction... xxi Chapter 1: Getting Started with Web Applications in Java... 1 Introduction to Web Applications... 2 Benefits of Web Applications... 5 Technologies used in Web Applications... 5 Describing

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 INFORMATION TECHNOLOGY TUTORIAL QUESTION BANK Course Name Course Code Class Branch : Web Technologies : ACS006 : B. Tech

More information

The Script Bowl Featuring Groovy, JRuby, Jython and Scala. Raghavan Rags N. Srinivas CTO, Technology Evangelism

The Script Bowl Featuring Groovy, JRuby, Jython and Scala. Raghavan Rags N. Srinivas CTO, Technology Evangelism The Script Bowl Featuring Groovy, JRuby, Jython and Scala Raghavan Rags N. Srinivas CTO, Technology Evangelism The Script Bowl: Groovy Style Guillaume Laforge VP Technology at G2One, Inc. Groovy Project

More information

Session 12. RESTful Services. Lecture Objectives

Session 12. RESTful Services. Lecture Objectives Session 12 RESTful Services 1 Lecture Objectives Understand the fundamental concepts of Web services Become familiar with JAX-RS annotations Be able to build a simple Web service 2 10/21/2018 1 Reading

More information

Announcements. CSCI 334: Principles of Programming Languages. Lecture 16: Intro to Scala. Announcements. Squeak demo. Instructor: Dan Barowy

Announcements. CSCI 334: Principles of Programming Languages. Lecture 16: Intro to Scala. Announcements. Squeak demo. Instructor: Dan Barowy Announcements CSCI 334: Principles of Programming Languages Lecture 16: Intro to Scala HW7 sent out as promised. See course webpage. Instructor: Dan Barowy Announcements No class on Tuesday, April 17.

More information

/ / JAVA TRAINING

/ / JAVA TRAINING www.tekclasses.com +91-8970005497/+91-7411642061 info@tekclasses.com / contact@tekclasses.com JAVA TRAINING If you are looking for JAVA Training, then Tek Classes is the right place to get the knowledge.

More information

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can.

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. P.S... I hate boring presentations. Please, engage and stay

More information

welcome to BOILERCAMP HOW TO WEB DEV

welcome to BOILERCAMP HOW TO WEB DEV welcome to BOILERCAMP HOW TO WEB DEV Introduction / Project Overview The Plan Personal Website/Blog Schedule Introduction / Project Overview HTML / CSS Client-side JavaScript Lunch Node.js / Express.js

More information

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes Java CORE JAVA Core Java Programing (Course Duration: 40 Hours) Introduction to Java What is Java? Why should we use Java? Java Platform Architecture Java Virtual Machine Java Runtime Environment A Simple

More information

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript Rich Web Applications in Server-side Java without twitter: #vaadin @joonaslehtinen Plug-ins or JavaScript Joonas Lehtinen, PhD Vaadin Ltd - CEO joonas@vaadin.com ? Vaadin is a UI framework for desktop-like

More information

TUTORIAL QUESTION BANK

TUTORIAL QUESTION BANK + INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad - 500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name Course Code Class Branch : Web Technologies : ACS006

More information

Scala, Your Next Programming Language

Scala, Your Next Programming Language Scala, Your Next Programming Language (or if it is good enough for Twitter, it is good enough for me) WORLDCOMP 2011 By Dr. Mark C. Lewis Trinity University Disclaimer I am writing a Scala textbook that

More information

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline Advanced Java Database Programming JDBC overview SQL- Structured Query Language JDBC Programming Concepts Query Execution Scrollable

More information

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies J2EE - Version: 25 Developing Enterprise Applications with J2EE Enterprise Technologies Developing Enterprise Applications with J2EE Enterprise Technologies J2EE - Version: 25 5 days Course Description:

More information

Front End Programming

Front End Programming Front End Programming Mendel Rosenblum Brief history of Web Applications Initially: static HTML files only. Common Gateway Interface (CGI) Certain URLs map to executable programs that generate web page

More information

CS506 today quiz solved by eagle_eye and naeem latif.mcs. All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz

CS506 today quiz solved by eagle_eye and naeem latif.mcs. All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz CS506 today quiz solved by eagle_eye and naeem latif.mcs All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz Question # 1 of 10 ( Start time: 04:33:36 PM ) Total

More information

Grails, Trails, and Sails: Rails Through a Coffee Filter

Grails, Trails, and Sails: Rails Through a Coffee Filter Grails, Trails, and Sails: Rails Through a Coffee Filter Matt Hughes David Esterkin Chariot Solutions http://chariotsolutions.com BOF-9843 2007 JavaOneSM Conference Session BOF-9843 Agenda Brief History

More information

CSC 309 The Big Picture

CSC 309 The Big Picture CSC 309 The Big Picture Server GET path/to/route Host: example.com Client Client sends HTTP request to server How? Server GET path/to/route Host: example.com Client Client sends HTTP request to server

More information

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO

RIA Security - Broken By Design. Joonas Lehtinen IT Mill - CEO RIA Security - Broken By Design Joonas Lehtinen IT Mill - CEO a system is secure if it is designed to be secure and there are no bugs no system should be designed to be insecure not all bugs are security

More information

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript

Rich Web Applications in Server-side Java without. Plug-ins or JavaScript Rich Web Applications in Server-side Java without twitter: #vaadin @joonaslehtinen Plug-ins or JavaScript Joonas Lehtinen, PhD Vaadin Ltd - CEO joonas@vaadin.com ? Vaadin is a UI framework for desktop-like

More information

Web Application Expectations

Web Application Expectations Effective Ruby on Rails Development Using CodeGear s Ruby IDE Shelby Sanders Principal Engineer CodeGear Copyright 2007 CodeGear. All Rights Reserved. 2007/6/14 Web Application Expectations Dynamic Static

More information

Advanced React JS + Redux Development

Advanced React JS + Redux Development Advanced React JS + Redux Development Course code: IJ - 27 Course domain: Software Engineering Number of modules: 1 Duration of the course: 40 astr. hours / 54 study 1 hours Sofia, 2016 Copyright 2003-2016

More information

Web basics: HTTP cookies

Web basics: HTTP cookies Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh February 11, 2016 1 / 27 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the

More information

Groovy & Grails Scripting for Modern Web Applications. Rohit Nayak Talentica Software

Groovy & Grails Scripting for Modern Web Applications. Rohit Nayak Talentica Software Groovy & Grails Scripting for Modern Web Applications Rohit Nayak Talentica Software Agenda Demo: Quick intro to Grails Scripting, Web Applications and Grails/Groovy REST service in Grails Demo Internals

More information

Migrating traditional Java EE applications to mobile

Migrating traditional Java EE applications to mobile Migrating traditional Java EE applications to mobile Serge Pagop Sr. Channel MW Solution Architect, Red Hat spagop@redhat.com Burr Sutter Product Management Director, Red Hat bsutter@redhat.com 2014-04-16

More information

JAVA. 1. Introduction to JAVA

JAVA. 1. Introduction to JAVA JAVA 1. Introduction to JAVA History of Java Difference between Java and other programming languages. Features of Java Working of Java Language Fundamentals o Tokens o Identifiers o Literals o Keywords

More information

How is state managed in HTTP sessions. Web basics: HTTP cookies. Hidden fields (2) The principle. Disadvantage of this approach

How is state managed in HTTP sessions. Web basics: HTTP cookies. Hidden fields (2) The principle. Disadvantage of this approach Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh March 30, 2015 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the server sends

More information

CS50 Quiz Review. November 13, 2017

CS50 Quiz Review. November 13, 2017 CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down

More information

Contents at a Glance

Contents at a Glance Contents at a Glance 1 Java EE and Cloud Computing... 1 2 The Oracle Java Cloud.... 25 3 Build and Deploy with NetBeans.... 49 4 Servlets, Filters, and Listeners... 65 5 JavaServer Pages, JSTL, and Expression

More information

Extensible Components with Sling Models and HTL

Extensible Components with Sling Models and HTL APACHE SLING & FRIENDS TECH MEETUP BERLIN, 25-27 SEPTEMBER 2017 Extensible Components with Sling Models and HTL Vlad Băilescu & Burkhard Pauli, Adobe About us: ref-squad 2 Agenda WCM Components in AEM

More information

Harnessing Java with Scala

Harnessing Java with Scala Harnessing Java with Scala OSCON 2010 July 21, 2010 Thomas Lockney @tlockney or thomas@lockney.net Trenton Lipscomb trentonl@amazon.com Introduction Understand the capabilities of sbt and Scala Demonstrate

More information

10264A CS: Developing Web Applications with Microsoft Visual Studio 2010

10264A CS: Developing Web Applications with Microsoft Visual Studio 2010 10264A CS: Developing Web Applications with Microsoft Visual Studio 2010 Course Number: 10264A Course Length: 5 Days Course Overview In this course, students will learn to develop advanced ASP.NET MVC

More information

RKN 2015 Application Layer Short Summary

RKN 2015 Application Layer Short Summary RKN 2015 Application Layer Short Summary HTTP standard version now: 1.1 (former 1.0 HTTP /2.0 in draft form, already used HTTP Requests Headers and body counterpart: answer Safe methods (requests): GET,

More information

13. Databases on the Web

13. Databases on the Web 13. Databases on the Web Requirements for Web-DBMS Integration The ability to access valuable corporate data in a secure manner Support for session and application-based authentication The ability to interface

More information

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/- www.javabykiran. com 8888809416 8888558802 Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/- Java by Kiran J2EE SYLLABUS Servlet JSP XML Servlet

More information

Developing ASP.NET MVC Web Applications (486)

Developing ASP.NET MVC Web Applications (486) Developing ASP.NET MVC Web Applications (486) Design the application architecture Plan the application layers Plan data access; plan for separation of concerns, appropriate use of models, views, controllers,

More information

Google Web Toolkit (GWT)

Google Web Toolkit (GWT) Google Web Toolkit (GWT) St. Louis Java SIG April 12, 2007 Brad Busch Andrew Prunicki What is GWT? GWT is a much different way to develop web applications from

More information

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University Web Applications Software Engineering 2017 Alessio Gambi - Saarland University Based on the work of Cesare Pautasso, Christoph Dorn, Andrea Arcuri, and others ReCap Software Architecture A software system

More information

Painless Persistence. Some guidelines for creating persistent Java applications that work

Painless Persistence. Some guidelines for creating persistent Java applications that work Painless Persistence Some guidelines for creating persistent Java applications that work The Authors Anthony Patricio Senior JBoss Certification Developer Highest volume poster on early Hibernate forums

More information

Call: Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline

Call: Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline Object-Oriented Programming (OOP) concepts Introduction Abstraction Encapsulation Inheritance Polymorphism Getting started with

More information

ive JAVA EE C u r r i c u l u m

ive JAVA EE C u r r i c u l u m C u r r i c u l u m ive chnoworld Development Training Consultancy Collection Framework - The Collection Interface(List,Set,Sorted Set). - The Collection Classes. (ArrayList,Linked List,HashSet,TreeSet)

More information

"Web Age Speaks!" Webinar Series

Web Age Speaks! Webinar Series "Web Age Speaks!" Webinar Series Java EE Patterns Revisited WebAgeSolutions.com 1 Introduction Bibhas Bhattacharya CTO bibhas@webagesolutions.com Web Age Solutions Premier provider of Java & Java EE training

More information

Enterprise Java Development using JPA, Hibernate and Spring. Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009

Enterprise Java Development using JPA, Hibernate and Spring. Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009 Enterprise Java Development using JPA, Hibernate and Spring Srini Penchikala Detroit JUG Developer Day Conference November 14, 2009 About the Speaker Enterprise Architect Writer, Speaker, Editor (InfoQ)

More information

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

Java- EE Web Application Development with Enterprise JavaBeans and Web Services Java- EE Web Application Development with Enterprise JavaBeans and Web Services Duration:60 HOURS Price: INR 8000 SAVE NOW! INR 7000 until December 1, 2011 Students Will Learn How to write Session, Message-Driven

More information

Java Enterprise Edition

Java Enterprise Edition Java Enterprise Edition The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data

More information

First Programming Language in CS Education The Arguments for Scala

First Programming Language in CS Education The Arguments for Scala First Programming Language in CS Education The Arguments for Scala WORLDCOMP 2011 By Dr. Mark C. Lewis Trinity University Disclaimer I am writing a Scala textbook that is under contract with CRC Press.

More information

Web-APIs. Examples Consumer Technology Cross-Domain communication Provider Technology

Web-APIs. Examples Consumer Technology Cross-Domain communication Provider Technology Web-APIs Examples Consumer Technology Cross-Domain communication Provider Technology Applications Blogs and feeds OpenStreetMap Amazon, Ebay, Oxygen, Magento Flickr, YouTube 3 more on next pages http://en.wikipedia.org/wiki/examples_of_representational_state_transfer

More information

Web basics: HTTP cookies

Web basics: HTTP cookies Web basics: HTTP cookies Myrto Arapinis School of Informatics University of Edinburgh November 20, 2017 1 / 32 How is state managed in HTTP sessions HTTP is stateless: when a client sends a request, the

More information

Open Source Library Developer & IT Pro

Open Source Library Developer & IT Pro Open Source Library Developer & IT Pro Databases LEV 5 00:00:00 NoSQL/MongoDB: Buildout to Going Live INT 5 02:15:11 NoSQL/MongoDB: Implementation of AngularJS INT 2 00:59:55 NoSQL: What is NoSQL INT 4

More information

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand) Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand) Code: URL: D101074GC10 View Online The Developing Applications for the Java EE 7 Platform training teaches you how

More information

Lift Application Development Cookbook

Lift Application Development Cookbook Lift Application Development Cookbook Gilberto T. Garcia Jr. Chapter No. 1 "Getting Started with Lift Basics" In this package, you will find: A Biography of the author of the book A preview chapter from

More information

Information Security CS 526 Topic 8

Information Security CS 526 Topic 8 Information Security CS 526 Topic 8 Web Security Part 1 1 Readings for This Lecture Wikipedia HTTP Cookie Same Origin Policy Cross Site Scripting Cross Site Request Forgery 2 Background Many sensitive

More information

CS 2340 Objects and Design - Scala

CS 2340 Objects and Design - Scala CS 2340 Objects and Design - Scala Objects and Operators Christopher Simpkins chris.simpkins@gatech.edu Chris Simpkins (Georgia Tech) CS 2340 Objects and Design - Scala Objects and Operators 1 / 13 Classes

More information

Scala : an LLVM-targeted Scala compiler

Scala : an LLVM-targeted Scala compiler Scala : an LLVM-targeted Scala compiler Da Liu, UNI: dl2997 Contents 1 Background 1 2 Introduction 1 3 Project Design 1 4 Language Prototype Features 2 4.1 Language Features........................................

More information

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.)

Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) Notes from a Short Introductory Lecture on Scala (Based on Programming in Scala, 2nd Ed.) David Haraburda January 30, 2013 1 Introduction Scala is a multi-paradigm language that runs on the JVM (is totally

More information

Web Programming. Lecture 11. University of Toronto

Web Programming. Lecture 11. University of Toronto CSC309: Introduction to Web Programming Lecture 11 Wael Aboulsaadat University of Toronto Servlets+JSP Model 2 Architecture University of Toronto 2 Servlets+JSP Model 2 Architecture = MVC Design Pattern

More information

Ur/Web: A Simple Model for Programming the Web. Adam Chlipala MIT CSAIL POPL 2015 January 15, 2015

Ur/Web: A Simple Model for Programming the Web. Adam Chlipala MIT CSAIL POPL 2015 January 15, 2015 Ur/Web: A Simple Model for Programming the Web Adam Chlipala MIT CSAIL POPL 2015 January 15, 2015 Ur / Web Ur A new general-purpose typed functional language λ Web Tools for implementing modern three-tier

More information

Introduction Basics Concurrency Conclusion. Clojure. Marcel Klinzing. December 13, M. Klinzing Clojure 1/18

Introduction Basics Concurrency Conclusion. Clojure. Marcel Klinzing. December 13, M. Klinzing Clojure 1/18 Clojure Marcel Klinzing December 13, 2012 M. Klinzing Clojure 1/18 Overview/History Functional programming language Lisp dialect Compiles to Java Bytecode Implemented in Java Created by Rich Hickey Version

More information

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar www.vuhelp.pk Solved MCQs with reference. inshallah you will found it 100% correct solution. Time: 120 min Marks:

More information

Apache MyFaces CODI. Mark Struberg, INSO TU-Vienna

Apache MyFaces CODI. Mark Struberg, INSO TU-Vienna Apache MyFaces CODI Mark Struberg, INSO TU-Vienna About Myself struberg@yahoo.de struberg@apache.org http://github.com/struberg freelancer, programmer since 20 years elected Apache Software Foundation

More information

James Writes Java. What I Have Learned by Reading James Gosling's Code. Mike

James Writes Java. What I Have Learned by Reading James Gosling's Code. Mike James Writes Java What I Have Learned by Reading James Gosling's Code Mike Duigou @mjduigou Safe Harbour Statement This is a safe harbour What This Is About I have had good fortune to work with many excellent

More information

HttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests

HttpServlet ( Class ) -- we will extend this class to handle GET / PUT HTTP requests What is the servlet? Servlet is a script, which resides and executes on server side, to create dynamic HTML. In servlet programming we will use java language. A servlet can handle multiple requests concurrently.

More information

Web Application with AJAX. Kateb, Faris; Ahmed, Mohammed; Alzahrani, Omar. University of Colorado, Colorado Springs

Web Application with AJAX. Kateb, Faris; Ahmed, Mohammed; Alzahrani, Omar. University of Colorado, Colorado Springs Web Application with AJAX Kateb, Faris; Ahmed, Mohammed; Alzahrani, Omar University of Colorado, Colorado Springs CS 526 Advanced Internet and Web Systems Abstract Asynchronous JavaScript and XML or Ajax

More information

Improve and Expand JavaServer Faces Technology with JBoss Seam

Improve and Expand JavaServer Faces Technology with JBoss Seam Improve and Expand JavaServer Faces Technology with JBoss Seam Michael Yuan Kito D. Mann Product Manager, Red Hat Author, JSF in Action http://www.michaelyuan.com/seam/ Principal Consultant Virtua, Inc.

More information

Using JavaScript on Client and Server with Project Phobos

Using JavaScript on Client and Server with Project Phobos Using JavaScript on Client and Server with Project Phobos Roberto Chinnici Senior Staff Engineer Sun Microsystems, Inc. http://phobos.dev.java.net July 27, 2007 JavaScript in the browser 2 JavaScript 1.x

More information

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master Oracle 1Z0-864 Java Enterprise Edition 5 Enterprise Architect Certified Master Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-864 Answer: A, C QUESTION: 226 Your company is bidding

More information

Fast Track to Java EE

Fast Track to Java EE Java Enterprise Edition is a powerful platform for building web applications. This platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This

More information

Jquery Manually Set Checkbox Checked Or Not

Jquery Manually Set Checkbox Checked Or Not Jquery Manually Set Checkbox Checked Or Not Working Second Time jquery code to set checkbox element to checked not working. Apr 09 I forced a loop to show checked state after the second menu item in the

More information

Information Security CS 526 Topic 11

Information Security CS 526 Topic 11 Information Security CS 526 Topic 11 Web Security Part 1 1 Readings for This Lecture Wikipedia HTTP Cookie Same Origin Policy Cross Site Scripting Cross Site Request Forgery 2 Background Many sensitive

More information

Unit 5 JSP (Java Server Pages)

Unit 5 JSP (Java Server Pages) Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic, platform-independent method for building Web-based applications. It focuses more on presentation logic

More information

Security. CSC309 TA: Sukwon Oh

Security. CSC309 TA: Sukwon Oh Security CSC309 TA: Sukwon Oh Outline SQL Injection NoSQL Injection (MongoDB) Same Origin Policy XSSI XSS CSRF (XSRF) SQL Injection What is SQLI? Malicious user input is injected into SQL statements and

More information

Object-oriented programming

Object-oriented programming Object-oriented programming HelloWorld The following code print Hello World on the console object HelloWorld { def main(args: Array[String]): Unit = { println("hello World") 2 1 object The keyword object

More information

JVA-563. Developing RESTful Services in Java

JVA-563. Developing RESTful Services in Java JVA-563. Developing RESTful Services in Java Version 2.0.1 This course shows experienced Java programmers how to build RESTful web services using the Java API for RESTful Web Services, or JAX-RS. We develop

More information

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M COURSE OBJECTIVES Enable participants to develop a complete web application from the scratch that includes

More information

Courslets, a golf improvement web service. Peter Battaglia

Courslets, a golf improvement web service. Peter Battaglia Courslets, a golf improvement web service Peter Battaglia Discussion Project Overview Design and Technologies Utilized Rails and REST URLs, URLs, URLs Rails and Web Services What s s exposed as a service?

More information

WWW Architecture I. Software Architecture VO/KU ( / ) Roman Kern. KTI, TU Graz

WWW Architecture I. Software Architecture VO/KU ( / ) Roman Kern. KTI, TU Graz WWW Architecture I Software Architecture VO/KU (707.023/707.024) Roman Kern KTI, TU Graz 2013-12-04 Roman Kern (KTI, TU Graz) WWW Architecture I 2013-12-04 1 / 81 Web Development Tutorial Java Web Development

More information

Java SE 8 Fundamentals

Java SE 8 Fundamentals Oracle University Contact Us: +52 1 55 8525 3225 Java SE 8 Fundamentals Duration: 5 Days What you will learn This Java SE 8 Fundamentals training introduces you to object-oriented programming using the

More information

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336

CSE 336. Introduction to Programming. for Electronic Commerce. Why You Need CSE336 CSE 336 Introduction to Programming for Electronic Commerce Why You Need CSE336 Concepts like bits and bytes, domain names, ISPs, IPAs, RPCs, P2P protocols, infinite loops, and cloud computing are strictly

More information

THE NEW ERA OF WEB DEVELOPMENT. qooxdoo. Andreas Ecker, Derrell Lipman

THE NEW ERA OF WEB DEVELOPMENT. qooxdoo. Andreas Ecker, Derrell Lipman THE NEW ERA OF WEB DEVELOPMENT qooxdoo Andreas Ecker, Derrell Lipman The Ajax Experience, 25-27 July 2007 1 Introduction Client-side JavaScript framework Professional application development Comprehensive

More information

Module 3 Web Component

Module 3 Web Component Module 3 Component Model Objectives Describe the role of web components in a Java EE application Define the HTTP request-response model Compare Java servlets and JSP components Describe the basic session

More information

Developing the First Servlet

Developing the First Servlet Overview @author R.L. Martinez, Ph.D. Java EE (Enterprise Edition) Java EE is a software platform consisting of multiple APIs (Application Programming Interfaces) and components that support and enable

More information

So far, Wednesday, February 03, :47 PM. So far,

So far, Wednesday, February 03, :47 PM. So far, Binding_and_Refinement Page 1 So far, 3:47 PM So far, We've created a simple persistence project with cloud references. There were lots of relationships between entities that must be fulfilled. How do

More information

CSC309: Introduction to Web Programming. Lecture 11

CSC309: Introduction to Web Programming. Lecture 11 CSC309: Introduction to Web Programming Lecture 11 Wael Aboulsaadat Servlets+JSP Model 2 Architecture 2 Servlets+JSP Model 2 Architecture = MVC Design Pattern 3 Servlets+JSP Model 2 Architecture Controller

More information