Git Product home page Git Product logo

oasp4js's Introduction

Sample Application Build Status Coverage Status

Note

OASP has been superseded by devonfw, the Open Source Standard Software Development Platform for state of the art Cloud Native Micro Service and Multi Platform Rich Web Apps, supported by Capgemini.

Individual products within OASP have been renamed to a corresponding one in devonfw.

For example:

  • OAPS4j → devon4j

  • OASP4js → devon4ng

  • OASP4NET → devon4NET

devonfw® is an exclusive and registered (European Trademark) product of Capgemini. Capgemini reserves all intellectual and industrial property rights over devonfw but publishes it under the Apache License, Version 2 – like OASP- which makes devonfw 100% Open Source. See: https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)

Getting Started

To get started you need to clone both the oasp4j and oasp4js repositories containing the server and the client part respectively. Each of them is to be built and started to talk to each other it. There are two ways to get the sample application working: eithter by getting the oasp IDE and running it from there or setting up the IDE manually.

Full oasp IDE installation

If you want to install full OASP IDE and get both server and client code please follow steps described in oasp IDE setup. The oasp IDE already contains software (Node.js, Gulp, Bower, Maven) required to run the sample application; only Git has to be additionally installed.

Getting oasp4js client working

Install prerequisites

If the oasp IDE setup is not used, additional software has to be installed manually. You need a Git client to clone the repositories and the Node.js platform (including its package manager - npm) which allows Gulp and Bower to install the dependencies and build the application. Here you can learn how to install the prerequisites. Also, for the server part you need Maven (tested against the version: 3.3.9) to be installed. For installation details please refer to the Maven home page.

Please note that this client version was tested with following versions of the additional software:

  • node.js version 5.0.0

  • npm version 3.3.6

  • gulp version 3.9.1

  • bower version 1.7.7

Create the <oasp_dir> directory for the sample application

mkdir <oasp_dir>
cd <oasp_dir>

Set up the server part of the application

Clone the oasp4j repository:

git clone --recursive https://github.com/oasp/oasp4j.git -b master

Let Maven build the server part:

cd oasp4j
mvn clean install

After a successful build go to the following directory

cd samples\core\target

Configure the port number which should be used by the embedded tomcat server and its context path. To do this, create a new application.properties file in the <oasp_dir>\oasp4j\samples\core\target directory and add the following entries:

server.port=8081
server.context-path=/oasp4j-sample-server

Start the oasp4j-samples-core project as a Spring Boot application by running the following command in your console:

java -jar oasp4j-sample-core-dev-SNAPSHOT.jar

Set up the client part of the application

We asume you are back in the <oasp_dir> directory.

Clone the oasp4js repository:

git clone https://github.com/oasp/oasp4js.git -b master

Install the client part’s dependencies:

cd oasp4js
npm install

During the npm install process Bower downloads some libraries and uses Git for it. Git defaults to the Git protocol whose standard port (9418) is sometimes blocked by firewalls. A solution for this problem is to configure Git to use the https instead of the git protocol with following command:

git config --global url."https://".insteadOf git://

and to rerun the npm install command.

Start the application using Gulp:

gulp serve

The above Gulp’s task opens the client part of the application in your default browser and watches for any changes in HTML/JavaScript/CSS files. Once you change one, the page is reloaded automatically!

You can sign in using the following credentials: waiter/waiter or cook/cook.

If for some reason your client should talk to the server configured in a different way, you can configure the server details in the client’s configuration file, <oasp_dir>\oasp4js\config.json, in the proxy part:

{
    "proxy": {
        "baseUrl": "http://localhost:8081",
        "context": "/oasp4j-sample-server"
    }
}

oasp4js's People

Contributors

csiwiak avatar drhoet avatar dumbnickname avatar fawinter avatar hohwille avatar jkokoszk avatar jorge-dacal avatar jsanchoh avatar kalmuczakm avatar kowalj avatar maihacke avatar may-bee avatar maybeec avatar mmatczak avatar mmatczak-cg avatar tbialecki avatar tomaszwawrzyniakit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oasp4js's Issues

Add showcase for "big" dialog for power users utilizing efficient keyboard control to get OASP4JS into projects

For getting OASP4JS into projects it would help to have a demo where a dialog

  • with lots of dialog components and fields
  • maybe with tabbed panes
  • maybe with a tree pane for navigation
  • maybe with pulldown menus
    can be efficiently controlled, navigated and edited by mouse and by keyboard.

Hopefully we can then boost existing JSF web applications with OASP4JS based dialogs and later replace JSF completely.

oaspUnauthenticatedRequestResender likely to break promise chaining when rejected by authenticator

Hi,

When authentication is rejected, cancelAllAwaitingRequestsOnFailure is executed, which goes through the queue of responses and calls 'cancel' for all of them. Unfortunately cancel rejects a promise with no value provided. Interceptor plays with HTTP responses so it should always provide something compatible with this API. It is very likely to break promises chaining here, as failure callbacks might blindly try to read some basic information from response like data, status, url, headers etc. (in order to provide some feedback to the user).

I would propose to return original unauthorized response in case of canceling.

Cheers,
Bartek

Security 401 unauthorized vs 403 forbidden

Hi,

I have noticed that HTTP security interceptor is sensible only for HTTP 403 (Forbidden) responses. How can we distinguish two scenarios:

  • user tries to execute some action against server/obtain a resource when he is not logged in
  • user tries to execute an action/obtain resource and he lacks privileges/rights to do so.
    What will currently happen if e.g. button/component is mistakenly shown to a user not belonging to the group having access rights to execute underlying action and the user clicks this button? Is 403 returned in such case? If so, the user will be prompted to log in, even though he already has a valid session.
    I would propose to introduce usage of HTTP 401 response status in case of an attempt to obtain resource when a session does not exist (or has expired) and 403 response status for resources with missing access rights. What do you think?

Cheers,
Bartek

Guided Project TH Köln - 0.2: Show some dishes at the homepage or login page

Part of the Guided Project at Technische Hochschule Köln - #48

Idea:
To get started with our student's OASP project we wanted to extend the restaurant application's homepage and/or login page with an impressive list of some selected dishes - similar to a real restaurant placing a sign at the street with its actual offerings.

After having planned this at the sprint planning last thursday the students send the attached UI designs.

Any comments on that?

Should we place the dishes at the homepage or login page?

loginpagedishestextual
loginpagedishespictures
loginpagedishespaging

Releasing OASP4JS with shrinkwrap

I do not know whether you already suggest to use shrinkwrap as mandatory tool to create releases of the oasp4js. If so, we should document a release howto similar to what we have for oasp4j, which covers such mandatory steps to be performed to enable stable release management.

REST service for generating CSRF token

The solution with the separate REST service is not a security issue, but can have the following consequences:

  1. The attacker can prepare a request invoking the service for the CSRF token generation, but cannot read the response because of the same-origin-policy (SOP). This is the case if the domain of the attacker is different from the domain that is attacked.
  2. If the domains are the same, the attack attempt will be successful, because the web browser permits the scripts contained in a first web page to access data in a second web page if both web pages have the same origin. Additionally the mechanism of CORS i.e. extending the domains which are permitted to gain access, if this mechanism would be introduced, will lead to futher security leak.

Refreshing 'Tables' View

Together with @szendo we faced some weird application behavior. Steps to reproduce:

  1. Login as cook,
  2. Navigate to tables view, should be shown properly
  3. Refresh - F5, you will be prompted to login because of:
    POST http://localhost:9000/services/rest/tablemanagement/v1/table/search 403 (Forbidden)
    It looks like this behavior is cased by requests execution order:
    image
    As picture shows, search is executed before CSRF token is obtained.
  4. If you click cancel, you can continue browsing through the app, but if you try to login again, then you will encounter 'Authentication failed.' message. In order to login again now, browser cache needs to be cleaned.

Extend js development environment installation instruction

I was installing the js sde last time and I was missing some information about installation of the sde. Trivial, but for non-js developer not intuitive.

After installing NodeJS, I had to install bower and grunt-cli separately

npm install -g grunt-cli
npm install -g  bower

It would be nice when the manual could be extended with such informations. I can"t find any informations how to install the software necessary for js development.

User profile concept

We need to come up with a concept what user related data (or application related data being more general) should be kept in the client. Example pieces of such data are:

  1. user name, date / time format, language
  2. dialogs the user is authorized for
  3. user's menu structure

Needed are the following steps:

  1. Server-Side (Java):
    Implement a transformer which based on the current user information creates a data structure holding the data needed in the client. The data structure is returned by the SecurityRestServiceImpl.getCurrentUser() REST service.

  2. Client-Side (JavaScript):
    update the appContext service accordingly

Build script for generated client

Is there any reason why the yeoman generator does not generate a pom.xml for building the application? The whole java-directory is missing. Or have I totally misunderstood anything?

Functional errors of the running application

Hi, I'm going through the client demo application running on "http://oasp-ci.cloudapp.net/" and I'm having some errors. Is it supposed to be fully working?

For example entering with cook it goes directly to cook-positions page, but if you click the Table menu there is no indication to go back to cook-positions (although browser back button goes back indeed)

Also entering with bartender I was hopping to enter to cook-positions with mealOrSideDish=false but instead goes directly to Table page.... so I can not get to cook-positions page.

Other thing that seems not right is that a table can be edited and have some orders without being "occupied"... I don't know if it makes sense

While trying the online demo I have some tables in occupied state that I'm unable to free because the server returns an IllegalEntityStateException, and also this error doesn't get to the UI so the user doesn't know whats happening.

I don't know if is the objective of the demo to have it fully working but it seems lacking.

By the way I'm being picky because I'm trying to replicate the client side demo with ExtJS5 so I've been playing lately with it to discover the functionality.

Thanks in advance

gulp build:dist job does not copy HTML files

gulp build:dist job does not copy HTML files into dist directory when html files already exist in the .tmp directory.

In the result - distribution version can't be built correctly if the .tmp directory exists.
Reproduction steps:

  1. run gulp serve / gulp build job
  2. run gulp serve:dist / gulp build:dist job
  3. there are no html files in the dist directory

When there is no .tmp directory, dist directory is built correctly (simply run gulp clean before gulp serve:dist)

gulp build fails

C:\tmp\oasp4js>gulp
[11:52:14] Using gulpfile C:\tmp\oasp4js\gulpfile.js
[11:52:14] Starting 'clean'...
[11:52:14] Finished 'clean' after 6.18 ms
[11:52:14] Starting 'default'...
[11:52:14] Starting 'build:dist'...
[11:52:14] Starting 'wiredep'...
[11:52:14] Starting 'sync group1:0'...
[11:52:14] Starting 'ngTemplatesTasksGeneration'...
[11:52:14] Finished 'ngTemplatesTasksGeneration' after 2.14 ms
[11:52:14] Finished 'sync group1:0' after 3.75 ms
[11:52:14] Starting 'sync group1:1'...
[11:52:14] Starting 'ngTemplates[main.templates.js]'...
[11:52:14] Starting 'ngTemplates[oasp-mock.templates.js]'...
[11:52:14] Starting 'ngTemplates[oasp.templates.js]'...
[11:52:14] Starting 'ngTemplates[oasp-security.templates.js]'...
[11:52:14] Starting 'ngTemplates[oasp-ui.templates.js]'...
[11:52:14] Starting 'ngTemplates[oasp-i18n.templates.js]'...
[11:52:14] Starting 'ngTemplates[offer-mgmt.templates.js]'...
[11:52:14] Starting 'ngTemplates[sales-mgmt.templates.js]'...
[11:52:14] Starting 'ngTemplates[table-mgmt.templates.js]'...
[11:52:14] Starting 'sprite'...
[11:52:14] Starting 'less'...
[11:52:14] Starting 'html'...
[11:52:14] Starting 'img'...
[11:52:15] Starting 'i18n'...
[11:52:15] Starting 'fonts'...
[11:52:15] Finished 'build:dist' after 1.14 s
[11:52:15] Finished 'default' after 1.14 s
C:\tmp\oasp4js\node_modules\gulp-ng-templates\node_modules\gulp-header\index.js:
58
var file = _file.clone({ contents: false });
^
TypeError: Cannot read property 'clone' of undefined
at DestroyableTransform.EndStream [as flush](C:tmpoasp4jsnode_modulesg
ulp-ng-templatesnode_modulesgulp-headerindex.js:58:21)
at DestroyableTransform. (C:\tmp\oasp4js\node_modules\through2\no
de_modules\readable-stream\lib_stream_transform.js:123:12)
at DestroyableTransform.g (events.js:199:16)
at DestroyableTransform.emit (events.js:104:17)
at prefinish (C:\tmp\oasp4js\node_modules\through2\node_modules\readable-str
eam\lib_stream_writable.js:492:12)
at finishMaybe (C:\tmp\oasp4js\node_modules\through2\node_modules\readable-s
tream\lib_stream_writable.js:500:7)
at endWritable (C:\tmp\oasp4js\node_modules\through2\node_modules\readable-s
tream\lib_stream_writable.js:512:3)
at DestroyableTransform.Writable.end (C:\tmp\oasp4js\node_modules\through2\n
ode_modules\readable-stream\lib_stream_writable.js:477:5)
at DestroyableTransform.onend (C:\tmp\oasp4js\node_modules\gulp-concat\node

modules\through2\node_modules\readable-stream\lib_stream_readable.js:523:10)
at DestroyableTransform.g (events.js:199:16)

C:\tmp\oasp4js>

seems to stem from a dependency update, related issue/fix I've found:
google/material-design-lite@618c51f

The package karma does not satisfy its siblings' peerDependencies requirements!

I'm trying to invoke npm install but it finishes with following error

kso@lenovo:~/work/projects/oasp/develop/oasp4js$ sudo npm install
npm WARN package.json [email protected] No repository field.
npm WARN cannot run in wd [email protected] bower install -F (wd=/home/kso/work/projects/oasp/develop/oasp4js)
npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.10 <=0.13
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9
npm ERR! peerinvalid Peer [email protected] wants karma@>=0.9

npm ERR! System Linux 3.16.0-44-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/kso/work/projects/oasp/develop/oasp4js
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/kso/work/projects/oasp/develop/oasp4js/npm-debug.log
npm ERR! not ok code 0

The gulp serve command works, but mvn install in the java subdirectory fails from the same reason described above

remove bower

We should remove bower as it does not provide any further benefit since npm catched up supporting everything bower has been added value for.

Would be worth a discussion to make live simpler especially in our sample, which already utilizes a lot technologies to work.

Pagination example

As described in oasp/oasp4j#193, we should have an example for pagination in the client.
A basic implementation for the server has already been done, see oasp/oasp4j#239. It includes general pagination support and REST services for the Order entity.

The client should include at least one reference implementation for each of the following cases:

  • pagination of a search result list (e.g. tables, orders) with next/previous page buttons
  • a search result list that loads further results when the user has scrolled to the bottom

I will start looking into this matter.

Guided Project TH Köln 0.0: organization

Basics of the Guided Project at Technische Hochschule Köln, will be described at http://lwibs01.gm.fh-koeln.de/blogs/bente/category/lehre/projekt/

  • Why: creating a showcase for OASP4JS to convince colleagues and customers of using OASP in their projects
  • Who: 11 students of the Technische Hochschule Köln
  • guided by Prof. Stefan Bente (SW development), Prof. Siegfried Stumpf (team process), Axel Burghof (playing the customer role)
  • When: WS 2015/16 from September 2015 till February 2016
  • Where: Campus Gummersbach of Technische Hochschule Köln
  • How: Agile software development following Scrum (two Scrum teams)
  • Sprints lasting three weeks

Client-side Subsystem Test

As described in https://github.com/oasp/oasp4js/wiki/Testing, we should have client-side tests against the browser, while the server is replaced by a client-side test double. According to the AngularJS tutorial, for this kind of test we should use Protractor. Unfortunately, I could not find an example using Protractor in the restaurant application.

I would like to clear up the following questions:

  • Do we want to use Protractor or is there a better tool for this kind of test?
  • Is it possible to replace the server by a test double when using Protractor (e.g. with $httpBackend.whenGET/POST/etc.)?

Furthermore, it would be fine to add an example test to the restaurant application, which should be part of this issue's definition of done.

update released cross-cutting oasp modules

We already have a bower repository for our oasp modules: oasp/oasp4js-bower
However, for resolving the typescript migration in #80, we first should use our oasp modules like any other application will do. Thus, we can ignore the migration of the modules for now and suspend it to a later point in time.

Furthermore, please consider the discussion in #91.
@mmatczak:

  1. is there any documentation how to release the modules in the bower repository?
  2. do we have to change anything to make the modules also available for npm?

Authorization (in the client)

Add the following elements which check roles of the currently logged in user:

  1. Going to a dialog requires check against user roles (depends on #51)
  2. displaying an element (e.g. button) depending on user roles
  3. service which checks user roles

Roles should be defined as constants to benefit from IDE's content assist.

Spinner cannot be tested in generated application

I performed these steps:

  1. Generating an application as described here: https://github.com/oasp/generator-oasp
  2. Installing the bower modules as described here: https://github.com/oasp/oasp4js-bower
  3. Adding the globalSpinner to the dependencies of app.controller.js:
angular.module('app.main').controller('AppCntl', function ($scope, globalSpinner) {
    'use strict';
    $scope.message = 'Hello!';
});

Now I can start gulp serve and the application works correctly. But unfortunately I'm not able to create a successful test against the controller.

Here is My first try:

beforeEach(inject(function ($rootScope, $controller, $q, $injector) {           
  $scope = $rootScope.$new();
  $controller('SearchACntl', {$scope: $scope});
};    
it('blabla',  function () {});

The restaurant application's testcases do not inject the globalSpinner explicitely, so I thaught this would not be necessary. But the result of gulp test:tdd is this:

PhantomJS 1.9.8 (Windows 7) Module: app.main, Controller: AppCntl blabla FAILED
Error: [$injector:unpr] Unknown provider: oasp.oaspUi.spinnerProvider <-
oasp.oaspUi.spinner

So I tried this:

    beforeEach(inject(function ($rootScope, $controller, $q, $injector) {           
        myGlobalSpinner = $injector.get('oasp.oaspUi.spinner');
        $scope = $rootScope.$new();
        $controller('SearchACntl', {$scope: $scope, globalSpinner : myGlobalSpinner});
    }));

The result is the same.

Question: Is it right that the bower modules are not loaded automatically when gulp test:tdd is executed? How can this be fixed?

Removal of CSRF token from GET requests

The client side of the sample application should not attach the CSRF token to GET requests. Due to the default behavior of the springs org.springframework.security.web.csrf.CsrfFilter filter, the CSRF token in GET requests is not protected.

(issue moved from oasp4j - #311)

add a static configuration constant for the currency

We want to change the JSON API in such way that the currency which is now retrieved by the system with each offer, will be removed. This is a leftover from the usage of JSR354 (MoneytaryAmount) which will no longer be needed as the system currency is always the same and won't be changed during operation.
After adding a static configuration constant for the currency the changes in the API can be performed. See oasp/oasp4j#58 for further information.

Guided Project TH Köln - 1.1: List dishes as a menu card

Part of the Guided Project at Technische Hochschule Köln, will be described at http://lwibs01.gm.fh-koeln.de/blogs/bente/category/lehre/projekt/

At first we may extend the restaurant app to list all dishes provided by the restaurants. This would give us a first example of a kind of dashboard and would allow us to demonstrate some nice looking table formatting.

Requirements technical

t-a) listing a potentially tall number of entries (with paging)
t-b) nice format showing the title of dishes in bold letters and an explanation and / or list of main ingredients in small letters underneath
t-c) grouped by some categories
t-d) optionally with a graphical marker for hot smell (some chillies)
t-e) self explaining (without the need for column titles), nice looking

At first we can start using the existing articles already defined in the restaurant app. When adding further attributes we may define our own entity type to be independ from the rest of the application.
Filtering and sorting we will provide later. Even prices may be added later, when recipes can be calculated.
When introducing our own entity type we should use the CobiGen to generate the code for the access layer. This way the code will automatically fulfill the guidelines.

Requirements business logical

b-a) list showing all existing dishes
b-b) readers should get an overview what they can eat in the restaurant(s) as they would get by a short look into a typical menu card
b-c) dishes should be grouped by typical categories (e.g. salad, fish, pasta, ...)
b-d) dishes should be marked by multiple criteria (e.g. vegetarian, gluten-free, lactose-free), optionally using little icons

Create unique correlation ID and request counter to send with every request

In OASP4J there is a concept called correlationID that is used as MDC and is included into each log entry. The idea is to be able to follow and trace a call trough the entire application landscape of a SOA or MicroServices architecture.

Therefore the client has to include an HTTP Header CorrelationId that should be set as following:

  • when the client is started a unique id (clientId) is created (e.g. UUID)
  • when the client is started a request counter (clientRequestCounter) is initialized with 0
  • for each request the request counter is increased and the CorrelationId is set to clientId-clientRequestCounter.

So if clientId is 9fbe72def1924fa the first request will have

CorrelationId: 9fbe72def1924fa-1

Error handling

Implement an error response interceptor which understands the server protocol (as implemented in https://github.com/oasp/oasp4j/blob/033faefe7052debc5d772a79a946eadfac181e20/oasp4j-modules/oasp4j-rest/src/main/java/io/oasp/module/rest/service/impl/RestServiceExceptionFacade.java) and shows a growl message.
Also, any unexpected errors should be handled (e.g. logged out to the console and shown as growl message).

For growl messages use https://github.com/JanStevens/angular-growl-2.

remove ngdocs

We currently have a lot of technologies in use when looking at the sample application. One of them is also ngdocs, which should be used to document the application code.
However, this is just a rare case in our application and of minor priority. I think we should remore ngdocs entirely until there is someone willing to document the application entirely and consistent. Currently it is just a mess.

cloning https://github.com/oasp/oasp4j-sample.git"

to have a working client application i followed the documentation that requested me to clone the sample application. i was not able to clone the sample application and got the following error:

git.exe clone --progress -v "https://github.com/oasp/oasp4j-sample.git" "C:\projects\oasp\workspaces\main\oasp4j-sample"

Cloning into 'C:\projects\oasp\workspaces\main\oasp4j-sample'...
remote: Repository not found.
fatal: repository 'https://github.com/oasp/oasp4j-sample.git/' not found

am i cloning with the wrong url?

oasp4js sample application websocket issue

Running oasp4js sample application using gulp against a locally started oasp4j server results in a non-loading start screen. Discovering the network traffic, you can see issues with breaking websockets.

error-log template not found

Running the currently available version of the sample application, you imediately will get an error stating, that the error-log template was not found.

issues with build (reproducability, architecture)

First Problem: build is not reproducable
node.js and gulp cause a lot of headaches and irreproducible builds.

People that come new into OASP check out the code and something that used to work then simply does not work anymore. The same code-base is leading to different build results for different moments in time. From an software-configuration-point of view this is more or less a catastrophy.
This is really an extremely painful situation that we ran into many many times now and that we should get rid off entirely.

Second Problem: organisation of artifact repositories
IMHO the entire architecture of how node_modules folders are organized and module-versioning is happening is a complete design flaw:

  • node_modules are just dumped directly into the current build directory without reuse for other projects
  • node_modules are chained recursively causing big problems on windows platforms with long file paths and the silly windows limitations
  • node_modules folders are not versioned

Maybe you can already say that maven is sick such that in order to start a small build for the first run you have to download half the internet to your local repo. However maven is putting each artifact version once onto your disk while node.js I have the same artifact version N*M times on the disc.

Is there any chance that this architecture will change in the future? Are we in discussion with the makers?
I see a lot of pain-points in this area.

Validation

Validation should be implemented based on the following rules:

  1. for simple syntactic validation the valdr framework should be employed.
  2. for cross-field validation the ui-validate directive should be used
  3. for asynchronous validation the angular $asyncValidators should be used
  4. for server side validation modal dialogs / growl messages (described separately in...)

Pre-Tasks:

  1. Migration to ui-router (#51)
  2. Order Details dialog should not be implemented as a modal one

Post-Task:

  1. Bread Crumb (separate task)

Guided Project TH Köln - 1.2: Add list of recipes as an entry point for recipe management

Part of the Guided Project at Technische Hochschule Köln - #48

As an entry point for recipe management operations we add a list of recipes to the restaurant sample application where cooks or other users can search for existing recipes and add new ones.

This dialog enables a user

  • searching for text in titles or even descriptions of recipes
  • paging through a list of recipes (to potentially cope with at least some dozens hits)
  • selecting a potentially relevant recipe to get more details about it.

The dialog will be made available by adding a new menu item beneath the existing ones.

Requirements

a) listing a potentially tall number of entries (with paging)
b) nice format showing the title of recipes in a bold font and their description in a small font underneath
c) search input field filtering the recipes list to those containing a string as part of their title (optionally description)
d) search should be performed on server-side for being able to cope with potentially big numbers of recipes
e) selecting a single recipe shows some more details on the right side beneath the list so that the user can evaluate multiple recipes with little effort
f) the list should look self explaining (without the need for column titles) and well designed

UI design

recipeslistatrecipespage_issue

With details for the selected recipe:
recipeslistwithdetailsatrecipespage_issue 78

cannot login on local tomcat deployment bundled with oasp4j

If you bundle the oasp4js sample application locally with the oasp4j server and start it in tomcat, you can easily reach the start screen of the jsclient.
But, logging in as chief, the client seems to send a lot requests until the browser crashes...

Accessibility

  1. Check AngularJS support for accessibility (ngAria)
  2. Check the current sample app using a screen reader.
  3. Set up rules which should be followed within OASP4JS (standard?, directives?)
  4. Document it on Wiki

Usage of jQuery $ in application and tests - conventions.

Hi,

While going through the code I have noticed that jQuery $ is being used in test for language-change directive. I have replaced that with angular.element, but then I have also noticed that $ is an allowed global variable in jsHint rules. Are there any conventions concerning the usage of $ already established?
Imho, angular.element should be used wherever jqLite functionality is enough - allows to avoid introducing unnecessary dependency on jQuery where it is simply not needed.

There is also another side of the equation. When jQuery is included in the project then its functionality will be exposed under angular.element. When application grows it might be hard to distinguish where real jQuery functionality is needed. I would propose to use $ only in such cases to explicitly express our intention, however I would suppress jshint only in those files where $ is needed - those cases should be rather rare (if we do not overuse jQueryUI based components).

Cheers,
Bartek

Installation not possible: Cannot find module replace.js

If I currently check out the main branch of this project, the build with 'npm install' succeeds, but then I get this error below when typing 'gulp serve'. This makes it impossible for me to develop extensions to OASP/Devon. Can you please help me with this one?

PS C:\dev\oasp4js> gulp serve
[16:23:43] Using gulpfile C:\dev\oasp4js\gulpfile.js
[16:23:43] Starting 'sync group4:0'...
[16:23:43] Starting 'wiredep'...
[16:23:43] Starting 'sync group1:0'...
[16:23:43] Starting 'ngTemplatesTasksGeneration'...
[16:23:43] Finished 'ngTemplatesTasksGeneration' after 3.49 ms
[16:23:43] Finished 'sync group1:0' after 7.15 ms
[16:23:43] Starting 'sync group1:1'...
[16:23:43] Starting 'ngTemplates[main.templates.js]'...
[16:23:44] 'ngTemplates[main.templates.js]' errored after 67 ms
[16:23:44] Error: Cannot find module 'C:\dev\oasp4js\custom\replace.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at null. (C:\dev\oasp4js\node_modules\gulp-processhtml\node_modules\htmlprocessor\lib\htmlprocessor.js:1
06:7)
at Array.forEach (native)
at new HTMLProcessor (C:\dev\oasp4js\node_modules\gulp-processhtml\node_modules\htmlprocessor\lib\htmlprocessor.js:
105:35)
at Object.module.exports (C:\dev\oasp4js\node_modules\gulp-processhtml\index.js:15:21)
at Gulp. (C:\dev\oasp4js\gulp\build.js:16:25)
at module.exports (C:\dev\oasp4js\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:34:7)
[16:23:44] Finished 'wiredep' after 437 ms

AngularJS and TypeScript

We should strongly consider to already switch to TypeScript before the AngularJS 2.0 Release.
Due to the DefinitelyTyped descriptions, it is possible to also type the AngularJS 1.5 framework. There is a quite nice article in the 11/15 JavaMagazin covering this issue in a nice sample description. I also know from my previous company, that it is possible also for large application to already work with AngularJS and TypeScript simultaneously.

Guided Project TH Köln - 0.1: idea

Basics of the Guided Project at Technische Hochschule Köln, will be described at http://lwibs01.gm.fh-koeln.de/blogs/bente/category/lehre/projekt/

Idea:

  • Build a showcase of a rich client for power users
  • highly interactive
  • with fast response time
  • keyboard controllable, where users work mostly
  • with a nice look (and feel)
  • with some eye-catchy features demonstrating the potential of OASP and especially OASP4JS

Help convincing colleagues and customer of OASP / devon being the best choice of a platform for their projects.

The idea is targeting Stefan Bente's and my former customer where inhouse web apps enable users to work through masses of applications (german: Anträge). Our future projects there would benefit from OASP4JS when implementing the requested user experience in their inhouse web applications.

Use powerful grid

We need to choose a powerful grid implementation.
Candidates are

oasp-generator for generating modules

When using yo oasp:module <module_name> the module is incorrectly added to the conifg.json file.

Reproduction steps:

  1. install npm install -g yo
  2. npm install -g generator-oasp
  3. use generator in some dir: yo oasp
  4. try to generate module with yo oasp:module new_module

The config.json looks like following:
"modules": [
"main",
"component-1",
"component-2",
{
"module": "new_module"
}
],

It should look like this:
"modules": [
"main",
"component-1",
"component-2",
"new_module"
}
],

gitignore

We can further simplify creating new OASP4JS apps by providing a .gitignore knowing which directories and files are maintained by the build process (e.g. gulp serve) and so to be excluded from version control.

What about copying the .gitignore from OASP4JS into oasp-generator?

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.