| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0) on Tue Jan 27 04:28:33 EST 2009 --> |
| <TITLE> |
| Overview |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2009-01-27"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Overview"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV |
| NEXT</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <CENTER> |
| <H1> |
| Web Tools Platform: Validation Framework |
| </H1> |
| </CENTER> |
| A framework for calling validators that are build based. |
| <P> |
| <B>See:</B> |
| <BR> |
| <A HREF="#overview_description"><B>Description</B></A> |
| <P> |
| |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Packages</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="20%"><B><A HREF="org/eclipse/wst/validation/package-summary.html">org.eclipse.wst.validation</A></B></TD> |
| <TD>A framework for calling validators that are build based.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD WIDTH="20%"><B><A HREF="org/eclipse/wst/validation/internal/provisional/core/package-summary.html">org.eclipse.wst.validation.internal.provisional.core</A></B></TD> |
| <TD>An earlier framework for calling validators that are build based.</TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| <A NAME="overview_description"><!-- --></A> |
| <P> |
| <p>A framework for calling validators that are build based.</p> |
| <h2>Approach</h2> |
| <p>In WTP 3.0 a new validation framework has been added. This was developed at |
| the request of validator owners and end users. To ease the transition to this |
| new framework, that approach that has been taken is to support both the old and |
| the new frameworks for a while. This means that the old validators work exactly |
| like they used to. They can still plug into the old framework and will continue |
| to be run by the old framework. This allows validator owners to migrate at their |
| own pace.</p> |
| <p>For validator owners that wish to exploit the new framework, it has been |
| designed n such a way to minimize the transition from the old framework to the |
| new framework. There is a new extension point that needs to be specified, and a |
| new abstract class that needs to be extended.</p> |
| <h3>Benefits</h3> |
| <p>What benefits does the new framework have to offer? Or asked another way, as |
| a validator owner, why would I want to switch?</p> |
| <h4>Performance</h4> |
| <h5>Tuning</h5> |
| <p>The main reason for creating a new framework was to improve performance. As |
| more and more validators are added, validation is consuming a bigger slice of |
| the resources that it takes to perform a build.</p> |
| <p>The best performance improvement is eliminating unnecessary work. We |
| eliminate work, by providing significantly more tuning options. Validation |
| owners can tune which resources they are called on. This is done through the use |
| of filter rules. These filter rules are grouped into inclusion and exclusion |
| groups. If you have multiple inclusion groups they are "anded" together, meaning |
| that each of the inclusion groups must have at least one successful filter rule. |
| Exclusion groups are used to specify what doesn't get validated. Exclusion |
| groups have a higher precedence than inclusion groups. If an exclusion group |
| excludes a resource than it is excluded no matter what the inclusion groups may |
| say.</p> |
| <p>They are several different types of filter rules:</p> |
| <ul> |
| <li><strong>File extension</strong> - Rules based on the file extension. For |
| example, include all the files with extension *.xml.</li> |
| <li><strong>Folder or File name</strong> - Rules based on the folder or file |
| name. For example exclude all the resources in the build folder. File names |
| can be fully qualified, project relative names, e.g. <strong>WebContent/WEB-INF/web.xml</strong>, |
| or simple names, <strong>web.xml</strong>.</li> |
| <li><strong>Project nature</strong> - Projects with certain natures can be |
| either included or excluded.</li> |
| <li><strong>Facet</strong> - Projects with certain facets can be either |
| included or excluded.</li> |
| <li><strong>Content Type </strong>- Resources of a particular content type |
| can be included or excluded.</li> |
| </ul> |
| <p>The filter rules and groups form the building blocks of what gets validated. |
| </p> |
| <p>In terms of tuning however, the end user has the final say. The validator |
| owners specify the default filter rules and groups for their validator, but the |
| end user through the use of preferences can override these settings. </p> |
| <h5>Caching</h5> |
| <p>Another way that performance is improved is through more effective caching. |
| With the previous framework we were noticing that different validators would be |
| opening and processing the same file, but that this would happen far enough |
| apart, that caches weren't effective. Even if files were being cached, the |
| second (or third, or forth, ...) open would happen far enough a means that way |
| that the file would have already been evicted from the cache. In the new |
| framework, the processing order is more tightly controlled. The framework calls |
| the validator and tells it what to validate. This way files are processed in |
| order, which means that the chance of them being a cache is much higher. Every |
| validator that is interested in file A processes it, and then we move on and |
| every validator that is interested in file B processes it, etc.</p> |
| <p>Also because state information is kept for the lifetime of the validation |
| operation, validators can cache expensive operations, like model creation, that |
| might be needed as part of validating several files. </p> |
| <h5>Job Control</h5> |
| <p>With the earlier framework, there were too many jobs/threads running |
| concurrently. This is now more tightly controlled.</p> |
| <h4>Dependency Support</h4> |
| <p>Another new feature is dependency support. A validator can now assert that a |
| resource is dependant on some other resources. For example that a XML file is |
| dependant on a XSD file. Now if the XSD file changes the XML can be revalidated. |
| As the user comes to trust this dependency support, they wont perform as many |
| clean builds.</p> |
| <h4>Primary Framework</h4> |
| <p>This is the primary validation framework. At some point, the earlier |
| framework will be deprecated and then removed. All the new investment will |
| happen in this framework. </p> |
| <p>The framework collateral will continue to be enhanced (junit testcases, |
| documentation, performance improvements, ...)</p> |
| <P> |
| |
| <P> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Overview</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| PREV |
| NEXT</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="index.html?overview-summary.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="overview-summary.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |