-Profile Direct- – Introduction to Profile Direct – Objectives



-Profile Direct- – Introduction to Profile Direct – Objectives

0 0


revealjs


On Github pmpfl / revealjs

-Profile Direct-

Introduction to Profile Direct

Created by ImpactZero Software

Objectives

  • Learn what is the Profile Direct. ​
  • Get familiar with the new logical architecture of Profile

Fidelity Profile Direct Solution Overview

What is Fidelity Profile Direct?

Part of the Profile suite of products built specifically as a servicing platform to provide unique perspectives into Profile Data.

  • WebClient: Consumer Internet Banking Perspective

  • WebCSR: Call Center and Branch Perspective​

  • WebTeller: Bank Teller Perspective​

  • WebAdmin: Profile and third-party System Configuration Perspective​

  • WebCSR: Call Center and Branch Perspective​

Profile Direct Architectural

  • J2EE Standards-based and Open Source Architecture:

    • Struts/Spring Java Frameworks​
    • Apache Web Server (Default Web Server)​
    • Tomcat App Server (Default App Server)​
    • Linux (Default OS)​
  • Designed for a Single Profile Host, not targeted as an Integration Hub;

  • Allows for easy 3rd party integration (e.g., eFunds, CheckFree);
  • Keep it Simple. All Business Logic resides in Profile;
  • WebCSR: Call Center and Branch Perspective​

-Profile Direct-

Strus 1.x

Day 1

Created by ImpactZero Software

Topics for today

  • Understanding Struts
  • Setting Up Struts

Understanding Struts

What is Apache Struts?

  • An MVC Framework?

    Struts provides a unified framework for deploying servlet and JSP applications that use the MVC architecture.

  • A Collection of Utilities?

    Struts provides utility classes to handle many of the most common tasks in Web application development.

  • A Set of JSP Custom Tag Libraries?

    Struts provides custom tag libraries for outputting bean properties, generating HTML forms, iterating over various types of data structures and conditionally various types of data structures, and conditionally outputting HTML.

Advantages

  • Centralized file-based configuration

  • Form Beans

    In JSP, you can use property="*" with jsp:setProperty to automatically populate a JavaBean component based on incoming request parameters. Apache Struts extends this capability to Java request parameters. Apache Struts extends this capability to Java code and adds in several useful utilities, all of which serve to greatly simplify the processing of request parameters.

  • Form field validation

Setting Up Struts

Struts Documentation

  • Main API (JavaDoc) - Link

  • User’s Guide - Link

First Project with maven

  • Create a Hello World Project, with the following structure

-Profile Direct-

Strus 1.x

Day 2

Created by ImpactZero Software

Topics for today

  • Struts flow of control
  • Result Mapping

Struts flow of control

Struts flow of control

  • The user requests a form

  • The form is submitted to a URL of the form

  • The execute method of the Action object is invoked

    The Action uses mapping.findForward to return a condition, and the conditions are mapped by struts-config.xml to various JSP pages.

  • Struts forwards request to the appropriate JSP page

Authentication Project

Edit project from Day 1

  • Create a form for authentication with :

    • Password

    • Email

  • If password length is less than six characters

    Display a error screen

  • If password length is greater than six characters

    Display a success screen

-Profile Direct-

Strus 1.x

Day 3

Created by ImpactZero Software

Topics for today

  • Using the Struts html: tags to build HTML forms

Flow of control

  • The user requests a form

    This form is built with html:form, html:text, and similar elements
  • The form is submitted to a URL of the form blah.do

  • The execute method of the Action object is invoked

  • Struts forwards request to the appropriate JSP page

    The page can use bean:write or the JSP 2.0 EL to output bean properties

New Techniques

  • Using html:form to declare form in initial JSP page

    The action should exactly match path attribute of action element in struts-config.xml
  • Using the Struts html:form elements

    The action should exactly match path attribute of action element in struts-config.xml
  • Using html:text and similar elements to declare the input fields of the form.

  • Using html:text and similar elements to declare the input fields of the form.

    								<html:text property="firstName">
    								</html:text>
    							

Authentication Project

Edit Day 2 project

Please use html: elements

  • If user authenticate with success

    Display the user name and password in a new jsp

-Profile Direct-

Strus 1.x

Day 4

Created by ImpactZero Software

Topics for today

  • Using Properties Files
  • Internationalization

Advantages of Properties Files

  • Centralized updates

    If a message is used in several places, it can be updated with a single change. This is consistent with the Struts philosophy of making as many changes as possible in config files, not in Java or JSP code
  • I18N

    If you use messages pervasively in your JSP pages, you can internationalize your application by having multiple properties files corresponding to the locale, as with standard I18N in Java MessageResources.properties MessageResources.properties MessageResources.properties

Loading Locale-Specific Properties Files

  • Default properties file

    When you say
    								<message-resources parameter="someName" ...="">
    								</message-resources>
    							
    WEB-INF/classes/someName.properties is loaded and treated as the default file
  • More specific properties file

    The system automatically looks for additional, specialized files corresponding to your Locale

Parameterized Messages

  • Properties File

    error.missing=You must enter {0}, you idiot!

Authentication Project

Edit Day 3 project

  • Create a message resources properties

  • Create a parameterized message.

    If the user logins wiht success the following should appear: Welcome {0}

-Profile Direct-

Strus 1.x

Day 5

Created by ImpactZero Software

Topics for today

  • DispatchAction

Struts Flow of control

  • The user requests a form

    The form has radio button, push button, or hidden field with a special name, and whose values correspond to method names
  • The form is submitted to a URL of the form blah.do.

  • The method is selected based on the special form parameter.

  • Struts forwards request to the appropriate JSP page.

New Capabilities

  • The form has a special parameter

  • The parameter is declared in struts-config.xml

  • The form bean needs no setter method for the special parameter

  • Extend DispatchAction instead of Action

Authentication Project

Edit Day 4 project

  • Create a "Sign Up" button on the login page.

    Both buttons should use the LoginAction
  • Create a Sign Up Form

    Data required:
    • First Name:
    • User Name:
    • Password:
    • Email:

-Profile Direct-

Strus 1.x

Day 6

Created by ImpactZero Software

Topics for today

  • Exception Handling

Objectives

  • Create :
    Page for specific type of exception Page for generic Exception Handler for specific type of exception

Approaches

  • Give page for specific type of exceptio

    Use exception entry in global-exceptions or action
  • Give page for generic Exception

    Use exception entry in global-exceptions, or Use exception-type entry in web.xml, or use error-page attribute of page directive
  • Give custom handler for specific type of exception

    Use exception entry in global-exceptions or action, and Define subclass of ExceptionHandler

Authentication Project

Edit Day 5 project

  • Create a error page - 404 Error

  • Create an exception - "ImpactZeroException"

    Create a new page for this exception It will be triggered if the user name length is greater than 12
  • Create custom exception handler

    Create a message based on the error

-Profile Direct-

Strus 1.x

Day 7

Created by ImpactZero Software

Topics for today

  • Manually Validating Input

Objectives

  • Performing validation in the ActionForm

Performing Validation in the ActionForm

  • Create an ActionForm method called validate

  • Create a property file with error messages

  • Use in input form

  • No validation logic needed in Action

Using Parameterized Error Messages

  • Error messages reflect runtime valuese

  • Less repetition of error messages

  • More meaningful error messages for situations other than missing-data

  • No validation logic needed in Action

Authentication Project

Edit Day 6 project

  • Validate Login and Signup page - Using Parameterized Error Messages

-Profile Direct-

Strus 1.x

Day 8

Created by ImpactZero Software

Topics for today

  • Using automatic validation

Automatic validation

  • Consolidates validation code

  • Lets you use standard validation rules

  • Runs on server; can optionally also run on client

  • Described by XML files

Steps in Using Automatic Validation

  • Configure struts-config.xml

  • Edit the properties file

  • Put validation rules in validation.xml

  • Have form bean extend ValidatorForm

  • Use html:errors as before

Authentication Project

Edit Day 7 project

  • Create a combined validation (Manual and automatic) for Login and Signup pages

-Profile Direct-

Strus 1.x

Day 9

Created by ImpactZero Software

Topics for today

  • Using Tiles definitions file

Tiles Motivations

  • Avoiding repetition

  • Centralized changes

  • Usage of config files

Tiles Basics

  • Sketch out desired layout

    Do this on paper
  • Make template file that represents layout

  • Create JSP pages that define layout pieces

  • Define layouts in WEB-INF/tiles-defs.xml

  • Create JSP pages that use layouts

Authentication Project

Edit Day 8 project

  • Convert the project to use Tiles

  • Create a base.jsp with the following entries:

    title

    header

    content

    footer

-Profile Direct-

Strus 1.x

Day 10

Created by ImpactZero Software

Topics for today

  • Using the JSP Standard Tag Library

The JSTL Expression Language

  • Accessed via ${expression}

  • Similar to JavaScript and XPath

  • Provides shorthand notation to access:

    Attributes of standard servlet objects Bean properties Map, List, and Array elements

Formatting Tags

  • fmt:formatNumber

    Formats a numeric value as a number, currency value, or percent, in a locale-specific manner
  • fmt:parseNumber

    Reads string representations of number, currency value, or percent
  • fmt:formatDate

  • fmt:parseDate

  • fmt:timeZone

  • fmt:setTimeZone

Authentication Project

Edit Day 9 project

  • Display a list on the success login page with:

    Restaurant Name

    Price

    Date added

  • Use Format tags

-Profile Direct-

Spring Core

Day 1

Created by ImpactZero Software

Topics for today

  • What is Spring?
  • Main Spring modules

What is Spring?

  • Spring is a framework with many modules

  • Core module: dependency injection

    Lets you define an XML file that specifies which beans are created and what their properties are
  • Second most important module: AOP

    “Aspect Oriented Programming” refers to the ability to add side effects to a class’ method calls without modifying the class’ source code Lets you separate business logic from system services

Dependency Injection

  • Spring is useful when :

    You have objects whose implementations change often These objects are defined in bean definition file, isolating Java code from changes in the implementation You supply initialization values via constructors or setters
  • Spring is even more useful when

    The initialization values are other beans. That is, your Spring-managed objects depend on other bean values. Supplying these values in bean definition file is called Supplying these values in bean definition file is called “dependency injection” Because Java code doesn’t have to depend explicitly on specific concrete values specific concrete values Instead, bean values are passed in (“injected”) at run time Also called “Inversion of Control” (IoC)

Dependency Injection Process

  • Design depending types to receive implementations

    Allow dependencies to be supplied using property setters or constructors
  • Avoid constructing objects from the client to fulfill dependencies

    For example, do not use the new operator to manage services

Authentication Project

Edit Day 10 project

  • Create a class called: UserManager. With the following methods :

    • Authenticate
    • SignUp
  • Inject that class into LoginAction and SignUpAction.

-Profile Direct-

Spring WebFlow

Day 1

Created by ImpactZero Software

Topics for today

  • Defining Flows

What is a flow?

  • A flow encapsulates a reusable sequence of steps that can execute in different contexts.

What is the makeup of a typical flow?

  • A flow consists of a series of steps called "states"

  • Entering a state typically results in a view being displayed to the user

  • On that view, user events occur that are handled by the state

  • These events can trigger transitions to other states which result in view navigations.

Essential language elements

  • FlowAll states of the flow are defined within this element. The first state defined becomes the flow's starting point.
						<!--?xml version="1.0" encoding="UTF-8"?-->
<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/springwebflow-2.0.xsd">
</flow>
					

Essential language elements

  • view-stateUse the view-state element to define a step of the flow that renders a view.
						<view-state id="enterBookingDetails">
						</view-state>
					

Essential language elements

  • transition

    Use the transition element to handle events that occur within a state.
						<view-state id="enterBookingDetails">
<transition on="submit" to="reviewBooking">
</transition></view-state>
					

Essential language elements

  • end-state

    Use the end-state element to define a flow outcome.
						<end-state id="bookingCancelled">
						</end-state>
					

Essential language elements

						
<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/springwebflow-2.0.xsd">
	<view-state id="enterBookingDetails">
		<transition on="submit" to="reviewBooking">
	</transition></view-state>
	<view-state id="reviewBooking">
		<transition on="confirm" to="bookingConfirmed">
		<transition on="revise" to="enterBookingDetails">
		<transition on="cancel" to="bookingCancelled">
	</transition></transition></transition></view-state>
	<end-state id="bookingConfirmed">
<end-state id="bookingCancelled">
</end-state></end-state></flow>
						
					

Authentication Project

Edit Spring project

  • Create a new flow

    • Page 1 - Insert Restaurant information
    • Page 2 - Review Restaurant Details