ORM IN WEB PROGRAMMING. Course project report for 6WW Erik Wang



Similar documents
Portals, Portlets & Liferay Platform

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Research Article. ISSN (Print) *Corresponding author Lili Wang

This presentation will provide a brief introduction to Rational Application Developer V7.5.

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.

Enterprise Application Development In Java with AJAX and ORM

OptimalJ Foundation. PSM EJB Model. Roadmap. What is the EJB model? EJB model as a PSM model Mapping the EJB model Model elements and code generation

Performance Evaluation of Java Object Relational Mapping Tools

Requirements Design Implementation. Software Architectures. Components Software Component Architecture. DSSA: Domain-Specific Software Architectures

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Performance Comparison of Persistence Frameworks

Web Application Development

Java EE Web Development Course Program

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

Introduction to Databases

Rapid Application Development. and Application Generation Tools. Walter Knesel

Software Architecture

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Chapter -5 SCALABILITY AND AVAILABILITY

C/S Basic Concepts. The Gartner Model. Gartner Group Model. GM: distributed presentation. GM: distributed logic. GM: remote presentation

CrownPeak Java Web Hosting. Version 0.20

JEE Web Applications Jeff Zhuk

Database Application Design and Development. What You Should Know by Now

JAVA/J2EE DEVELOPER RESUME

Journal of Chemical and Pharmaceutical Research, 2015, 7(3): Research Article

Web and Enterprise Applications Developer Track

Java Platform, Enterprise Edition (Java EE) From Yes-M Systems LLC Length: Approx 3 weeks/30 hours Audience: Students with experience in Java SE

PERFORMANCE EVALUATION OF JAVA OBJECT-RELATIONAL MAPPING TOOLS HASEEB YOUSAF. (Under the Direction of John A. Miller)

Java DB2 Developers Performance Best Practices

Client/server is a network architecture that divides functions into client and server

Web Development Frameworks

Nicholas S. Williams. wrox. A Wiley Brand

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

Resume of Victor Kachan (Web developer, Java developer)

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

10. Ausblick Zusammenfassung. Datenbanksysteme und ihre Realisierung. Datenmodelle. Anwendungen. RDM (Kap. 3) Transaktionen (Kap.

CloudCERT (Testbed framework to exercise critical infrastructure protection)

Building Web Applications, Servlets, JSP and JDBC

How To Write A Web Framework In Java

B. WEB APPLICATION ARCHITECTURE MODELS

Announcements. Comments on project proposals will go out by in next couple of days...

How To Extend Content Broker Storage On Libs Libs (Libs) With Libs 4.5) And Libs 5.5

Reusing Existing * Java EE Applications from Oracle SOA Suite

Agile Best Practices and Patterns for Success on an Agile Software development project.

X-DB Modernize. What s Inside. Database Modernization, including DDS-to-DDL Conversion and Detailed Impact Analysis.

WEB DEVELOPER Reports to: Technical Lead. Digital and Media

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

Grails: Accelerating J2EE Application Development

Enterprise Java Web Application Frameworks & Sample Stack Implementation

SSC - Web development Model-View-Controller for Java web application development

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

applications. JBoss Enterprise Application Platform

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

UBS Training Course Catalog

Using Relational Databases to Provide Object Persistence

The Oracle Fusion Development Platform

Core Java+ J2EE+Struts+Hibernate+Spring

1. Introduction What is Slice? Background Why Slice? Purpose of this Document Intended Audience...

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

1. INTRODUCTION TO RDBMS

JSR-303 Bean Validation

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Client Overview. Engagement Situation. Key Requirements for Platform Development :

Credits: Some of the slides are based on material adapted from

Client-server 3-tier N-tier

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

Agilité des applications Java EE 6

SENIOR WEB DEVELOPER

Java (J2SE & J2EE) and Web Development Training Catalog

CACHÉ: FLEXIBLE, HIGH-PERFORMANCE PERSISTENCE FOR JAVA APPLICATIONS

Code : 1P3127 M.Tech. II Semester Regular Examinations, July/August CLOUD COMPUTING (CSE) Time: 3 hours Max Marks: 60

How To Develop A Web Dialog For An Org Database With A Database On A Computer (Oracle)

Web Development in Java

WebSphere Server Administration Course

Data Management for Biobanks

Converting Java EE Applications into OSGi Applications

Object Relational Mapping for Database Integration

Object-Relational Databases

Detailed Table of Contents

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

OBJECTS AND DATABASES. CS121: Introduction to Relational Database Systems Fall 2015 Lecture 21

The Enterprise Java Internet Provider

Performance Optimization For Operational Risk Management Application On Azure Platform

B M C S O F T W A R E, I N C. BASIC BEST PRACTICES. Ross Cochran Principal SW Consultant

Java EE 7: Back-End Server Application Development

Tuning Your GlassFish Performance Tips. Deep Singh Enterprise Java Performance Team Sun Microsystems, Inc.

MBARI Deep Sea Guide: Designing a web interface that represents information about the Monterey Bay deep-sea world.

There and Back Again As Quick As a Flash

Service Oriented Architectures

GlassFish Security. open source community experience distilled. security measures. Secure your GlassFish installation, Web applications,

Project Manager 1 Post == Experience years in Project Management in reputed company, Salary Rs.1,20,000/-

PG DAC. Syllabus. Content. Eligibility Criteria

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

JBOSS ENTERPRISE APPLICATION PLATFORM MIGRATION GUIDELINES

Alice. Software as a Service(SaaS) Delivery Platform. innovation is simplicity

A Standard Modest WebSite

Introduction to Computing. Lectured by: Dr. Pham Tran Vu

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

Transcription:

ORM IN WEB PROGRAMMING Course project report for 6WW Erik Wang

Problems with web programming When people do the web design Design from functional aspects Programmer also needs to understand database Code is not sophisticated This keeps long from CGI, ASP, PHP, JSP Traditional web programming has some problems Low efficiency Hard to maintain Hard to re-use

Evolution of web system CGI JSP Web Service Present layer ASP PHP Present layer Application Business logic layer Functions Library Business Model Entity Business process ORM Database layer DBMS Data layer DBMS Data service Data in memory More abstract observation of business model Various data layer source and present method New database-like-system fit for large scale and fast data computing

ORM Object relation mapping A Framework to do database memory mapping Free developers from database The idea from JAVA EE EJB entity bean May implementations toplink, JPA, active record etc. Hibernate is an implementation of ORM which can be used for Web Application

Data persistent From the software designer s view: You just know the data will be saved, but you don t need to worry who will do it and how they do it Data in memory is not persistent Data in database is persistent From the programmer s aspect Call a persistent method without use SQL query

New method to thinking - MDE Think about the object from the real world - Abstract things, using natural language to describe them - Business analyst and domain expert can describe requirements better

Hibernate Everything Data

Approach by Hibernate Hibernate provides a new method to design the system 1. Design the system from data aspect 2. Generate class from database entity 3. Use DAO to access data 4. Work with other frameworks

Using Hibernate Direct engineering and Reverse engineering From JAVA code to database generate DDL From database to JAVA code generate JAVA CLASS Relationship mapping define in XML or JAVA annotation 2 level of Cache

Case study A news web system Requirements statement A department news web site Publish news to the website - CRUD Highlight News has many reference objects: Image, reviews, related news, etc. Challenges Too many functions to be implemented Data relations are complex

Case study Old idea of design Consider from functional consideration Function 1: Login/Logout - login.php Function 2: Show a list showallnews.php Function 3: Add a news addnews.php Database: table account table news table account_connect_news Peter, Programmer If add a new entry: A series of database queries are required

Case study - Access database Access to database Use JDBC/ODBC Code in page $hostname_cnn1 = "localhost"; $database_cnn1 = "macmovie"; $username_cnn1 = "macmovie"; $password_cnn1 = "macmovie"; $cnn1 = mysql_pconnect($hostname_cnn1, $username_cnn1,$password_cnn1) or trigger_error(mysql_error(),e_user_error); require_once('dbconn.php'); include 'util.php'; mysql_select_db($database_cnn1, $cnn1); No more SQL query Peter, Programmer

Case study Abstract the problem Abstract the factors in the problem Entity News, Images, Comments etc.. Properties Michal, Modeler SN, NAME, CONTENT, DATE Methods News can be: added, posted, audited, modified, removed, etc.. Images can be: added, posted, audited, removed, attached, etc...

Case study - Relation Mapping tdnews.xml <set name="tdaddonimgs" cascade="all" table="tdnewsaddonimgs" > <key column="sn" /> <many-to-many column="isn" unique="true" class="eznews.tdaddonimgs" /> </set> Dave, DB guru Reverse Engineering Peter, Programmer tdaddonimgs.xml <join table="tdnewsaddonimgs" optional="true" inverse="true"> <key column="isn" /> <many-to-one name="news" column="sn" not-null="true" /> </join>

Case study Generate JAVA class Peter, Programmer

Case study Entity to database entity Hibernate do database access works Includes: Mapping data type to db type Generate entity JAVA class or DB DDL Translate JAVA methods to SQL queries Hint: Use connection pool work with Hibernate

Case study example: add news Get a news object and some image objects Add properties to news and image Refer image to the news Get a transaction object from session factory Call SaveorUpdate() What actually happen are: 1. Run a insert query into table news 2. Run some insert queries into table images Peter, Programmer 3. Run some insert queries into middle table news_image

Case study - Following steps Implement methods by JAVA programming Enclosure to a function Servlet Build web page HTML/CSS/JS part Combine Servlet to web page (JSP) Use other JAVA solution to be better (Spring, Structs)

Conclusions ORM provides a new method to design software Advantages: Re-use models from other system Web developers don t need care about database layer Improve the quality of the source codes Disadvantage ORM is not a complete MDE implement Additional layer that increasing potential risk (N+1 problem)

Thank you

Case study Adopting MDE Database design Consider from data flow aspect What kind of data will be composited What are the state changes for the objects Design the system from object aspect Attributions? Functions?

N+1 problem from hibernate