Controls |
|
Presentation | GoogleControl | Polaris |
PageBox controlsPrincipleWeb service supportPageBox controls primarily aim to address a common RPC problem: When the provider changes its interfaces the consumer must change its client code. This problem still exists with Web services. Web services address interoperability issues. The consumer no longer needs to use the same technology with providers but it still needs to manage the interfaces changes. The industry response so far has been the versioning. Versioning has two drawbacks:
The only thing able to adapt to changing interfaces is the human. With PageBox control, the provider (or a third party) provides the User interface (the control). The consumer just picks PageBox controls on the shelf and put them in some slots on its user interface. ControlThere used to be a control market for Windows control. The approach was successful despite an expensive and largely manual distribution. Because PageBox controls are deployed on an Web environment,
Windows controls were successful because:
PageBoxPageBox is a small Web Application that acts as a deployment agent. The PageBox owner subscribes to one or more Control repositories. The owner can select the Controls that it wants to install or it can ask for all controls from the repository. In the latter case, it will automatically get new controls. In both cases it will automatically get a fresh copy of the controls when they are changed. The owner keeps the control of the control deployment, for instance:
Providers publish and update their controls on the repository without necessarily be aware of who is using them. Most of this site addresses one aspect or another of PageBox. We developed three versions of PageBox:
We studied and tested most aspects of the PageBox model:
The solution works in an Internet environment and applies simple rules:
In a way PageBox is only a way to automate what ASPs routinely offer today, for instance
PageBox controlsWe assume that the consumer application is a sort of portal or WebTop application. It can also be a CMS delivery system. The PageBox control can be:
A PageBox control supports a simple customization. The consumer is allowed to set the look and feel, for instance the CSS classes used to display the graphical components of the control. The consumer should be allowed to set this information at the client directory level and if possible at the client page level. We call this customization ambient property setting. It aims allowing a seamless integration between the client pages and the control. GoogleControl contains a good example of this. If applicable, the consumer is also allowed to set the connection string to use when the control needs to store and retrieve data from a database, the working directory where the control can store data... at least at a site level. We call this customization core property setting. Though it is a Distributed Application rather than a control, Reservation contains a good example of this. PageBox controls don’t support interactions such as events and methods: it would reintroduce the version compatibility problem. With core and ambient properties, providers can implement fallback mechanisms. For instance, if the user interface contains a new component, the provider can reuse the CSS class of an existing component to show the new component. The only exception to this rule is the support of cross-control interactions. A Workflow control is a typical example of this. A Workflow control typically implements a navigation interface, a bag where other controls can save and retrieve data and a mean allowing
Here is an example of cross-control support:
Though the delivery of A and B cannot happen at the same time
Other applicationsEven if you don’t use PageBox it is useful to split your Web application in
Then you can apply a divide and conquer approach and manage each control as a subproject. It is especially useful in maintenance mode: The lifecycle of the main part and of the controls is never the same. It is cheaper to test only a modified component before releasing rather than hunting regressions in all the application HTTP controlAn HTTP control is invoked using an HTTP request, typically in GET mode. It returns an HTML flow that can contain object references and binary areas encoded in base 64. It can also refer to images, sounds, video... It can be used in servers pages or in browser frames / IFrames. Strong point: Fully interoperable. The Portal page and the control can use different technologies, for instance J2EE for the portal page and CGI for the control. Drawbacks: When and only when the control is called from a server page, the solution can be slower and less scalable than a monolithic application. However it depends on the control design and caching can minimize the penalty. Server page HTTP controlWeb application servers allow writing pages that invokes other pages and to add the other page response to its own response. It is especially true for J2EE, .NET and PHP. In the examples below, the client page calls a control whose url is stored in control_url in GET mode with two parameters stored in parm1 and parm2. J2EE
ASP.NET
PHP
ExampleThe client page hosted by the consumer portal calls the control, which can be hosted on another consumer Web server using another Web server technology. The client page gets the HTML stream generated by the control and writes it on its response stream.
The control has been deployed automatically from the provider repository by the consumer PageBox. The control calls the Web service of the provider. Frame HTTP controlHTML 4 supports frames and inline frames (IFrame) that allow including controls in the display. Here is an IFrame example:
Notes:
A browser downloads a page from the consumer portal. Because the page has a frame or IFrame referring to the control, the browser also downloads the control from another consumer Web server.
The control has been deployed automatically from the provider repository by the consumer PageBox. The control calls the Web service of the provider. Include controlWeb application servers allow writing pages that include code from other files. It is especially true for J2EE, .NET, ASP and PHP. Include controls imply that the client page and the control use the same technology. J2EEThe simplest solution is to use:
You can also use:
The first syntax is an include directive: the bytes in the JSP page are included. The latter syntax is an include action: a request is sent to that object and the result of processing it is included. You can do the same thing using RequestDispatcher.Include() of the servlet API. ASP.NET and ASP
PHP
ExampleThe client page hosted by the consumer portal includes the control that is also hosted by the portal and uses the same Web server technology.
The control has been deployed automatically from the provider repository by the consumer PageBox. The control calls the Web service of the provider. Web Application controlJ2EE and .NET allow creating tags that we can use to invoke controls. It is easy to implement the same function in PHP. Web Application controls are very close to Include controls and the diagram above also applies here. Web Application controls also imply that the client page and the control use the same technology. Web Application controls offer more control. However you can prefer Include controls in case where the client pages are generated using an XSL transformation. See the Cuckoo customization guide for more information about this. J2EEThe simple solution is to use a tag lib. Assuming a tag lib coded like this (MyTaglib.java):
You can need a peer BeanInfo named MyTaglibBeanInfo.java coded like this:
The client JSP can use it with the code below:
.NETLet assume the control is coded like this (MyControl.aspx.cs with Visual Studio .NET):
The client page can use it with the code below:
PHPPHP doesn’t support controls or tags. It is however easy to code the same thing. Let’s assume the control (MyControl.ctrl) is coded like this:
The client page can use it with the code below:
Contact:support@pagebox.net |