Live data from Hacker News

Show HN: My new JavaScript MVC framework

lhorie.github.io

141–150 of 167 posts

Re: Show HN: My new JavaScript MVC framework

#141
post #91

Earlier quoted context omitted.

I think the idea is that it's simple — it's just a basic data structure in the language and can be generated or manipulated with just simple JavaScript. This is similar to why Lisp programs being Lisp data structures is interesting. Intriguingly, it looks like the API is compatible with React's JSX. With that, you could write this as: @jsx m todo.view = function(ctrl) { return ( Add Desk description ); }

That is ugly as heck - for some of the complaints that some people have with Angular's templating, it doesn't force you into tying your view so heavily to JS. That is far more of a travesty.

[deleted]

Re: Show HN: My new JavaScript MVC framework

#142
post #112
post #93

Earlier quoted context omitted.

>Stop with the frameworks. >Things like jQuery, underscore, etc... Sounds great until you have a team of 5 developers maintaining at least a semi-huge code base over the course of some years. Some people leave, new join the team. Then you really start appreciating frameworks if only for their conventions to structure the code. Top coders can write web apps with jQuery and underscore alone, but everyone else is better…

HTML, css, JS (jquery) have stable APIs, when new developers come they don't have to learn something new. If your code degrade over time, sorry to tell you, a framework won't solve the problem. If you have coders that don't care about maintainability of code correction, code organization in whatever technology, they won't care about what you wish. As usual, they won't take the time to learn the frameworks, will diver…

Well I think we'll just have to disagree here. I think you are patently wrong if you really believe you can keep up maintainability of a largish codebase by appealing to craftmanship in a real-world company.

This is all nice and well in academics and start-ups but some years down the road, your code is going to be a mess. Frameworks, especially opinionated frameworks are a tremendous help. Coding in jQuery or native JS without some prodding is at best an accident waiting to happen.

Re: Show HN: My new JavaScript MVC framework

#143
post #36

Here are my thoughts, but you won't like them. Stop with the frameworks. Learn Javascript. Learn CSS. Learn HTML. You'll find pretty quickly that what you need are libraries , not frameworks. Things like jQuery, underscore, etc...

>Stop with the frameworks. Learn Javascript. Learn CSS. Learn HTML. That's good advice to someone that might be asking about using a framework. But to someone that has written a framework they probably have a pretty good understanding of Javascript already, and if they didn't it will have improved greatly by the time they are done.

The Stop with the frameworks idea still applies doesn't it?

I don't code in JS. Maybe a few lines once in a while when it pops up. It just seems like an MVC framework is the javascript equivalent of writing your first recursive factorial function.

Re: Show HN: My new JavaScript MVC framework

#144

I've become a huge fan of simple things. When I was just starting out developing software, I was a big fan of huge integrated solutions. But as the years went on I loved well scoped, lean options. This is the reason why I like Backbone.JS instead of Angular. The reason why I like Go instead of Java. Mithril looks really promising! Don't let feature creep turn it into a behemoth! Keep it lean and mean, and excel at th…

Go vs Java? Choose the right tool depending on your experience with either and the goal of your project. They're really different beasts. Go (2007) focuses on concurrency, is relatively young, and is compiled to machine code for native speed. Java (1995) is object-oriented, has thousands of libraries, and runs on JVM. For the same project you probably won't consider both of them at the same time.

Backbone vs Angular? Backbone (without 10 other plugins) is just a small handful of prototypes so you will need to write huge parts of the actual application framework yourself (NIH syndrome). Not really comparable to a fullblown framework like Angular or Ember where you learn their workflow to take advantage of all the features and to save 'technical' time to write more 'business' logic. So again apples and oranges in this case until you mention Thorax and that kind.

Re: Show HN: My new JavaScript MVC framework

#145
I like the small, unmagical, well-defined API.

That strength is also a weakness though. Particularly because for coffeescript (or my favourite, the related LiveScript) it doesn't result in the super-cute syntax of e.g. TeaCup[1][2].

[1] https://github.com/goodeggs/teacup

[2] Markaby begat CoffeeKup begat CoffeeCup and DryKup which begat Teacup

Re: Show HN: My new JavaScript MVC framework

#146
I think the m.prop getter/setter creation is a good compromise between the "magical" creation of properties employed by Vue and Ractive and the cumbersome use of SomeFramework.set("propertyname", value) employed by other MV* frameworks.

I can't think of a good argument against it.

Re: Show HN: My new JavaScript MVC framework

#147

Earlier quoted context omitted.

There's a sample TodoMVC posted here - https://github.com/jpmonette/todomvc-mithril . If you have any idea to improve, feel free to send a pull request!

https://github.com/jpmonette/todomvc-mithril/blob/master/js/... Looks pretty painful, but I do think adapting JSX could be a pretty painless solution so I don't look at it as a deal breaker. I am still yet to find a javascript templating solution that I don't have at least 1 or 2 issues with.

Here's a JSXified version which assumes the existence of an "mshim" object which adapts tag calls and arguments to what m() expects:

https://gist.github.com/insin/9639918

Re: Show HN: My new JavaScript MVC framework

#148
post #120

Earlier quoted context omitted.

You've missed the point. You're comparing MVC frameworks to jQuery as if that made sense, which it doesn't. As I said, Angular and Backbone use jQuery. So you're just comparing how you've used jQuery (as if that's how any jQuery user would do it) to how they've used jQuery. There is no such thing as "idiomatic" jQuery templating. There are only plugins and libraries that use jQuery to do templating. In fact, what you…

Many people are at a stage where they're using jQuery to build large apps and wondering what benefits a framework provides. Not having to worry about script injections is one of the benefits that frameworks bring to the table. This is a perfectly sensible thing to point out, imho, given both tools are used for the purpose of building web applications. The technical implementation of the jQuery test is flawed on purpo…

> Many people are at a stage where they're using jQuery to build large apps

Nobody's using jQuery only to build large single page apps,that's not true. Comparing jQuery which a DOM manipulation library to any framework that manage the application lifecycle is dishonest.

It would be like comparing underscore to AngularJS,makes no sense.

Re: Show HN: My new JavaScript MVC framework

#150

your "getting started" page is like a crash course in building websites with javascript - just forwarded it to a bunch of friends it felt like you were giving a smart person a crash course in javascript wish more apps sturctured their tutorials like this great job! One thing: it feels like it's aimed at people who are already competent at javascript but your tutorial isn't too many steps away from a being solid "java…

why don't you use some punctuation and not separate your thoughts out on different lines? Not trying to be mean, this is just hard(er) to read!

Sorry - hadn't planned on making my comment that long but will definitely keep your feedback in mind next time I reply to a comment.
Post reply on HN