Welcome!

IBM Cloud Authors: Elizabeth White, Yeshim Deniz, Liz McMillan, Pat Romanski, Stefan Bernbo

Related Topics: IBM Cloud

IBM Cloud: Article

Bowstreet Portlet Factory

Bowstreet Portlet Factory

For years, the holy grail of programming, at least from a CIO point of view, was a magic software tool variously called a "code generator," a "fourth-generation language," or an "autocoder." This tool would generate the correct executable code to fulfill a user's wishes, based on relatively high-level requirements. Such a tool would definitely fulfill a project manager's wishes, since creating software is a labor-intensive process requiring high-priced talent.

But the big questions were always "Upon what criteria is the code generation based?" and "What is the range of functionality that can reasonably be generated?" The answers to these questions were always, respectively, "very limited" and "extremely narrow." Then came J2EE, proving that in many ways Java was made to generate itself, thanks to introspection, metadata, the JVM, and other features. Now a new type of autocoder is emerging. Not a monolithic code builder, but sets of J2EE component generators strung together in a workflow or a model. Just as did assemblers, then compilers, then JVMs, now component generation is raising the level of abstraction between developers and executable code. How far will this abstraction go? No one knows for sure, but in eventually implementing full J2EE component autogeneration, we may see the limits of human comprehension.

I have used and reviewed several different component generators, and each has features that extend beyond merely generating servlets from XML configuration files. Each of these primarily addresses the issue of J2EE being too complex for the average COBOL, Visual Basic, or PowerBuilder programmer. Java generators open up application programming to novice J2EE programmers, and I think this is important for Java to continue to thrive. Of course, these tools don't do the full job by any means, and Bowstreet Portlet Factory (BPF) is no exception. However, BPF brings several interesting ideas to the table. BPF generates code for a portlet-based architecture, and provides a new slant on component reusability with its idea of multiple profiles for one builder or a set of builders.

BPF itself consists of three main components: the Designer, the Automation Engine, and the Profile Manager.

Designing Portlets
Using the Designer, programmers create models and profiles. This component runs as a plug-in to WSAD, JBuilder, or Eclipse (see Figure 1).

During the course of development, you will use the Designer to create the portlet functionality and run the Portlet Factory's deployment scripts to create a WAR file that contains the portlets you created. You then install the generated portlet WAR as a portlet application using the WebSphere Portal Administration tools. In summary, developing WebSphere portlets with the Portlet Factory consists of these steps:
1.  Implement the portlet functionality using Designer to model and profile the application. You can also create customized Configure and Edit functionality with the Designer.
2.  Use the WebSphere Portal Administration tools to deploy your portlet by creating a new instance of the Bowstreet Portlet Adapter.

As you make changes to the portlet models, you can log out and log back in to the portal to see the effects of those changes on your portlets.

Use Portlet Factory's Designer to develop the portlet's functionality. The Designer includes several Builders useful in developing portlets for WebSphere, in addition to the more general Builders used for any J2EE application development. These Builders include:

  • WPS Portlet Adapter: Adding this Builder call to a model allows for tighter integration with WebSphere Portal and allows you to define portlet information, such as a name and description, as well as specifying the HTML pages or Portlet Factory models to be used when the user configures or edits the portlet.
  • WPS Event Declaration: Adding this Builder call to a model allows you to declare an event that can be handled through the WebSphere Portal Server's event processes. Other portlets, whether they are created with the Portlet Factory or not, may handle these events.
  • Portlet Customizer: Adding this Builder call to a model allows you to quickly create custom Configure and Edit models for a particular portlet.

    Once you have created the models for your portlets in the Designer, you can deploy them to WebSphere Portal by creating new instances of the Bowstreet Portlet Adapter. Under the Manage Portlets tab in the WebSphere Portal Administration tool, perform a "copy" of the Bowstreet Portlet Adapter for each portlet, and simply specify the name of each model in the Modify Parameters screen. The portlets are instantly available inside the WebSphere Portal. Alternatively, Bowstreet Portlet Factory also provides scripts for packaging portlets by generating traditional portlet WAR files.

    The Automation Engine
    The Automation Engine is a servlet that handles a request for a model. The first time the Automation Engine gets a request for a model, it generates a Web application according to the profile(s) associated with the request. On subsequent requests for the same model and profile(s), the Automation Engine simply serves the previously generated Web application. For additional requests to the model with different profile associations, the Automation Engine generates new Web applications.

    The Profile Set Manager
    The Profile Set Manager allows you to create and modify profile sets and profiles (see Figure 2). When you create or open a profile set in the Designer, the Profile Set Manager replaces the view pane.

    The Manage Profiles tab allows you to set the profile entry values for the profiles in a profile set. The Manage Profiles tab also provides you with the ability to lock and otherwise manage the profile entry values for the profiles in a profile set.

    Developing Portlets
    From the developer's point of view, BPF's approach is component based. The core component type is called a "Builder." Builders generate the Java and XML code needed for a specific application function. Developers can select Builders from a palette, provide parametric values, and launch the Builder to create the code to perform the specified behavior.

    Out of the box, BPF provides over 100 Builders. These represent a wide range of functionality, from creating a button to building a Web service call to creating a view portlet connected to a data source. Providing an extensive set of reusable code generators is a great idea, but BPF's ability to combine these into new components is even better.

    Of course, someone needs to configure each of these Builders before they are used. This is where Profiles come in. This Profile configuration process may be simple or relatively complex depending on what needs to be generated, but BPF facilitates the idea of combining simple components to create complex functionality. Ideally, a Builder editor would support both a fill-in-the-blanks wizard mode and a more advanced configuration language. BPF provides this feature by allowing a set of Profiles to be associated with each Builder. This is similar in theory to deployment descriptor files for EJBs or instantiations of a C++ template.

    I was impressed that BPF integrates with either JBuilder or WSAD, but Portlet Factory is suitable primarily for application programmers who are relative novices in J2EE development. The work of creating EJB container components must be left to experienced developers using a tool such as WSAD. This work includes transactions, object/relational mapping, connections to legacy applications, and other external data sources.

    Portlets are driven by Models. In Bowstreet parlance, an application is made up of Models, each of which is simply an ordered set of Builders that together automate the creation of a portion of an application. For example, an application could have a Model that imports a page, connects to a database, accesses data from the database, formats the data into a table, and displays the table on a Web page. Models and Builders are dynamic. This means that inputs to the Builders are easily changed, and a change to a Builder input automatically propagates through the entire model. For example, if the database schema changes in this model, the JSP that writes the table on the Web page will automatically update.

    A Profile is a level of abstraction above, and captures inputs to Builders. When a Model regenerates with a specific Profile, a new version of the application is dynamically generated. In this way, it becomes easy to generate different behaviors from a single Model - for example, to enable customization, user entitlement, or syndication - by creating a new Profile for your application. Profiles can allow people who are not familiar with the details of a Bowstreet Model to supply inputs to the Model in order to change the behavior.

    One Model, driven by multiple Profile sets, can drive multiple portlets. As an example, you may wish to allow a marketing manager to create customized versions of your portlet that are co-branded and have unique business processes for each new partner, or to allow sales reps to create a new portlet for each new customer that shows only the products that the specific customer is entitled to purchase. So, Profiles allow multiple variations of a portlet to be easily created from a single code base, helping to make large-grained components reusable.

    SIDEBAR

    Bowstreet Portlet Factory

    Company Info:
    200 Ames Pond Drive
    Tewksbury, MA 01876
    E-mail: info@bowstreet.com
    Web: www.bowstreet.com
    Toll free: 877 663.2978

    SPECIFICATIONS:
    Application Server:
    IBM WebSphere Application Server

    Portal Server:
    IBM WebSphere Portal Server

    Browsers:
    Microsoft Internet Explorer
    Netscape Communicator

    Operating Systems:
    Microsoft Windows 2000
    Microsoft Windows NT
    Sun Solaris
    IBM AIX
    Red Hat Linux

    IDEs:
    JBuilder
    Eclipse
    IBM WebSphere Studio Family

  • More Stories By Jay Johnson

    Jay Johnson is a J2EE architect at Qorusoft.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    IoT & Smart Cities Stories
    Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
    DXWorldEXPO LLC announced today that "IoT Now" was named media sponsor of CloudEXPO | DXWorldEXPO 2018 New York, which will take place on November 11-13, 2018 in New York City, NY. IoT Now explores the evolving opportunities and challenges facing CSPs, and it passes on some lessons learned from those who have taken the first steps in next-gen IoT services.
    Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
    DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
    René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
    SYS-CON Events announced today that DatacenterDynamics has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. DatacenterDynamics is a brand of DCD Group, a global B2B media and publishing company that develops products to help senior professionals in the world's most ICT dependent organizations make risk-based infrastructure and capacity decisions.
    Nicolas Fierro is CEO of MIMIR Blockchain Solutions. He is a programmer, technologist, and operations dev who has worked with Ethereum and blockchain since 2014. His knowledge in blockchain dates to when he performed dev ops services to the Ethereum Foundation as one the privileged few developers to work with the original core team in Switzerland.
    @DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...
    Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or per...
    DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.