Update on ContactsManager app


As part of my 30 days of Node I’m building a ExpressJS app that allows you to create, edit and save contacts. I’ve been working on this app for a couple of days, not really got too far just managed to get the the package.json file and an Readme file setup. In the package file I’ve got the Express framework and Nodemon all setup, along with the very basic app.js file setup.

I know there is the Express Generator tool which would set up the core of an app, but as this is a project for learning Express I think it’s better to start adding the bits of the project, bit by bit. Instead of letting a tool setup a project with all these parts (views, routes and the core app.js file) and then wondering how it all works. I think it’s better to setup parts of the app as I go and learn how to implement them. I think tools like Express Generator are fantastic they can help you get a new Express site setup and running in minutes, they really have their place.

I mentioned earlier that I’m using Nodemon with this project, the reason for this is because the main drawback I see using Express is that you have to keep restarting the server after each change in order to be able to see the change. It can be annoying and I know that there is probably a NPM package I can install that gives me live reload (which is awesome and something that I wish I had back when I started building websites in the late 90s). So for now I’ll use Nodemon to monitor my app for changes and then I can manually refresh the site to see the changes. This isn’t perfect, but better than having to restart the server after each change.

Anyway my project is on GitHub, as this is what all the cool kids do nowadays. My next task is to start looking into how to create views and routes. How routes work and how they can load a view.

How Node compares to other web tech I’ve used

I’ve been looking into Node and Express, getting ready for my learning Node month, and I’ve started to compare Node/Express with the other web technologies I’ve used in the past.

Over my career I’ve used a few other web technologies including ColdFusion, .Net even classic ASP a wide variety of approaches to how to build a web app. All of them are server side technologies unlike Express which is client side. Now I have done a lot of Angular and JavaScript work over the years but I see Express as filing a different niche than Angular. For me Angular 1 is really client side, while Express is more of a full-stack approach to building a web app.

If you look at something like the MEAN stack Angular is used for the client side JavaScrip, Express is used for the middle ware part of the stack, being used to connect to the data layer (Mongo) and providing APIs for the client side (Angular). This reminds me of the old sites I use to build with ColdFusion where I’d write ColdFusion Components and ColdFusion tags to connect to the data source and serve this data to the client.

The reason I like the approach Express takes is:

  1. Its lightweight, doesn’t insist that you do everything one way
  2. Its JavaScript across the stack, both client and middleware
  3. The use of one language across all parts of building the web app

For me Express is building full stack web app as I use to, but using modern technologies. I’m sure I’ll find a lot of similarities between my old way of building web apps and using ExpressJS.



Plan for learning NodeJS

How do I plan to learn NodeJS over the next 30 days? Well obviously you can’t learn all of Node in just 30 days, but you can learn how to use Node in build a decent web app.

So my plan is simple I’m gong to build a web app using Node, I mean as Chris Coyer says in order to learn to about the web then ‘just build websites’. I’m going to use ExpressJS as the framework I’ll use to build my new web app.

The app itself is going to be a ‘contacts manager’ where you can add, edit and delete contacts. An app like this will, I think, give go overview on the Express framework. How to create views, how to manage actions, how to write Middlewares, how Express handles routes and finally I can also look into how to connect to a datasource (Mongo).

Building this app gives a great overview of how to use Express.

I also have an EggHead account and they have a few Node views and these complete courses:

I also have some a few Node books to read:

Plenty to read, watch and do over the next 30 days.

Finding Your Passion

I recently watched a video by Sean McCabe about finding your passion (seanwes tv: How to Find Your Passion). In the video Sean says ‘we shouldn’t think of trying to find what you passion is as going off in another direction from what you are currently doing, but instead think of it as a starting line where exploring each idea is like moving forward from that starting line’.

He continues to say by moving forward off this starting line and exploring an idea that you feel might be what you are passionate about, you are discovering what really is your ‘passion’. You may find that after a while this new thing isn’t what you are passionate about, you may not like it, but at least you’ve explored the idea.

This idea really resonated with me because for the last few months I’ve been trying to decide whether to stick with the ‘technology stack’ I’ve been using for the last few years (Angular, Ionic and general front-end development) or explore the world of NodeJS, but the thing that has been holding me back is if I starting getting into a new stack, it might mean that the work opportunities open to me suffer.

As a contractor the amount of experience you have in a technology helps. When clients are looking for someone with x amount of experience and you don’t have that many years it does mean that you can’t be put forward for the role, the recruitment agency won’t put you forward for the role as they see you don’t have the require amount of experience. Even though you maybe the most knowledgeable developer on a new stack that you have only been using for the last year. CVs get scanned through every quickly and if you only have a few months experience you could find your application doesn’t go any further.

But I am really fascinated with NodeJS, I think the types of projects you can do with Node is amazing, (web, mobile, desktop, server side, even robots). The NodeJS community looks amazing, so helpful and welcoming to new Node developers.

Anyway after watching Sean’s video it made me think that by learning Node I’m not going off in another direction from what I’ve normally been doing, what I’ve been making my living off. Instead I learning, I’m moving forward.

I may find I don’t like building sites/apps with Node, I may also find that it makes me a better developer, it gives me more opportunities and more experience. Experience I can bring back into the mainstay of my career.

So if you have something you want to try, but you feel it is moving away in another direction from what you normally do, remember it really is just moving forward.

Freelance Podcasts

I’ve been looking for more podcasts to listen to especially freelancing podcasts. Some of the ones I’ve found include:

I’ve also gotten into watch some freelancers vlogs on YouTube. I started watching more and more after Steve Folland from Being Freelance started one, which lead to finding others to watch.

Currently I’m watching:

While all these vlogs are great to watch, there are a lot of designer ones out there, but not so many by freelance developer ones. I suppose no one wants to watch someone coding with their headphones on.

 

Plans for 30 Day Writing Challenge

It’s nearly April which means two things, 1 it’s getting near my birthday and 2 its the start of another 30 Day Writing Challenge which I took part in last year.

The idea, started by Marc Jenkins, is simple write online everyday throughout April. It sounds a simple challenge, but as I found out last year, it can be difficult to find ideas of what to write every day.

So this year I’m going for more of a theme on which to base my posts on. For this year I’m going to write about learning Node throughout April.

I’ve been thinking about learning Node for the last few weeks/months, but never sat down to really learn it, to build a project using Node or how it works in detail. As it is one of the things I want to start doing in 2017 it seems like an idea opportunity to both learn it and write about it at the same time.

The benefits of writing about what you learn is that it helps galvanise your understanding of a topic. If you’re ideas are mislead hopefully someone reading your post will be able to correct you. By being part of a challenge like the 30 Day Challenge, where you are held accountable for posting every day, means that you have to do what you’ve said you’ll do.

Nice ngClass tip

This is a useful thing I found while working on a Angular project, making a small note here in case I come across the need for something like this again.

I’m working on a project where I have to loop through a list of items and display them in a table. Pretty straight forward stuff. One requirement is that if a row contains an item with a certain name, then a Class needs to be added to this row so the front-end developer can style this row differently.

After doing some research into this I found out that using ngClass this is really easy to do.

Using ngRepeat I looped through the data creating the table, then on each row using ngClass you can check the matching value like this:

Ng-class=“{‘className’: value === ‘titleToMatch’}

What’s happening here is if the value matches the titleToMatch then the className is applied to the row.

Ng-class is really flexibile and it’s well worth looking into what you can do with it.

Creating a Definition of Done

Today in our project planning sessions we discussed the idea of a Definition of Done. Now this is the first agile project I’ve worked on where we’ve actually defined what we, as a team, think a definition of done is.

As a developer I can really see the benefit that having a DoD set out from the beginning has. It gives us a checklist to go through when we have finished a task so we know that we can ‘officially’ say it’s done.

I think for 2 main reasons why the DoD is important for a developer, one that I can be happy to say that I have done/finished a tasks when I have met all the criteria that the DoD has set out. The second reason I think having a DoD is important for developers is that the quality of the project stays at a higher level as the project goes along.

If your Definition of Done says that a task can only be finish if it has 100% code coverage and has been checked over by a designer to make sure the work matches what they have designed. Then the quality of the project remains at a consistant high level, because you can’t say something is finished until all the quality checks have been made.

2016 – Wasn’t to bad

2016 wasn’t too bad for me, considering that a few years ago around this time I had just got out of hospital, I had blood clots in my legs and a kidney that hardly worked.

2016 started with me getting 2 Ionic freelance projects. I’ve always wanted to go 100% freelance specialising in Ionic mobile development. So getting 2 projects at the start of 2016 was a great start.

Unfortunately the bad side of freelancing soon followed after these two projects finished. Late paying clients, and no other work on the horizon meant that my freelancing ‘dream’ soon died as I had bills to pay and no income.

So I went back to contracting. I spent about 4-6 weeks in mid-2016 looking for a new contract, eventually I got a new contract in central London, but unfortunately it was a terrible contract and I left 4 days after starting.

The people I was working for were working in a terrible way, they had all their developers in one small room, with Project Managers asking for updates every 5 mins. There was no sprint planning or anything in the way of good development practices. I had a bad feeling about the place after one day, so I was glad to be out of there as soon as I could.

This did mean I still had a few more weeks without being paid. Thankfully some of the late payments from my freelance work came through so that helped.

Eventually I got a new contract working for a great company, building their new Angular based website. As part of the team we managed to get the new version of the site out, but then went straight into a long cycle of bug fixing.

Generally bug fixing can be fun, it’s a challenge to find the cause of the problem, then working on a way to fix the issue. But 5 months of solid bug fixing meant I wanted to look for something new.

So now I’m working on a large Angular 1.5 project for a well known brand, when the site’s live I’ll be posting who they are. This is my first project using the new Angular 1.5 components based approach, which I really like. Being able to moduralise everything, making everything a separate component is a challenge to get started (especially unit testing components), but once past this using components seems like it is the best way to build apps. Lookign forward to getting into Angular 2 very soon.


So 2016 was alright, a couple of hickups with late payments and taking on a terrible contract, but the end of the year has got a lot better.

My plans for 2017 are continue on this large contract (which should take me to mid-2017) I’m also planning to build a Ionic 2 app as a side-project in order to learn Angular 2 and hopefully get some Ionic work towards the end of the year.

Review of my first AngularZone meetup

It was my first time at the new SkillsMatter premises and wow that place is amazing. It’s over 2 levels, level 1 has a large meeting room ideal for large meet-up groups and mini single track conferences. While on the lower level there is a slightly small room ideal for smaller second track sessions or large training sessions. There is also a few smaller training rooms. In the middle of all these lower rooms is a bar, table tennis and seats ideal for the social side of meet-ups.
The AngularZone meet-up had 3 talks, one by the main organiser on AngularZone all about the new features in Angular 2.1 (yep we’re on version 2.1 already, (Angular releases are like buses you wait ages for one to come then 2 come along at the same, we’ll nearly the same time). The new parts of Angular are simplified animations and better preloading of modules.
Lazy loading modules preLoader looks a great feature. I personally can’t wait to use it and see how it will improve sites.
The second talk was from Ari Lerner, who wrote the original ngBook and co-authored the new ngBook 2. His talk was really interesting, all about how he is using features of Angular 2 for intelligent A/B testing. If his talk is available to see after ngEurope it is well worth looking out for.
The final talk of the night was a quick tour through GraphQL. I have to admit I’ve never see it before this and I was really impressed. GraphQL will make a great backend for an Angular app.
I’m looking forward to the next AngularZone.