Sunday, November 26, 2017

Re: List of 12c new and deprecated features

It has been more than a year since WCS 12c has been released but if you check the official website, you should see 4 versions of 12c released when this article was published. So, I thought to basically jot down all the new features and list of deprecated features.

List of all new features in WCS 12c (all versions)
  1. DojoTree instead of Java applet: Hugh improvements for loading tree tabs in Admin UI, very important change for WCS administrators (Note: this feature is also available for 11g 11.1.1.8.0 Patch12+). No more battling with java plugins in browser:)
  2. Publishing from Contributor UI: Publishers can now publish assets from Contributor UI itself, no need to provide "AdvancedUser" role to editors until they really need to access Admin UI. No more technical/configuration slip-ups by editors.
  3. Content help menu: There is help menu in Contributor UI which can be used to know how-about of various basic functionalities. Another option would be to customize it and point it to Client's document or wiki page.
  4. GetURLExpressions.groovy can be customized: It has been hard in past to write some custom functions within this element and maintenance of this element has been headache but now in 12c, it is possible to create customized element and add your custom functions as needed.
  5. Content Audit Report: It has been long desired feature for any customer to have an overview of who, what and when performed which operations on assets & 12c meets this requirement aptly.
  6. History of an asset in History tab: Small but helpful feature
  7. A/B Testing: Allows editors to check their website's "more viewed or favored sections" and thus, lets them decide to set the content for the website.
  8. New security, engage and user properties. Check out properties guide.
  9. MVC framework: A slight relief for developers ? Well, all depends on design but still at least a great effort by Oracle to provide such functionality
  10. Lucene indexing test
  11. Integration with other products like Bluekai, Eloqua, Content Cloud, LDAP, Oracle Access Manager, Oracle WebCenter Content, etc. are available out-of-the-box (of course, there are some or the other nitty-gritty details which one needs to implement)
  12. Some small notable changes like separation within search assettype in Contributor UI, colored tabs according to device groups, improved mobility features, tags tree tab, etc.
  13. Log4J is replaced by ODL which is good but too much logging happens now, thus, need to configure log settings very carefully. Custom loggers are feasible in ODL which is pretty nice feature to separately log in different log files if you have deployed your own custom implementation.
  14. Logs are now visible from Admin UI which was very slow and many times not possible in 11g
  15. Logging information like ip, geo-location, etc. are possible due to inclusion of geoip library but it has been recently removed from higher version of 12c3 as these needed licenses.
  16. A very robust aggregate REST API; a very useful feature for clients to deliver micro-sites.
  17. Improved context menu for asset operations in Contributor UI
  18. Shared file system can be managed in database but it has it some caveats as well
  19. Visitor services: New API and integration points with different products
  20. Properties managed via now single json file: wcs_properties.json
  21. Passwords are mostly saved now in keystore rather than AES or SHA encryption, providing better security
  22. Installation, patching and upgrade process are improved drastically then previous 11g version
  23. Deployment of static and custom implementation is to be done as a separate war file rather than updating default war i.e. sites.war
  24. Monitoring logs files, caches, etc. in Oracle Weblogic console
List of all deprecated features in WCS 12c (all versions)
  1. WCS 12c cannot be deployed (not officially supported) on other application servers except Oracle Weblogic (This is a bummer for many customers) and even db is mainly restricted to Oracle database.
  2. No community or gadget server anymore.
  3. No CIP integrations like SharePoint, EMC, etc.
  4. No soap-based web services (replaced by new improved REST & aggregate REST API)
  5. No analytics
  6. No static publishing or any other publishing available out-of-the-box
Need help? Click here.

Monday, February 22, 2016

Introduction to OWCS 12c

Overview
This document is created to provide an idea on the news features of Oracle WebCenter Sites 12c. This new version of WCS introduces various marketing tools which can be used by marketers to generate web pages personalized based on the characteristics (interests, social category, context, etc.) of an individual or group of users, therefore providing them with a tailored user experience.

DEVELOPER’S PERSPECTIVE
    • Oracle has introduced new MVC pattern of coding in 12c which follows the following flow:
Controller Flow.pg.png
    • General idea is to write all the business logic in controller (WCS_Controller asset type) which serves as CONTROLLER, Templates or SiteEntry+CSElement can include controllers and should contain only basic HTML code and output from controller using <fragment> tags and thus, serve as VIEW. Output from controllers i.e. asset data are saved in MAP objects which serve as MODEL. Hence, the MVC pattern.
    • REST api was already present in older version of Oracle WebCenter Sites to access data but 12c provides simpler ways to access data in different ways. Check out this section for more details.
    • Improvements in eclipse-csdt plugin and csdt command line feature.

CLIENT’S PERSPECTIVE
    • Visitor services is a separate module which can be installed and configured with WCS 12c to capture visitor’s activity data from various multiple platforms like google, fb, twitter, etc. and saves as a unified profile within webcenter sites so that marketers can segmentize visitors on basis of these unified profiles/data and thus, target users with desired content. Details related to configuration are present here. This is very advanced topic in terms of capturing visitors data and providing personalized data. Engage is already a part of WCS 12c OOTB and can be used in tandem with Visitors services and Insights (described later) components to target end-users efficiently.
    • This component is kind of reporting tool to check specific visitor action that one can identify for tracking for e.g. number of clicks on certain asset or promotion, specific link, amount of time a visitor watches video, stays on a webpage or an ad.
    • Conversion assets can be created by marketers and works in tandem with Insights component and A/B testing to generate conversion reports.
    • The Insights component delivers a comprehensive real-time view of your website's ROI.
    • This component is again a marketing tools for marketers to drill down marketing initiatives from webpage to single asset.
    • It also provides information on the contributors which worked for contributing content within WCS during a period by generating reports.
    • Marketers can analyse website traffic and user behaviour to segmentize them at very specific content level and target them using either both Engage and Visitors Service component or just with Engage only.
    • This marketing functionality within WCS contributor interface works in tandem with Conversions and Insights components; to test a piece or group of content against each other to determine which can be best for visitors targeting and/or serving best content by testin g performance among variations of content before delivering the content to end-users. This is more of hit-and-trial kind of creating variation of content (assets), capturing data and analysing for targeting users. For A/B testing, insights component should be enabled.
  • Rest of the features are few improvements, functionality and accessibility in the WCS product itself.

Need help? Click here.

Implementing pagination on search in 12c

Pagination on search pages is quite a common requirement and with introduction of WebCenter Sites 12c, it has become even more easier to do so. If you are looking for implementing pagination on search results for 11g, you can check my old post here.

With introduction of new server-side api, its very easy to perform CRUD operation on assets. For searching assets, Searcher helper class provides methods to include various options which is very easier to implement.
Note: For using Searcher, global indexes for the assettype should be enabled.

Following is simple illustration of searching product assets of particular locale (en_US) in FirstSiteII, it can also search on product name, order by date and shows 10 results per page.

Click here to download this sample groovy class.

Need help? Click here.

Sunday, January 3, 2016

Using controllers for development

Welcome to Oracle WebCenter Sites 12c development! After the introduction of MVC framework in Oracle WebCenter Sites, it is now very very easy to perform CRUD operations on assets as OOTB Controller assets are sufficient to carry out nearly 99% of your WCS development. Developers now need to learn little bit of groovy but its okay even if you know JAVA and jstl programming. But still in current release of 12c, legacy tags and asset api can also be used.

If you browse through Samples site, all new concepts are described aptly in the site's sections itself so its redundant to write the same thing in this post. I just wanted to list down few simple cases which are not present or not explained in detail in Samples or Avisports site.

1. Debugging using watchers:

Debugging is little bit difficult when it comes to WebCenter Sites; if not aware of various core functions which are used in background. And seems like that hasn't changed much as it is same case while using controllers. Whenever there is error thrown from controller, you get detailed error log in sites.log but sometimes it may be difficult to decipher the root cause. Thus, the role of watchers is very useful not only during debugging but also gives detail on output of your data in the model object. For every function, you can just add your own watchers and print them in your JSP code.

Syntax to define in controller: watch("__my_watch__")
Syntax to print output in JSP: $("__my_watch__")

Watchers are very useful when you just want to check output from your controller's method. For e.g. Create one controller and add any method which is defined in Samples site and then create one template (applies to various asset type, can be called from browser, uncached) and assign your controller. In template code, just add the following line of code within <cs:ftcs> opening and closing tag, which is basically default watcher: ${__$WATCH$__}
Now, call your template directly from browser using following url: <hostname>:<port>/sites/Satellite?pagename=<sitename where template was created>/<template name>&c=Page&cid=<Some random id> --> which should print the output of your controller's method. Note: Output will be from the asset of what c and cid is used in controller.

2. Accessing attribute values:

To fetch attributes of data type: string, text, number, float, date, int, money ; use the following syntax in JSP template or CSElement:
${asset.YOUR_ATTRIBUTE_NAME} or ${asset["YOUR_ATTRIBUTE_NAME"]}  
where asset is the model object containing the map values which was defined in controller.

To fetch asset of type blob, use the following syntax:  
${asset._bloblink_} or ${asset.YOURATTRIBUTENAME_bloblink_}

To fetch hyperlink for an asset: ${asset._link_}

To fetch attribute of type - asset: ${asset.YOURATTRIBUTENAME} but it will just provide your associated asset id. So to get detail/summary/link template fragment of this associated asset, fetch id in your controller using following syntax: models.asset.YOURATTRIBUTENAME whose output is basically an arraylist. Loop through list and get each id values. Create one empty List<Fragment> and add as TemplateFragment or SiteEntryFragment or ElementFragment to it to be used in Template or CSElement code. For eg: Suppose product assets are associated to one attribute: RelatedProducts and you want to show them using Summary template, then your code will be as followed:

 
and jsp code as followed (don't forget to include jstl core library at top of your element):

<c:if test="${not empty relatedProducts}">
   <c:forEach begin="0" end="${relatedProducts.size()-1}" var="product">
      <fragment:include name="relatedProducts" index="${product}"/>
   </c:forEach>
</c:if>

3. Formatting date is now very simple using jstl fmt:formatDate tag. Just pass ${asset.DATE_ATTRIBUTE_NAME} and desired format to get the formatted date.

4. Apart from watchers, you can directly log the desired output using already defined logger for controller:  
log.info("AssetMap: " + assetMap) OR log.info(JsonOutput.prettyPrint(JsonOutput.toJson(assetMap)))

5. Although methods related to search are explained but fails to provide info on how to sort and search against locale/dimension content. Following code searches against Page of only particular locale - en_US, sorts by updateddate descending and sets only the latest updated page into model object.

That's all for now, will share as I explore more.

Need help? Click here.