Routing and State (The AngularJS Discussions)

I’m a big fan of the Adventures in Angular podcasts.  At a recent podcast that happened at ng-conf in Salt Lake City, there was a lively discussion around the topic of routing and URL’s.  Specifically, one side of the discussion was that a URL defines a state of an application.  The other side said that is not true. Personally, I think it’s ridiculous to think that a URL can define that state of applications.  My first proof is that there is a huge amount of discussion around it.  If it was clear and true, there would not need to be discussions about it. I believe that URL’s are simply pointers to places in web sites.  That’s it.  Any more than will breed confusion.  The most trivial example is that … Continue Reading

Refactoring C# Code With ReSharper Help

image.png

  A pattern that I do quite often is to first right out code that actually works, then when I see a pattern repeat itself, I like to refactor that code to try and avoid the repetitive code.  Reasons include: Smaller Code Less Chance For Error Don’t Repeat Yourself (DRY) As an example, the c# code I’m working on now involves reading key values to be used with the Stripe payment service.  Here is the code I first wrote: [crayon-5592c83732f69668647334/] The first thing I do is to look for the pattern and try and pull out variables that I know are going to be helpful in refacotring. You can see below that I pulled out the keyAppName variable and I also changed the assignment to be to a new variable rather than … Continue Reading

Showing The Record Count in a Sencha ExtJS Grid Made Simple

image.png

I use Sencha’s ExtJS for lot’s of data maintenance type applications.  One such application is an email response manager where it’s convenient to know how many different URL’s got clicked.  Basically, how many rows in the gridview.  Certainly, counting is an option but showing it in the title makes a lot more sense. The tip here is that often you have to call store.load() on the store associated with a grid so with just a couple extra lines you can put the count in the title of that grid.  Those extra lines are basically just a callback to the store.load that then grabs a reference to the gridview.  In my case, I have a button on my toolbar (just above the gridview), and in the button’s handler I execute the … Continue Reading

Add a Data Driven Combobox to ExtJS Form

image.png

I’ve been enhancing the session editor for AngularU  (Written in ExtJS 4.2)  and I’ve recently had to add a couple data driven comboboxes.  One to specify which track the session is in and one to assign which track the session is in.  Having done it a couple times in a row, my muscle memory is pretty good so I thought I’d do it again but this time on my blog. This is what the result looks like: The basics of the relationship between the table data is that we have a Session Table and a Track Table as follows: For the sake of the controls, we actually have two rest feeds.  One Track and one Session.  You can see them both here: http://angularu.com/rest/track http://angularu.com/rest/session The track … Continue Reading

Follow

Get every new post delivered to your Inbox

Join other followers: