Hi all. Last month I launched kloudo.com, completely built on Fantom. I had written some good amount of code that has helped me out on the way. Over the last month I extracted out all those into a framework.
There are some more. Check out the web site. Hope it will help some of you starting out with web development in Fantom. If you want to help me out in this please mail me [email protected]. and thanks.
Kaushik Sathupadi
rosarinjroyThu 4 Nov 2010
Kaushik: Thank you for sharing the library.
kaushikThu 4 Nov 2010
rosarinjroy: Thanks.
rosarinjroyThu 4 Nov 2010
Kaushik: The documentation in the site is very limited. Also the source code for the library is not shared. With the source code, playing with the framework will be easy. When will the source code be available for download?
mslThu 4 Nov 2010
Brilliant!!! Same question as above: is the source out there? Would love to take a look.
Also: you were recording a screen cast at 2:44?!?!?
kaushikThu 4 Nov 2010
rosarinjroy: Yes the documentation is limited. That's the next step. Would you(or anybody else here) would like to help me with it?
msl: Thanks! Reg 2:44, I know! it sucks! din't get less noisy around here until then. And you know how the microphones are, they pick up every damn noise out there.
rosarinjroy, msl: The source code is over here. I will release it under apache license or something like that.
Wow, that's really impressive! I'll have to give it a try.
Something I think is fantastic about Fantom is the "Test" class (and fant) is built in to the language. I've become a dedicated TDD developer, so my hope is that you'll set up a similar facility for Tales.
As I do Rails work as well, I've used both RSpec and Cucumber successfully to do testing (RSpec for unit-type tests, and Cucumber for full-scope acceptance testing). I believe that RSpec is ruby-only, but Cucumber will work with any web app (you still have to write the pattern-matching bits in ruby, though). So perhaps RSpec could be inspiration, and Cucumber could be immediately useful... I'll try to get it going, and let you know if it works.
Also, did you augment the existing Fantom bundle for TextMate, or did you set up your own?
Regarding textmate, I din't do any change to the existing textmate bundle. I just added a few snippets required for the screencast.
Andy: Thanks!
rosarinjroyThu 4 Nov 2010
kaushik: I can help with documentation. Will go through the code and come up with some draft material. If I have any questions, will post it the Tales discussion group.
florinFri 5 Nov 2010
Unbelievable! I've been waiting for a code-less html template based framework since 1998! I'm jumping on the Fantom bandwagon today.
Looking forward to getting support for Fantom and Tales in IDEA.
@kaushik: Wow, very cool work! Thanks a lot for sharing!
florinFri 5 Nov 2010
I won't touch Clojure.
Wicket is server side heavy, still has tags in the html page (<wicket:container>, <wicket:extend>), requires server reload, etc. I chose the Apache Click framework with Groovy over Wicket. Click is simpler, stateless and easy to grasp, a perfect fit for my needs.
I've found Fantom attractive and started giving time to it. I'm looking forward to more IDE support and for the ability to run Fantom inside/along a servlet container.
Tales leads to a clean web development environment. For example, I am anticipating that Tales allows a designer to define the table row and the tales does the repeating of the row, etc.
Great start.
tcolarFri 5 Nov 2010
I'm gonna checkout this framework some more soon.
Anyway I'm also a big fan of codeless HTML, one of the better framework out there IMO, is lift, the only drawback being that it's Scala based(but it also takes great advantage of Scala features) .... but overall it's VERY nice.
I was using my own Java framework (logic less HTML too) ... and was considering making one for Fantom, but haven't had time to do much.
So far I really like what I've seen of Tales (I think it totally fits the "Fantom way" and takes advantage of the language greatly).
Add that the awesome built-in Fantom features, like compile to javascript, JSON and so on and to me this could already be the best lightweight web framework out there (and fun/easy to use)
Will look at it some more soon (& use it !)
liamstaskFri 5 Nov 2010
@florin - I put together a library that allows you to run Fantom in a servlet container. Take a look at http://bitbucket.org/liamstask/fanlet if you're interested.
kaushikSat 6 Nov 2010
florin, dmoebius, tcolar: Thank you!
tcolar: I would love to see your java framework and what Ideas you had for fantom based framework.
liamstask: I will check out the code you've done. Deploying on a servlet container would be cool. One feature I added then removed was the ability to do reverse ajax in a similar way of doing ajax. If you look at the tales source code, its already there. The only problem, it can right now only work by constant pings. May be an integration with a servlet container will help me to bring back that feature to do real comet.
This is how tales compares with wicket:
on the HTML part both are more or less comparable "wicket:id" vs "talesId". One the server part Tales approach encourages to be more close to HTML itself than working with another set of server side components like wicket. for eg. Lets say you want to add a textfield and dynamically set its value and size, you would do something like this in tales
TextField t = new TextField("lang")
t.setText("Fantom")
t.set.. //I don't remember how exactly this is done, but you set the size as a property for this textfield
add(t);
(I am not exactly sure about wicket part and its been a few years since I've worked with it. so correct me if am wrong)
If you know markup-> and repeater-> tags you are mostly done with learning how to load dynamic content onto a page. Like wicket there are panels for you to make reusable components.
Also in tales, the component hierarchy is not stored in memory. Thus you cannot get back the value of this textfield say during an ajax call. However that said the page itself is stateful, you can create an instance variable, and its value will be retained during an ajax call (as long as it is serializable, and can be automatically moved to something like memcached or redis in production mode. otherwise you get an exception).
The approach towards ajax is a little bit different too. You just alternate the the js and fantom blocks and pass the arguments in the params[] map. You pass what you need for that ajax call, no magic.
AkcelistoWed 24 Nov 2010
This is cool video. More cool is enable it for AppEngine. Just suggestion...
kaushik Thu 4 Nov 2010
Hi all. Last month I launched kloudo.com, completely built on Fantom. I had written some good amount of code that has helped me out on the way. Over the last month I extracted out all those into a framework.
Check out the website: http://www.talesframework.org/.
Some Ideas are derived from what I like in other frameworks. But others are unique and only possible in a language like fantom.
Here are a few things you could do right now:
a) Fix and go: For any change you don't have to restart the server. Just write code and refresh the browser.
b) Simplified Ajax: Just interlace Javascript and fantom code like this.
c) Wicket like logic free html
d) Simple dependency injection by name
There are some more. Check out the web site. Hope it will help some of you starting out with web development in Fantom. If you want to help me out in this please mail me [email protected]. and thanks.
Kaushik Sathupadi
rosarinjroy Thu 4 Nov 2010
Kaushik: Thank you for sharing the library.
kaushik Thu 4 Nov 2010
rosarinjroy: Thanks.
rosarinjroy Thu 4 Nov 2010
Kaushik: The documentation in the site is very limited. Also the source code for the library is not shared. With the source code, playing with the framework will be easy. When will the source code be available for download?
msl Thu 4 Nov 2010
Brilliant!!! Same question as above: is the source out there? Would love to take a look.
Also: you were recording a screen cast at 2:44?!?!?
kaushik Thu 4 Nov 2010
rosarinjroy: Yes the documentation is limited. That's the next step. Would you(or anybody else here) would like to help me with it?
msl: Thanks! Reg 2:44, I know! it sucks! din't get less noisy around here until then. And you know how the microphones are, they pick up every damn noise out there.
rosarinjroy, msl: The source code is over here. I will release it under apache license or something like that.
https://bitbucket.org/ksat/tales
yachris Thu 4 Nov 2010
Hi kaushik,
Wow, that's really impressive! I'll have to give it a try.
Something I think is fantastic about Fantom is the "Test" class (and fant) is built in to the language. I've become a dedicated TDD developer, so my hope is that you'll set up a similar facility for Tales.
As I do Rails work as well, I've used both RSpec and Cucumber successfully to do testing (RSpec for unit-type tests, and Cucumber for full-scope acceptance testing). I believe that RSpec is ruby-only, but Cucumber will work with any web app (you still have to write the pattern-matching bits in ruby, though). So perhaps RSpec could be inspiration, and Cucumber could be immediately useful... I'll try to get it going, and let you know if it works.
Also, did you augment the existing Fantom bundle for TextMate, or did you set up your own?
Thanks again!
andy Thu 4 Nov 2010
Very cool kaushik.
kaushik Thu 4 Nov 2010
yarchris: Thanks! Regarding tests, how about you mail me what you have in your mind[[email protected]]. Or just add a discussion here http://help.talesframework.org/discussions/discuss. Thanks for willing to help.
Regarding textmate, I din't do any change to the existing textmate bundle. I just added a few snippets required for the screencast.
Andy: Thanks!
rosarinjroy Thu 4 Nov 2010
kaushik: I can help with documentation. Will go through the code and come up with some draft material. If I have any questions, will post it the Tales discussion group.
florin Fri 5 Nov 2010
Unbelievable! I've been waiting for a code-less html template based framework since 1998! I'm jumping on the Fantom bandwagon today.
Looking forward to getting support for Fantom and Tales in IDEA.
tonsky Fri 5 Nov 2010
florin, also check out https://github.com/cgrand/enlive and http://wicket.apache.org/
dmoebius Fri 5 Nov 2010
@kaushik: Wow, very cool work! Thanks a lot for sharing!
florin Fri 5 Nov 2010
I won't touch Clojure.
Wicket is server side heavy, still has tags in the html page (<wicket:container>, <wicket:extend>), requires server reload, etc. I chose the Apache Click framework with Groovy over Wicket. Click is simpler, stateless and easy to grasp, a perfect fit for my needs.
I've found Fantom attractive and started giving time to it. I'm looking forward to more IDE support and for the ability to run Fantom inside/along a servlet container.
Tales leads to a clean web development environment. For example, I am anticipating that Tales allows a designer to define the table row and the tales does the repeating of the row, etc.
Great start.
tcolar Fri 5 Nov 2010
I'm gonna checkout this framework some more soon.
Anyway I'm also a big fan of codeless HTML, one of the better framework out there IMO, is lift, the only drawback being that it's Scala based(but it also takes great advantage of Scala features) .... but overall it's VERY nice.
I was using my own Java framework (logic less HTML too) ... and was considering making one for Fantom, but haven't had time to do much.
So far I really like what I've seen of Tales (I think it totally fits the "Fantom way" and takes advantage of the language greatly).
Add that the awesome built-in Fantom features, like compile to javascript, JSON and so on and to me this could already be the best lightweight web framework out there (and fun/easy to use)
Will look at it some more soon (& use it !)
liamstask Fri 5 Nov 2010
@florin - I put together a library that allows you to run Fantom in a servlet container. Take a look at http://bitbucket.org/liamstask/fanlet if you're interested.
kaushik Sat 6 Nov 2010
florin, dmoebius, tcolar: Thank you!
tcolar: I would love to see your java framework and what Ideas you had for fantom based framework.
liamstask: I will check out the code you've done. Deploying on a servlet container would be cool. One feature I added then removed was the ability to do reverse ajax in a similar way of doing ajax. If you look at the tales source code, its already there. The only problem, it can right now only work by constant pings. May be an integration with a servlet container will help me to bring back that feature to do real comet.
This is how tales compares with wicket:
on the HTML part both are more or less comparable "wicket:id" vs "talesId". One the server part Tales approach encourages to be more close to HTML itself than working with another set of server side components like wicket. for eg. Lets say you want to add a textfield and dynamically set its value and size, you would do something like this in tales
Html:
Fan (in tales):
While in wicket it would be something like:
(I am not exactly sure about wicket part and its been a few years since I've worked with it. so correct me if am wrong)
If you know markup-> and repeater-> tags you are mostly done with learning how to load dynamic content onto a page. Like wicket there are panels for you to make reusable components.
Also in tales, the component hierarchy is not stored in memory. Thus you cannot get back the value of this textfield say during an ajax call. However that said the page itself is stateful, you can create an instance variable, and its value will be retained during an ajax call (as long as it is serializable, and can be automatically moved to something like memcached or redis in production mode. otherwise you get an exception).
The approach towards ajax is a little bit different too. You just alternate the the js and fantom blocks and pass the arguments in the params[] map. You pass what you need for that ajax call, no magic.
Akcelisto Wed 24 Nov 2010
This is cool video. More cool is enable it for AppEngine. Just suggestion...
chillenious Sat 12 Feb 2011
Sweet!
kaushik Fri 18 Feb 2011
Thanks Eelco!