Monday, December 6, 2010

ofbiz cont.

1.its a web app containing inside multiple apps
2.each is called a component.
3.each component can be accessed independently by different users logging from different locations by an account
4.primary handle to a login session is based on user name and password.
5.a handle will be obtained for the session.
6.this handle typically identifies an entry in static login table in the database.
7.Now there can be different operations like create smthg,delete,modify etc based on the handle
8.a user ui session calls on the component with the handle,the event handler identifies the current
context with the handle.
9.the context will be a row with n coloumns,each coloumn containing separate sql formula (pointers)
10.the entry point of the event will update this context and refresh,after that every successive operation with the context should refresh before using it.
11.this makes the context in nnn(context,request)
12.the event handler can be a separate java lib,scripts etc(binary mapping,inplace loading)
13.prefer scripts over lib
14.how to load two batch files in an application and call a function in one batch file from other in the context of application.
15.event handler ultimately gathers some other contexts into its workspace , manipulates and writes something back to contexts or updates some data base tables, or passes on to next call.

event1:
get context from handle1, and data
do something
get handle for event2 in another module
call event 2 pass handle, and data
get context2
16.some context row can reserve a column for unknown handle
17.when this context is passed to another module it can access the unknown modules handle which is a depenent db

sw desig and devel

1.sw desig and devel are entirely different things
2.A sw design that can be explained within a day or two will need atleast 6 months development with novices to implement
3.Most effective design is one where after design none of the developers need to communicate with each other.Absolute reduction of h2h interactions.
4.Still if the design does not understand leaves even single gap in requirement analysis the development can fail
3.development has many weak points because of multi human interfaces, code typing with io devices.logic error correction h2h,integration h2h,testing h2h/h2sw,debugging h2sw etc
4.a good design will have a solid framework
5.a good framework is reusable and extensible
6.It gives a clear demarcation at directory-file level,binary module level,absract module level(interface,context,token,framework,drv1,drv2,lib1 etc),class etc.

not related: ssl encrypts tcpip payload

ofbiz

on a webserv there can be multiple portal,offbiz is an web application that contains other applications.since offbiz binds to port its portal.

simple pluggable ftl to display a dialog on web page
simple beanshell script to make and transfer a we between two wq
simple groovy script to print the contents of wq's

ftl and bsh example
http://www.opensourcestrategies.com/ofbiz/hello_world2.php

General working of offbiz
when starting it looks for file X
if it finds, parses file X
file X contains many paths
It checks for the UI component path
In the UI component path it looks for file A
It loads A and executes
It checks for business logic part
It checks for data base part

Basic idea is, most functionalities are prescribed in configuration files and implemented in std
libraries.A user can reuse the configuration files and hence the libraries to get most of the
work done.If extensions are required, framework allows to add more configuration files and
associate it with libraries and thus to achieve more functions

Http requests are captured by http server,converted to system events,mapped by (remote ip,incoming url,session).
webserver forwards to it client(index page).Any events on the index page is forwarded to handler java libraries.
This can be chained.A webserver has a url parser,a directory serach logic and html transfer logic.After the
html transfer the event handler java classes get loaded.http requests come for events with data,its routed to
a process/thread having the incoming session id.when it reaches the thread it already contains the loaded java
lib hence delegates the call to handler.
or each time a http request comes ws spawn thread loads libs and calls a handler with context.May be ws will
store only store the context mapped to session id,threads are not kept alive.

look and feel of offbiz freemarker, screen widgets and form widgets can be changed by using style sheets

offbiz used work flow engine shark before but now does it using EDA/SOA/SOAP/SECA/EECA
offbiz can export a components functions directly over web.This feature is used
to test,measure,debug.A special service needs to be created.It uses axis2.refer to
http://www.mail-archive.com/user@ofbiz.apache.org/msg16286.html.

In offbiz lang loading seed data means filling the data base with worable data.
adding new names,orders,accounts etc.complex database tables are created based
on the seed data.

ftl,screen widg,form widg
-------------------------------
| |
entity engine<==============service engine (BL)
| |
bsh script bsh script
--------------------------
groovy
db interface

The service engine will use the entity engines functions to do the business logic


ftl,screen widg,form widg
---------------------------------------------
| |q1 |q2 |q3 |q4
entity engine<==============service engine (BL)
| |
bsh script bsh script
--------------------------
groovy
db interface


|frm1 |frm2 |frm3 |frm4

|null |wq2 |wq3 |wq4

|dbt1 |dbt2 |dbt3 |dbt4

seed data will be single category dbt.More coloumns will be added in seed if and
only if has atomic relation between prim key.

there are dynamic dbts and static dbts.seed data always is static
wq comprises dynamic dbt.its size can vary from 0 to N.

at data model,relational dbt's will come into picture.items will be picked from
seed dbt's and grouped here.


For a SOAP example,ExampleServices.xml

Offbiz services tutorial
http://www.packtpub.com/article/ofbiz-services-apache
Offbiz tut
http://www.hotwaxmedia.com/ofbiz-tutorials.html
Buy Apache offbiz cook book
http://docs.google.com/viewer?a=v&q=cache:sqMDVClJIW8J:docs.huihoo.com/apache/ofbiz/The-Hitchhiker-Guide-to-OFBiz.pdf+download+offbiz.pdf&hl=en&gl=in&pid=bl&srcid=ADGEESjrpP2nZyqmuFanSz_GEvUF52XIZyiG4wSVqXY0-mcQugEsUdX5qPHBIiBXxaJgMBZSGFP0tWQHRCEXJ3A2fpQfS6UOGqokVgVfwmYOaToUg2uYTCoOqzznmJ1_bbnZIU2cOtgB&sig=AHIEtbTnzDMl3Fuc4BGj-s60qyVyg--G4Q
Buy Apache offbiz development beginners tutorial
Offbiz architecture view
http://webcache.googleusercontent.com/search?q=cache:YuejplShHfIJ:docs.huihoo.com/apache/ofbiz/OFBiz-An-Insider-View.pdf+ofbiz+widgets,database&cd=21&hl=en&ct=clnk&gl=in&client=firefox-a

wondering what erp involves

main players
1.hr
2.procurement
3.production
4.finance
5.inventry
6.scm
7.asset

A cycle is the activities happening from the time a customer order enters into erp system and its
closed

it goes through lot of token forwarding and feedback between the modules of course and maintaing data and states.

parts of sw puzzle

1.ability to create replicas
2.loadable modules
3.single module multi interface and contexts
4.discontinuous control flow
5.notion of data movement, src:dst local and remote. local uses virtual addresses direct by reference, remote by value