AppEngine demo - A url shortener

482 views
Skip to first unread message

Miki Tebeka

unread,
Nov 22, 2011, 2:41:33 PM11/22/11
to golan...@googlegroups.com
Greetings,

I've written a small application to demonstrate using Go on AppEngine.
The application is a url shortener (like bit.ly) and demos the following:
- HTTP serving
- Templates
- Datastore
- Task Queues
- Logging
- Memcache

I'd highly appreciate comments, improvements or other thoughts you have.
The code is at https://bitbucket.org/tebeka/go-appengine-demo

Thanks,
--
Miki

Miki Tebeka

unread,
Nov 24, 2011, 1:38:36 PM11/24/11
to golan...@googlegroups.com
Nothing?

André Moraes

unread,
Nov 25, 2011, 6:37:13 AM11/25/11
to golan...@googlegroups.com
Andrew wrote something similar called goto

https://github.com/nf/goto

It is just a example of how to make such thing, that is probably a place
to compare your code.

Note that, as he said on the talk, the system don't use a database or
something like
that.

--
André Moraes
http://andredevchannel.blogspot.com/

Johann Höchtl

unread,
Nov 25, 2011, 9:26:00 AM11/25/11
to golan...@googlegroups.com
For your comment on

!-- FIXME: odd/even -->

I recommend you

http://jan.newmarch.name/golang/template/chapter.html, the section about JSON serialisation by templates. The idea is to treat iterator % 2 different.

Greetings, Johann

Johann Höchtl

unread,
Nov 25, 2011, 9:30:16 AM11/25/11
to golan...@googlegroups.com
BTW, while totaly unrelated to your doing,  I would opt for a string base without 0,O,I,J,L,i,j,l. There are links on the web which characters are more or less eligible regardless of font, may be more than in my example or others.
(A shortened url might be printed and hand-input into the browsers address bar)


Miki Tebeka

unread,
Nov 25, 2011, 10:28:22 AM11/25/11
to golan...@googlegroups.com

!-- FIXME: odd/even -->

I recommend you

http://jan.newmarch.name/golang/template/chapter.html, the section about JSON serialisation by templates. The idea is to treat iterator % 2 different.
Thanks, I saw that and failed (hence the fixme :), got a syntax error when trying
{{ if $idx % 2 == 0 }}

I decided to use another template function that returns "odd" or "even" according to the loop index.
Thanks again for reminding me to fix this.

Miki Tebeka

unread,
Nov 25, 2011, 10:29:16 AM11/25/11
to golan...@googlegroups.com


Andrew wrote something similar called goto

https://github.com/nf/goto

Thanks, I'll have a look.
Reply all
Reply to author
Forward
0 new messages