QrCode.Net demo site feedback.

Coordinator
Feb 9, 2013 at 8:32 PM
Edited Feb 9, 2013 at 8:33 PM
Please post suggestion and feedback for that demo site here.

http://kamocu.com/en/qrcode/
Developer
Feb 11, 2013 at 9:11 AM
That online demo is a way to quickly verify (without having to compile anything) how the QrCode.Net library is working and test the generated codes with scanners.
I plan to add more features soon, like supporting more content formats (vCard, geolocalization, ...) and generate colored codes. Feel free to submit your ideas.

If there is demand I will add the source code of a web application sample (actually the server-side of this demo as the client-side is already readable).
Feb 19, 2013 at 5:41 AM
I was just using the website for some quick tests and think the source for the actual website would be very helpful as part of the documentation or sample downloads. I took a peek and saw that you were using AJAX and the images could be generated as streams from query strings, which is also another great usage.

http://kamocu.com/qrcode.ashx?e=M&q=Zero&optimize=true&t=http%3A%2F%2Fgoo.gl%2Fidb32

These will be useful for the community as a whole, and I am looking into using these QR Codes as part of printed material to guide users back to the website it was printed from... Very excited and excellent work!!
Developer
Feb 19, 2013 at 11:24 AM
You should not rely on the current query string structure as it is subject to change. But the web application sample I plan to add will certainly have this kind of plain API. The sample must be easy to understand and reuse so I will remove all the fancy things I'm testing now.

The online service will always be available for the community, but because of limited server resources I will have to limit the number of requests by user. It should not be used live in a production environment.
Coordinator
Feb 19, 2013 at 5:46 PM
For generate button, probably can replace with some sort of simple throttle mechanism.

With angular, you can submit ngchange event, on every ngchange save a Date.Now(). And also fire up a timed event, to execute ajax request after 1 sec.

Once event fire up and saved timer still 1 sec ago, request ajax call to get image, else ignore it. But time might be a bit short for slow typing people, also server stress is also much higher than button.


For people who in hurry and interest at grab image as string and query related stuff before iMarti finish up his code. You can check WebAPI's official tutorial, that cover up all request and send back. To display string as image, check out turn stream into base64 format and display under <img> tab. There are some simple src mark up for let browser know internally is base64 image.

While you can also request for SVG string and present in webpage's DOM. If use angular just use html unsafe insert will do. That case is faster than transfer raw image, can be useful if there is no need for user to save the file.
Developer
Feb 22, 2013 at 11:46 AM
I just added a new demo project Gma.QrCodeNet.Web.Demo generating QR code images for the web.

The images are generated by an HttpHandler getting parameters through the Query String.

The current two sample pages have as few dependency as possible (no external JS library). I just used the Twitter Bootstrap CSS for layout, but it can be removed without consequence.
May 21, 2013 at 1:23 AM
Nice demo. I would like the source code if possible. Did you build it in MVC 4?
Developer
May 21, 2013 at 8:09 AM
Thanks.
The server-side code is very similar to the Gma.QrCodeNet.Web.Demo sample provided here. It is only an ASP.NET ASHX handler returning QR Code images.

The client-side code is built using the AngularJS JavaScript Framevork. As the code is not minified, you can view the sources and download them from the demo site.