NancyFX + CORS

Every once in a while you need to have access to a json api from another domain. Thankfully there’s a mechanism to allow this. This Mechanism is called CORS So before any JSON request is allowed a Options requst will be sent to the corresponding ressource and expects a „Access-Control-Allow-Origin“ header to be present. There can…

Hell, It’s time again!

Well it’s a long time since I last postet something here. Sadly i’ve been very busy with work and afterwards just coded for about an hour before going to sleep. So what’s going on you might ask. Ive startet a rewrite of an unfinished project called AMVScore back then. The project startet because a friend…

Yii Pattern zur validierung von Preisen

Ein leidiges Thema, wenn man Preise in der DB abspeichern muss. Aus Datenbanksicht gibt es hier meist den Datentyp Decimal. Bei Eingabe in einem Formular möchte ich nun Prüfen ob die eingegebene Zahl dem entspricht was ich mit vorstelle. Hierzu bediehnen wir uns dem „Match“ Validator welcher uns ein RegEx pattern definieren lässt mit dem…

Yii nested relations (HasMany) im GridView

Tjahaaa einfaches Ding aber ich hab lange gesucht bis ich die Lösung hatte. Im nachhineine betrachtet ist das super simpel! Ich hab in meinem aktuellen Projekt eine Recht perverse HasMany Struktur und musste bei der Ausgabe alle Relationen auflösen und diese teilweise in GridViews anzeigen. Ich Meine Damit sowas Model1 -> has One Model2 ->…