AS400 -Three-tier Architecture - 2015 09 06 - 12.53 IST

Post on 22-Jan-2018

233 views 0 download

transcript

Three-tier Architecture Objective

To prepare AS/400 developers for Modernization projects

IT 32 years AS/400 21 years

Project Management 18 years

Email joshirb@gmail.com

Countries India, Belgium, Singapore, UK, US ERPs Mapics, J D Edwards, Macpac, JBA, Prism, Movex, RentalMan

Education Bachelor of Commerce, Diploma in Computer Management

Born 1957

LinkedIn profile http://www.linkedin.com/in/rameshjoshias400consultant

Ramesh Joshi

Overview

1. What is IBM i Application Modernization? 2. Why modernize? 3. How to modernize?

What is Modernization?

What is Modernization?

Modernization = Market

Why should I learn about Modernization?

Why should I learn about Modernization?

Market

Knows about Modernization

Does not know about Modernization

Modernization

How to modernize?

Fruit Information System

Traditional Architecture

(AS/400 Applications)

Three-tier Architecture

(Ideal)

Boy meets girl. Boy and girl both know that their parents won't let them get involved. Neither boy nor girl care, and they arrange to be married in secret. Meanwhile, the cousin of the girl gets in a fight with the boy's best friend and kills him. The boy then kills the girl's cousin in a fit of rage, and as a result is banished from the city. The girl is distraught and seeks to fake her own death so that she can escape home to be with her love. However, the boy is not told of this, and when he returns to town he believes the girl to be dead. Anguished, he poisons himself, only to discover (too late) that his love is not really dead. The girl stabs herself. There is much weeping and gnashing of teeth.

Romeo and Juliet – in 10 sentences!!!

Three-tier Architecture 1. Fruit Information System 2. Traditional Architecture 3. What's wrong with that? 4. Ideal Three-tier Architecture 5. Step-1: M-V-C design 6. Step-2: Exchange Data using Sockets

The Fruit Table

Rules: 1. Fruit Name should not be blank. 2. Purchase Price should be +ve. 3. Retail Price should be +ve. 4. Wholesale Price should be +ve. 5. Wholesale Price should be > Purchase Price. 6. Retail Price should be > Wholesale Price. 7. Fruit Name should be unique.

Traditional Architecture

Library-X PF-SRC-Y Member-FRUITS Type-PF

Compile

Add Fruit

Pgm01 *PGM

2 screens

Change Fruit

Pgm02 *PGM

2 screens

Delete Fruit

Pgm03 *PGM

3 screens

Display Fruit

Pgm04 *PGM

2 screens

List Fruits

Pgm05 *PGM

1 screen (subfile)

Alternatively . . .

Alternatively . . .

Alternatively . . .

PGM01

WW Fruits *PGM

2 screens (subfile & subset)

PGM02

Maintain Fruit *PGM

Call

3 screens

Alternatively . . .

PGM01

WW Fruits *PGM

2 screens (subfile & subset)

PGM02

Maintain Fruit *PGM

Call

3 screens

What's wrong with that?

I want the same functionality using a browser and a mobile phone.

When can you deliver?

None of these programs should access any database table.

Three-tier Architecture

None of these programs should access any database table.

How to implement on IBM i?

Three-tier Architecture 1. Fruit Information System 2. Traditional Architecture 3. What's wrong with that? 4. Ideal Three-tier Architecture 5. Step-1: M-V-C design 6. Step-2: Exchange Data using Sockets

http://www.scottklement.com/

The Fruit Table

Rules: 1. Fruit Name should not be blank. 2. Purchase Price should be +ve. 3. Retail Price should be +ve. 4. Wholesale Price should be +ve. 5. Wholesale Price should be > Purchase Price. 6. Retail Price should be > Wholesale Price. 7. Fruit Name should be unique.

Work with Members Using PDM PUB1

File . . . . . . ESSRC

Library . . . . NEETARJ1 Position to . . . . .

MVC Member Type Text

M DSPFIDS PF Display File Inf. Data Structure

V ES01M MNUDDS

V ES01MQQ MNUCMD

M ES0101 CLLE Create table to store Fruit Information

M ES0102 SQLRPGLE Create table FRUITS

C ES0201 CLLE Add Fruit

C ES0202 SQLRPGLE Add Fruit-Controller

C ES0301 CLLE Change Fruit

C ES0302 SQLRPGLE Change Fruit-Controller

C ES0401 CLLE Delete Fruit

C ES0402 SQLRPGLE Delete Fruit-Controller

C ES0501 CLLE Display Fruit

C ES0502 SQLRPGLE Display Fruit-Controller

C ES0601 CLLE List Fruits

C ES0602 SQLRPGLE List Fruits-Controller

M ES9801 SQLRPGLE Fruit Procedures

ES9801BND BND

ES9801PR SQLRPGLE Fruit Procedures-Prototypes

V ES9901 SQLRPGLE Accept Fruit Name

V ES9901DS DSPF Accept Fruit Name

V ES9902 SQLRPGLE Display/Accept Fruit Information

V ES9902DS DSPF Display/Accept Fruit Information

V ES9903 RPGLE List Fruit Information

V ES9903DS DSPF Simple Subfile Program Example

Bottom

M=Model, V=View, C=Controller

This is not a Production template.

What is missing? 1. Message Handling 2. Pure SQL 3. Example of Header-Detail 4. Stored Procedures 5. Machine Independent Data Exchange 6. Naming Standards 7. Examples of other User Interfaces 8. Example of Result Set

Three-tier Architecture 1. Fruit Information System 2. Traditional Architecture 3. What's wrong with that? 4. Ideal Three-tier Architecture 5. Step-1: M-V-C design 6. Step-2: Exchange Data using Sockets

Modernization Three-tier Architecture

What next?

What next?

You Ramesh + 2015 Batch SEs

Guest blog post by John Kelly, Founding Partner of KOgent Systems, LLC. I started a new software consulting company, KOgent Systems LLC., exactly five years ago today. I was coming from a twenty year consulting career focused primarily on the IBM i. In my previous life, I had worked for two of the largest software tool vendors for the IBM i, and over the previous decade, I had managed an eCommerce solution designed to integrate into all the major ERP systems (i.e., JD Edwards and others). We had implemented 100s of eCommerce projects working within a wide variety of customer markets. The product was well-known in the industry, widely used and the services practice had been profitable under my watch. Now, I was one my own with a new staff. I had to consider which way to go, and what tools and products I would invest in for the transition to a new development platform. I chose ZEND PHP. Why?

1. Platform Independence

Did I want to be free of the IBM i? No. I was raised on the box, and I’ve had too many successes on the platform to cast aspersions on the technology. But we all know all good things come to an end, and I want the freedom to run anywhere. I want the freedom of choice. Zend PHP provides this choice for me.

2. Legacy Integration Let’s face it, most of the software development work that I do is integration work into pre-existing packages, and ERPs. I don’t write from scratch anymore. I extend and improve. I extend the life of the legacy applications by transforming them to run on new devices – mobile or the web. The Zend server open source PHP toolkit for the IBM i provides me with this capability. It provides direct integration for all IBM i objects – RPGILE, CL, C, data areas, etc. There is nothing I can’t touch directly – this makes me happy.

3. MVC Architecture PHP scares some people because they remember the days SQL injections, and unmaintainable code. Back when PHP was a basic scripting language, it was easy to learn and easy to write code in bad form. The IBM i community has a long memory. This has long changed with the introduction of the modern PHP frameworks. The modern Zend Framework 2 architecture is a true enterprise level OO development platform. Its structure promotes highly modular design while supporting large groups of developers. This is a product built for professionals.

4. Enterprise Level Support I wanted an open source product with enterprise level support. I want to be able to tell my customers that the chosen technology has a strong support backbone, which means a long life. I don’t want to be the only guy on the block running Python on the IBM i. Yeah, I’m sure it can be done, and it would be cool, I just don’t want to be the only guy doing it.

5. My Gut Ok, this is the real reason. It felt good. I went with my gut like I always do. I tend to spend a lot of time researching, and analyzing something that my gut told me was the right choice from day one. Remember, this is a blog, I’m allowed to have opinions and back them up with nothing. My gut has never let me down (except for that one time with the redhead in the 8th grade). But otherwise, I tend to go with my gut.

Check back next week when I provide you with some real life examples of how listening to my gut worked out. I will explain how we used Zend PHP to integrate into the IBM i, and SAP running on Linux simultaneously to provide a new B2B site for one of the largest retail chains in the country.

Questions?