Enterprise Systems & Frameworks

Similar documents
Project Horizon Technical Overview. Bob Rullo GM; Presentation Architecture

Project Horizon Technical Overview. Steven Forman Principal Technical Consultant

Rails: MVC in action

Open Source Library Developer & IT Pro

Front End Programming

(p t y) lt d. 1995/04149/07. Course List 2018

relational Key-value Graph Object Document

MongoDB Web Architecture

Using Data Science to deliver Workforce & Labour Market Insights. Gary Gan Co-Founder, JobKred

Backend Web Frameworks

Data 101 Which DB, When. Joe Yong Azure SQL Data Warehouse, Program Management Microsoft Corp.

Etanova Enterprise Solutions

Database Application Architectures

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Etanova Enterprise Solutions

Scaling DreamFactory

Masters in Web Development

Advanced Web Applicatio Design Patter. Rupak Raj Ghi

WebStore9 Services. Web Development Services

Data 101 Which DB, When Joe Yong Sr. Program Manager Microsoft Corp.

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

Remote Health Service System based on Struts2 and Hibernate

Implementing a Numerical Data Access Service

Bringing Together One ASP.NET

FILE - JAVA WEB SERVICE TUTORIAL

Eclipse Java Ejb 3.0 Tutorial For Beginners With Examples Pdf

CIS 086 : Week 1. Web Development with PHP and MySQL

Ruby on Rails 3 March 14th, 2011 Ken Li Allison Pon Kyra Leimert Matt Delaney Edward Bassett

Lessons learned from real-world deployments of Java EE 7. Arun Gupta, Red

DevShala Technologies A-51, Sector 64 Noida, Uttar Pradesh PIN Contact us

Drupal 7 Sql Schema Api Datetime

Real Life Web Development. Joseph Paul Cohen

Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

An Application for Monitoring Solr

How to Use a Tomcat Stack on vcloud to Develop Optimized Web Applications. A VMware Cloud Evaluation Reference Document

Database Applications

Distributed Systems. 29. Distributed Caching Paul Krzyzanowski. Rutgers University. Fall 2014

App Engine: Datastore Introduction

Get in Touch Module 1 - Core PHP XHTML

Fermin Aguilar 5907 University Blvd. SE SUMMARY

Migrating traditional Java EE applications to mobile

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

At present we use several collaboration (web) tools, like SuperB website Wiki SVN Document management system etc.

About the Authors. Who Should Read This Book. How This Book Is Organized

Struts: Struts 1.x. Introduction. Enterprise Application

Developing Applications with Java EE 6 on WebLogic Server 12c

Index. Bower, 133, 352 bower.json file, 376 Bundling files, 157

ASP.NET MVC Training

Development of E-Institute Management System Based on Integrated SSH Framework

Goran Halusa. Summary. Experience. Web Developer at Quotient

Overview of Web Application Development

COURSE 9 DESIGN PATTERNS

Webservices In Java Tutorial For Beginners Using Netbeans Pdf

WebDev. Web Design COMBINES A NUMBER OF DISCIPLINES. Web Development Process DESIGN DEVELOPMENT CONTENT MULTIMEDIA

The project is conducted individually The objective is to develop your dynamic, database supported, web site:

Courses For Event Java Advanced Summer Training 2018

PaaS Anywhere. Isaac Christoffersen Architect, Vizuri

DOC // JAVA TOMCAT WEB SERVICES TUTORIAL EBOOK

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

DBPowder-web: Web Application Development Framework with RDBMS

20486: Developing ASP.NET MVC 4 Web Applications

INTRODUCTION TO ZEND FRAMEWORK

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

Building Effective ASP.NET MVC 5.x Web Applications using Visual Studio 2013

CSCI 1320 Creating Modern Web Applications. Content Management Systems

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

Introduction. Who wants to study databases?

Basics of Web. First published on 3 July 2012 This is the 7 h Revised edition

More reading: A series about real world projects that use JavaServer Faces:

Web Software Model CS 4640 Programming Languages for Web Applications

Copyright 2014 Blue Net Corporation. All rights reserved

PaaS Anywhere. Isaac Christoffersen Architect, Vizuri

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Transform your data estate with cloud, data and AI

Now go to bash and type the command ls to list files. The unix command unzip <filename> unzips a file.

P a g e 1. Danish Tecnological Institute. Developer Collection Online Course k Developer Collection

Ruby on Rails. SITC Workshop Series American University of Nigeria FALL 2017

Topics. History. Architecture. MongoDB, Mongoose - RDBMS - SQL. - NoSQL

1

Full version is >>> HERE <<<

Caliber Data Training

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Index. C CakePHP framework, 232 Cascading Style Sheets (CSS)

Announcements. PS 3 is out (see the usual place on the course web) Be sure to read my notes carefully Also read. Take a break around 10:15am

Module 3 Web Component

Using and Developing with Azure. Joshua Drew

Evaluation Guide for ASP.NET Web CMS and Experience Platforms

Developing ASP.NET MVC 4 Web Applications

JDK-WildFly-NetBeans Setup Local

COMP9321 Web Application Engineering

Mobile Device Architecture CS 4720 Mobile Application Development

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

Visual Studio Course Developing ASP.NET MVC 5 Web Applications

NoSQL database and its business applications

Keeping Rails on the Tracks

STATE OF MODERN APPLICATIONS IN THE CLOUD

Where Do We Go From Here? Why Many IT Staff are Living in the Past

Windows Azure Overview

Programming in PHP Have you Cake? Presenter: Nguyen Thanh Hai Mar. 30 th, 2014

Use Case: Scalable applications

Transcription:

Enterprise Systems & Frameworks CS25010 - Web Programming Connor Goddard 5 th November 2015 Aberystwyth University 1

INTRODUCTION In today s session, we will aim to cover the following: Multi-tier Architectural Patterns Enterprise Systems Web Frameworks 2

INTRODUCTION If you re on Twitter, jump on your phones! During the presentation, look out for tweets from @cgddrd with the hashtag #cs25010. These tweets will contain links to other material you may find useful. Feel free to tweet back with any questions. 3

A LITTLE BIT ABOUT ME I m a fifth-(and final!)-year MEng Software Engineering student. Previous web modules include: CS15020, CS25010, CS25210, SE31520 & SEM5640 (so pretty much them all ) I spent my IY working at Renishaw plc, developing advanced web and mobile applications (Android, ios & hybrid) I ve played around with most web-related technologies including: PHP, ASP.NET, Node.js, Ruby-on-Rails, Python & OO-Javascript 4

WEB APPLICATIONS What do we mean by a web application? What makes a web application different to other applications? Where does the cloud fit into it all? 5

WEB APPLICATIONS To a typical consumer, web applications can appear mystical. [1] Most do not appreciate all that has to go on under the hood. What problems could this present on development projects? [1] http://imgflip.com 6

ENTERPRISE SYSTEMS When designing non-trivial web applications, we typically will want to decompose the system into smaller parts. Separate presentation from business logic and data sources. Possibly delegate across multiple servers. These are known as multi-tier/n-tier or enterprise systems. As a consequence, interconnectivity between separate systems and their servers becomes essential. 7

MULTI-TIER ARCHITECTURES Web Server Application Server Database Server [1] https://en.wikipedia.org/wiki/multitier_architecture 8

MULTI-TIER ARCHITECTURES Presentation Tier Web Server Model View Controller e.g. HTML, ASP.NET, PHP, JSP, XML, JSON Logic Tier Application Server Business Logic Business Objects Business Objects e.g. PHP, JavaBeans, C#, Ruby Data Tier Database Server RDBMS OO-DMS File Stores e.g. MySQL, PostgreSQL, MongoDB, XML 9

MULTI-TIER ARCHITECTURES Example: Online Store Presentation Layer Logic Layer Data Layer 10

MULTI-TIER ARCHITECTURES There is a distinction between tiers and layers. What is the difference between the two terms? 11

MULTI-TIER ARCHITECTURES There is a clear distinction between tiers and layers. What is the difference between the two terms? Layer: Logical organisation/separation of code (e.g. separating code associated with presentation from that of business logic) Tier: Physical deployment of layers (e.g. across multiple servers) 12

MULTI-TIER ARCHITECTURES Why would we want to use multi-tier systems? What would be the advantages? What would be the disadvantages? 13

MULTI-TIER ARCHITECTURES Why would we want to use multi-tier systems? Advantages: Separation of concerns Improved scalability Help to avoid single point of failure Improved problem solving/bug tracking (isolation of issues to specific part of system) Easier mapping of system entities to developer workload Disadvantages: Could prove to be overkill for very small projects Likely increase in code size and complexity Steeper learning curve - greater potential for bugs to be introduced Use of M-TA introduces greater risk for poor design choices - these can become expensive to fix later Easier mapping of system entities to developer workload - Too many cooks spoil the broth. 14

WEB FRAMEWORKS 15

WEB FRAMEWORKS What frameworks do people know about? Has anyone got any preferred frameworks? 16

WEB FRAMEWORKS PHP Adobe Coldfusion C# / VB / F# Javascript Javascript PHP Ruby 17

WEB FRAMEWORKS Good community support Long history High feature set Fast and easy to scale Lightweight + good community support Simple to set-up Many tools out of the box 18

WEB FRAMEWORKS Frameworks aim to assist in the development of web applications by alleviating some of the overhead associated with common tasks: Database access, ORM, templates, authorisation, web services, scaffolding, testing, caching, session management etc. Web frameworks are not the same as CMS software (e.g. Wordpress or Drupal) Frameworks provide general solutions to developing web applications. CMS software builds on top of underlying frameworks. 19

SCAFFOLDING Scaffolding refers to a process whereby the skeleton of an application is automatically generated by the web framework. Typically the reference to a database is given, from which the code relating to standard CRUD operations is enacted without input from the developer. Scaffolded systems provide a good starting point from which the main application can be built upon. [1] [1] https://scaffoldinginsouthwest.wordpress.com/ 20

SCAFFOLDING - RoR One of the first mainstream frameworks to support scaffolding was Ruby-on-Rails. Generating a new web application in RoR takes 3 lines of code: 1 # Step 1: Generate new web application. 2 rails new mywebapp && cd mywebapp 3 4 # Step 2: Create new model entity and scaffold 5 CRUD operations (controller and views). 6 rails generate scaffold User surname firstname 7 age:integer is_student:boolean 8 9 # Step 3: Migrate the new model into SQLite 10 database (pre-created) 11 rake db:migrate 12 13 # Step 4: Start the server (navigate to http://<url>/users) 14 rails server 21

SCAFFOLDING - ASP.NET ASP.NET is another framework that provides automatic creation of web controllers and views from a pre-existing data model. This is particularly useful within MVC projects where we are also utilising object-relational mapping. 22

OBJECT-RELATIONAL MAPPING Object-relational mapping (ORM) provides a mechanism for representing and querying relational entities using an objectbased paradigm. In other words: ORM allows us to map data stored in a relational/tabular format into an OO format for use in applications. ORM helps to address an issue known as Object-Relational Impedance Mismatch. 23

OBJECT-RELATIONAL MAPPING Relational - Object mapping: Relational Model ORM Table Class Row Instance Field Property With ORM, it doesn t matter what persistent storage mechanism we are using (e.g. MySQL, NoSQL, XML data files etc.) The framework handles this all for us. 24

FRAMEWORKS, ORM & MVC Many frameworks adopt an MVC pattern, supported by mechanisms including scaffolding and ORM. Generated via ORM Template files used to render dynamic data to end user (e.g. HTML, XML, JSON) Class for each model responsible for: Handling incoming requests Retrieving model data Re-directing user to appropriate view templates [1] https://en.wikipedia.org/wiki/model view controller [1] 25

MVC - MODEL ASP.NET (C#) 1 namespace HelloMVC.Models 2 { 3 public class BlogPost 4 { 5 6 public virtual int Id 7 { 8 get; set; 9 10 } 11 12 public virtual string Title 13 { 14 get; set; 15 16 } 17 18 } 19 } PHP 1 <?php 2 3 class BlogPost { 4 5 public $id; 6 public $title; 7 8 public function construct($id, $title) { 9 $this->id = $id; 10 $this->title = $title 11 } 12 13 function save(); 14 function settitle(); 15... 16 17 }?> 26

MVC - CONTROLLER ASP.NET (C#) PHP 1 namespace HelloMVC.Controllers 2 { 3 public class BlogPostController : Controller 4 { 5 private HelloMVCContext db = new HelloMVCContext(); 6 7 public ActionResult Index() 8 { 9 return View(db.BlogPosts.ToList()); 10 } 11 12 public ActionResult Create() GET Request 1 <?php 2 3 class BlogController { 4 5 function indexaction(); 6 function createaction(); 7 8... 9 10 }?> 13 { 14 return View(); 15 } 16 17 [HttpPost] 18 [ValidateAntiForgeryToken] 19 public ActionResult Create([Bind(Include = "Id,Title")] BlogPost blogpost) 20 { 21 if (ModelState.IsValid) 22 { 23 db.blogposts.add(blogpost); 24 db.savechanges(); 25 return RedirectToAction("Index"); 26 } 27 28 return View(blogPost); 29 } 30 } 31 } POST Request 27

MVC - VIEW 1 @model IEnumerable<HelloMVC.Models.BlogPost> ASP.NET (Razor) 2 3 @{ 4 ViewBag.Title = "Blog Posts"; 5 } 6 7 <h2>list of Posts</h2> 8 9 <ul> 10 @foreach (var item in Model) { 11 12 13 <li> 14 <a href="@html.actionlink("details", "Details", new { id=item.id })"> 15 @Html.DisplayFor(modelItem => item.title) 16 </a> 17 </li> 18 } 19 20 </ul> PHP 1 {% block title %}Blog Posts{% endblock %} 2 3 {% block body %} 4 5 <h2>list of Posts</h2> 6 7 <ul> 8 {% for item in blog_posts %} 9 <li> 10 <a href="{{ path('blog_show', {'id': post.id}) }}">{{ post.title }}</a> 11 </li> 12 {% endfor %} 13 </ul> 14 15 {% endblock %} 28

APPLICATION SERVERS Of course, once we have developed our web application, we need to be able to host and run it. Application Server: Software designed to handle communication between a front-end website, and a business back-end system. Features include: Performance optimisation (caching, profiling etc.) Database management (population, transactions etc.) Load Balancing Logging/Debugging Security Data integrity support Deployment Recovery management (application isolation) 29

APPLICATION SERVERS Application servers provide services and features appealing for enterprise systems. Remember: Enterprise systems imply large volumes of data, high potential for scalability and co-ordination of business processes across multi-tier architecture. [1] [1] http://maaw.info/articlesummaries/artsumdavenport98.htm 30

APPLICATION SERVERS Glassfish (Oracle) JavaEE IIS (Microsoft) ASP.NET Wildfly (Red Hat) Java Zend Server PHP Tomcat (Apache) Java Servlets & JSP 31

IDEAS FOR ASSIGNMENT While use of frameworks and multi-tier architectures is not an explicit requirement for the assignment, you could always investigate their use for your own learning plus perhaps for some extra marks (cough cough) Ideas to consider include: Database management functions Templates/server-side includes ORM 32

Many thanks for your time. Questions? @cgddrd clg11@aber.ac.uk http://cgddrd.me 33