Why Am I So Excited About AngularU?

 

 

What is Angular?

If you work in the web development space, unless you have been hiding under a rock for the zpast couple years, you must know what Angular is.  If not, let me tell you.  Basically, it’s a   JavaScript toolset that allows you to build single page web apps (SPA’s) efficiently, while at the same time deliver great user experiences and programmer development experiences.  What I mean by this is that Angular just feels good to program in.  It does not make you feel like you are using something artificial to build your web sites that transpose some cryptic language into the web, but it makes you feel like you are talking the web’s language.

In addition, Angular has a huge number of extensibility points which makes it great for the new web programmers as well as experienced ones who can make the web an amazing place.

What is AngularU?

imageWith Angular all the rage, it’s important to have gatherings with the best and smartest people involved in any given technology.  At AngularU, we have created an event where we have brought the leaders of the Angular project, leaders in JavaScript, leaders in TypeScript and leaders in Web Components together along with the best and brightest leaders from the community.  I’m feeling the need to enumerate everyone of one of these awesome people right now but since that’s already done on the web site, just head over to AngularU.com and read about them.

OK, I can’t stop myself.  Our five keynote speakers are nothing short of amazing. 

On Monday morning, right off the bat we have the three leaders of the Angular Google project (Igor Minar, Misko Hevery and Brad Green) speaking to us about the state of Angular and more specifically they are going to talk about the next major update to Angular known as Angular2.  I’ll talk more about that in a little bit.

Monday afternoon, we have Douglas Crockford who basically needs no introduction.  Douglas, brings a perspective to JavaScript (and for that matter all computer languages) that makes us all think about what we are doing and why.  As the inventor of JSLint, a program that inspects your JavaScript code and let’s you know where it could be better, Douglas pours a huge amount of his time into making us all better at what we do.  Expect Douglas to talk about how things are getting better as the landscape matures around all of us. 

Finally, Jonathan Turner, the Microsoft Program Manager of TypeScript will be talking to us about TypeScript.  Even if you have not been living under a rock, you may not know that Google and Microsoft are both on the same page when it comes to TypeScript.  Angular 2 is now going to be built on TypeScript!  Who would have guessed Google and Microsoft collaborating for better web development tools.

image So, that’s just our keynotes!  If you look at our full speaker lineup (which we are working on feverishly to complete), we have a veritable who’s who in the AngularU community.  From John Papa who writes the amazing Angular Style Guide to Dan Wahlin who in my opinion is the top Angular training guy in the world. Among other things, Dan has published Angular in 60-ish minutes which at my last check had over 800,000 views and over 10,000 thumbs ups!

I can’t mention every one of our great speakers in a single post, but do want to highlight a few.  Peter Bacon Darwin is on the Google Angular team and is in charge of Angular 1.x which we all know is so important. 

John Lindquist leads EggHead.io which if you’ve searched for any Angular training content you most assuredly would have watched tons from John.  I’d say John is king of the 5 minute explanation of almost anything Angular.

Lukas Ruebbelke, famous author of Angular in Action and a hugely sought after speaker that is going to talk about prototyping and security, Ward Bell, the create of BreezeJS as well as sought after inspirational speaker will be talking about Angular and pizza (still coming to terms with that). 

Andrew Connell is proof that Angular is indeed enterprise ready.  Andrew specializes in Azure, Office 365 and other Microsoft technologies and will be talking specifically about both Office 365/Angular integration as well as building secure enterprise apps with Angular. 

In addition to Monday and Tuesday sessions, we have 2 full days of workshops happening Wednesday and Thursday.  Make sure to check those out!  My favorite workshop title currently is Make Your Angular App a Maximum Security Prison (by Lukas Ruebbelke and Martin Gonto). Security in single page apps can be tricky and Lukas and Martin are really going to help you get a handle on that.

There are just so many other top cabin speakers I have not even mentioned!  Check out both our speakers and sessions pages to get a real flavor of what we at AngularU are offering.

AngularU is not just about technical knowledge.  We are dedicated to everyone having a great time.  We have a dedicated game room with all kinds of cool stuff.  We have parties that include local traditions and of course top-notch entertainment at our attendee party.

 

Why is TypeScript So Important?

TypeScript is important when building large, sophisticated web applications because it adds a level of robustness that JavaScript does not necessarily give us.  We all our coming to terms with dynamic languages (Ruby, JavaScript, Python, PHP, etc.) and one of the things that gives people like me who have worked in type safe languages all our lives shudders is the idea that mistakes can be introduced so subtly and be hard and expensive to find.

TypeScript is a superset of JavaScript, which means that if you take a JavaScript file (having just plain JavaScript), rename it to a TypeScript a file (a file with a .ts extension), it is still a 100% valid TypeScript file.  TypeScript encourages you to add type annotations to your JavaScript (now TypeScript) that catch errors you may not otherwise have caught.  For example, if you pass a string to a function that is expecting a number, JavaScript will not complain.  TypeScript will and save you the bug count increase. In addition to type annotations, TypeScript supports many ES6 (the next version of JavaScript) features which allow you to use modules, classes, and much more today in your applications.

At AngularU, even before Google and Microsoft announced that they are now working together, we recognized the importance of TypeScript and are making it a first class citizen of AngularU.  From the Keynote by Jonathan Turner (the Microsoft TypeScript Program Manager), to our TypeScript workshop, we welcome TypeScript at AngularU.

 

Why is Angular 2 so Important and What is the Controversy?

First off, there is a lot of misinformation floating around about Angular 2 and what it really is.  At ng-conf this year in Salt Lake City, the Angular team (Brad, Misko and Igor among others) did a great job of clarifying a lot of things.

First and foremost, Angular 2.0 is not a small release of Angular.   Without trying to speak for the Angular team I just want to say that I applaud the team for not just planning a face lift type update to just stay relevant.  It’s clear to me that the Angular team took a hard look at the next version of JavaScript (ECMAScript 6), the new Web Components standards and decided that a bold move was necessary to insure the long-term relevance of Angular. 

We can all agree that when you make bold moves that affect hundreds of thousands of people (if not more), careful explanations are needed.  Unfortunately, the initial explanations that came out were put out with out the diligence that was probably necessary to make things very clear.

Indeed, Angular 2 is huge!  At AngularU, we will have a lot of discussions on Angular 2 and have sessions focused on incorporating these changes into your current and future Angular applications.  AngularU will not only sessions and workshops but tons of side discussions with our leaders and attendees on the challenges and how to overcome them.

Again, Angular 2 is happening!  It will affect all our lives as programmers and engineers.  At AngularU, you will have the chance to go at the changes with your eyes wide open.  The Angular team has committed to keep Angular 1.x relevant for a long time and will keep enhancing it. 

At AngularU you will learn how to live with both the upcoming 1.x changes and the next generation Angular 2.

 

Conclusions Regarding AngularU and Why Come?

You can read magazines, you can read blogs, you can listen to videos but if you really want to know what is going on you have to rub elbows with other people.  Talking to the movers and shakers live in person is the only way to really know.  When should you update to Angular 2?  Should you incorporate TypeScript into your projects, and how long will it really take?  Those are the questions you need answers to and attending AngularU is a great way to get those answers to those questions and many more.

So, in a nutshell, this is why you should come:

  • Smartest Angular People On the Planet Will Be There Teaching You
  • The Side Discussions and Debates Can Only Happen When We Are All Together
  • Workshops Second to None
  • It’s Just Going To Be Fun!
    That’s it!  I Hope to see you in San Francisco in June.

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 a web page is different when the user is authenticated (logged in) versus not.  That by itself should close the discussion.

On a more constructive note, I think it’s reasonable to map application states to URLs. For Example, their might be three states while viewing an employee record on a web site, all at the same URL. The states might be as follows:

  • State 1:  Not Logged In (show error)
  • State 2: Logged in as Employee
  • State 3: Logged in as Manager

All three states would show different data and allow for different interactions.  All different, all on the same URL.

Bottom line, we as engineers should not get confused with things we do for convenience and start thinking that there is some science behind that.  Recognize it for what it is.

Refactoring C# Code With ReSharper Help

 

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:

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 to the exact target I wanted (keyValue instead of view.StripePublicAndPrivateKeys.StripeSecretKey). The reason is my plan is to pull out the common functionality and to do this I don’t want to have to pass into a common method lot’s of extranious classes.

Next, through the helpfulness of JetBrain’s ReSharper, I select the code I want to refactor and then right mouse button, say "Extract Method" and this is what I get:

image

The method that is created is this:

image

Which, when shown, changes the code to the following (notice that the method GetKeyValueFromStrip is created.

And, that can be simplified to simply

And now, all 4 keys (public and private for both live and test) can be generated quite simply and with little chance of typos as follows

Showing The Record Count in a Sencha ExtJS Grid Made Simple

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 store.load which passes the parameters to the store as well as sets the title on completion.

Here is the very simple code.


image

HTH’s

Plugin by Social Author Bio

Follow

Get every new post delivered to your Inbox

Join other followers: