Giter Site home page Giter Site logo

my-app-seed's Introduction

My UW App Seed

Build Status

This is a "seed" project intended to be used as a template for creating "Apps" in My UW in a new way.

Rather than creating a Portlet, developers can clone this project and write a Servlet 3 web application that can deployed with My UW Madison.

Requirements

This application assumes you are familiar with Maven, have it installed, and have a settings.xml appropriate for interacting with UW's Maven Artifact Repository.

Getting started

  1. git clone [email protected]:UW-Madison-DoIT/my-app-seed.git your-app-name
  2. cd your-app-name
  3. mvn install jetty:run-war

Point your browser at http://localhost:8080 and you'll see the familiar My UW frame.

Adding your content

The unique aspect about this project is that it overlays angularjs-portal-frame. That project provides us the frame that My UW uses: the header, the sidebar, and the footer. It provides us an extension point in a file with a specific name: my-app.js.

That file is expected to be a require.js module, i.e. enclosed within a define() function. RequireJS can be used to include more javascript resources from within my-app.js. For example:

var myWidget = require(['my-widget.js'], function() {
  alert('Require runs my-widget.js first, and then this function.');
});

For more detailed information, see the require.js quickstart guide and API documentation.

In my-app.js, you can see that we reference a variable named app; this variable is the result of angular.module that was provided by angularjs-portal-frame.

With that reference we can use Angular to register controllers, services, directives, you name it.

The example in this project simply adds a new Angular Route called 'default' that loads the contents of my-app.html into the frame.

Why is this a multi-module project?

Generally, projects that use this seed are a little larger in nature and have other modules encapsulating parts of the code base. You would see other modules that are siblings of the war module like:

  • api
  • impl
  • security
  • integration

If your application won't have these things, you probably should consider a portlet instead.

my-app-seed's People

Watchers

 avatar  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.