Ionic UK October Meetup Review

This month’s meetup was a special one for the Ioinc UK group… we had Ionic Royalty in the house!

Yes! Max Lynch and Perry Govier joined us following their time at the AngularConnect conference, and we were all honoured and pleased to get the chance to hear from them and have a good ol’ chat.

Max was keen to mention how he admired the Ionic UK group, especially as it was the BIGGEST meetup group, even including the ones near their home town of Maddison.

Ionic 2 – Perry Govier

Ionic2

Perry gave us a run through of the slides that Adam Bradley showed at the AngularConnect conference, but talked through them in a way that an audience who already knew Ionic (from the V1 days… aah… I remember like them like it was yesterday).

We skipped through some of the initial slides (they can be found here) and moved quickly onto the technical differences of V2. Of course one of the primary changes is that it’s built on Angular 2, and as such gets a lot of the benefits of that with it… importantly this includes the speed improvements, which on mobile are very key. I was hoping to find some performance comparisons but I haven’t come across any yet.

Perry mentioned that a lot has changed since V1, not just with Ionic but with all the technology surrounding it. We now have better, faster devices, improved web APIs, fewer poor devices (through churn) and, of course, improved browse engines. As for Ionic though there are also a lot of changes. I suggest reading through the initial blog post from Ionic on V2 as well as the slides and even watching Adam’s presentation from AngularConnect.

 

As a quick summary though, here are a few of the changes that I’ve noted;

  • Performance – Yes, I’ve mentioned this already… but it’s so key when dealing with app experience on mobile devices. This is really as good as native.
  • Move away from using CSS classes to define Ionic behaviour. Ionic elements are now all defined through directives and as attributes. Not only does this remove ambiguity from the “best practices” but it also has the positive side-affect that CSS specificity should make it easier to over-ride any Ionic styles.
  • Ionicons v3 – These are improved, all SVG and also match up nicely with the native icons on both IOS and Android.
  • Android Material Design is now an integral part of the experience on Android devices.
  • Routing – This is one of the major internal changes I believe. The Ionic team’s approach was to try to make it easy to programatically take control of the app’s navigation system. It should now be possible to have quite complex navigation support. And the interesting thing about areas such as navigation is that something that is technically complex can really map to something very intuitive from the user’s point of view.
  • Animations – Ionic 2 takes advantage of the Web Animation API to allow for JavaScript controlled animations that can take advantage hardware acceleration. This is a big deal for animation performance on Android devices.

There are other areas of change too, including the support for TypeScript, JS ES6 and the bundling of the ng-Cordova type interfaces.

Although Ionic 2 currently wears an alpha badge Max said that this was based upon the core reliance on Angular 2, rather than the internal state of Ionic 2… a nice sign of confidence.

I asked about ongoing support for V1 from the Ionic team and was told that this is likely to be around till the take-up of version 2 has at least surpassed that of V1, so we should feel pretty comfortable with this.

From a MobileCaddy point of view we hope to have versions of our Seed and Shell applications written in TypeScript, running with Ionic 2 in the near future. We’re definitely excited about the prospect of performance improvements and can’t wait to see some Salesforce mobile applications written in Ionic 2 on-top of Angular 2.

Ionic 1 – Sani Yusuf

Meetup co-organiser Sani gave us a quick run-through over some of the (our) much-loved Ionic V1 features and implementations… I won’t go over this here, but if you’re wondering “what’s so cool” about Ionic then I can only suggest you give yourself some time to have a go at running up an app… you’ll only need half-an-hour.

asim_perry_sani

Showcase

I really enjoyed the previous meet-up’s showcase segment and was pleased to see it have another slot. In this part of the meetup folk are invited up to talk about projects they are working on, would like to be working on, etc… it’s great stuff.

Jambuster – A real time traffic monitoring app built for Londoners. With the app you can set routes and times so that you only see the information relevant to you. The app allows you to see live traffic cam statuses and pictures. The chap that built was an old-skool dev, building the backend with Perl, Emacs and sqlite. I can’t find a link to the app unfortunately… but I’m on the hunt for it. The developer is after some cash and users to test it.

Jasper – 19 year old Alex Emedeme gave a quick pitch of his app Jasper that “… helps friends experience the places they’ll actually love.Plan it. Vote on it. Do it“. It looks like a potentially useful application for those wanting to meet with friends but always seem to struggle finding a place that suits everyone. Alex came across very comfortable and knowledgeable about his app and I can only wish him the best.

Electric Jukebox –  Electric Jukebox gave us a hiring pitch for their product, which by the looks of things is really going places… so if you’re a talented Angular/Ionic dev then why not get in touch with them?

Ionic in Space  – (well sort of)… Tom Halfpenny (what a great name) demoed the app that helped them become finalists in Nasa’s International Space Apps Challenge. And he gave props to Ionic for helping deliver the app development speed. Here’s a video of their “Stereo Vision” app in action…

Wrap Up

You’re probably not going to be surprised to hear that I really enjoyed the meetup again. The mixture of knowledgeable talks, interesting showcase and great post-meetup chats and beers made it almost perfect. Almost? yes, sadly I missed out on pizza… so perhaps there could another 2 or 3 ordered next time as I think a few people didn’t get any.

Regardless, thanks go to all the speakers and folk for getting up during the showcase… and of course to Sani and Ryan for organising… oh and the sponsors for helping out with beer (of which there was enough, I think), pizza and venue.


1.0.0 Seed And Shell Apps

Today saw the push of the 1.0.0 release of our Seed and Shell apps, along with the 1.0.0 version of our Codeflow library.

Along with a few bug fixes and minor improvements comes the wonderful Codeflow Control Panel. This is an app that get’s bundled with the Codeflow development environment and can be used to interrogate the Salesforce mobile application that you’re building with MobileCaddy. The Codeflow Control Panel can be accessed on http://localhost:3030/codeflow/ and is automatically available after starting your application with mobilecaddy serve.

Codeflow-control-panel-dashboard

We should soon have a blog post out explaining more about the Codeflow Control Panel and it’s features.

It should be noted that the 1.0.0 release of the starter applications and the libraries also contain breaking changes if you’re running a Salesforce package of MobileCaddy that has a non mobilecaddy1 namespace. If you are running an old version then please update your package to take advantage of these new and improved assets… just follow this link http://developer.mobilecaddy.net/install/latest-stable.

Full change information can be found in the relevant CHANGELOG files on our github repos.


MobileCaddy CLI 1.2.0

The 1.2.0 version of our CLI tool to help you kickstart your latest Salesforce mobile application is now ready and available via NPM.

The latest release has a handful of minor bug fixes but primarily focusses on having a better mechanism for handling the package dependencies and showing feedback.

There are no breaking changes and it is recommended that users upgrade to the latest version. This can be done with this command;

 


Codeflow CORS Proxy Crashes

Just a quick post to let you know that we’ve seen an issue with the Codeflow CORS proxy crashing out when trying to refresh the access token used to make authenticated calls to the Salesforce platform.

This crash itself isn’t always easy to spot, but can be seen in your terminal window with this kind of output.

 

The issue here can be seen if running 0.12.X version of node, and is caused by a breaking change that was introduced. The latest versions of the request NPM package (that is used in Codeflow) fixes this issue, and can be installed into your setup with this one command.

This line installs the 2.64 version of request  and updates it’s dependencies and also updates your package.json file to represent this.

With this version of request in place the Salesforce token refreshing should now take place as expected. Of course if you see issues still then please message us on our support boards.

We are just in the process of updating our public seed and shell app repositories to include these dependency updates, they should be made public in the coming days following our test cycles.


IOS 9 Breaking Changes

With the upcoming release of IOS 9 – with a guess date of the 16th September2015 – we’ve been working hard to make sure your Salesforce.com mobile applications powered by MobileCaddy will be fully supportive of the new OS version. We shall be completely transparent and let you know that this hasn’t been plain sailing.

Since testing the earlier betas things have been getting better, but there’s still a couple of breaking changes that mean your apps need to be updated to work as best they can;

Changes requiring an app store submission

NS Exception Domains

The default version of SSL that the OS plays nicely with has been upped. This mean that applications built with the Salesforce Mobile SDK (including the Cordova Plugin) require some extra configuration to allow the app to communicate with the salesforce.com and force.com domains.

A PR we raised has been included in the 3.3.2 version of the Salesforce Mobile SDK Cordova plugin to support the automatic inclusion of this configuration.

Logins are not Persistent

Along with the above issues with oAuth’ing into Salesforce in the first instance it was also seen that once the app was closed (not just resumed from the background) that the user was required to log in again. A bug was raised to the Mobile SDK team and this fix is now in the 3.3.1 version of the IOS repo and in the 3.3.2 version of the Cordova plugin.

Both these breaking changes result in the need for a new IOS app version. If you’re a MobileCaddy customer then these applications have already been built and submitted for you. If you are building your own device apps then you should also specify config to disable BITCODE in xcode. This is needed as the Salesforce Mobile SDK does not yet support BITCODE. This StackOverflow answer guides you through the process.

Changes requiring a new Application Bundle

Along with the need to have a new device application (IPA) available on the iTunes store (or your enterprise counterpart) there are other changes to be aware of if you are using Angular/Ionic for your core application code.

Delay the Bootstrapping of Angular

For some reason (we are still investigating) it seems that some of the digest cycles run into mass loops (this has been put down to a bug in the UIWebView in the latest version of IOS 9 Beta that is available). One result of this appears to be that apps that rely on the manual bootstrapping of Angular can end up hanging. One solution we have found that seems to work is to, albeit a bit dirty, delay the calling of the bootstrapping.

Original Line…

Replace with…

 

Once your code has had these change applied it is recommended that you deploy to the platform and test on IOS 9 and pre IOS 9 devices. Our experience shows that there is no need to target IOS 9 in this particular case. Using the MobileCaddy Deploy to Salesforce functionality and our Dynamic Versioning it should be possible to target your test users (if you have some) and also dynamically up version your users prior to the IOS 9 release.

Wrap Up

As with prior IOS releases it’s a case of “keep your wits about you” and be prepared as best you can.

And we shall keep you posted on any further findings… though at present it looks like MobileCaddy and even non-MobileCaddy Salesforce mobile application developers should have the fixes they need to have their enterprise apps running.


Ionic UK August Meetup Review

Last week was a busy one with regards to meet-ups, and it was capped off with a super-whammy gathering of the Ionic UK folk. The theme was to be the ever-progressing suite of tools that make lives for those building with Ionic even easier. As well as attending I was also contacted by one of the organisers – the lovely Sani Yusuf – to see if MobileCaddy wanted to demo our apps and tools. Having been actively improving our tooling recently (see Introducing MobileCaddy CLI 1.0.0) I jumped at the opportunity.

The friendly Makers Academy folk hosted us and the mobile insights tool Count.ly sponsored the beers and pizza, so thanks go to them for getting behind the event.

Before the event kicked off I was chatting to a couple of the most recent graduates from the Maker’s Academy, and they were telling me how they’d built their final projects using Ionic. One was (as I’d describe it) “An Uber for Errands” and the other was an eco-check-in-reward type service, where users could check-in to locations (coffee shops, retail outlets etc) and the place of check-in would donate a small sum to help towards planting trees. I wonder if we’ll ever see either of these come to fruition, I hope so.

But hey, enough of my yakkin’; whaddaya say? Let’s boogie!

Ionic IO – Mike Hartington

Mike, a core Ionic team member, joined us via video stream to run through some of Ionic IO’s neat features… and with just 10 minutes notice he did a grand job; On a related note I think Ryan might owe him a favour or two now.

mike_hartington

Push

First up on the list of utilities was the Ionic Push; a service available to apps built and deployed with Ionic IO that let’s you send push notification to your apps. Push notifications are a big thing when it comes to being able to engage with your users; it enables you to add a level of interactivity to your apps that native apps have had for some time.

With great power comes great responsibility – Spiderman’s Uncle Ben

The Ionic IO Push service allows for a couple of handy extras;

  • Templating
  • Scheduling
  • User Targeting

We were shown a quick demo of this, and to be honest the simple way that the Ionic IO GUI is laid out should make this a breeze to use.

Analytics

When building apps with MobileCaddy you get Analytics out-of-the-box, with all your stats and logs residing in your own Salesforce.com org, where they can be used as you like. But if building an app that doesn’t have a Salesforce backend then using Ionic’s IO is a great alternative.

Apps built with Ionic (and run through Ionic IO) can have analytics functionality added in by adding 2 cordova plugins into your app like this;

… and then initiating them like this;

Ionic IO’s analytics allows for many types of stat to be recorded. These include;

  • Custom Events
    • Ad clicks
    • button clicks
    • touch events (swiping, etc)
  • Hardware stats
  • Push Event stats (if using the Ionic IO Push this is simple, if not it is slightly more involved)

Full documentation for adding analytics can be found on the Ioinc site.

We then had a series of questions for Mike, and a couple that I thought I should mention here;

Q) Can you give some information as to when Ionic IO might come out of Beta?

A) “Dates mean that you might let people down” – So that’s a No then.

and

Q) Can you use IO with other frameworks?

A) “The APIs used are quite angular specific… so I wouldn’t recommend it”

Ionic Deploy – Asim Hussain

To fill in the missing Deploy piece from the Ioinc IO suite of tools was Asim Hussain. He’s the founder of BubbleGum HQ and teaches Angular and Ionic over at Code Craft.

Asim took us through the basics of Deploy, it’s restrictions and why you might want to use it (spoiler: if you’re building for IOS then you just do).

With a recent change to Apples developer guidelines it’s now within their rules to have actual code remotely loaded into applications. This is with the caveat that the code does not alter the overall function of the app, like turning a stock ticker into a video poker app. Using this new “grey area” Ionic have a service that allows you to bundle all your hybrid app’s web assets up (essentially whatever is in the www) directory and then have this pulled into the running app and replace the existing assets (and delete any too I believe). This process does mean that you cannot alter the cordova plugins that your app uses, but it does give the app developer a lot of freedom.

And why would you want this?

As far as I can see, you’d want to do this to to bypass Apples App submission process. It is notorious for a reason… I personally dislike almost every aspect of submission to itunes (the tools, the process, the rules, the waiting time… everything). It is not unusual for an app to be in review for over a week, once submitted to the Apple review team… and it could be rejected for any number of reasons.

And one of the cool things about this? Native apps can’t do this.

Ionic IO’s Deploy follows the same architecture as MobileCaddy’s Dynamic Versioning System, although with MobileCaddy you can “click to deploy” from right inside the very application you are building.

Animated screenshot showing a deploy to Salesforce from the MobileCaddy app

 

With MobileCaddy the Salesforce administrator can decide who get’s which version of the app (for example a set of test users can beta test a new release), and along similar lines Ionic IO allows you to deploy to “channels”, that might represent beta testers, for example.

A closing remark from Asim was that it should be noted that in his experience Ionic IO’s Deploy is still very much an alpha product… but great potential for things to come.

Third Party Tools – Sani Yusuf

As well as the Ionic IO tools there are many 3rd party apps and services that can be used to enhance your Ionic App. Sani gave us a rundown of some of his favourites;

Push

Authentication

Analytics

We haven’t really used many 3rd party services at MobileCaddy as most of these functions are built-in, either through our APIs or the sheer fact that we have a Salesforce.com backend. I can see for sure though that having a toolset like Firebase and Count.ly would give you an incredibly cheap and easy leg up to building amazing apps.

Showcase

Next up was an open-floor session. I opened with a quick talk through our MobileCaddy tooling setup. I covered how we match the Ionic IO toolset for mobile apps built with Salesforce (with offline in mind). One thing that struck me when I was writing the talk up was just how similar the architecture for an app built and run with Ionic and Ionic IO would now, compared with how we’ve been doing things at MobileCaddy.

To have a similar architecture introduced with Ionic IO is a great sanity test – Me

Ioinc and MobileCaddy Architecture

 

A recording of my talk is here;

 

We then had several groups of indie devs and users come up a share their apps… I LOVED this bit.

Jambusters – A real time traffic monitoring app built for Londoners. With the app you can set routes and times so that you only see the information relevant to you. The app allows you to see live traffic cam statuses and pictures. The chap that built was an old-skool dev, building the backend with Perl, Emacs and sqlite. I can’t find a link to the app unfortunately… but I’m on the hunt for it. The developer is after some cash and users to test it.

HooHair – billed as “the easy way to book your haircut” it’s a stylish location based app to allow online booking of haircuts. The app looks pretty neat, yet still in development. The developers recommended that anyone looking to work with maps in the apps to take a look at MapBox as it has great customisations available.

hoohair

Sold House Prices – This is a free app that lists the prices that houses were sold at, based on location. The app itself was really only a tool to demonstrate a Google Analytics cordova plugin that can connect to the native Google Universal Analytics SDK. The demo was pretty neat… and showed how users (us in the audience trying out the app) had our interactions recorded. These included search criteria etc, and was pretty cool.

Wrap-up

This was a great meet-up, full of smashing talks and buckets of information. Thanks go to Sani and Ryan for organising and to the sponsors and all the presenters and those willing to share their work in the showcase section. Of course thanks should be extended to everyone involved in Angular and Ionic too… and I hope they already know how much I love them all.

The next meet-up is planned to coincide with Angular Connect… and I’ve been hearing that we might be in for a surprise. I personally can’t wait (especially as I lost everyone on the way out so missed out on post-meetup-beers).


London Salesforce Dev Meetup – August Review

Meetups in London this week have had a rough ride due to the planned Tube strikes… thankfully for me these worked out in my favour and it meant that I was able to get a spot at the London Salesforce Devs meetup at the very last minute.

The Financial Times

 

There was a new venue for this outing of the devs – The Financial Times offices by the Thames. The venue had everything we needed, along with (too many?!?!) pizzas and beer. I was hoping to carb-load for my morning run the next day, and this provided the perfect opportunity.

There were two talks scheduled but we ended up with three… sounding good already, right?

In fact the dev group was honoured to welcome Jodi Wagner and other #girlygeeks to the group. Some who I’ve seen at previous meetups but were in attendance to specifically kick off a new London GirlyGeeks meetup. Jodi pointed out that the meetups won’t be entirely technical, and are all are welcome to attend… more news on this can expected post-Dreamforce.

Jodi Wagner talking about GirlyGeeks

 

Anyhoo… onto the talks;

CSS Flexbox – MakePositive

Kim Hellbom who was down for this talk was sadly unwell, but thankfully Mohammed Haseeb from MakePositive filled in with just 30 minutes notice. The talk was a whistle-stop tour of the CSS Flexbox implementation and how it can be used to gain control over some tricky responsive layouts.

Included in the talk were the some of the pitfalls of other layouts techniques and some examples. Here’s a codepen demonstrating Flexbox in use.

See the Pen Flebox example 1 by kim hellbom (@kimhell) on CodePen.

The Flexbox display property is a fairly deep topic… and I recommend this great article on css-tricks for a good overview and as an initial starting point on the subject.

We were teased with the idea of a Minecraft demo… but were left without one… I’ll chase down the folk at MakePositive to see if they have a link to it.

Salesforce at The FT : Gareth Park

Gareth gave bonus talk on how The FT have used Salesforce internally. The FT have 2k+ users, 10 developers and 2 admins and currently use (possibly among others) the Sales Cloud, Service Cloud and multiple apps on Force.com. These cover both B2C and B2B scenarios.

One particular case that Gareth took us through was that of their Corporate Fulfilment application. Prior to powering this with Salesforce they had multiple systems on their architecture, which lent itself to complexity and a slow flow between the different systems. This meant that a fairly simple use-case could actually be a complicated process that took many hours.

With a Salesforce solution they used Salesforce as their key platform (so single sign-on for users) and this consumed micro-services hosted on platforms such as Heroku and AWS. These micro-services were bridged via a Kafka messaging queue and bespoke Salesforce event bridge.

Architecture of a tech solution using Salesforce at The FT

 

The result of this migration was a dramatic reduction in time-to-complete for transactions, as well as a simple, single platform for end users to interact with.

We were also told how splunk was used as a big store, allowing for complex searching, filtering and handling of events.

Building Video Apps on Salesforce – Francesco Iervolino

As a Salesforce Certified Technical Architect Francesco is certainly a voice of knowledge. And in this case he talked us through some of the details of how MakePositive have used video in their Salesforce apps. He mentioned that in today’s world that the technology needed to deliver such functionality was cost-effective and as such enriched apps were now more readily available. A couple of apps that show a real benefit of this technology are TutorHub and BeMyEyes. If you’ve not heard of either of these then I definitely recommend you take a quick gander.

Francesco’s talk and demos used the WebRTC standard technology and he told us that in one of their projects their R&D into this topic came out with several options. The one they settled on though was a solution called OpenTok. There were a few reasons for this choice but a key one was the archiving feature that they needed. OpenTok, who are owned by Telefonica, supplies a comprehensive set of standard features, as well as some extensions that really make their offering fairly strong.

sf-vid

 

We were then shown a few demonstration apps that Francesco had put together, ranging from a very basic Visualforce implementation, through to a video conference calling app. The hunger in the room for such an app (based upon the quality of Hangouts, the pain of GTM, etc) was huge… and it seems that MakePositive might release this on the AppExchange.

Francesco’s slides can be found here.

Wrap-up

As well as the usual chat (and beer and pizza) with the fellow attendees the key highlight of this month’s meetup was the Video talk. It was confidently delivered and covered a topic that really got people thinking and talking… oh how I’d love to never have to use <INSERT VID CONF TOOL OF YOUR CHOICE> again.

Thanks, of course, must go to the organisers for once again putting on a great meetup. And to to The FT for hosting and feeding us all.


London Salesforce Dev Meetup – July Review

Cloud Encryption Image – Perspecsys (rotated)

After sadly being unable to make the last meetup of the London Salesforce Developers‘ group we were back in attendance this month. This time I was joined by both Paul and Justin and we were all looking forward to the talks and of course the pre and post meetup chats and drinks.

The Make Positive offices were once again the venue and beers and pizza were, as usual, supplied to fill our bellies. With this in mind thanks go to them and the other sponsors, Appririo, BrighGen, Cloud Sherpas and Manning Publications.

Wave (The Analytics Cloud) and Salesforce Platform Encryption were the topics to be presented, both of interest but it was the latter that I was most looking forward to.

Salesforce Wave – Kerry Townsend and Scott Gassmann

Wave is the technology that powers Salesforce’s Analytics Cloud, and that is what Kerry and Scott were covering in the first talk. To be honest I think the two terms can be used pretty much interchangeably without anyone getting too excited.

Kerry kicked off with a brief introduction to Wave and, I suppose, why Salesforce have such a product. The Analytics Cloud is separated from the rest of your organisation’s Salesforce data, and in fact integrations with all sorts of data stores are possible.  My key take-away was that the Analytics Cloud was able to make raw data easier to be explored and insights gained from it. There was some mention of it being mobile, but I doubt this extends to offline capability. It’s hard to ignore that when you’ve grown accustom to offline being run-of-mill through my work at MobileCaddy.

Scott then took up the baton and walked us through creating a dashboard for a user, and showed off some of the visualisations that are possible. He also covered how a dashboard’s widgets could be modified by altering the underlying JSON (which I suppose could be classed as the configuration). He mentioned how this manual work was likely to be replaced by some GUI features in the future.

As well as likely being a useful tool for insights and data analysis, there’s definitely no getting away from the fact that data visualisations really would be a handy asset to have if a sales pitch too. If you’re interested in seeing how charting can be made easier in your JavaScript applications then checkout our review of the latest JS Monthly meetup that covered charting with D3.

The slides for the presentation can be found here.

Salesforce Platform Encryption – Thomas Waud

Thomas is a CTA at Cloud Sherpas. Though his job tonight was to guide us through Salesforce’s new Platform Encryption.

He started off giving a general overview on encryption and the Whys, Whats and Whos and Hows. He briefly mentioned some of the laws and regulations surrounding data security (Gagging Laws, Data Residency, etc) and also briefly ran over the basics of Symmetric and Asymmetric encryption methods and how they can be used together to further strengthen security.

The core chunk of Thomas’ presentation was of course on the new Platform Encryption feature. He covered a fair amount (a link to his slides is below) but for me the following points were well worth noting;

  • Platform Encryption requires a feature license (freely available in developer orgs)
  • It uses 256 bit encryption keys
  • More type of data can be encypted (compared to Salesforce’s classic encryption)
    • Attachments, Files and Content
    • Encrypted Custom Short Text, Long Text Area, Phone, Email, and URL Fields
    • Encrypted fields are searchable (including fragment searches)

This is a diagram from the Salesforce Summer ’15 Release Notes

Salesforce Platform Encryption Process Diagram

 

Thomas presented very well and it was obvious that he was very comfortable with the subject matter. His slides can be found here. Presentations like this really do make the journey into the Big Smoke worth it.

Platform Encryption started rolling out as part of the Summer ’15 release but is, at the time of writing, not available on the eu5 instance. It seems from discussion last night that this would be resolved in the coming weeks.


JS Monthly – July 2015 Review

Last night I attended my first JS Monthly meetup in London. The meetup group used to be focused solely on Backbone JS but it’s since diversified. The meetup was organised by Guy Nesher, a London based JS dev, and to say he over-ordered on pizza and beer would be an accurate (and unfamiliar) statement. Thanks should then go to lastminute.com for sponsoring the event, I was left wanting for nothing.

There were two talks on the line-up for the event… so let’s get to the detail.

Charts: from monoliths to components with D3

First up was Colin Eberhardt and Chris Price from Scott Logic, a company I was familiar with from my trips up to DIBI conf. They gave a talk on how charts and charting libraries are huge monoliths, but also how they’ve come up with an approach using D3 that makes use of components to aid maintainability and re-use.

Chris initially talked us through D3’s Data Join feature. This is the way to essentially have data-binding in D3. It was something that very few of the audience, myself included, knew really existed within D3 itself. Chris showed us some example code of how this can be used (using the characters from Under Siege, which was nice), but from the point of learning I recommend reading Mike Bostock’s write-up on this. We have used used D3 in some of the mobile applications we’ve built MobileCaddy, but we’ve not as yet had the need to use joins, though I do look forward getting my hands dirty with it.

MobileCaddy D3 charts on child heathcare tracker

 

Colin then introduced us to making re-usable components using D3, and with this D3FC, a collection of components that Scott Logic have produced that can be extended to help build interactive charts. It sounds very interesting and something definitely worth looking into if you have a need to implement data visualisations within your applications.

D3FC Graph example and logo.

 

My personal experience with D3 is that it can be fairly overwhelming upon first sight… and this talk gave me a better explanation of some real D3 use over much of the online documentation I’ve read. So for that alone I thank Chris and Colin.

ES6 Promises – Guy Nesher

I’ve seen a lot of talks on ES6 features, and I’ve got to say that Promises seem to have taken a back seat in most of them, so to have a talk dedicated on them was a nice change.

Guy’s talk outlined how promises and their syntax can be used to mitigate the chance of creating Christmas Tree code through callback-hell. He also covered the importance of having a catch() clause; promises that reject and aren’t caught can lead to errors falling into the abyss.

If a promise rejects and no one is around to catch it, does it fail?

Using Callbacks;

Using Promises (and fetch);

Guy’s slides are available here.

There was some discussion around debugging in promises and how it can be tricky in error scenarios. This prompted me to make a note of this edition of Google’s Totally Tooling Tops YouTube series.

If you’re using JavaScript Promises then the short vid is well worth viewing.

Wrap Up

It was great meeting Guy and the other attendees; post meetup beers and chats were as good as ever. I seem to say this a lot, but I’m genuinely looking forward to seeing what will be presented at the next meetup.


Introducing the MobileCaddy CLI

It’s been hiding in the wings, but our MobileCaddy CLI v1.0.0 is here!

cli-1.0.0

 

The MobileCaddy CLI is the easiest way to use MobileCaddy to create offline first, robust and versionable mobile applications for Salesforce.com.

Using the MobileCaddy CLI you can quickly create a project structure based on one of our template applications that will allow you to have a deployable mobile application in a matter of minutes. Too good to be true? Just watch this video where we create a new mobile application using Salesforce.com as a backend.

As well as helping us create our new projects, the CLI tool gives us a few workflow benefits including;

  • Ongoing SCSS compilation and live-reload
  • JavaScript JS Hinting
  • Automatic package bundling

If you’re familiar with accessing SFDC from a localhost environment you’ll know that you have to have a CORS proxy set-up, but not to worry, the MobileCaddy CLI will manage the creation and running of that for you too.

What’s new in v1.0.0

The latest release was primarily focussed on stabilising the features we already have, but we also added the capability of defining your own project templates when starting a fresh project. This can be used, for example, if you re-use the same design patterns over-and-over and don’t want to keep re-implementing them on top of the standard MobileCaddy templates (see our Seed and Shell applications). To use a custom template the new command can now be run with a URL that links to a zip file of a project based upon one of the MobileCaddy templates.

We currently have two Ionic based templates available… have we mentioned the we LOVE Ionic?

Get it today

What? You’ve not installed it yet?

If you want to have a dig into the code the project is over on github.

We hope you enjoy it and would love to hear your feedback.

Looking for more info? Why not check out our tutorials and you’ll be mobile applications for Salesforce.com in no time at all.