News for hackers. Stuff that matters.
Re:Marko – An isomorphic UI framework similar to Vue by oulu2006 on Sunday August 20, 2017 @05:28AM (#15057661)
Just learn vue.js, and use the associated vue libraries, vue-router, vuex, etc.

Start with: https://nuxtjs.org/

And go from there, I wouldn't waste my time with Angular, and React is much more complicated than Vue.

Re:Marko – An isomorphic UI framework similar to Vue by clarus on Sunday August 20, 2017 @05:55AM (#15057734)
This is very subjective. I feel React is conceptually simpler (no custom templating language) and less opinionated (no official state management system like Vuex for example).
Re:Marko – An isomorphic UI framework similar to Vue by oulu2006 on Sunday August 20, 2017 @08:55AM (#15058221)
You've mentioned one of the exact reasons why I found Vue.js so much simpler. It's highly opinionated, which for 95% of the time, in my experience, is exactly what I want.

I found myself much much more open to JS library fatigue with React; the ecosystem is so vast that it's hard to figure out which particular store I need, or which routing library I want or what form library I need and so on. I've seen a number of people complain about this, especially new comers.

I find the opinionated nature of Vue.js so refreshing, especially for newcomers, which the OP is, hence why Vue.js is a much better option to begin with. And continue with, but that's a decision I guess the OP can make further down the road.

Re:Marko – An isomorphic UI framework similar to Vue by debaserab2 on Sunday August 20, 2017 @11:10AM (#15058692)
You don't need a route library. You don't need a form library.

What do you need a routing library for? Have a single controller component (usually the most outer shell app component) and sprinkle in further functionality (e.g. history pushState) as necessary. Don't build it out until you actually need it.

I've never needed a "form library" because forms are almost always interactive in some specific way. Using a form library is almost always guaranteed to just get in the way.

You don't need to have a global state management library either if you have a good grasp of your apps data structures and how they need to be passed into components.

I find with React I get the opposite of javascript fatigue: it's so easy to build anything you need once you understand react that you won't need to search for all those libraries and code snippets.

Re:Marko – An isomorphic UI framework similar to Vue by oulu2006 on Sunday August 20, 2017 @07:37PM (#15060828)
I guess we have completely different approaches to software development.

I really hate reinventing the wheel, especially when good quality production tested solutions are out there. React libraries, quality wise, I've found hit or miss.

I find Vuex a very nice global store and the tooling (chrome plugin etc..) is top-notch.

Re:Marko – An isomorphic UI framework similar to Vue by debaserab2 on Sunday August 20, 2017 @09:26PM (#15061287)
You won't be reinventing the wheel for things like global state management and javascript routers. I promise. These libraries are huge solutions to problems that may or may not be huge - and in most of the cases I've seen, YAGNI.

The concept of maintaining application state is nothing specific to SPA's. What is new is the idea that every application must have a global data store where all state is saved. This is a trend and not always necessarily a best practice.

This isn't a matter of reinventing the wheel, it's a matter of using an oversized solution for an undersized problem.

Re:Marko – An isomorphic UI framework similar to Vue by shangxiao on Sunday August 20, 2017 @06:35AM (#15057841)
Your response is a bit disingenuous.

> no custom templating language

JSX may not be a templating language but you still need to consider it when comparing with other framework's languages

> less opinionated

The community is though, if you don't do things with redux, react-router, etc then you're considered odd. Any job you pick up with react is sure to use those.

Re:Marko – An isomorphic UI framework similar to Vue by mamp on Sunday August 20, 2017 @07:09AM (#15057930)
> The community is though, if you don't do things with redux, react-router, etc then you're considered odd

A bit disingenuous there. In general people find Redux quite complicated and it everyone acknowledges it requires quite a bit of boilerplate when used in the default way. Quite a few like MobX, or using their own state management.

I've found the community to be very open to alternatives and helpful.

Re:Marko – An isomorphic UI framework similar to Vue by debaserab2 on Sunday August 20, 2017 @11:11AM (#15058700)
I've used neither of those libraries in any of the production React apps I've made.
Re:Marko – An isomorphic UI framework similar to Vue by boubiyeah on Monday August 21, 2017 @12:48PM (#15065832)
Me neither, thank god.
Re:Marko – An isomorphic UI framework similar to Vue by christilut on Sunday August 20, 2017 @07:14AM (#15057941)
Don't start with nuxt.

Start with the Vuejs tutorial on their website. Vuejs docs are amazing and one the big reasons why people enjoy starting Vue.

Nuxt docs are so-so and can be quite confusing.

Re:Marko – An isomorphic UI framework similar to Vue by noir_lord on Sunday August 20, 2017 @08:26AM (#15058136)
Agree with this.

I tend not to use "quick starts" especially when using something new since you a) don't learn the internal gubbins b) are more fucked when something breaks.

When I started with WebPack and TypeScript I deliberately started from an empty webpack.config.js and an empty tsconfig.js and added in stuff as I went at the end I had a decent understanding of what everything in both files actually did and they only did what I wanted.

I've never found a quick start that helped me (in terms of total time) since the time spent fixing it when it breaks always exceeds the time taken from just doing it manually the first time, after I understand what I'm doing then I'll consider the quick starts.

Re:Marko – An isomorphic UI framework similar to Vue by musashizak on Sunday August 20, 2017 @07:27PM (#15060778)
Poi is a good webpack wrapper for vue. Is a webpack with zero config
Re:Marko – An isomorphic UI framework similar to Vue by oulu2006 on Sunday August 20, 2017 @09:03AM (#15058240)
I guess I should have been more specific here, my bad.

Reading the Vue.js docs online is of course the first port of call; the documentation is very good, so much better than Reacts. One of the few occasions I've been able to learn a good majority of the project without resorting to googling for tutorials and other community contributed resources.

I recommended Nuxt as a good "this is how you put a enterprise ready Vue.js project together" so the OP would learn some good habits in project layout early on.

Re:Marko – An isomorphic UI framework similar to Vue by computerex on Sunday August 20, 2017 @03:32PM (#15059883)
I tried to like VueJs but just couldn't. Seems just like another Angular 1.x like framework. I am done with HTML template API's. So many failed attempts using this concept. Anyone remember Polymer? That's what I thought.
Re:Marko – An isomorphic UI framework similar to Vue by scottmf on Sunday August 20, 2017 @07:46AM (#15058017)
Nuxt is the Vue version of Next, which I highly recommend for quickly bootstrapping a production-ready React app with server-side rendering and so on.
Re:Marko – An isomorphic UI framework similar to Vue by wolco on Sunday August 20, 2017 @10:43AM (#15058569)
For me I picked up React pretty quickly but I was using old school includes in the browser with the babel compiler.

I tried moving to a newer version and start using with npm and webpack and I got a little lost.

Started using the php framework laravel it has a mix package build in that makes everything very simple.

My advice for backend developers is to use either the laravel framework or standalone npm laravel's mix package.

With a simple command preseyts for vue, react, bootstrap come out of the box to allow you to focus on writing code vs setting up webpack or gulp or grunt and managing that yourself

Re:Marko – An isomorphic UI framework similar to Vue by jbergens on Thursday August 24, 2017 @02:24AM (#15088028)
There is nwb and create-react-app that takes care of initial configuration now. Unless you're gonna write everything from scratch you're gonna need to learn npm though.
Re:Marko – An isomorphic UI framework similar to Vue by zebra9978 on Monday August 21, 2017 @01:52AM (#15062254)
hi, im helping build a fairly vanilla ecommerce site in either reactjs/vue. I want it to be entirely server-side rendered with high SEO visibility. However.. (and this is the big point), have the same APIs exposed for mobile apps as well.

How do I do this ? Any templates to explore this pattern ? It is fairly straightforward to do this in rails, but in the world of react/vue, it seems that the whole community is geared towards rich client-side applications with low SEO.

Re:Marko – An isomorphic UI framework similar to Vue by jbergens on Thursday August 24, 2017 @02:26AM (#15088040)
There are many examles, like next.js. Or search for isomorphic or universal js.
Re:Marko – An isomorphic UI framework similar to Vue by raphinou on Sunday August 20, 2017 @06:03AM (#15057754)
Did I miss something or there's no explanation of what nuxtjs is on their website?
Re:Marko – An isomorphic UI framework similar to Vue by ycmbntrthrwaway on Sunday August 20, 2017 @06:08AM (#15057764)