SlideShare uma empresa Scribd logo
1 de 18
Extensible Architecture
(2004-12-21)
Requirements (1)

Hi,
We're currently facing an old question again: How can you build a big
OpenACS application (composed by several modules) that can be customized
so that it suits more then one customer? Sounds easy, but it isn't if you want
to avoid a copy-paste-modify approach.
Let's take a simple example to explain the requirements: Let's consider user
management. OpenACS provides several standard user management screens
with the fields "first_names" and "second name". However, people in Spain
have two first names and two second names, such as "Juan José Ruiz
Martínez". And this time we are working for a demanding customer who
requires us to do it "their way" and to use their design standards. So we
actually have to include the four pieces of the name in one line so that the
users screen needs to look like:

   Name: [First1] [First2] [Second1] [Second2]
   Username: [Username]
   Email: [Email]
   Password: [Password]
   URL: [Url]

However, another customer from the US may requires us to add a field for a
middle name such as in "Frank W. Bergmann" and a third customer requires
us to add a second email address for the private email (just to put an
example).
Copy-Past-Modify



The standard approach in the OpenACS community (and also in
many other Web-based content & community tools) for such a
situation is to take the OpenACS code as a base and to extend it,
adding the necessary fields "manually".
This works pretty well for the first and maybe for the second
customer, but after that you're getting a holy mess of different
versions that are difficult to maintain. Imagine that you need to
upgrade to the next version of OpenACS or that you have developed
an improvement for one of the customers that might be useful for
the others as well.
Requirements (2)

But if you start thinking about how to unify the user management code for all
customers, you immediately get to the question of how to extend the unified
code to accommodate the different requirement and you get to a list of quite
ugly requirements:
Adding new fields to a business object:
We want to be able to add any number of new fields to a user or another
object without touching the "core" code. These new fields should support
validation and referential integrity such as all other fields.
Integrating new packages:
We want to be able to add new packages to the system, so that they are
integrated with the rest of the system. Let's consider adding a "bookmark
list". We may want to be able to show a list of bookmarks on the users main
page, even though the users page didn't "know" about bookmarks before. And
please remember, we don't want to touch the TCL or ADP code, because they
are common to all of our customers.
Also, we want to add a link "add a bookmark" in another part of the page and
we want to add a new item in the global site menu such as "Bookmark
Management".
Customized layout and design:
Customers are picky, so we want to be able to adapt to all of their design
preferences, particular in terms of form layout. Colours and stuff are covered
by CSS style sheets anyway.
Requirements (3)

Taking into account the overall TCL/ADP structure of OpenACS pages, we can
translate these requirements into technical issues that we have to tackle:
Customizing ADPs:
How can we add dynamicallynew pieces of code to an ADP page to display
new contents or links?
How do we dynamically add new fields to a form or new columns to a list
view?
Customizing TCLs:
How can we dynamically add business logic to TCLs?
Customizing SQLs:
How can we patch SQL statements to include new fields from new "extension
tables" or dynamic attributes? How do we sort the results according to an
extension field that didn't exist at the time when we wrote the SQL?
Menus and Navigation:
How can we dynamically adapt the navigation to reflect the presence of new
packages?
Links and References:
How do we link from "core" pages to pages in new add-on packages that
didn't exist at the time of writing the "core" pages?
User Exits (1)
So let's come back to our user registration example in order to explore how
"User Exits" could help us to build a single page that would serve all of our
fictitious customers.
The ADP Page: Here we could add several "user exits" to the ADP page that
would look like this: <%=[ad_call_proc_if_exists TCL_library_routine]%> . We
could then write a TCL_library_routine implementation for a specific customer
that would add the right HTML code in order to create the new fields. Also, we
could call ADP includes on an similar "if exists" base to include pieces of
content.
The TCL Page: The TCL page has to provide the ADP page with additional
business logic for the new fields. So we could use same "user exits" trick and
call a TCL library routine at the end of the TCL if it exists.
The SQL: This is more complicated. Let's imagine that the new user name
fields are implemented via a "user_extension_table". How do we "join" the
contents of this table into our exiting SQL? One option is to use SQL "views".
The TCL page would do a "select * from my_users" where "my_users" is an
SQL view that by default only performs a "select * from cc_users". However,
our extension module could now overwrite this view with a new version that
joins cc_users with the user_extension_table. This approach may cause
problems when there is more then one package adding fields to a user, but
it's simple and straight-forward.
Menus, Navigation, Links and References
We could again use the "user exits" to implement flexible menus and
references.
User Exits (2)


Pros & Cons
The advantage of this "architecture" is that it's quite simple, transparent and
easy to understand. It is actually already being used in the request processor
using the ad_call_proc_if_exists routine. Also, it provides a simple "migration
path" to migrate an existing hard-coded system towards a more flexible one
without rewriting the whole code. However, there may be "extension conflicts"
between different modules that extend the same business object, and the
code may become very ugly ("spaghetti") with the time.
Store Everything in the
                                                            DB
The current Project/Open architecture stores all variable elements in the
database, such as menus, links, "components" (ADP includes), table columns
and form fields. Table columns include the TCL code to render a table cell
content and they include the "order by" clause if a user wants to sort a list by
a specific column. Here is the comlete documentation:
http://www.project-open.org/doc/intranet-core/
Pros & Cons
This is a very straight-forward approach that allows for great flexibility and
performance. An extension module can just add a new column to a table and
define some extra_select, extra_from and extra_where pieces for the SQL
clause. However, the approach requires a considerable initial effort and
storing TCL code in the database isn't really an elegant solution. So this is
why we are considering alternatives in a project that is not related to
Project/Open.
Extending ad_form (1)

The last option that we explored is based on the OpenACS templating system
and ad_forms. These modules use a list of fields in order to control the
rendering of forms and tables. Normally, these lists of fields are defined
statically as part of the TCL page as in the following example:
ad_form -form {
        menu_id:key
        {name:text(text) {label Name} {html {size 40}}}
        {label:text(text) {label Label} {html {size 30}}}
        {url:text(text) {label URL} {html {size 100}}}
        {sort_order:text(text) {label "Sort Order"} {html
{size 10}}}
} [...]
Extending ad_form (2)

However, the definition of these fields could be moved out of the ad_form
procedure call into a variable. And once it is within a variable, we could
overwrite this variable in the case that an exension module has added more
fields in a database table:

set field_list {
        menu_id:key
        {name:text(text) {label Name} {html {size 40}}}
        {label:text(text) {label Label} {html {size 30}}}
        {url:text(text) {label URL} {html {size 100}}}
        {s_order:text(text) {label "Sort Order"} {html {size 10}}}
}
if {[check_the_database]} {
        set field_list [get_field_list_from_the_database]
}
ad_form -form $field_list [...]
Extending ad_form (3)

This "architecture" would allow for a simple and convenient default
configuration defined in the TCL page, while allowing for full extensibility by
extension modules.
Another shortcoming of ad_form is its current HTML layout inflexibility.
ad_form renders the form fields as a vertical list by default. There is no easy
way to say that first_name and second_name should go together into the first
line of the form. However, ad_form allows for custom rendering "form
templates", so that we could tackle this issue by introducing new field
parameters for field positioning (absolute horizontal/vertical or relative
line/column) and by creating a customized version of a form template to
implement something similar to a "layout manager" in Java.
Also, there are facilities in ad_form to handle dynamic fields via acs_attributes
and the OpenACS SQL metadata system. However, the implementation of the
acs_attributes feature is not very "transparent" (you don't understand easily
what it happening) and doesn't seem to be commonly used. The only place
that I have seen is group_type maintenance, and this is an incomplete
implementation error with an error when trying to use default values.
Extending ad_form (4)

Pros & Cons
ad_form and templating could allow for a flexible architecture without storing
TCL code in the database. It would provide a very elegant solution if the
integration with acs_attributes would work in real-world applications.
However, I personally don't like the "hide as much as possible" philosophy of
ad_form, and I have lost many hours debugging relatively simple issues due
to the lack of transparency and documentation.
4 Architectures Summary



  Arch          ADP              TCL              SQL      Menu &
  Areas                                                      Refs


User Exits   <=%              ad_call_if_exi   select *   User exits
             ad_call_if_exi   sts xxx
             sts xxx%>

Extending                     ad_form with     select *
ad_forms           ?          dynamic                           ?
                              fields

Everything Components         Dynamic       extra_select+ „DB-Menus“
 in the DB                    fields and    extra_from+
                              table columns extra_where,
                                            select *
“Extensible
Architecture”
Extending ad_form (4)

dynfield_attribut   dynfield_attribut   dynfield_widget
       es                     es
                    attribute_id                 s
                                        widget_name
                    widget_name         storage_type
                                        acs_datatype
                                        tcl_widget
                                        datatype
                                        parameters
Extending ad_form (4)

acs_attributes    ams_attributes     ams_widgets
                 attribute_id       widget_name
                 widget_name        ...
Screenshots
Screenshots

Mais conteúdo relacionado

Mais procurados

Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[Klaus Hofeditz
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3Klaus Hofeditz
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)Prashanth Shivakumar
 
Introduction to dataweave
Introduction to dataweaveIntroduction to dataweave
Introduction to dataweaveSwati Deshpande
 
Example User Stories Specification for ReqView
Example User Stories Specification for ReqViewExample User Stories Specification for ReqView
Example User Stories Specification for ReqViewEccam
 
]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1Klaus Hofeditz
 
Oa Framework Tutorial
Oa Framework TutorialOa Framework Tutorial
Oa Framework Tutorialnolimit797
 
Oaf development-guide
Oaf development-guideOaf development-guide
Oaf development-guide俊 朱
 
]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4Klaus Hofeditz
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Amit Singh
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architectureTanmoy Barman
 
Towards Requirements Management Issues in Excel
Towards Requirements Management Issues in ExcelTowards Requirements Management Issues in Excel
Towards Requirements Management Issues in ExcelEccam
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012daniel plocker
 
Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Prashanth Shivakumar
 
Application engine
Application engineApplication engine
Application engineJAYAARC
 

Mais procurados (20)

Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
 
Asp.net
Asp.netAsp.net
Asp.net
 
XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
Introduction to dataweave
Introduction to dataweaveIntroduction to dataweave
Introduction to dataweave
 
Example User Stories Specification for ReqView
Example User Stories Specification for ReqViewExample User Stories Specification for ReqView
Example User Stories Specification for ReqView
 
]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1
 
Oa Framework Tutorial
Oa Framework TutorialOa Framework Tutorial
Oa Framework Tutorial
 
Oaf development-guide
Oaf development-guideOaf development-guide
Oaf development-guide
 
]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
MVC Training Part 1
MVC Training Part 1MVC Training Part 1
MVC Training Part 1
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architecture
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
 
Towards Requirements Management Issues in Excel
Towards Requirements Management Issues in ExcelTowards Requirements Management Issues in Excel
Towards Requirements Management Issues in Excel
 
Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012Client Object Model - SharePoint Extreme 2012
Client Object Model - SharePoint Extreme 2012
 
Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01
 
Application engine
Application engineApplication engine
Application engine
 

Semelhante a ]project-open[ Extensible Architecture

ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010vchircu
 
Mdx Basics
Mdx BasicsMdx Basics
Mdx BasicsALIPPHAR
 
Workload Management with MicroStrategy Software and IBM DB2 9.5
Workload Management with MicroStrategy Software and IBM DB2 9.5Workload Management with MicroStrategy Software and IBM DB2 9.5
Workload Management with MicroStrategy Software and IBM DB2 9.5BiBoard.Org
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-flyquest2900
 
3 tier architecture in asp.net
3 tier architecture in asp.net3 tier architecture in asp.net
3 tier architecture in asp.netRavi Bansal
 
Access tips access and sql part 1 setting the sql scene
Access tips  access and sql part 1  setting the sql sceneAccess tips  access and sql part 1  setting the sql scene
Access tips access and sql part 1 setting the sql scenequest2900
 
]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators OptionsKlaus Hofeditz
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docxjane3dyson92312
 
Oracle application express
Oracle application expressOracle application express
Oracle application expressAbhinaw Kumar
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express pptAbhinaw Kumar
 
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docxPURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docxamrit47
 
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...Alkis Vazacopoulos
 
The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!Randy Carey
 
SharePoint 2010 For Developers
SharePoint 2010 For DevelopersSharePoint 2010 For Developers
SharePoint 2010 For DevelopersSparked
 
Innovate2011 Keys to Building OSLC Integrations
Innovate2011 Keys to Building OSLC IntegrationsInnovate2011 Keys to Building OSLC Integrations
Innovate2011 Keys to Building OSLC IntegrationsSteve Speicher
 
Architecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling ToolArchitecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling ToolAdriaan Venter
 

Semelhante a ]project-open[ Extensible Architecture (20)

ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
ASP.NET MVC3 RAD
ASP.NET MVC3 RADASP.NET MVC3 RAD
ASP.NET MVC3 RAD
 
Mdx Basics
Mdx BasicsMdx Basics
Mdx Basics
 
Workload Management with MicroStrategy Software and IBM DB2 9.5
Workload Management with MicroStrategy Software and IBM DB2 9.5Workload Management with MicroStrategy Software and IBM DB2 9.5
Workload Management with MicroStrategy Software and IBM DB2 9.5
 
Bo df b_layer
Bo df b_layerBo df b_layer
Bo df b_layer
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
 
3 tier architecture in asp.net
3 tier architecture in asp.net3 tier architecture in asp.net
3 tier architecture in asp.net
 
Access tips access and sql part 1 setting the sql scene
Access tips  access and sql part 1  setting the sql sceneAccess tips  access and sql part 1  setting the sql scene
Access tips access and sql part 1 setting the sql scene
 
]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
Oracle application express
Oracle application expressOracle application express
Oracle application express
 
Oracle application express ppt
Oracle application express pptOracle application express ppt
Oracle application express ppt
 
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docxPURPOSE of the project is Williams Specialty Company (WSC) reque.docx
PURPOSE of the project is Williams Specialty Company (WSC) reque.docx
 
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
Quick Development and Deployment of Industrial Applications using Excel/VBA, ...
 
Views
ViewsViews
Views
 
The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!The 'Client' Template - Illustrated!
The 'Client' Template - Illustrated!
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
SharePoint 2010 For Developers
SharePoint 2010 For DevelopersSharePoint 2010 For Developers
SharePoint 2010 For Developers
 
Innovate2011 Keys to Building OSLC Integrations
Innovate2011 Keys to Building OSLC IntegrationsInnovate2011 Keys to Building OSLC Integrations
Innovate2011 Keys to Building OSLC Integrations
 
Architecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling ToolArchitecture Specification - Visual Modeling Tool
Architecture Specification - Visual Modeling Tool
 

Mais de Klaus Hofeditz

]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and TrackingKlaus Hofeditz
 
]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage Specs]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage SpecsKlaus Hofeditz
 
The ]project-open[ Community
The ]project-open[ CommunityThe ]project-open[ Community
The ]project-open[ CommunityKlaus Hofeditz
 
]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511b]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511bKlaus Hofeditz
 
]project-open[ Screenshots
]project-open[ Screenshots ]project-open[ Screenshots
]project-open[ Screenshots Klaus Hofeditz
 
]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission ConfigurationKlaus Hofeditz
 
Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603Klaus Hofeditz
 
]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2Klaus Hofeditz
 
]project-open[ Package Manager
]project-open[ Package Manager]project-open[ Package Manager
]project-open[ Package ManagerKlaus Hofeditz
 
]project-open[ Roll Out Plan
]project-open[ Roll Out Plan]project-open[ Roll Out Plan
]project-open[ Roll Out PlanKlaus Hofeditz
 
]project-open[ Timesheet Project Invoicing
]project-open[ Timesheet Project Invoicing]project-open[ Timesheet Project Invoicing
]project-open[ Timesheet Project InvoicingKlaus Hofeditz
 
]project-open[ OSS Project Mangement
]project-open[ OSS Project Mangement]project-open[ OSS Project Mangement
]project-open[ OSS Project MangementKlaus Hofeditz
 

Mais de Klaus Hofeditz (12)

]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking
 
]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage Specs]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage Specs
 
The ]project-open[ Community
The ]project-open[ CommunityThe ]project-open[ Community
The ]project-open[ Community
 
]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511b]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511b
 
]project-open[ Screenshots
]project-open[ Screenshots ]project-open[ Screenshots
]project-open[ Screenshots
 
]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration
 
Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603
 
]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2
 
]project-open[ Package Manager
]project-open[ Package Manager]project-open[ Package Manager
]project-open[ Package Manager
 
]project-open[ Roll Out Plan
]project-open[ Roll Out Plan]project-open[ Roll Out Plan
]project-open[ Roll Out Plan
 
]project-open[ Timesheet Project Invoicing
]project-open[ Timesheet Project Invoicing]project-open[ Timesheet Project Invoicing
]project-open[ Timesheet Project Invoicing
 
]project-open[ OSS Project Mangement
]project-open[ OSS Project Mangement]project-open[ OSS Project Mangement
]project-open[ OSS Project Mangement
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

]project-open[ Extensible Architecture

  • 2. Requirements (1) Hi, We're currently facing an old question again: How can you build a big OpenACS application (composed by several modules) that can be customized so that it suits more then one customer? Sounds easy, but it isn't if you want to avoid a copy-paste-modify approach. Let's take a simple example to explain the requirements: Let's consider user management. OpenACS provides several standard user management screens with the fields "first_names" and "second name". However, people in Spain have two first names and two second names, such as "Juan José Ruiz Martínez". And this time we are working for a demanding customer who requires us to do it "their way" and to use their design standards. So we actually have to include the four pieces of the name in one line so that the users screen needs to look like: Name: [First1] [First2] [Second1] [Second2] Username: [Username] Email: [Email] Password: [Password] URL: [Url] However, another customer from the US may requires us to add a field for a middle name such as in "Frank W. Bergmann" and a third customer requires us to add a second email address for the private email (just to put an example).
  • 3. Copy-Past-Modify The standard approach in the OpenACS community (and also in many other Web-based content & community tools) for such a situation is to take the OpenACS code as a base and to extend it, adding the necessary fields "manually". This works pretty well for the first and maybe for the second customer, but after that you're getting a holy mess of different versions that are difficult to maintain. Imagine that you need to upgrade to the next version of OpenACS or that you have developed an improvement for one of the customers that might be useful for the others as well.
  • 4. Requirements (2) But if you start thinking about how to unify the user management code for all customers, you immediately get to the question of how to extend the unified code to accommodate the different requirement and you get to a list of quite ugly requirements: Adding new fields to a business object: We want to be able to add any number of new fields to a user or another object without touching the "core" code. These new fields should support validation and referential integrity such as all other fields. Integrating new packages: We want to be able to add new packages to the system, so that they are integrated with the rest of the system. Let's consider adding a "bookmark list". We may want to be able to show a list of bookmarks on the users main page, even though the users page didn't "know" about bookmarks before. And please remember, we don't want to touch the TCL or ADP code, because they are common to all of our customers. Also, we want to add a link "add a bookmark" in another part of the page and we want to add a new item in the global site menu such as "Bookmark Management". Customized layout and design: Customers are picky, so we want to be able to adapt to all of their design preferences, particular in terms of form layout. Colours and stuff are covered by CSS style sheets anyway.
  • 5. Requirements (3) Taking into account the overall TCL/ADP structure of OpenACS pages, we can translate these requirements into technical issues that we have to tackle: Customizing ADPs: How can we add dynamicallynew pieces of code to an ADP page to display new contents or links? How do we dynamically add new fields to a form or new columns to a list view? Customizing TCLs: How can we dynamically add business logic to TCLs? Customizing SQLs: How can we patch SQL statements to include new fields from new "extension tables" or dynamic attributes? How do we sort the results according to an extension field that didn't exist at the time when we wrote the SQL? Menus and Navigation: How can we dynamically adapt the navigation to reflect the presence of new packages? Links and References: How do we link from "core" pages to pages in new add-on packages that didn't exist at the time of writing the "core" pages?
  • 6. User Exits (1) So let's come back to our user registration example in order to explore how "User Exits" could help us to build a single page that would serve all of our fictitious customers. The ADP Page: Here we could add several "user exits" to the ADP page that would look like this: <%=[ad_call_proc_if_exists TCL_library_routine]%> . We could then write a TCL_library_routine implementation for a specific customer that would add the right HTML code in order to create the new fields. Also, we could call ADP includes on an similar "if exists" base to include pieces of content. The TCL Page: The TCL page has to provide the ADP page with additional business logic for the new fields. So we could use same "user exits" trick and call a TCL library routine at the end of the TCL if it exists. The SQL: This is more complicated. Let's imagine that the new user name fields are implemented via a "user_extension_table". How do we "join" the contents of this table into our exiting SQL? One option is to use SQL "views". The TCL page would do a "select * from my_users" where "my_users" is an SQL view that by default only performs a "select * from cc_users". However, our extension module could now overwrite this view with a new version that joins cc_users with the user_extension_table. This approach may cause problems when there is more then one package adding fields to a user, but it's simple and straight-forward. Menus, Navigation, Links and References We could again use the "user exits" to implement flexible menus and references.
  • 7. User Exits (2) Pros & Cons The advantage of this "architecture" is that it's quite simple, transparent and easy to understand. It is actually already being used in the request processor using the ad_call_proc_if_exists routine. Also, it provides a simple "migration path" to migrate an existing hard-coded system towards a more flexible one without rewriting the whole code. However, there may be "extension conflicts" between different modules that extend the same business object, and the code may become very ugly ("spaghetti") with the time.
  • 8. Store Everything in the DB The current Project/Open architecture stores all variable elements in the database, such as menus, links, "components" (ADP includes), table columns and form fields. Table columns include the TCL code to render a table cell content and they include the "order by" clause if a user wants to sort a list by a specific column. Here is the comlete documentation: http://www.project-open.org/doc/intranet-core/ Pros & Cons This is a very straight-forward approach that allows for great flexibility and performance. An extension module can just add a new column to a table and define some extra_select, extra_from and extra_where pieces for the SQL clause. However, the approach requires a considerable initial effort and storing TCL code in the database isn't really an elegant solution. So this is why we are considering alternatives in a project that is not related to Project/Open.
  • 9. Extending ad_form (1) The last option that we explored is based on the OpenACS templating system and ad_forms. These modules use a list of fields in order to control the rendering of forms and tables. Normally, these lists of fields are defined statically as part of the TCL page as in the following example: ad_form -form { menu_id:key {name:text(text) {label Name} {html {size 40}}} {label:text(text) {label Label} {html {size 30}}} {url:text(text) {label URL} {html {size 100}}} {sort_order:text(text) {label "Sort Order"} {html {size 10}}} } [...]
  • 10. Extending ad_form (2) However, the definition of these fields could be moved out of the ad_form procedure call into a variable. And once it is within a variable, we could overwrite this variable in the case that an exension module has added more fields in a database table: set field_list { menu_id:key {name:text(text) {label Name} {html {size 40}}} {label:text(text) {label Label} {html {size 30}}} {url:text(text) {label URL} {html {size 100}}} {s_order:text(text) {label "Sort Order"} {html {size 10}}} } if {[check_the_database]} { set field_list [get_field_list_from_the_database] } ad_form -form $field_list [...]
  • 11. Extending ad_form (3) This "architecture" would allow for a simple and convenient default configuration defined in the TCL page, while allowing for full extensibility by extension modules. Another shortcoming of ad_form is its current HTML layout inflexibility. ad_form renders the form fields as a vertical list by default. There is no easy way to say that first_name and second_name should go together into the first line of the form. However, ad_form allows for custom rendering "form templates", so that we could tackle this issue by introducing new field parameters for field positioning (absolute horizontal/vertical or relative line/column) and by creating a customized version of a form template to implement something similar to a "layout manager" in Java. Also, there are facilities in ad_form to handle dynamic fields via acs_attributes and the OpenACS SQL metadata system. However, the implementation of the acs_attributes feature is not very "transparent" (you don't understand easily what it happening) and doesn't seem to be commonly used. The only place that I have seen is group_type maintenance, and this is an incomplete implementation error with an error when trying to use default values.
  • 12. Extending ad_form (4) Pros & Cons ad_form and templating could allow for a flexible architecture without storing TCL code in the database. It would provide a very elegant solution if the integration with acs_attributes would work in real-world applications. However, I personally don't like the "hide as much as possible" philosophy of ad_form, and I have lost many hours debugging relatively simple issues due to the lack of transparency and documentation.
  • 13. 4 Architectures Summary Arch ADP TCL SQL Menu & Areas Refs User Exits <=% ad_call_if_exi select * User exits ad_call_if_exi sts xxx sts xxx%> Extending ad_form with select * ad_forms ? dynamic ? fields Everything Components Dynamic extra_select+ „DB-Menus“ in the DB fields and extra_from+ table columns extra_where, select *
  • 15. Extending ad_form (4) dynfield_attribut dynfield_attribut dynfield_widget es es attribute_id s widget_name widget_name storage_type acs_datatype tcl_widget datatype parameters
  • 16. Extending ad_form (4) acs_attributes ams_attributes ams_widgets attribute_id widget_name widget_name ...