THE OPEN SOURCE INTEGRATOR FOR ENTERPRISE

Testing an Angular 2 Service with a Mocked HTTP Interface

Angular 2 is the successor of the famous and broadly used AngularJS Javascript Framework, for building dynamic web applications. Due to the huge success and popularity of its predecessor, some client projects started using Angular 2 before its official release.This resulted in Angular 2 becoming one of the most famous platforms for web and hybrid application development. Although this framework is relatively new there are already a lot of tutorials and examples explaining how to develop an Angular 2 application. However, there is one aspect of Angular 2 that is not widely covered, but is still very important for every project: Writing tests. The command used to generate the default test cases is “ng generate” and it’s contained in the Angular 2 CLI. However, it only generates the boilerplate code that is needed for each test case. The actual tests have to be created separately and the API is still experimental, so examples are often outdated. In example, most of the available tutorials use the “beforeEachProviders” method, which was removed in an earlier Angular 2 pre-release and was replaced by “TestBed.configureTestingModule({providers:…})” with a completely different signature. In the following example we will test a simple “ItemService” which executes one HTTP GET request against a REST endpoint.
Facebooktwittergoogle_pluspinterestlinkedinmail

Continue Reading

Developing plugins for Liferay DXP with Maven

A new major version of Liferay has been release past May with a lot of new features. One of the most important is related to plug-ins architecture. Basically Liferay is a web application running in a Java EE application container where plug-ins were built as separate web applications. But DXP introduces a module framework based on the OSGi architecture.

But… What it is OSGi? As defined by OSGi Alliance (the organization in charge of this specification): The OSGi technology is a set of specifications that define a dynamic component system for Java. These specifications enable a development model where applications are (dynamically) composed of many different (reusable) components. As the aim of this article is not the OSGi architecture but how it is implemented within Liferay, we are not going to deepen in OSGi specification.  In fact, you do not need to be very familiar with all the OSGI architecture for develop plug-ins for Liferay DXP. You only need to understand this 2 concepts: modules and components.

Facebooktwittergoogle_pluspinterestlinkedinmail

Continue Reading

Making your life easier with Sass

Preface

When I entered my current project one of the first things I noticed was it used stylesheet languages for its styles. “Yay!”, I thought. But then I opened up one of those files and found nothing but plain vanilla CSS inside. It was the same for most of them. No nesting, no variables, no mixins, no inheritance, no operators… Well, you get the idea. I won’t judge anyone and I’d rather believe those who wrote them didn’t use them just because they didn’t know how to. So I thought it would be interesting to write a short article explaining the basics of them.
Facebooktwittergoogle_pluspinterestlinkedinmail

Continue Reading

CeBIT2016 Speech Fintech (german)

Matthias Gläser, Head of Business Consulting at mimacom has given a lecture on the digitalization of the banks at the CeBit. Learn in the lecture how the banking will change in the future, what customers expect from the digital bank and which homework banks have on the road to digitalization: You would like talk about digitalzation in the financial industry with us? Mathias Gläser is available: mathias.glaeser@mimacom.com
Facebooktwittergoogle_pluspinterestlinkedinmail

Continue Reading

Angular component method, the natural evolution

One of the cool things that we “were/are/will be” using while coding our front applications with AngularJs is the option to use directives to create our own reusable components. Basically, the main idea of the component was (…and is …and will be) to have reusable elements that brings their own encapsulated functionality and also the ways to manipulate the data they need.
Facebooktwittergoogle_pluspinterestlinkedinmail

Continue Reading