Play Framework: Introduction

Slides:



Advertisements
Similar presentations
® IBM Software Group Copyright © 2005 IBM Corporation AJAX Toolkit Framework Emerging Internet Technologies Group.
Advertisements

Ruby on Rails Model of MVC. Model-View-Controller Paradigm A way of organizing a software system Benefits: Isolation of business logic from the user interface.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. The Web Services Modeling Toolkit Mick Kerrigan.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Apache Struts Technology A MVC Framework for Java Web Applications.
© 2006 by IBM 1 How to use Eclipse to Build Rich Internet Applications With PHP and AJAX Phil Berkland IBM Software Group Emerging.
Struts 2.0 an Overview ( )
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
Ruby on Rails. What is Ruby on Rails? Ruby on Rails is an open source full-stack web framework. It is an alternative to PHP/MySQL. It can render templates,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
K. Jamroendararasame*, T. Matsuzaki, T. Suzuki, and T. Tokuda Department of Computer Science, Tokyo Institute of Technology, JAPAN Two Generators of Secure.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
An Introduction to Software Architecture
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
1 Dr Alexiei Dingli Web Science Stream Introducing Rails.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Chính phủ điện tử TS. Phạm Văn Tính Khoa CNTT, ĐH Nông Lâm TP.HCM
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Apache Struts Technology A MVC Framework for Java Web Applications.
12. DISTRIBUTED WEB-BASED SYSTEMS Nov SUSMITHA KOTA KRANTHI KOYA LIANG YI.
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
Getting Started With HTML
Windows Communication Foundation and Web Services
J2EE Platform Overview (Application Architecture)
Product Training Program
INF230 Basics in C# Programming
JRA2: Acceptance Testing senarious
Goals Give you a feeling of what Eclipse is.
Google App Engine Mandeep Singh (37926)
Object-Oriented Analysis and Design
Software Design.
Introduction to Advanced Java Programming
CSE 333 – Section 4 HW3, MVC, GTK+.
Architecture Concept Documents
Data Virtualization Tutorial… CORS and CIS
Play Framework: Introduction
Node.js Express Web Services
Content Management System
Haritha Dasari Josue Balandrano Coronel -
Introduction to J2EE Architecture
Unit 6-Chapter 2 Struts.
Course Name: QTP Trainer: Laxmi Duration: 25 Hrs Session: Daily 1 Hr.
Sakai WebApp Structure
SharePoint-Hosted Apps and JavaScript
Social Media And Global Computing Introduction to Visual Studio
Chapter 27 WWW and HTTP.
CIS16 Application Development Programming with Visual Basic
The Model Layer What is Model?
Topics Introduction Hardware and Software How Computers Store Data
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
JavaServer Faces: The Fundamentals
An Introduction to Software Architecture
Chapter 7 –Implementation Issues
(Computer fundamental Lab)
…and web frameworks in general
AJAX Toolkit Framework
CS4961 Software Design Laboratory Understand Aquila Backend
Rule Engine Concepts and Drools Expert
Ponder policy toolkit Jovana Balkoski, Rashid Mijumbi
Chengyu Sun California State University, Los Angeles
Web Application Development Using PHP
Plug-In Architecture Pattern
Presentation transcript:

Play Framework: Introduction COMP 353 Summer 2015-16

Challenges of Java Web App Development Today Lots of Time waiting for server redeploys Long, Ugly error Messages Crazy XML Configuration Bean Failures RESTfull URL-s A lot of complexity Redeploy with a server  In computing based on the Java Platform, JavaBeans are classes that encapsulate many objects into a single object (the bean).  Any model which don't identify resource and the action associated with is restless. restless is not any term but a slang term to represent all other services that doesn't abide with the above definition. In restful model resource is identified by URL (NOUN) and the actions(VERBS) by the predefined methods in HTTP protocols i.e. GET, POST, PUT, DELETE etc.

Play Framework Play Framework is an open-source Web Framework written in Java launched in 2008 A full-stack framework: from compilation to deployment Live code changes when you refresh the browser More friendly error messages directly in browser Type safety in the templates Cool console and build tools Integrated unit testing In computer science, type safety is the extent to which a programming language discourages or prevents type errors. Full stack ;  "full stack" frameworks appeared, that often gathered multiple libraries useful for web development into a single cohesive software stack for web developers to use

MVC approach Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.

The central component of MVC, the model, captures the behavior of the application in terms of its problem domain, independent of the user interface. The model directly manages the data, logic and rules of the application. A view can be any output representation of information, such as a chart or a diagram; multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants. The third part, the controller, accepts input and converts it to commands for the model or view

Convention over configuration Convention over configuration (also known as coding by convention) is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, and not necessarily losing flexibility.

Layout of a Play Project

The app/ directory The app directory contains all executable artifacts: Java and Scala source code, templates and compiled assets’ sources. There are three standard packages in the app directory, one for each component of the MVC architectural pattern: app/controllers app/models app/views

You can add your own packages, for example an app/utils package. There is also an optional directory called app/assets for compiled assets such as LESS sources and CoffeeScript sources .

The public/ directory Resources stored in the public directory are static assets that are served directly by the Web server. This directory is split into three standard sub-directories for images, CSS stylesheets and JavaScript files. You should organize your static assets like this to keep all Play applications consistent.

The conf/ directory The conf directory contains the application’s configuration files. There are two main configuration files: application.conf, the main configuration file for the application, which contains standard configuration parameters routes, the routes definition file. If you need to add configuration options that are specific to your application, it’s a good idea to add more options to the application.conf file. If a library needs a specific configuration file, try to file it under the conf directory.

The lib/ directory The lib directory is optional and contains unmanaged library dependencies, ie. all JAR files you want to manually manage outside the build system. Just drop any JAR files here and they will be added to your application classpath.

The project/ directory The project directory contains the sbt build definitions: plugins.sbt defines sbt plugins used by this project Build.scala defines your application build script.

The target/ directory The target directory contains everything generated by the build system. classes/ contains all compiled classes (from both Java and Scala sources). classes_managed/ contains only the classes that are managed by the framework (such as the classes generated by the router or the template system). resource_managed/ contains generated resources, typically compiled assets such as LESS CSS and CoffeeScript compilation results. src_managed/ contains generated sources, such as the Scala sources generated by the template system.

Typical .gitignore file Generated folders should be ignored by your version control system. logs project/project project/target target tmp

Because Play uses UTF-8 as single encoding, it’s very important that all text files hosted in these directories are encoded using this charset. Make sure to configure your text editor accordingly. Now if you’re a seasoned Java developer, you may wonder where all the .class files go. The answer is nowhere: Play doesn’t use any class files but reads the Java source files directly. Under the hood we use the Eclipse compiler to compile Java sources on the fly. That allows two very important things in the development process. The first one is that Play will detect changes you make to any Java source file and automatically reload them at runtime. The second is that when a Java exception occurs, Play will create better error reports showing you the exact source code.

Samples https://www.playframework.com/documentation/2.0/Samples