Yay, I just launched a project. It’s an internal single page application. On the server side a restful api built with ServiceStack serving json data and files (reports in PDF format and images) on a separate service-address (cross domain). And a client side application primarily for iPads, but built with Html5 for wider platform reach […]
Read moreSimple module dependencies in Typescript
I’m not that convinced about the AMD module model. I rather use a simpler model which is also easily possible to achieve with typescript: use <reference path…> and compile to one file using the –out parameter. This is my application structure: main.ts (contains bootstrap startup code, reference to refs.ts) refs.ts (contains all references) modules… (contains […]
Read moreExecute Typescript
Want to easily execute Typescript? Cool thing is that TSC.exe (that comes with the Typescript installation) has a -e option to execute a file. So you can simply write: That command will compile the .ts to .js and execute that js. But we also like to be able to see some generated output. We can […]
Read moreExecute Javascript and Typescript within Visual Studio (and repl)
Add PhantomJs as an external tool in Visual Studio and you have a really easy way to test run your javascript or typescript. You can even use it to play around with your code in a run-eval-print-loop (repl). First download PhantomJs from http://phantomjs.org/ and extract the folder. Copy the path. Next open Visual Studio and open […]
Read moreWeb app woes: The database needs another field
After a few weeks on client side coding. I realize I need another field in the database and in the DTO. So I need to leave my client side project and enter the dark dungeons of the server side. Add a field to the dev database. Add the property to the DTO. Deploy a new […]
Read moreNice and simple Razor templates with the help of RenderPage and some dynamic sugar
Besides saving global helpers in App_Code we have the option to use RenderPage (or Html.Partial) in Razor to reuse code globally. Both ways helps in making the HTML code DRY and well structured. But an important difference is a RenderPage file can be wherever we want, and changes are fluent (no app restarts). We do […]
Read moreHack: Dynamic helpers in WebPages Razor v1
It’s well known that we can create global helpers by saving them in the App_Code folder. But changes in App_Code forces app restarts and therefore its quite interesting to find out alternative ways to call functions cross files. Here is one way – that works fine in WebPages Razor v1 (not MVC, and not WebPages […]
Read moreRazor helpers with razor content
Adding a little more DRY to Razor scripts. If you find yourself adding the same boilerplate code over and over again in your razor scripts: You’ll do yourself a favour if you add a helper: Which means you can write: – Ok. But. What if we want this to be available globally? In every Razor […]
Read moreWeb app woes: Save files offline for later upload to server
Ok, so this is something I like to do with a web application: make the users choose pictures when they are offline, and upload them later when they are online (even after the original page was closed). Easy? Not as far as I understand. Data is easy to store locally in localstorage. But localstorage is […]
Read moreTrying out Azure Mobile Services to create a rest api and a Facebook authenticated web app
I heard about Azure Mobile Services on Yet Another Podcast #86 where Jesse Liberty interviews Josh Twist. There was a few things to the service that made me very interested: Azure Mobile Services Inside the Azure portal Easy to setup a robust Restful API over an accompanying Azure SQL database With permissions per user, extensible […]
Read more
May 2, 2013 