Ihr Partner in Web-Entwicklung

Innovative Ideen für Ihr Unternehmen

Web-Entwicklung

Egal ob neue Firmen-Webseite, CRM-System oder Spezial-Software. Wir sind ihr Ansprechpartner in Sachen Web-Entwicklung!

Wir erstellen Webseiten und Web-Applikationen nach ihren Wünschen und Anforderungen. Dabei setzen wir stehts auf die neusten Technologie- und Sicherheits-Standards.

Netzwerk Administration

Planung, Aufbau und Administration ihres kleinen bis mittelständigen Firmen-Netzwerkes.

Wir kümmern uns daraum dass es in ihrer Firma läuft. Wir planen, bauen und administrieren ihr Unternehmens-Netzwerk.

Linux Server Management

Aufbau, Instandhaltung und Wartung ihres Linux-Servers.

Wir bieten ihnen einen umfassenden Service für ihren Linux-Server. Wir sorgen dafür, dass alles auf dem neusten Stand ist und ihre Services verlässlich laufen. Dabei achten wir stehts auf die Sicherheit ihres Netzwerkes und ihrer Kunden.

Wer Sind Wir?

Software ist Analyse und Instrospektion. Um einen Prozess zu verstehen, betrachten wir ihn so lange bis wir ihn verstehen. Gute Software erklärt einen Prozess in einfachen Schritten.

Wir bauen Software aus Micro-Services, kleine Komponenten die eine kleine Aufgabe erledigen. Ein Service alleine ist nahezu nutzlos, aber wenn mehrere zusammenfließen - dann können sie komplexe Prozesse abbilden und verwalten.

Viele unserer Services sind Open-Source, so das sie von der Community geprüft und verbessert werden können. Das erlaubt uns transparente und effiziente Arbeit.

Wir ergänzen diese Services dann mit anderen Services die proprietär sind, und das geistige Eigentum ihrer Firma schützen. [Mehr erfahren?]

Wir möchten das unsere Kunden das Gefühl haben das dass was wir tun ganz einfach ist. Dann wissen wir das wir es richtig machen.

César

César

Inhaber & Entwickler

Sebastian

Sebastian

Entwicker

BLOG

Wir nutzen unseren Blog um uns mit anderen Entwicklern auszutauschen. Die Softwareentwickler Community ist global, und selten Deutsch sprechend. Unsere Artikel sind deshalb alle auf Englisch verfasst. Wir laden sie trotzdem ein sich umzuschauen.

Null coallesce in JS

31/07/2020

We talked about null coalesce in PHP a few months ago, and it’s a feature that Javascript is getting too this year.

A bit of backstory first. In Javascript, coallescing has basically been a quirk of the logical OR operator. As opposed to most languages, Javascript’s OR operator will not return whether the expression is true or false. It returns the first expression it received that is not falsy.

Falsy implies any of the following: null, false, integer zero, undefined, NaN and an empty string.

const t = myvar || null;

This is very backwards compatible and will produce excellent results in most cases.

But, since ECMA Script 11, which has been released this year (2020), Javascript has gotten a proper null coalesce operator.

const t = myvar?? null

Unlike the OR operator, this will specifically look for null and undefined values. And therefore leaving stuff like empty strings, and false untouched.

Pretty cool, isn’t it?


: 0 : javascript

Simple Image-Zoom-Effect with CSS

27/07/2020

Today I want to show you a simple but modern zoom-effect for images on your website. It’s made with plain CSS and it’s no JavaScript required.

You may have seen this effect on some other websites. When you hover over the image it looks like the camera slowly zooms into the image but it’s all happening inside a fixed image-container.

.zoomEffect {
    position: relative;
    overflow: hidden;
}

.zoomEffect img {
    max-width: 100%;
    height: auto;
    -moz-transition: all 1s;
    -webkit-transition: all 1s;
    transition: all 1s;
}

.zoomEffect:hover img {
    -moz-transform: scale(1.1);
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
}

You can change the transition time (e.g. 1s = 1 second) and the zoom amount / scale (e.g. 1.1 = 110%). If you like a opacity effect like in the example above you just need to add the line opacity: .8 to the .zoomEffect:hover img class in the CSS.

Now you just need to add your image inside a div with the class ‘.zoomEffect’ and your are done:

<div class=”zoomEffect”>
    <img src=”images/image.png”>
</div>

: 0 : javascriptprogramming, html, css

This built-in tool helps you find bugs in your PHP code

17/07/2020

When you’re writing PHP, you sometimes come accross situations that are impossible and should not be able to happen.

For exanple, the creation date of a database record for a project you created yesterday should not be January 1st, 1970. That’s a bug in your application and it should not happen.

These health checks though incurr a real cost when run in production. You would like to know that your database code is working properly and be informed about errors when you’re testing the code in your stage environment, but these impossible conditions should not arise in your production code and you wouldn’t want this check to be performed thousands of times per second.

This is where the PHP language provides you the assert construct. You can use it to perform health checks to your application when you’re in a development environment and skip it when you’re in production.

Let’s go back to our example, let’s say we have the following code:

  if ($record->created < 1) { 
    throw new Exception('Integrity check failure. This is a bug'); 
  }

This is not an extraordinarily expensive operation. But during production runtime you don’t want to tell the user that your database ran into an issue setting the creation date (at least if it’s for data like a blog post or a comment where the time isn’t too critical)

But you can rewrite it with an assertion like this

  assert($record->created > 0);

This will only be executed if the zend.assertions setting in php.ini is set to on, and if assert.exception is set to true. You can use this to set your stage or development environment to have these flags set to true and yu will start getting exceptions for these issues.

This is what the php.ini looks like on my development machine:

[Assertion]
; Switch whether to compile assertions at all (to have no overhead at run-time)
; -1: Do not compile at all
;  0: Jump over assertion at run-time
;  1: Execute assertions
; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1)
; Default Value: 1
; Development Value: 1
; Production Value: -1
; http://php.net/zend.assertions
zend.assertions = 1

; Assert(expr); active by default.
; http://php.net/assert.active
;assert.active = On

; Throw an AssertionError on failed assertions
; http://php.net/assert.exception
assert.exception = On

Note: Do never use this to perform checks that are more than integrity checks for impossible conditions. Impossible conditions should never arise in your code, but will obviously be more likely in your development code due to the fact that you’re testing the application.

DO not use assertions to make assumtions on user data, like whether a database record for a user provided id exists. Do not use assertions to manipulate situations with user data.


: 0 : javascriptprogramming, html, cssengineering, web development, php

Live-update your Text-Boxes

10/07/2020

This week we’ve updated our self made time-tracking system, which we use to track our times while programming for our customers, with a handy new function. Auto updates of the text-boxes where we enter the start / end time of each tracking. In the first version of the time-tracking there was just a simple text-box with the current time as the website was loaded.

With the update the system now recognizes whether the input was changed or not. If the input is unchanged the system automatically updates the input with the current date/time. This is achieved with a simple JavaScript code:

(function () {
    var inputs = document.querySelectorAll('[data-pristine]');
    for (var i = 0; i < inputs.length; i++) {
        inputs[i].addEventListener('input', function () {
            this.setAttribute('data-pristine', 'false');
        });
    }

    setInterval(function () {
        for (var i = 0; i < inputs.length; i++) {
            var date = new Date();

            switch(inputs[i].getAttribute('data-pristine')) {
                case 'time': 
                    inputs[i].value = date.getHours() + ':' + date.getMinutes();
                    break;
                case 'date': 
                    inputs[i].value = date.getDay() + '.' + date.getMonth() + '.' + date.getFullYear();
                    break;
                case 'false': 
                    //Ignore
                    break;
            }
        }
    }, 10000);

}());

The script searches the document for each element with the tag data-pristine for example:

<input type="text" name="start-date" data-pristine="time">

and loops over each object. Based on the data defined in the data-pristine-tag the system updates or ignores the input. We use an interval of ten seconds which is good enough for our use case.


: 0 : javascriptprogramming, html, cssengineering, web development, phpprogramming, js, web development

Is your PHP App compatible with others?

03/07/2020

The PHP - Framework Interoperability Group defines a series of standards that should be implemented by framework developers so software is compatible with that from other vendors.

I had forgotten about this one, because the first time I read about it (about 2013) it was very early in it’s development stage. But now, PHP-FIG seems like it’s going matured a little and this means I’d like to talk about it.

The idea behind PHP-FIG is to release a series of documents and interfaces that standardize components inside PHP code. It is the equivalent of you being able to go to the store and buy any light bulb with a E27 socket and it will fit into any fixture in your house.

The analogy here is quite the same, while three different light bulbs may accomplish the task of illuminating the room in three different ways (one may be incandescent, another may be LED, another a CFD) they all fit into the socket that determines the voltage they receive and how they’re screwed in.

In the world of lamps, this prevents you from screwing a car light bulb into your house’s light fixture, because the interface is different.

The same goes for PHP-FIG’s PSRs. Which define a series of interfaces that can be implemented by Framework maintainers (like us) and allow to interchange components between frameworks within reason.

For us, committing to being within a reasonable standard makes work easier. We can onboard engineers who know the standards. So, for us, it means that in the future we’re moving towards making our software compatible with PSR.


: 0 : javascriptprogramming, html, cssengineering, web development, phpprogramming, js, web developmentengineering, php, web development

Kontakt

Wir haben Ihr Interesse geweckt oder Sie möchten uns einfach eine Frage stellen?
Gerne können Sie uns eine E-Mail verfassen oder sich telefonisch bei uns melden.

Wir freuen uns auf Ihre Anfrage!

Magic3W
Pelkovenstr. 148
80992 München