Data/API Servers/Services for Single Page Web Applications

A Client needs a Server, or at least a Service

Over the last few years the team at Oasis Digital has created various complex “single page” web applications, using AngularJS, KnockoutJS, and other tools. These applications’ assets and code are be statically hosted (cheaply on  CDN if needed), but of course each application needs a backend data service (possibly comprised of smaller or even “micro” services internally) to provide data and carry the results of user operations to permanent storage.

Context and Background

Our work context is typically data- and rule-centric line-of-business applications, hosted in a company data center or on virtual/cloud or dedicated hardware, or occasionally a (more cloudy) PaaS like Heroku; so advice here is for that context. “Backend as a Service” solutions are appealing, but I don’t have any experience with those.

The systems we build most often store data in a traditional RDBMS like PostgreSQL or MS SQL Server, but data service needs are similar with a NoSQL or other non-RDBMS data store. (Among the many topics I should write about: making effective, justified use of polyglot persistence with CQRS and related ideas.)

We have also worked extensively with multi-tier desktop applications, which have essentially the same data service needs, albeit with different data serialization formats. As a result, we have worked on and thought about data services extensively.

Building a Data API Service

For convenient, rapid, efficient development of robust data/API services, your tool set should have as many as possible of the following:

  1. A server-side programming language / platform, with its runtime environment, native or VM.
  2. A way of routing requests (hopefully with a RESTful pattern matching approach).
  3. Automatic unmarshaling of incoming data into data structures native to the programming language. If you find yourself writing code that takes apart JSON “by hand”, run away.
  4. Similarly, automatic marshaling of ordinary data structures into JSON. If you see code which uses string concatenation to build JSON, it should either be to meet some specific needs for extra marshalling performance of a huge data structure, or shouldn’t be there at all.Database_icon_simple
  5. Analogous support for other data formats. Successful systems live a long time. If you create one, someone will want to talk to it in a situation where JSON isn’t a good fit. A few years from now, you might think of JSON the way we think of XML now. Therefore, stay away from tools which are too deeply married to JSON or any other single data format.
  6. If you’re using a relational database, your data server toolkit should make it quite easy to talk to that database. Depending on the complexity of the relationship between your data services and the underlying data store, either an object relational mapper (ORM) or perhaps a table/query mapper is suitable. If you find yourself working with the low-level database API to pluck fields out, you are looking at a long investment with little payoff.
  7. Good support for a wide variety of database types (relational and otherwise). This reduces the risks from future database support requirements.
  8. A reasonable error handling system. Things will go wrong. When they do, an appropriate response should flow back to the client code, while a fully detailed explanation should land in a log or somewhere else suitable – ideally without re-inventing this on each project or for every API entry point.
  9. Depending on application needs, some way of maintaining a persistent connection (SSE, websocket, or fallback) to stream back changing information.
  10. A declarative way to specify security roles needed for subsets of your API (RESTful or otherwise).
  11. Monitoring / metrics.
  12. Scalability.
  13. Efficiency, so you are less likely to need to scale, and so that if you must scale, the cost isn’t awful.
  14. Rapid development supported by good tooling. Edit-compile-run cycles of a few seconds.
  15. A pony.

Is That All?

This is quite a checklist; but a toolset lacking these things means that a successful, growing project will probably need to reinvent many of them – shop carefully. In later posts, I’ll write more about particular technology stacks.

 

Taking CSS Seriously

At Oasis Digital, we have spent much of our effort over the last several years creating complex “single page” web applications. There is much to say about that, but today I’m writing about one specific sliver: styling the application pages with CSS. To do good work at scale when using CSS to style an application (versus a one-off “webpage”), the only path to success is to take CSS seriously as a language, and study how to use it in an idiomatic, semantic, maintainable way.

Unfortunately, thinking about CSS in this way is considered far into “advanced” CSS territory, and these topics received almost no attention from the countless online and off-line resources to learn CSS.

What does it mean to take CSS seriously? Briefly, it means learning the technology and patterns of use in depth, by studying what others have done and thinking about why and how to solve problems.

Idiomatic CSS

CSS written by experts tends to follow many idioms. These are patterns that have been found useful again and again: a consistent order of selectors, consistent use of white space and other formatting, and so on. There is a popularly cited online resource explaining some of the most common idioms, and A List Apart (which you should probably read extensively) has a busy topic area around CSS.

Robust CSS

css-is-awesomeDo you always use the same browser, with your window the same size, with the same settings? Then your CSS is probably not robust at all. It is quite easy to accidentally style in such a way that the slightest disruption in the layout causes unexpected unpleasant results.

The way to robustness is exposure to ongoing change. Use multiple browsers, and switch often. Adjust your font size every day up or down, for a good reason or no reason. Change the width and height of your browser window, don’t just always leave it maximized at whatever very common screen size you happen to use. Do you work on a PC? Try a Mac sometimes. You work on a Mac? Your CSS-styled pages probably change in some minor but irritating way if you haven’t looked on a PC.

Good CSS is robust. It is specified sufficiently but not over-specified. A particular anti-pattern to avoid: layout some elements; observe their width on your particular browser and settings; set the width of an element that is supposed to contain them to a hard-coded number based on that single observed width; then watch what happens when some minor difference in font or other matter makes something a little bit wider than you expected.

Appropriate CSS

A hammer is a great tool, but not every problem is a nail. Grid systems are wonderful, but not for every element on every page. To take CSS seriously, we must learn when and where to use grid systems, ad hoc floats, that shiny new flexbox, and even an old-fashioned table.

Layered CSS

Many projects today start with a CSS framework like Bootstrap or Foundation. Working in this context requires a keen awareness of how your CSS interacts with that provided by the framework. It is common to see CSS which randomly and arbitrarily overrides rules set by such a framework, with no regard for what sense those framework provided rules made. The typical result: layer upon layer of overrides, trying to fix a resulting problem by adding layer upon layer of of more overrides.

The key to winning this battle of layers is to stop fighting. To use the delete key extensively, trimming away excess CSS to fix problems rather than adding more. Adjust variables provided by your framework, instead of ad hoc overwriting its calculated class attributes. Understand exactly what layers are needed and why.

Semantic CSS

“Semantic” means “pertaining to the meanings of words”. But the problem many of us have around semantics isn’t so much of wrong meaning, but of applying the wrong names to the right meaning.

It seems everyone is taught, on their CSS journey, about the evil of the in-line style attribute. As a result, we see in the wild many CSS classes like this:

.float-right { float: right; }

Thus allowing the CSS user to type class=”float-right” instead of style=”float: right;”.

This of course misses the point of the admonition against in-line style completely. It is not the literal use of the style attribute that is the problem, it is that the idea behind CSS is to mark up content with classes which say something about what the content is, then use CSS separately to apply a visual layout and so on.

If you can look at the name of a CSS class and know exactly the style settings it contains, it is probably not a very good name. But if you can look at a piece of content, and tell what CSS class you should apply based on what kind of content it is, you probably have a very good name.

Did I mention, don’t actually write CSS itself?

CSS is lacking critical facilities for abstraction and removal of duplication. There are persuasive arguments floating around that CSS is too broken to ever be fixed; and I would not argue against that. But given that we are mostly stuck with CSS for many types of applications, it is necessary to use a layer on top of CSS. The usual contenders are Sass and LESS. This means that all of these goals mostly apply to the Sass or LESS you write, rather than to the CSS generated from Sass or LESS.

People who have studied both usually conclude that Sass is a better choice than LESS, and indeed the former is what we most often use.

(A helpful tip: if you are using a CSS framework like Bootstrap or Foundation, use a version of those which is supplied using whichever language about CSS you have chose. For example, if you use Sass, use the Bootstrap Sass version – don’t use the normal Bootstrap LESS or the bare Bootstrap CSS files!)

Maintainable CSS

The net result of all of the above is maintainable CSS. CSS which you can keep adding to, in an incremental way, as the application you are styling continues to grow and improve. CSS which you or someone else can understand a year later. CSS which you can be proud of when someone looks under the hood.

Balanced CSS

CSS is not ideal; it has gradually accumulated features since the emergence of the web and therefore has legacy concerns, among other problems. The CSS to solve any particular problem might not be able to meet all of these design qualities at the same time. Therefore, good quality CSS strikes a balance: semantic enough, robust enough, idiomatic enough, and so on.

Rapidly Written CSS

Some of the ideas here sound like they could take a long time to code – but good CSS is faster to complete – bad CSS burns up far more hours than good, in the quest to create a finished system.

Of course, mastering tools can take a long time. The payoff is that a master usually creates code (CSS or otherwise) with high “first time quality”.

</rant>

At Oasis Digital, we are not perfect. We do not yet do all of these things perfectly all the time; there is sometimes a tradeoff between delivery speed and polish. But we do take CSS seriously, and we work hard to move in the right direction along all these axes.

 

Europe on a Chromebook

Much has been and will continue to be made of the viability of Chromebooks as a primary computing device. Microsoft launches direct attacks, inadvertently validating the platform. I see posts often lamenting the lack of gaming support. I judge computing devices by how well the device enables me to do what I need to. It is a functional decision. I have been using a Chromebook as my primary computing device for close to two years now. This last month in Europe was the first time I ventured beyond reach of either a PC or Mac. I have not used them much over the last two years but I have used them.

DSC_0207I posted information on the kit I took to Europe here (https://plus.google.com/u/0/+MichaelMcNeil/posts/2Lu3ifNWVn8?pid=6038321522472785250&oid=114761459049572366004)

The Chromebook was the ARM based Samsung CB2 13” with a 1920×1080 screen and 4GB of RAM. My wife also brought her phone and our Dell 11” Chromebook. The Dell has a speedy Haswell CPU, and 2GB of RAM. These are really 2 quite different devices that many would like to mash together. The Samsung has more memory and a much higher resolution screen, it is also more svelte and lighter than the Dell. The Dell is made of nice soft touch materials and has the fast Intel processor. Battery life on the two is roughly equal, both very very good.

europe-mapEven though this was a vacation, there was significant work that needed to be done each week for our business. I run a custom software company, Oasis Digital Solutions, and my wife is the controller. Customers still need to be responded to, software releases need to go out, new contracts need to be signed, projects cannot be ignored, employees still like to be paid and we still need to bill each week. These are pretty heady computing tasks. Here are a subset of the computing processes we used regularly just for business:

  1. Editing and creating large docs
  2. Manipulating large spreadsheets
  3. Editing PDFs with Electronic Signature
  4. Online Chats
  5. Screenshares
  6. Video Chats
  7. Email, Browsing

To support our trip we had some significant computing needs as well. I used the Sony lens camera and my phone camera to take nearly 2000 pictures and videos. About 16GB worth. I am a believer in backups so each day I would transfer files off of the micro SD cards to another storage device we carefully stored away. I also backed them all up to Google services which are backed up by Spanning Backup. My wife journaled on the Chromebook each day as we went. We knew we were seeing more than we could possibly remember. We would like to share our trip with family and friends. We also used Google Maps heavily and planned our days using the Chromebooks.

The performance of the Chromebooks can be viewed on a couple of axes. First, there is performance. My metric is different than most, I watched to see which Chromebook we tended to use more. The online and offline performance is also important. Many of the times we had opportunity to use the CBs were on trains without internet access. They can also be judged in terms of storage space and battery life. Here are our conclusions:

Performance

By the fourth day of the trip we both preferred to use the Samsung. The extra screen space and memory won the day. I am more firmly convinced than ever than an ARM processor is ok and 4GB of memory is a minimum. The Dell is an excellent device but is struggles with many complex pages open and the memory disappears quickly in the latest versions of Chrome OS. When we streamed an HD movie in Dusseldorf we used the Samsung without problem. When we had Hangouts with our daughter and grandchild from St. Louis, we used the Samsung. The one exception was when my wife was working on a bunch of spreadsheets, so I used the Dell.

I did start getting into the habit of shutting down the Samsung instead of closing the lid. There is some sort of memory leak going on in the latest OS releases that I am not pleased about. Fortunately it takes only a few seconds more to boot instead of un-suspend. I expect they will fix this problem soon, as it seems to be affecting all of my Chrome devices.

Overall we found the performance of the CBs to be fantastic. We never hit a spot where we could not do what we needed in a timely fashion. This made the trip much better.

Offline Use

We did not have internet at all times. In fact we used the CBs pretty extensively in an offline mode. Most of this was content creation and manipulation. For example we would write documents, create spreadsheets, and edit photos. We also used the opportunity to review documents we had stored locally intentionally before boarding a train. The process was quite painless.

The camera I brought was a Sony DSCQX100 lens camera. I used it held in my hand with the phone as a viewfinder. Because the camera was round I ended up with an inadvertent slight tilt to many of my photos. This meant a lot more photos needed to be rotated than normal. I found the tools on my Android phone to be faster than the process on the CB. The tools are there but getting to them from the file manager is not as seamless as it could be. With that said the process of moving the files back and forth was simple because I have a USB stick with a micro USB connector. It works really well with smartphones.

Storage and Battery Life

I expected this trip to be the point I would finally start to get irritated by 16GB of storage on a typical CB. I simply was not. I downloaded a movie to watch offline, I moved photos around, I stored piles of documents for offline use, all without a hitch. Because the model is to store in the cloud and use locally, there is not a build up of little used files on the device. I have rarely found myself creating new folders locally. The files I need I keep in a pile, they sync up and when I am done with them I delete them locally. Storing too much locally defeats the backup strategy, also, so there is not a drive to keep things (pun intended).

Battery life was simply fantastic. I never once through the trip found myself watching my battery or working to conserve. These devices can go and go and go. We would go days without charging them when we were only sporadically using them. On heavy use days we would simply charge overnight. Any time we went out we did not take a power supply with us, it was simply not needed.

Conclusion

PICT_20140825_192211This trip confirmed to me that I no longer need a PC at home. I removed my last one from my entertainment center last night. Its function as a media center PC was replaced by a $35 Chromecast last year. I will still keep a Mac around at the office, but it is not critical either. I will say that I am tired of TN displays. Once manufacturers get rid of all of these old netbook parts lying around and get to real business we will all be better off. The Samsung is a huge winner with an IPS display. I say that because I came back to write this article and others on my Pixel. The Samsung is a fine device and there are none better for traveling, but when I am sitting at home or the office, I want a nice display. Visuals are important.

Chrome OS has successfully defied its detractors. It is a robust OS with capabilities users need in 2014. It is fast, efficient, and most of all, reliable. Users can bounce from machine to machine with ease, your entire portfolio of apps will be available in minutes from the first login. There is not another OS that can boast that feature. I still think the biggest advantage of Chrome OS is a little harder to see at first. When a user buys a Chromebook they are getting a machine that will increase in functionality and speed over time. In any other ecosystem the device slows dramatically over the years.

I am really excited to see where the platform goes over the next year.

Bits are Free, People are Valuable

A few days ago, I caught myself thinking about whether to save some images and video; whether the likely future value of those megabytes would be greater or lesser than the cost of storage. This is a sort of thought that was important and valuable… a couple of decades ago.

Bits are Free

Today, and at least for the last decade, bits are so absurdly cheap that they can be considered free, compared to the time and energy of people. Storing gigabytes or terabytes because they might come in handy is not just for government agencies, it makes sense for all of us in our daily work.

Waste bits to save time.

Waste bits to help people.

People matter, bits are free.

Bits are Free at Work

Here are some ways I waste bits at work:

  • We often gather a few people working on project to meet or code together; it is very easy to start a video or screen video recording of the work. That recording can then be shared with anyone on the project who wasn’t present.
  • We record screenshots or videos of the future in progress, and send it to a customer. Yes, we could wait and present to them “live” using WebEx or whatever. But it is cheaper to waste the bits and conserve human coordination effort.
  • If I have something complex to explain to someone, I can do it in person, and I can do it on the phone, and I can write lots of text. But if I already know them well enough to partly anticipate their questions, I will start a video recording and explain something using voice and white board. The bits are cheaper than the coordination to work “live”. The bits are cheaper than asking them to figure it out themselves.
  • Driving down the road, it is unsafe to text, or read, or write, or (I am looking at you, morning commuters…) apply makeup. But while the numbers are unclear, we have a broad assumption that merely talking with someone while driving down the road is OK. I sometimes make use of traffic time, and burn some bits, by recording audio about some problem to be solved or other matter. The bits are free, who cares if this uses 1000x as much data as sending an email?

Wasting bits can grow somewhat extreme. In the first example above, I described a screen video of developers working together, recorded for the benefit from other developers. You might imagine this as a high-ceremony process, done on important occasions about important code. But bits are free – so we sometimes record such video even if no developer will ever pay attention to it – the value is there even if just one developer maybe lets it play in the background while they work on something else – much like by working in the same room as other people, it is common to pick up some important bit in the background. If one developer learns one small thing to make their work better, that is more valuable than 400 MB of video storage space.

Bits are freeBits are Free at Home

Here are some ways I waste bits at home:

  • When I take photographs, I take a lot of photographs. One might come in handy. Who cares if 95% of them are bad and 90% of them are useless?
  • Why do cameras have settings other than maximum resolution? Bits are free.
  • Nearly 100% of paperwork I get in the mail, other than marketing, I scan, OCR, and keep in a searchable archive. The disk space for this costs almost nothing. The time saved deciding whether to keep each item, and how to file each item, is irreplaceable. I probably only ever look at 10% of what is scanned, but who cares?
  • If my kids are doing something even vaguely interesting, I try hard to remember to take photos and record video. Looking back at when they were very young, snippets of video we have (from before every phone had a decent video camera) are priceless. I can’t reach back and record more of those, but I can easily record things now that might be fun in the future. Who cares if 95% of that video no-one ever looks at? If I ever need to go through it, I can do it then. The storage space in the meantime doesn’t matter.
  • If I need to look at a model number, serial number, etc. of anything around the house, I snap a photo of it. Then I can look back at the photo anytime from anywhere. Yes, it is absurd to store 3,000,000,000 bytes of JPG rather than 20 bytes of serial number. But they both round to zero.

How Free Can Bits Get?

I expect this tradeoff will shift even more exponentially in the future. In a couple of decades, perhaps:

  • We will record 5 petabyte ultra beyond-HD holographic recordings of insignificant activities just in case someone wants to watch them.
  • We will run video and audio recording of our lives 24 x 7, to be indexed just in case anyone ever wants to look back at it.
  • Future cameras won’t even come with an on-off switch, and will instead record continuously for the lifetime of the camera.

 

Has Google Crossed Over?

In the life of corporations, especially technology companies, there appears to be a tipping point where they cross the line and begin to bleed their customers at a greater rate than they provide new value. A couple of good examples are Apple, Cisco, and Microsoft. Earlier examples are IBM, Digital, and Wang.

microsoft-windows-xp-logoWhen Microsoft rolled out XP they demolished the competition and dominated almost the entire PC market. Once they felt the battle was won, they almost completely stopped innovating and providing value. There was little offered to bolster XP over the coming years and the market moved away from them. Microsoft’s focus in these years was building their bottom line, especially through licensing. Prior to XP licensing was important, they had to make money, but innovative value lead the way. We can clearly look back today and see the missteps they made in mobile, tablets, and netbooks.

smarnetCisco is an even clearer case. They built their company with strong marketing and strong value. Part of the value they created was through their maintenance programs (SMARTNet) on their products. This service cost money and was built into every sale providing rapid updates and support for all sizes of customers. Over time they became obsessed with these fees, increased them year after year, held customers hostage, and relegated any “uncovered” products useless. They had almost completely eliminated any real competition in the networking space but opened the door when they stopped taking care of the customer first. Once profits came first customers started leaving them and continue to do so at a strong pace.

apple_logo_rainbow_6_color-260x300Apple is a unique company in that they have actually gone through this cycle twice! In the 1990s they were on fire and poised to take over the PC space. Their operating system was polished and feature rich and their hardware was very good. Their arrogance in thinking that only they were capable of making decent hardware eventually opened the door for Microsoft. They fell so low that Microsoft invested heavily in them to prop them up and avoid Apple disappearing. What eventually happened is a literal repeat of history. They are riding high but clearly their view that they have to completely control hardware opened the door for Android and Google. It will be interesting to see how far they fall this time.

dr-seuss-google-logo-300x123Now we finally get to the question of Google. Google has built itself by providing very functional tools and applications for almost no cost to build a user base. This has worked so well they are now tops in mobile, tablets, and rising fast in the PC market with Chromebooks. This last few months a shift appears to have occurred and it was right in my face this last week in London. Google has started to show me results that benefit them and do not necessarily relate to my needs at all.

Anyone who has driven in London knows that there are good routes and awful routes, not much in between. I have been using Google Maps navigation since its inception eventually eschewing dedicated GPS devices for my phone or tablet. This has worked consistently and wonderfully. In London Google consistently wanted to route me past advertisers, sometimes adding as much as an hour to my route. This happened consistently every day. After we gained familiarity with the city we were able to intercept this silliness and avoid it, but it was costly the first couple of days.

Dead End Trail In Badland National Park South DakotaOne of the best examples was when we were near Hyde Park. We needed to navigate back to our cottage in Flaunden from that side of the busy shopping district. There was a very clear path that led straight away from the immense congestion and towards Hemel Hempstead but Google kept trying to re-route us past Harrod’s and Selfridge’s and Madame Tussaud’s through a couple of miles of deadlocked tour buses, commuter buses and taxis. The “recommended route” more than doubled our trip time and would have placed us in much more dangerous traffic. There is an interesting liability here as well. The navigation app would literally override our route selection to put us back on a stressful and slow path past advertisers. It is hard to communicate how horrible this was, and if we had not been educated we could have been in a very bad situation–including missing a flight when our nav route suddenly changed from around the city center to right through the business district. Google was certainly making our trip harder, not easier.

We have also begun to see search results that are more advertiser-driven  or politically-filtered, but that is a little harder to prove. I believe Google might have just tipped over a line that they will look back and regret. The way to stay on top is to provide value. Be so consistent that your customers do not even think twice about using your products vs. the competition. We will see if I am correct but we may look at 2014 and 2015 as the years Google started to decline. I am writing this on a Google Chromebook, using Google Docs offline. I will update this by hotspotting with my Android phone later. I am firmly into the Google ecosystem but it appears they have gotten a little fat and complacent. Starting to look for the next big wave.

 

Google’s Go language

Google’s Go language (“golang”) was first released in early form in 2009, and reached 1.0 in 2012. Go has matured quite quickly compared to many other new languages. We find several aspects of Go appealing:

  • Go is a pragmatic language, with features chosen to ease and speed development of substantial projects.
  • Go uniquely combines a rapid cycle “scripting” language feel with a robust static compilation process.
  • Go’s compiler generates statically linked binaries; this is very “old-school” in 2015, but static compilation trades off disk space (which is cheap) for simplicity and reliability in production (which is valuable).
  • It is suitable for both small and large teams, although our work so far as been small.
  • Go has good support for concurrency, well-suited to software that scales up to run on many core machines.
  • Go has proven relatively easy to learn, for developers coming from a wide variety of backgrounds.
  • Go has a good standard library.
  • Go can target multiple platforms, yet does not use a separately installed runtime.

Go Development at Oasis Digital

Oasis Digital has made use of Go for various small systems, including:

  • Experimental programs
  • Development by interns in our intern program
  • Utility software, test-stub software
  • Minor customer work

We recommend considering Go for certain types of projects:

  • Small, standalone software for which static compilation will ease deployment and support.
  • Data services behind front-end web systems, suitable for local or cloud deployment.
  • Applications where the Go concurrency model (“CSP”) is especially appropriate.

Localization in AngularJS

At the St. Louis Angular Lunch this month (which we sponsor), Mark Volkmann of OCI gave a talk on localization. In his talk he addresses how to setup AngularJS services and filters to determine which rules to apply for i18n and l10n runtime support. AngularJS includes good i18n support, probably because of extensive use inside Google across their global operations.

Video below:

 

Transcript

Here is the talk, transcribed to text. This is a lightly edited, draft transcription, so any errors are probably from that process.

Continue reading Localization in AngularJS

Samsung Chromebook 2 11 and HP 11, Better Than The Dell?

Last week I contrasted the Samsung CB2 13” with my stable of Chromebooks and my Chromebox. I purchased a couple of additional Chromebooks for our Intern Hackathon prizes. I took the opportunity to try the units and get some impressions fresh off of the other review. I think this allowed me to quickly and efficiently evaluate the units.

DSC00091The prizes I purchased were the HP 11 and a Samsung CB2 11”. Regarding the HP, I assumed that because I was 6 months removed from the original HP, and the unit was being restocked, that this would be considered the “Revised” HP 11. It turns out there is a new version coming soon that most people have tagged with that moniker and the current model is considered the original.  With that in mind, let’s first compare the two Samsung models.

Samsung Chromebook2 11 vs. 13

Chassis

Materials are simply much better on the 11 with a couple of exceptions. The lid is soft touch plastic, the rest of the chassis is just a little nicer. The 11 just looks better. The material used on the touchpad is the primary enhancement for the 13. The gray of the 13 is unappealing while the black of the 11 looks really rich and sharp. As stated in the last review, it seems counter-intuitive that the smaller, less-expensive unit would have superior construction, but that is the case here.

Screen

The 11 is not as bright as the 13, and the color temp of the panel is a lot warmer. The viewing angles are similar(possibly slightly better on the 11). The panel on the 11 is nice for its size, but when using 1366×768 vs. 1920×1080, resolution is the clear winner. Windows are not usable side by side on the 11 like they are on the 13.

Keyboard, Touchpad

In comparison to the touchpad on the 13, the 11 feels a little irritating. The touchpad on the 13 is smooth like glass, but it is not cool to the touch. The layout of the two keyboards are almost identical, but the pressure and depth of movement required is superior on the 13. Touch-typing is the automatic experience it should be, not a process that requires corrections and attention.

Can the HP and Samsung 11 compare with the Dell 11?

Chassis

I keep having iMac flashbacks to the 1990s looking at the HP. Did they hire a designer from that old team? This sure feels like one of the old clamshells from Apple. The HP chassis is different from most others, and depending on your preference you will likely either love or hate it. The HP and the Samsung are distinctly thinner and lighter than the Dell, which is a clear advantage. That said, the Dell is still better made in my opinion. The materials Dell uses are top notch for this price point, I am still amazed with the soft touch plastic around the keyboard.

I do like some of the extra design touches on the HP. As a Pixel owner, I appreciate the LED strip on the lid of the HP. I am disappointed other manufacturers have not taken this up as a “standard” feature. It seems to me it could be quite useful for notification, customization, and entertainment purposes.  The color around the keyboard is fun. I never really mind a little whimsy on the inside of my devices, just keep the outside clean. I also love the use of micro usb for charging. This is a fantastic idea and I really wish more manufacturers would give this a try. Overnight charging with the rest of my devices on a multi USB station would be a wonderful change from toting a proprietary brick around.

Chassis quality is distinctly different between all three units. Samsung is attempting to be sophisticated while HP is well, HPish. I have a clear preference for the Dell first, the Samsung second, and the HP third.

Screens and Audio

DSC00086 editedThis HP still comes with an IPS panel despite the rumors otherwise (this may change in the near future but to my knowledge has not yet). I would not be shocked if a TN panel started shipping but it certainly was not in the model I received last week. With that in mind, you will not be surprised to find the the HP has the best screen of the group. Colors, brightness and viewing angles are all better than any Chromebook I have used except the Pixel.

I will say that I like the design of the hinge on the Dell better than the others. The screen sits higher and that is simply more comfortable when typing. The HP sits extremely low. This allows the unit to be smaller, but is less than ideal for heavy typing ergonomics. The Samsung is a step better but not as nice as the Dell.

The HP is also dull in the audio department. The Samsung is markedly better than that, but the Dell is again the clear winner. Movie trailers were far deeper and louder. There was no buzzing in the unit even at full volume. The Samsung is still quite good but I would suggest the HP would simply not work in a moderately loud environment and is only suited for use by a couple of people. The Dell, in contrast, will fill out a small room nicely if watching a movie, listening to music, or participating in a Hangout.

Keyboard, Touchpad

I would not be surprised to find that HP and Dell used the exact same touchpad. They are not quite as nice as the Samsung CB2 11 but quite acceptable. It is very interesting to me that I can easily tell that the pad on the CB2 13 is a step above the CB2 11 which is a step above the Dell and HP.

The Dell keyboard is the clear winner here. The others are good but feel a little cheap next to the Dell. The keyboard is also less audibly “clicky” on the Dell than the Samsung, while the HP feels dull and more like it knows it will break soon.

There is not a lot of debate in my mind on the input devices. I use touchpads and island style keyboards on all of my devices. The long-term usability of a particular piece of hardware is obvious in a few minutes.

Performance

The Dell is the fastest machine. As mentioned in my previous review, the CB2 is not obviously slower unless you are using the machines side by side. The HP11 is faster in daily use than the original Samsung ARM Chromebook but is clearly slower than the other two in this comparison.

I systematically opened the same 13 memory intensive sites on the three machines. I then went back and played HD trailers on all three machines. This really stressed them and I was pleased with the separation it provided me to evaluate the units. I was also able to determine that none of them run very hot under load but the HP did get a little warmer than the others.

As a secondary machine all of these will work just fine. For a daily driver I would have to eliminate the HP, the processor is too weak for 2014. I can excuse the first gen Sammy for being a bit slow after years of production, but no excuse for a brand new device.

I am undecided as to the real risk of choosing the HP11 or even the original Samsung ARM CB. On one hand, Chrome has improved its efficiency dramatically this last year and the gains are obvious on such a device. On the other hand, Android apps are coming to CBs and it seems that many of those will tax the processors extensively, especially the games. It is possible that a year from now we will all be wishing for higher powered cpus, but we might not be. I am curious to see where this all goes.

Octane Scores

All done in guest mode on a clean boot with the same version of Chrome 35.0.1916.155

Samsung CB2 11  6620

HP 11 5955

Dell 11  11047

Conclusion

PICT_20140614_101711As I stated previously, the Dell has been my favorite small chromebook by a large margin. If I did not have the 13” CB2 I would very likely begin to use the 11” CB2 a lot more. It has a nice feel and an especially svelte form factor that is appealing. The Dell still has the better keyboard, better cpu, better battery life, better build quality. For now it is still the winning combination for me…

..as long as I do not have the 13” CB2, that has become my go-to machine and the best Chromebook for the dollar.

My ultimate conclusion is the the 11’ chromebooks are, as a group, a toy to me now. They remind me of a 7” tablet. They are good to use, very functional, but never my first choice. The 13’ with a 1920×1080 screen I predict will be the sweet spot for CBs just like they are for laptops. Perfect resolution for multitasking, lightweight, slim, and less than $400, that is a sweet package.

How Does Samsungs Chromebook 2 13″ Really Work?

When a product category has matured to the point of multiple good offerings from many manufacturers, comparing devices gets more difficult but more fun. Last year I was contrasting the Pixel to the original Samsung Chromebook and the Lenovo 131e, not exactly a fair fight. Sort of like Germany playing Portugal in the World Cup or the Cardinals playing the Cubs about anytime in the 20th century.

But this year is radically different. There are very good Chromebooks from many manufacturers. The amazing thing is they all work relatively well. There are only a few bad eggs in the batch and these are easily spotted. First they will have a spinning disc instead of an SSD, immediately rule them out as illegitimate children of a company that still listens to Microsoft. These are cloud computing devices. If you don’t want to be in the cloud don’t buy one.

So enough of the obnoxious comments.

The Final Question?

PICT_20140614_100952When I got to the end of the time where I was working with the units and needing to write the review, which one would I pick up to do it with? I wrote the review sitting outside in my yard under the trees, so screen was important. Battery life was important because I would need the screen turned up and I am sometimes a little verbose. The keyboard was important because I was typing a long article. This became a very important question, and one which helped answer the Title question of this article. Skip to end if you want to know the result.

Side note: A convertible ’60s GTO and a ’40s Chevy hill climber just drove by. I love working outside.

The Processors

Let’s address the elephant in the room straight away. The Dell and the Pixel both have Intel processors. The Samsung has an ARM processor. I will summarize for you. The ARM processor is a little slower in real life. When using the units side by side the Samsung feels a millisecond slower in general use and some pages take an extra second to load. When used on its own, it does not feel slow, and I never hesitated to immediately use Tab Cloud and open my 20 tabs I start every computing session with.

To put it in perspective I will list the main applications I use daily:

  • Google Docs (spreadsheets, docs, forms)
  • Google Drive (personal and business)
  • Gmail (email)
  • Hangouts (video, audio, screenshare, and chat)
  • GApps Administration
  • Atlassian JIRA (project management)
  • BitBucket (repositories)
  • Cloud9 IDE
  • BeeBole (time tracking)
  • QuickBooks Online (accounting)
  • G+ (business and personal)
  • Pixlr photo editor
  • YouTube (video editing, managing our channel)
  • Netflix
  • Facebook
  • Twitter
  • Klout

Another side note: a restored ’65 Chevy Impala with a hopped up engine just drove by. Did I already say I love working outside?

All of these applications work flawlessly on the ARM processor in the Chromebook 2. It is very true that this was not the case in the original Chromebook. You really needed to limit yourself to a few tabs and even then it could bog down. I think the combination of 4GB of RAM and a more powerful generation of processors make the difference.

Yes, it is possible to get the unit in a slow arduous state if you have the right combination of background processes going. You can see videos on YouTube if you want. Yes, it did happen to me once. There is a quick, easy, solution. Because it is a CB you can reboot in 10 sec and reopen all the tabs you were using, easy peasy.

A Rant on Benchmarks

I am specifically defending the ARM processor here because it works for the applications I use every day. Obviously there are many in the computing industry that live for benchmarks. As an electrical engineer with decades of experience (my first computer was an Atari 400), benchmarks are useful for comparing similar devices. A good example is smartphones based on the same chipset or incremental generations of the same chipset. Benchmarks are not good for comparing differing platforms.

PICT_20140614_101711Using the Octane benchmark to compare the Samsung Chromebook 2 with Intel Chromebooks is silly. It is like comparing the power numbers on an automobile with the power numbers of a truck. It simply does not tell you anything you cannot know on your own. An Intel processor is going to benchmark faster than an ARM processor. Real life use is what matters when you are comparing devices built in different ways but intended for a similar purpose. It is a many-faceted analysis that is more abstract and takes real work to put into a usable form.

Octane 2.0 Scores

All of these were done with all users signed out, the machine restarted and in guest mode. They are all running the same version of Chrome 35.0.1916.155.

Samsung Chromebook 2 13” 6994
Samsung Chromebook 2 11” 6600
Dell Chromebook 11 11047
Samsung Chromebook 6856
Acer C720 11177
Lenovo 131e 9722
Google Chromebook Pixel 19017
ASUS Chromebox 11199

In real world use the Dell, Pixel and Chromebox are indiscernible in terms of performance. This alone causes me to question the viability of the benchmarks, the range is 8000 points! This is more than the CB2 scored altogether. It is interesting to me that the latest builds of Chrome have equalized their daily performance. Previously I could see a difference and now I cannot, even when I am trying to discern one.

The Chromebook 2 looks pretty pitiful here but in reality it is barely a notch below the others. It is slightly faster in real use than the Lenovo. It does feel a step slow when contrasted directly to the fastest Chromebooks but it is a joy to use. It is also very obvious that the Chromebook 2 is a lot faster than the original yet the scores are almost identical.

Simply put when looking at everyday life, this benchmark, in this situation, is bogus. Yes, there are times when the data is valuable and I use it, too. But benchmarks are greatly misused and have become a marketing tool instead of a measurement tool. The Chromebook 2 Octane score is not indicative of the real user experience.

Impressive, Uniquely Chromebook

I have made this point before, Chromebooks get better with age. The Samsung Chromebook is still a viable machine (my adult daughter loves it for a daily driver) and is faster today than when it was new. My Pixel was one of the first shipped and is much faster today than it was when new. This is so different from the PC and Mac experience that most people have a hard time believing it. It is true, unlike your typical computer that will steadily get slower with age a Chromebook does not. Whatever Chromebook you buy will improve over time. This is a nice feature and not focused on enough in the media.

Screens

I use my device for most of my working day. Screen real estate is king when you multitask. Even when I am mobile I will jump between windows and chats constantly. I need to have things side by side even in a coffee shop. This is simply not possible on a 1366×768 screen. These devices are suitable for single window use only. Within the first day I knew if the processor would hold up that I would be switching from the Dell to the Sammy for mobile use.

The screen is not as good as the Pixel. I am utterly spoiled with the experience on the Pixel so colors seem a little washed out at times on the Samsung. For the price the screen is very nice and I am using it outside right now with the screen half in the shadow of a tree and partially in the sun. It is very usable at full brightness and reflections on the screen are less (better) than the Pixel.

Chassis, Keyboard, Trackpad

In the chassis department the Dell wins easily. Although the Pixel is incredibly well made, it is also really heavy. The Dell feels solid yet light to handle. The materials are well-chosen. The plastic does not feel cheap and scratchy like the Samsung and it does not feel overly industrial like the Lenovo. It just feels right. It also does not have a somewhat ridiculous fake stitched vinyl top, ugh.

The keyboards are all very usable. The Pixel is obviously the benchmark and the best. It is backlit, the use of it is so natural you actually want to type. The Dell feels a little cramped at times but is the best I have used on an 11” device. The Samsung is really good and approaches the Pixel in quality. I wish it had a backlit keyboard but you cannot have everything for $400.

The trackpad actually goes to the Samsung. The Pixel unit is really really good and the glass surface feels incredibly smooth but it can actually be too slick at times. The Samsung feels just right in all situations. The click on the Samsung is not as obnoxious as the Pixel either. Clicking around on the Pixel late at night results in nasty looks from my wife, definitely a negative…

Conclusion

When I went to actually write this I picked up the Chromebook 2 and I never regretted doing so for the morning I spent writing this. These factors were important while writing this in the lovely outdoors on a beautiful day:

Screen

The screen is not awesome like the Pixel but it is superior to the other CBs that I have. 1920×1080 simply matters for everyday work. I can easily see my writing full page width on half the screen and use the other half for reference. I cannot do that on the Dell. As much as I love the Dell this kills it for me.

Battery

The Pixel could likely get through this article but I simply do not like watching the battery level. It is a distraction that does affect writing. I could get an extension cord but that would be stupid. The battery in the Dell is almost as good so it would certainly have worked from that angle.

Keyboard

The keyboard is really quite excellent on the CB 2. It is not the same quality as the Pixel but is a slightly better than the other Chromebooks I have used. The keys are properly spaced and touch-typing is natural, very few distractions.

Speed

This is the big issue. Can an ARM processor really work for what I do? The answer is simply yes. If I have 20 tabs open it feels a step slow when directly compared keystroke for keystroke with the Intel CBs I am comparing it with. BUT, when by itself you do not notice it at all. The processor is simply not an issue for me.

Gripes regarding the Chromebook 2

PICT_20140616_160844Power supply: I really liked the approach HP took on the 11 Chromebook, using the common micro- USB charging connection. It seems that the extra charging time is worth having a more universal adapter that will work with your smartphone and Chromebook. I hate carrying a device-specific brick while traveling. The Samsung power supply is awkwardly shaped and takes twice the space the Pixel power supply does. In the photo can see how neat and small the Pixel power supply is compared to the Samsung, pretty obvious opportunity for improvement.

Materials: Samsung, if you are going to stay married to plastic, please start caring about the experience. The feel could be better, it sounds like a piece of junk when typing on a hard table. Please get your act together and steal some ideas from Dell. When I use the unit on a soft surface (my lap, ottoman) if feels much better than on a hard table. This is not really that important, I just found it interesting.

The Chromebook 2 11″ actually uses better materials. The lid is covered with a soft touch plastic more like the Dell. I find it odd that they would use lesser materials on the more expensive machine. I am guessing they are trying to control the cost of the device since the screen is more expensive.

Other: Not having a charge indicator on the outside of the device is simply silly. When I charge my Chromebooks I close the lid to keep dust out. I should not have to open the unit to see if it is charged.

Recommendation

If your Chromebook is going to be your only computing device, and you want to do more than casual computing, then I would get a Pixel or wait for a FHD Intel unit.

If you have a desktop, Chromebox, Mac, or a Windows laptop still in your arsenal then I would recommend the CB2 over all the others. There are rare times you might want more power but the unit is simply awesome as a mobile computing device.

I believe the Dell is probably the best solution for Education. The extra power of the Intel processor is likely going to come into play for some applications. Since most education environments are single focus I do not expect the screen resolution to be an enormous handicap. Schools seem to function quite well at the standard resolution that is readily available.

Even after my window I still find myself using the CB2 over the Pixel. It is light, handles all my work and the battery last longer than I need it to. When I go to Europe for a month later this year I will be taking the CB2. It simply works and is the best tool for the job. If it gets stolen or broken I simply replace it without shedding a tear. If that happens with the Pixel it is a different story. I had previously intended to take the Dell but I was struggling with the limited screen. With the CB2 I expect to be fully functional on my trip and not miss a beat, what else can I ask for?

Using GulpJS

I recently gave a talk at the St. Louis Angular Lunch on GulpJS. While not directly related to Angular, GulpJS is a great utility to have while working on frontend development, and it very popular among Angular developers. This talk explains the basic usage of Gulp and provides some minor comparisons to its largest competitor, Grunt.

Here is a video of the talk, from our YouTube channel.

Transcript

Here is the talk, transcribed to text. This is a lightly edited, draft transcription, so any errors are probably from that process.

Continue reading Using GulpJS

Advanced Directives in AngularJS

AngularJS directives have a wide array of uses, some more difficult to implement than others. Understanding how the link function, directive controllers, scopes, required, restrict all interact and how to implement them can be daunting. Bill Odom and Matt Follett recently gave a talk at the St. Louis Angular Lunch explaining in detail about advanced directives they have written.

Transcript

We have transcribed the talk about to text, provided below. This is a rough, first-draft transcription, so any errors are probably from that process.

Continue reading Advanced Directives in AngularJS