GSF 12 Is Finally Here!
GSF-12 is finally here! Yay!!!
This new version comprehends brand new features, but also a major reorganization of the entire project's codebase and several features getting deprecated in benefit of some of WebCenter Sites 12c's native features.
- Providing the means for clients out there already using GSF to reuse as much of their existing code as possible when upgrading from WCS 11.x to WCS 12c,
- Leveraging the use of WCS 12c's new features/API,
- Simplifying GSF's installation/deployment to the utmost and making it as agile and CI-friendly as possible, and
- Encouraging GSF users and potential adopters to benefit from GSF's optimized code whilst leveraging better encapsulation, cleaner design and more intuitive, simpler usage and deployment.
So... What's New?
Updated Java Stack
GSF-12 requires Java v1.8, Servlet 3.0 and JSP 2.2.
Brand New Namespace
(Considerably) Simpler Installation Procedure
Cleaner, More Intuitive, and Simpler to Extend
Integrating With WCS Is Easy As Ever
Obviously, you can still use the GSF from your Java code.
Very Cool Annotations
class SomeTypicalController extends InjectingController { (...) @CurrentAsset(attributes=["title", "subtitle", "body"]) TemplateAsset theAsset; protected void handleRequest() { String headline = theAsset.asString("headline"); (...) } (...) }
- The @ServiceProducer annotation (tools.gsf.config.ServiceProducer) allows your defining ServiceProducer methods inside your Factory classes.
(...) @ServiceProducer(cache = true, name="someCustomBean") public MyCustomBean newCustomBean() { return MyCustomBean.getInstance(); } (...)
-
The @InjectForRequest annotation (tools.gsf.config.inject.InjectForRequest) allows your injecting a ServiceProducer-produced bean into your own Java class, Groovy controller or even JSP / Groovy Template.
(...) @InjectForRequest(value="sitePlanNavService") protected NavService myNavService; (...)
-
The @Bind annotation (tools.gsf.config.inject.Bind) will look for a given variable in the specified scope ("ics", "request" or "session") and, if found, it will inject the value into the annotated field (plus, it handles automatic type conversion for you too)!
(...) @Bind(value="rendermode") protected String currentRenderMode; (...)
-
The @Mapping annotation (tools.gsf.mapping.Mapping) will look up a MAP entry (AssetType:AssetName, AssetType:AssetId, etc...) matching the specified key in the Template / CSElement being executed (for the current site) and, if found, it will inject the mapped value into the annotated field. Yes, it supports AssetId and left/right selection!
@Mapping(value="myMappedAssetIdKey") protected AssetId mappedAssetId;
The GST Properties Mechanism Is Not Tied To Any Asset Type Anymore
A Brand New Navigation Service API
- All navigation structures must be modeled as a hierarchy (N-tree) of Node objects.
- Each navigation structure you build must have a unique handle.
- Each and all nodes belonging to a nav structure have a (preferred) breadcrumb.
- One for loading your entire nav structure (i.e. all 1st level nodes): List<N> getNav(S navStructureId);
- Another one for calculating the breadcrumb of any of its nodes: List<N> getBreadcrumb(P navParticipant);
The base interfaces - NavService and Node or even AssetNode - "invite" you to (build and) return the entire Nodes N-tree structure when invoking NavService.getNav(), but it is not strictly enforced, leaving the door open to your implementing your own NavService using a lazy-loading approach, if needed.
... and What's Gone?
These are some of the major features which got deprecated in GSF-12:
- The "gsf-mobile" module.
- All GSF-specific taglibs.
- The existing Navigation Service, including all related classes, taglibs and asset types / subtypes.
- GSF Tagging, including supporting tables, asset event listeners et al.
- GSF's own Groovy support.
- GSF Actions / Controllers / Request Dispatching framework.
- GSF's vanity URLs framework.
- The entire "include" subpackage, including IncludeService and GsfCallTemplate.
- All AppContext implementations and all related factories, servlet context listeners and injection-related classes, which have been replaced and enhanced by the new scoped factories-driven infrastructure.
- All samples driven and/or related to the above features.
Refer to the GSF-12's Release Notes for a comprehensive list of deprecated features and the suggested approach for replacing each of them in your own project's codebase.
So... What's Next?
Function1 has been deeply involved in this new release of the GSF and will continue to support it and enhance it in the foreseeable future.
In upcoming articles, we will dive into the GSF 12's cool new features/components. For now, have a look at the GSF website.
Should you have any inquiries regarding GSF (any version) and/or WebCenter Sites, do not hesitate to contact us!
- Log in to post comments