Despite what you may read, there is more than one right way to build software. Every client you work with will have a different process and a different culture. Often clients will bring in consultants to improve their software as well as their process, but many already have a process that works (well enough) for them. What if your client doesn’t use the Agile methodology and there isn’t a critical mass in the company to transition? Guess what? It’s not your client’s job to subscribe to your way of getting things done. You should always promote process improvements, but don’t let your preferences get in the way of solving the discrete problem you were hired to solve. Remember which problem you are tasked to solve.… Read more
Earlier this year I tagged along with one of our sales guys to ask potential clients what was keeping each of them up at night. I heard two recurring themes:
If you fall into camp #1 – check out this Silverlight Migration Strategies white paper here. Otherwise, keep reading…
Business/domain complexity is at the root of every enterprise software project. Mind exploding business and validation rules often result in code with seemingly infinite cyclomatic complexity scores, dependency graphs that make the most stoic architect weep, and code smells so strong you have to work remotely three days per week. What’s that, stakeholder? You need to create invoices using ten different calculation algorithms (with varying input), including various fluctuating currencies, distributed over three transports in one of four formats? And oh, next sprint will have two more calculation algorithms, each with a slightly different output? These types of rules are hard to document, much less turn into legible, maintainable, and testable code. There is no silver bullet for complexity, but following some best practices can help prevent a complex code base from turning into a big ball of mud.
The SOLID principles are a set of five guidelines that help make complex applications more maintainable and extendable over time. These principles are:
UPDATE: I recently published a WintellectNow course – Getting Started with Ember.js. You should also check out Jeremy Likness’ in depth series on Angular – Mastering AngularJS. Use promo code NSTIEGLITZ-13 for a free two week trial.
Last week, I published a blog post that shows how to build a reusable Star Rating Component using Ember.js. For this blog, I will share how to build the same functionality using a custom directive in Angular.js. I’m not the first person to write a star rating component in Angular.js; this post is more about comparing the bits needed in the respective frameworks.
There are more similarities than differences in the way you build reusable controls, but as you’ll see, there are some key differences. Below is a screenshot of a demo app which uses the Star Rating component.
At the highest level, Angular directives are reusable components used to manipulate the DOM. Angular comes with several built in directives like ngClick, ngRepeat, etc. It’s also pretty straight forward to write custom directives. A custom directives looks just like HTML; you can define a directive to be used as an element, attributes, CSS class, or less commonly, as a comment. For example, here is the ngClick directive (as an attribute):
<button ng-click="count = count + 1" ng-init="count=0">
Here is a an example of using a custom directive as an element:
Ember Components are “custom HTML elements that you can use to clean up repetitive templates or create reusable controls.” They simplify your templates by encapsulating functionality and introduce reusability that would otherwise not be possible.
If you’ve been reading about HTML5 Custom Elements, this concept should not be totally unfamiliar. It should however, sound awesome. Ember.js components are
future-proof future-resistant in that the Ember.js team is working with the W3C standards body to ensure an easy migration path to the HTML5 custom element.
If you’re brand new to Ember.js, check out Getting Started with Ember.js on WintellectNow (shameless plug – use promo code NSTIEGLITZ-13 for a free trial with Credit Card), and read the ever improving guides on Emberjs.com. Otherwise, read on to learn how to build an Ember Component.
In this blog, I’ll walk through building a star rating component and show you how to consume the component in a simple demo app. The demo app (source code linked below) allows users to rate movies, but the star rating component is generic enough that it can be used to rate anything (products, beer, etc). Below is a screenshot of the demo app. The gold star below each movie title is an instance of the star rating component.… Read more
UPDATE: I recently published a WintellectNow course (Getting Started with Breeze.js) that goes into more depth using Breeze in the context of an AngularJS app. Use code NSTIEGLITZ-13 for a free 2 week WintellectNow trial.
In future posts I will expand on the entire feature set. In this post, I’ll focus on the Rich “LINQ like” Querying.
Advanced querying is probably the most compelling case for BreezeJS. If you’re familiar with Entity Framework, querying in BreezeJS will feel quite intuitive. With Breeze, you can easily write queries that filter, sort, page, project data, and even eager load relationships.… Read more