Sunday, April 9, 2017

MERN Series Step 3 - Which client app

After looking at the two clients, one from generator-webapp and the other from tech-dojo's starter repo, I'm going to go with the app from tech-dojo, as it's structure is laid out for react components and services, vs generator-webapp is pretty generic and I'd have to do all the react setup myself.
Generator-webapp gives you an app folder with fonts, images, scripts and styles, which is fine for your generic client side app.  It also gives you a decent gulpfile to start with, and a tests folder using mocha and chai.
Tech-dojo's MERN starter gives you an app folder with components (with some examples coded, articles, core, and users), images, services, and stores, a gulpfile that I'm not familiar with yet, tests using mocha/chai/sinon with tests set up to run against the components, and you also get test coverage reporting.  On top of that you get the server folder set up to use express, mongoose, passport, and some seed data for the example components.
 
So, basically if you're reading these all in one go, skip everything I did in step one :) I'll be updating the article to reflect this new information and moving on to setting up login next using auth0, because security is hard and I don't have time to stay on top of it, and it’s their job to do so.  
Which brings me to a general point, if something is not part of your core business, don’t write it if you don't have to!  I'm not going to re-write paypal functionality if I want to take payments, nor am I going to write an email service.  Bring in something open source, or buy it if you need to, but only write it if you have to. 

No comments:

Post a Comment