5 ms·
Shortest TodoMVC implementation
- jakozaur 12y agoAbout 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
- deleted 12y ago[deleted]
- krcz 12y agoGreat 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-examples/om/ http://swannodette.github.io/todomvc/labs/architecture-examp...
- emidln 12y agoLikewise, the Reagent version seems pretty short: https://github.com/holmsand/reagent/blob/master/examples/todomvc/src/todomvc.cljs https://github.com/holmsand/reagent/blob/master/examples/tod...
- madeofpalk 12y agoI can't wait for ToDoMVC.js, a highly specialised JS framework designed for creating a simple todo app in 5 lines of code.
- krat0sprakhar 12y agoCame here to say exactly this! Talk about overfitting! :D
- cnp 12y agoScala sure is a beautiful, beautiful language to read; definitely want to dig in deeper now
- emergentcypher 12y agoAs someone who mostly writes Scala at work, I love it, and definitely recommend you to. The language is not without its faults, but it remains my personal favourite.
- rco8786 12y agoIt can also get out of control if you let it :)
- mkoryak 12y agoshow me a language where that isnt possible.
- rco8786 12y agoFor 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 12y agoBut look what you can do with two lines of code!!!!!!111
- malkia 12y agoI 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 12y agoThat's really what TodoMVC is really about... just enough of an application with a common markup and css, so you can compare frameworks.
- NicoJuicy 12y agoTry out NodeJS and Angular... You'll learn a lot. Don't forget to pickup the basics of HTML on the side ;-) Ow yeah, i could advise for RoR also, but there isn't much talk about it anymore.
- werdnapk 12y agoShort? 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 12y agoYou haven't done large enough SPA yet. Just try any moderate sized CURD app for an enterprise
- oblique63 12y agoAgreed. 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.
- fdsary 12y agothat "import" function is really handy for writing short programs!
- deleted 12y ago[deleted]
- EGreg 12y agoI 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 12y agoThat'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.
- pornel 12y agoNo, my fork of the HQ9+ language (called TQ9+) has the shortest TodoMVC implementation: T
- zerr 12y agoI'm actually more interested in non-MVC approaches.
- tindzk 12y agoIn fact, the given code uses a reactive approach and does not even separate between model, view and controller.
- xiaoma 12y agotodomvc / src / main / scala / org / widok / todomvc / Application.scala For a single file, that's a heck of a deeply nested directory structure.