Skip to content

Latest commit

 

History

History
70 lines (56 loc) · 3.33 KB

README.md

File metadata and controls

70 lines (56 loc) · 3.33 KB

MBRS17

Methodologies for Rapid Software Development Course Project Meta-model

Example application

An example of a generated application can be found here.

Login credentials:

  • username: admin
  • password: admin

Prerequisites

This project uses the following technologies and tools:

Running the app

  • Import XMI2NG project into your Eclipse workspace
  • Run the src/generator/Main.java class with the following command line arguments:
    • path to model file in XMI format exported from MagicDraw
    • path to directory where the code generated from given model will be saved

Meta-model used for modeling

Meta-model

Model used for code generation

Model

Generated app example

Back-end

Back-end layer is implemented by using Microsoft ASP .NET WEB API with the use of additional Microsoft's technologies such as Entity Framework Code First and OData .NET. An example of a generated back-end layer of an application can be seen on the following git repository. An instance of the back-end app is running on an Azure cloud server and is linked directly to the aforementioned git repository.

Front-end

Front-end layer is implemented by using AngularJS 1.5 and Bootstrap frameworks. An example of a generated front-end layer of an application can be seen here.

Techniques used for preserving manually added code

Several techniques are used to provide preserving manually writted code:

  • Protected areas (code blocks between predefined comments)
  • Partial classes

Example of usage

Custom code for report

$scope.Generisi_izvestajClick = function() {
  // USER CODE STARTS HERE
  var initInjector = angular.injector(['ng']);
  var $http = initInjector.get('$http');
  var host=$scope.$parent.host;
  $http.get(host+'api/operations/Generisi_izvestaj?jezik=srp', {responseType: 'arraybuffer'})
   .success(function (data) {
       var file = new Blob([data], {type: 'application/pdf'});
       var fileURL = URL.createObjectURL(file);
       window.open(fileURL);
    });

  // USER CODE ENDS HERE
}

Partial classes example

An example of the usage of partial classes can be seen here for model classes and here for controller classes.

License

MIT