Giter Club home page Giter Club logo

wso2-samples-store's Introduction

#wso2-samples-store

This is an example Jaggery application to demonstrate the features of caramel framework.

##Installing

  • Copy wso2-samples-store webapp into a Jaggery server which has caramel module installed.
  • You can straightaway try this on WSO2 UES 1.0.0.
  • If you change the webapp context, you need to update the value of context object key inwso2-samples-store/app.js to match you context.

##Documentation

  • This sample contains 2 different themes for the same webapp. All themes resides on themes directory and you can add any number of themes as you want.
  • Theme for a particular HTTP request is determined by evaluating the theme callback that you specified in caramel configuration.
  • caramel configuration is set when the app get deployed using the init script app.js.
  • According to the logic in this particular caramel configuration, theme can be switched by specifying theme url parameter with desired theme name. Then, selected theme will be stored in user session and will be used for subsequent requests.
  • theme0 is a very basic theme which use only the core apis of caramel.
  • theme1 is a theme based on the handlebars engine which is an extension on top of caramel core.
  • A theme can have their own theme engine and each theme has complete control over the data been rendered for each request.
  • In order to switch to theme0, use http://localhost:9763/wso2-samples-store/?theme=theme0
  • In order to switch to theme1, use http://localhost:9763/wso2-samples-store/?theme=theme1
  • Once you switched to a theme, you can void theme parameter.
  • Please refer architecture diagrams in docs directory along with the app source to learn more.
  • There are several more features of caramel like i18n, client side rendering etc. which will be added to this sample in the future.

wso2-samples-store's People

Contributors

ruchiraw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.