
Shortest TodoMVC implementation - tindzk
https://github.com/widok/todomvc/blob/master/src/main/scala/org/widok/todomvc/Application.scala
======
madeofpalk
I can't wait for ToDoMVC.js, a highly specialised JS framework designed for
creating a simple todo app in 5 lines of code.

~~~
krat0sprakhar
Came here to say exactly this! Talk about overfitting! :D

------
malkia
I am a noob when comes to the web. I've spent all my years doing C, C++,
Pascal and using TurboVision, Delphi, MFC, wxWidgets, Qt, some minor GTK, etc,
mainly as sound and then tools programmer at a video game studio.

So this would be of great help to me, since as much as cool names these are -
I need some kind of "rap genius" mode for all the dom-lingo and this comes at
the right time.

Thank you!

~~~
tracker1
That's really what TodoMVC is really about... just enough of an application
with a common markup and css, so you can compare frameworks.

------
EGreg
I don't code anymore. I just press a button and the ToDo app appears. The
framework I use is from the year 2040, it communicates with itself in the past
so it's able to learn instantaneously.

The history of the framework shows that on many different projects it actually
just waited until people completed the project, then sent a signal back
through time to inform itself. But then, the internal history shows that many
parts were eventually replaced by an AI that wrote the whole app.

It seems from what I was able to gather about its source code, some parts of
it are in a quantum flux, with their waveform never collapsing. The parts that
have stabilized are basically a stable-point solution of a time-space
"differential equation". Those are the parts that are being executed on this
quantum computer.

Basically the result is ... whatever I wish for, it just produces it. Truly
amazing.

Do you have any requests for it?

~~~
d0m
That's how I feel when I'm coding with Python! There's always an amazing
library around the corner, like if it read my mind from the future.

------
cnp
Scala sure is a beautiful, beautiful language to read; definitely want to dig
in deeper now

~~~
rco8786
It can also get out of control if you let it :)

~~~
mkoryak
show me a language where that isnt possible.

~~~
rco8786
For sure. I'm just speaking in relative terms. Scala makes it really easy to
write seriously complex code and types.

You end up with fun stuff like this:

def map[U](f: T => U): Group[U] = collect { case e => f(e) }

implicit def canStackFromFac[Req, Rep] : CanStackFrom[Filter[Req, Rep, Req,
Rep], ServiceFactory[Req, Rep]] = new CanStackFrom[Filter[Req, Rep, Req, Rep],
ServiceFactory[Req, Rep]] { def toStackable(_role: Stack.Role, filter:
Filter[Req, Rep, Req, Rep]) = new Stack.Simple[ServiceFactory[Req, Rep]] { val
role = _role val description = role.name def make(next: ServiceFactory[Req,
Rep])(implicit params: Params) = filter andThen next } }

~~~
cheepin
But look what you can do with two lines of code!!!!!!111

------
jakozaur
About the project: [http://todomvc.com/](http://todomvc.com/)

Link to other examples:
[https://github.com/tastejs/todomvc/tree/master/examples](https://github.com/tastejs/todomvc/tree/master/examples)

~~~
krcz
Great project. Like more complex version of 99 Bottles of Beer for the client
side web apps.

I wonder why Om version has not been submitted though:
[http://swannodette.github.io/todomvc/labs/architecture-
examp...](http://swannodette.github.io/todomvc/labs/architecture-examples/om/)

~~~
emidln
Likewise, the Reagent version seems pretty short:
[https://github.com/holmsand/reagent/blob/master/examples/tod...](https://github.com/holmsand/reagent/blob/master/examples/todomvc/src/todomvc.cljs)

------
fdsary
that "import" function is really handy for writing short programs!

------
pornel
No, my fork of the HQ9+ language (called TQ9+) has the shortest TodoMVC
implementation:

    
    
       T

------
xiaoma
_todomvc / src / main / scala / org / widok / todomvc / Application.scala_

For a single file, that's a heck of a deeply nested directory structure.

------
werdnapk
Short? Perhaps, but as a front-end web developer I really like to see vanilla
HTML to grok instead of the DOM being created via helper functions.

~~~
est
You haven't done large enough SPA yet.

Just try any moderate sized CURD app for an enterprise

~~~
oblique63
Agreed. Up until recently, I too used to prefer working with raw HTML... then
I started working on a couple large apps, tried polymer/angular, and ended up
gaining a new-found appreciation for frameworks like react/mithril/mercury.

The cost of abstracting away the DOM isn't as much as I would've expected
compared to the cognitive overhead of switching back and forth between
languages, making sure everything is linked up nicely, as you normally would.
There are a few times when that abstraction can lead to annoying hidden bugs,
but overall I've found the workflow to be much nicer.

------
zerr
I'm actually more interested in non-MVC approaches.

~~~
tindzk
In fact, the given code uses a reactive approach and does not even separate
between model, view and controller.

