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.

JS: Scroll behavior smooth

26/02/2021

I’ve seen many people use a jQuery or Javascript library that provides the ability for your application to smoothly scroll to a position on the window so the user has a sense of orientation.

Often in tutorial scripts or autoscroll, you want the user to understand that they are not on a new page. But that the viewport has been moved.

This benefits the usability (as long as you’re not trying to scroll long distances) and it now can be implemented in vanilla Javascript.

Instead of using your window.scroll function like this:

window.scroll(0, 0);

You can pass an object like this:

window.scroll({
 top: 0,
 left: 0,
 behavior: 'smooth'
})

Another added bonus is that you can omit the left parameter if you do only wish to scroll to the top of the page.


: 0 : js, web development, user experience

Our journey towards OpenID Connect

19/02/2021

We have been maintaining an identity provider service for quite some time now. It’s been a massive undertaking, but I also learned an incredible lot from the experience.

With the next version of phpauth I want to start to properly implement authorization and authentication in a way that is interoperable with the rest of the world. This is where OIDC comes into play.

Up until now, we used a proprietary mechanism to generate tokens for the users, and signatures for the clients. Unlike oAuth2, we would have the client generate a signature with it’s app id and secret, and exchange that signature for a token.

The identity provider would then generate a token that the client can redirect the user to authenticate.

While our system was rudimentary in a lot of ways, and probably undercooked, it provided many of the creature comforts that we expect from OIDC and gave me a great foundation for understanding what makes the work behind OIDC, oAuth2 and JWT so amazing.

I found that many of the problems I was trying to solve were already solved elegantly (or not so elegantly at some points), and that adhering to a standard would not just make life easier for me - since somebody already wrote the manual to my software for free - it would also make the software more useful and interoperable with others.

Most of the oAuth stuff is already implemented on phpauth 0.2, and I’ll make sure to implement the rest of the openID standard and report with my findings back here.


: 0 : js, web development, user experienceweb development, oidc, oauth, phpauth

SASS variable defaults

12/02/2021

SASS is a really powerful tool when you write styles for your web application. We use it to maintain a small SASS framework that our applications can extend. This way, we can share fixes to our components across our applications without the need to repair a broken margin or a bad overflow in every application’s CSS.

This also makes it super convenient to maintain a consistent behavior in every app. Instead of having custom error messages in every one of them, you have a shared class that all can use, extend and rely upon. And if you update the underlying framework, the behavior stays consistent.

But there was one thing I found to be notoriously hard to do in SASS. And that’s configuring the components.

If your application just wants to adjust the blue color palet to match a client’s corporate image, you would have to either edit the library, or do some sort of black magic.

But lately I found out that this is a non-issue if you use !default. This keyword is appended to a variable definition and implies that the variable is only overridden if it wasn’t set to begin with.

So, now my library code can be something like this:

$blue : #00F !default;
$button-radius: .3rem !default;

Now, if a project needs a bit of configuration on top of our base styles, they can use something like this:

$blue: #F00;
$button-radius: 0;

@import "./library/main.scss";

or

@use "./library/main.scss" with (
  $blue : #F00, //Actually red
  $button-radius: 0
)

To override our default settings.

Update: You should consider that the use documentation on the SASS page says you should not use this and replace it with mixins instead. We’ll be publishing an updated tutorial later. Since I feel like their suggestions on how to build the styles feels brutally complicated too.


: 0 : js, web development, user experienceweb development, oidc, oauth, phpauthsass, web development

Using JSDelivr as a CDN for your application‘s assets

05/02/2021

We’ve been internally migrating towards NPM for asset management, mainly because we started using webpack to build our assets.

Webpack does this really nice thing, where you select your entry files with a config file, and it assembles a bundle file that you can deploy on your frontend servers.

Originally I was a bit disastified with the idea of having to commit the files that webpack generated to my /dist directory. They often feel out of place, and polute diffs with large changes that mean nothing to the person reviewing them.

My first instinct was to push these javascript files to the repo and use .gitattributes to remove them from any diffs. Which is a great solution, specially for repos where this doesn’t work.

But then I happened to read about jsdelivr. This service will lookup any github repository or npm package and serve the static files these contain.

While we all can agree that serving your code from github may have considerable implications (if your app isn’t purely open-source) we can use the nature of NPM to work for us.

NPM contains a file called .npmignore that allows us to exclude files from being uploaded to NPM. This is the perfect polar opposite to .gitignore. We can use gitignore to remove our /dist directory from the equation (unless you want to give people deploying your app the option to host the assets themselves) and ignore the /src folder for your backend stuff to npmignore.

When you now run npm publish (which needs an account on npmjs.com) you will see that it packages your app into a tarball and sends it to their repository. You now would need some asset mapping technology to tell your app that the JS files are now on a remote server.

Accessing https://cdn.jsdelivr.net/npm/[email protected]/file will return the asset you just uploaded. There’s no need to deploy servers, or anything like it.

If you do not add your /dist folder to .gitignore you can always have a safe and easy way back, serving your file from your webhost again is a matter of telling your asset mapping that the file should be served locally.


: 0 : js, web development, user experienceweb development, oidc, oauth, phpauthsass, web developmentweb development, webpack, js

pcntl_alarm() is the PHP feature you wanted but didn’t know existed.

29/01/2021

Have you ever found yourself writing a PHP script that opens a socket or a file, waits for a queue to be finished, and the event it’s waiting for is just never happening? Don’t you hate it when the process ‘hangs’ waiting for the socket?

This is where pcntl_alarm() comes into play! This handy function lets you interrupt a blocking operation with a signal. And it’s super easy to use!

Just call it like this:

pcntl_alarm(10); //Allow for up to ten seconds before a timeout

if (flock($fh, LOCK_EX) { do_something(); }
else { die('Locking the file timed out'); }

This is the most basic way of handling this. But you can also combine it with pcntl_signal to respond to your signal in any way you want.

Hope this helps someone!


: 0 : js, web development, user experienceweb development, oidc, oauth, phpauthsass, web developmentweb development, webpack, jsphp, 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