Hacker News new | past | comments | ask | show | jobs | submit | bartonhammond's comments login

Some ramblings about NueJS from a 70 year old dude with some time on his hands. ;)

My thoughts after using nuejs building this: https://bartonhammond.github.io/nue-todo/. My source is available by clicking the icon in the bottom right.

There's a better ToDo example done by the team but I don't have the source: https://nuejs.org/todomvc/

Yes - I had to install somethings globally. No big deal for me. It was quick and painless.

So I followed the https://nuejs.org/docs/tutorial.html and ran `nue create simple-blog`. The browser opened so fast I was stunned. I really couldn't believe what happened - less then 2 seconds and the app was generated, compiled/built and loaded in the browser.

For me, having 'md' files containing content is so much better than html - having to write a boilerplate html file with all the required junk is tedious.

For example, my main content page, the entry point, which is very readable, is https://github.com/bartonhammond/nue-todo/blob/main/index.md...

--- include: [form] title: Nue Todo ---

# Nue Todo Example

[app]

It is a little magic but every framework has magic. Every framework requires learning how all the artifacts are related.

The application component logic is included with the [app]

So how did I like the development experience? Good and bad. It's early so there's a lack of things, or should I say, not fully fleshed out, such as examples, tutorials, editor support, testing, documentation, and run time errors detection and debugging.

Examples | Tutorials The only example I could find was the "simple-dialog" which is also the only tutorial. The tutorial was helpful but a little light to get started. I wish there were more examples that were more targeted to specific concepts. Trying to start a new project was challenging. The "nue create" command has no other options but to generate the "simple-dialog" and there's no GitHub repo with something like "starter template".

Testing I looked through the nuejs packages that include unit tests. That helped a little when looking at how the templating works. It was nice to see plain JS code - I too dislike TypeScript. There is no documentation on how to test a Nue application from the command line even though it looks like they know how. Maybe they just haven't gotten to it yet.

Editor Support There are two extensions for VS Code that I installed. They helped w/ colorization and such but not so much for the "dhtml" files which contain both html and <script> tags. Trying to format the js code w/in the script tags didn't work for me. That being said, I found that editing in VS code was workable for now. I would like to have more editor support for editing the yaml and md files so I know what is valid and what options.

Documentation There's a lot of documentation with a lot of examples but they are somewhat disjointed and not clear sometimes how they actually work. For example, there is a distinction between htm, html, and dhtml files but the examples don't provide what the file name is. With the lack of examples I could run, I found myself frustrated trying to piece the concepts together.

Run time errors Sometimes the errors reported were helpful - clear and precise. But sometimes the messages provided were not specific nor associated with the actual code. The generated code in the browser showed the error but relating that back to the code was difficult. The Hot Reload worked sometimes but I had to continually reload the page to pick up the changes. I think there were "silent" errors somewhere that prevented it. It was intermittent. For example I tried building a "component" that contained a "table" and could never get it work - no indication of problem. Eventually I removed the table and got it working. Seems that if tables aren't support that an error while "linting" or some process would detect that. Another time I had a "click" action with the same name as my "todo" object property. The generated ui inserted the "function" into the UI rather than the property. Once I renamed the function, it worked. But trying to figure out the issue that was painful and took me a long time.

Debugging With the components that have <script> tags, I would place a "debugger" statement and that was fine. But when things don't stitch up properly, for example, trying to figure out the issue was lacking.

Overall I liked it a lot!

It was nice to not have to wrangle with a lot of complexities. For me, the conceptual model I needed wasn't a huge lift as compared to learning new languages (functional) like Elixir & Phoenix, Gleam or Roc-Lang or picking up some other JS frameworks that I've tried (e.g. Svelte, Angular, Vue, Meteor, Hapi, etc) These are very mature frameworks and handle a lot of complexities, such as State Management, that NueJS doesn't have at this time due to it's newness.

I didn't have to learn a new language - I already am familiar with html, js, css, yaml and md. That's a good thing! I was able to put the Todo app together in about 2 days. Learning a new framework / architecture is always challenging for me. This felt approachable without a big hurdle for entry - I was able to start playing around fairly quick.

I don't plan on doing much more at this point. But I will circle back as additional functionality is released e.g Templates and SPA.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: