customizing the api store & publisher in wso2 api manager

31
Last Updated: Jan. 2014 Lalaji Sureshika & Joseph Fonseka Customizing the API Store & Publisher WSO2 API Manager Team

Upload: wso2

Post on 18-Nov-2014

1.310 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Customizing the API Store & Publisher in WSO2 API Manager

Last Updated: Jan. 2014

Lalaji Sureshika & Joseph Fonseka

Customizing the API Store & Publisher

WSO2 API Manager Team

Page 2: Customizing the API Store & Publisher in WSO2 API Manager

**

About the Presenters

๏ Joseph joined WSO2 in September 2013. He is a Senior Tech Lead in the WSO2 API Manager team where he focuses on improving the UX of the API Manager. In addition to his product development efforts he is also a contributor to the Sahana and OpenEvsys open-source projects. He is also a FOSS advocate.

๏ Lalaji joined WSO2 in September 2010. She is a senior software engineer in the WSO2 API Manager team where her main focus is on the development of the product. In addition to her product development efforts she has provided development support and technology consulting on customer engagements, including customer QuickStart programs.

Page 3: Customizing the API Store & Publisher in WSO2 API Manager

*

About WSO2

*

๏ Global enterprise, founded in 2005 by acknowledged leaders in XML, web services technologies, standards and open source

๏ Provides only open source platform-as-a-service for private, public and hybrid cloud deployments

๏ All WSO2 products are 100% open source and released under the Apache License Version 2.0.

๏ Is an Active Member of OASIS, Cloud Security Alliance, OSGi Alliance, AMQP Working Group, OpenID Foundation and W3C.

๏ Driven by Innovation

๏ Launched first open source API Management solution in 2012

๏ Launched App Factory in 2Q 2013

๏ Launched Enterprise Store and first open source Mobile solution in 4Q 2013

Page 4: Customizing the API Store & Publisher in WSO2 API Manager

**

What WSO2 delivers

Page 5: Customizing the API Store & Publisher in WSO2 API Manager

*

Agenda

๏ Introduction to WSO2 API Manager

๏ Dive in to API Store

๏ Customizing API Store & Publisher

๏ Localization

๏ Sample Customizations

๏ Future

Page 6: Customizing the API Store & Publisher in WSO2 API Manager

*

Introduction

๏ WSO2 API Manager is a complete solution for publishing and managing APIs.

๏ It comes with an out of the box API Store which allows you to publish and advertise your APIs.

๏ You can easily customize the API Store to reflect your company's brand.

๏ Also you can add targeted content to the store and use it to build a developer community under your brand name.

http://wso2.com/products/api-manager/

Page 7: Customizing the API Store & Publisher in WSO2 API Manager

*

Key Components

Page 8: Customizing the API Store & Publisher in WSO2 API Manager

*

API Store

Page 9: Customizing the API Store & Publisher in WSO2 API Manager

*

Dive in to API Store

๏ Where to find the API Store

{API Manager}/repository/deployment/server/jaggeryapps/store

๏ API Store is built on Jaggery

A framework to write web-apps and HTTP-focused web services for all aspects of the application: front-end, communication, Server-side logic and persistence in pure Javascript

http://jaggeryjs.org/

Page 10: Customizing the API Store & Publisher in WSO2 API Manager

*

Dive in to API Store๏ API Store Directory Structure

Page 11: Customizing the API Store & Publisher in WSO2 API Manager

*

Dive in to API Store

๏ API Store Directory Structure

jaggery.conf -This file specifies the application specific

configurations. It has used to define the URL-mappings for the

pages, define welcome page,security-constraints,etc.

Templates- Contains views of the web-application. A template can

be considered as a re-usable UI block.

Blocks-This can be considered as the Controller part of the web

app. User actions on each View(template) are sent to the relevant

block and then it handle the incoming HTTP requests.

Page 12: Customizing the API Store & Publisher in WSO2 API Manager

*

Dive in to API Store๏ API Store Directory Structure

Modules- Can be considered as the 'Model' of the application. It

handles the state of the application.Contains references to all the

functions plugged through the java modules in to Store app..

Jagg -This directory is for handling all functionalities to control and

manage interactions among the modules,blocks and templates of

the jaggery application APIStore/Publisher.

Page 13: Customizing the API Store & Publisher in WSO2 API Manager

*

Dive in to API Store๏ API Store Request Flow

Page 14: Customizing the API Store & Publisher in WSO2 API Manager

*

Customizing APIStore๏ Changing the brand

○ Changing the banner○ Changing the background colors○ Changing the footer

๏ Create a new jaggery theme.○ Changing the page layout

๏ Adding new Content.○ Adding a new page

Page 15: Customizing the API Store & Publisher in WSO2 API Manager

*

Changing the Banner ๏ To change the banner image Locate logo.png from

“store/site/themes/fancy/images” and replace it.

๏ To change the banner height and color find “styles-layout.css” in “store/themes/fancy/css” and change the relevant styles.

Page 16: Customizing the API Store & Publisher in WSO2 API Manager

*

Changing Colors & Styles

๏ The store uses bootstrap css to style some of the components and to structure the page layout.

๏ Additional styles are specified in “styles-application.css” and “styles-layout.css” found inside “store/site/themes/fancy/css” directory.

๏ Use the above mention style sheets to customize the colors.

๏ You can include a bootstrap theme to change the styles of bootstrap components.

Page 17: Customizing the API Store & Publisher in WSO2 API Manager

*

Changing the Footer๏ The footer is located in

“store/site/themes/fancy/templates/page/base/template.jag” file.

๏ Open the template file and find a div with “footer-main” class name.

๏ Change the content of the above footer as required.

Page 18: Customizing the API Store & Publisher in WSO2 API Manager

*

Creating a new theme

๏ API Store has Themes and Sub-themes which can be use to customize page layout and styles.

๏ If you want to change the page layout you can create a new theme, and if you only need to change colors and banners better to use subthemes.

๏ Easiest way to create a theme is to duplicate an existing theme and change the templates & styles.

๏ To apply the new theme change the theme property in “site.json” under “site/conf/” directory and refresh the application.

Page 19: Customizing the API Store & Publisher in WSO2 API Manager

*

Creating a new Page๏ Create new jag file under “store/site/pages/” directory.

Ex : aboutus.jag

๏ Create a directory under “store/site/themes/fancy” with the page name and create initializer.jag and template.jag inside it.

๏ Add page content to the template.

๏ Create a path to the page in store/jaggery.conf.

Page 20: Customizing the API Store & Publisher in WSO2 API Manager

*

Custom Error Pages

๏ Add to Store/jaggery.conf

Page 21: Customizing the API Store & Publisher in WSO2 API Manager

*

API Publisher

Page 22: Customizing the API Store & Publisher in WSO2 API Manager

*

Customizing API Publisher

๏ API Publisher is a Jaggery application located in -

{API Manager}/repository/deployment/server/jaggeryapps/publisher

๏ You can use the same methods used to customize the API Store to customize API Publisher.

Page 23: Customizing the API Store & Publisher in WSO2 API Manager

*

Internationalization Support๏ Jaggery based String localization

Store/site/conf/locales/jaggery/locale_{locale-code}.json

http://jaggeryjs.org/apidocs/i18n.jag

๏ Client side Javascript based String localization Store/site/conf/locales/js/i18nResources.json http://i18next.com/

https://docs.wso2.org/display/AM160/Internationalization+and+Localization

Page 24: Customizing the API Store & Publisher in WSO2 API Manager

*

Sample Customizations

Page 25: Customizing the API Store & Publisher in WSO2 API Manager

*

Sample Customizations

Page 26: Customizing the API Store & Publisher in WSO2 API Manager

*

Sample Customizations

Page 27: Customizing the API Store & Publisher in WSO2 API Manager

*

Future

๏ Custom themes per tenants

๏ API Usage Statistics on Store

๏ Move the Store/Publisher to adhere to Caramel Framework built on Jaggery

http://wso2.github.io/caramel

Page 28: Customizing the API Store & Publisher in WSO2 API Manager

*

Future ๏ Migrate Store/Publisher to WSO2 Enterprise Store http://wso2.

com/products/enterprise-store

Page 30: Customizing the API Store & Publisher in WSO2 API Manager

**

Business Model

Page 31: Customizing the API Store & Publisher in WSO2 API Manager

Contact us !