codesword / entranic-architecture

0 stars 0 forks source link

Choosing a frontend framework - React or VueJS #1

Open codesword opened 7 years ago

codesword commented 7 years ago

React and Vue share many similarities. They both:

Differences btw React and VueJS Jsx vs Templates React uses jsx templates eg

render () {
  let { items } = this.props
  let children
  if (items.length > 0) {
    children = (
      <ul>
        {items.map(item =>
          <li key={item.id}>{item.name}</li>
        )}
      </ul>
    )
  } else {
    children = <p>No items found.</p>
  }
  return (
    <div className='list-container'>
      {children}
    </div>
  )
}

Jsx has a number of advantages:

VueJS uses html style templates.

<template>
  <div class="list-container">
    <ul v-if="items.length">
      <li v-for="item in items">
        {{ item.name }}
      </li>
    </ul>
    <p v-else>No items found.</p>
  </div>
</template>

The above html style templates gives a number of advantages:

Learning Curve VueJS is more intuitive and has an easier learning curve unlike React which is more abstract with a steep learning curve.

Popularity React is very popular and is backed by tech giant facebook while on the other hand, vueJS has rising popularity.

Check out this link for more indepth comparison.

codesword commented 7 years ago

I will like to hear your view on the framework we should choose.

thechinedu commented 7 years ago

I don't think we should spend too much time on this, for the most parts, both frameworks/libraries will give the same or very similar performance benefits in terms of speed and ease of use.

However, if we are all new to both technologies (haven't used either extensively), then we should just go with VueJs as you have said it is more beginner friendly.

0sc commented 7 years ago

I would vote for ReactJS only because it's popular and has lots of resources from an engaging community. I'm currently more excited about VueJS and would gladly love to try it out but I don't think the projected timeline for this project allows enough room for avoidable experiment.

My rule of thumb, for now, is where quality wouldn't be affected go with the tool the team has greater familiarity.

Adebolavictor commented 7 years ago

If most of us are fairly new to these technologies like I am then I would suggest we go for VueJs, otherwise ReactJs would be great cos of the community support and company behind it

codesword commented 7 years ago

@andela-cdaniel @andela-ooranagwa @Adebolavictor Thanks for responding. After doing more digging. I discovered that VueJS also has a lot of resources. Probably not as much as React though. I will like to stick with VueJS because of the beginner friendliness. Before the project kicks off, I will try to create a starter template that has most of the things discussed in frontend architecture. This way, the frontend team can focus on implementation.