Class Decorator with TypeScript and React

The syntax for creation and use of a class decorator written in TypeScript that works with a React.js component wasn’t obvious …, so I thought I’d document it here.

The decorator takes a constructor/class which could be used how ever you’d like (or substituted for something else entirely).

 

Social-up your Business

Dear Small Business Owner,

As a potential customer of your small business, I’m frustrated by your lack of response to my email, tweet, Facebook post, Instagram Message, text message, Skype chat, etc.

I think I know what happened that led to my frustration.


 

You’ve got an established or new business.

At some point in the business life cycle, you decide to build a web site. (“Hey! You totally need a web site to drive more traffic!”). As you realize building web sites is not core to your business, you spend some hard earned income to invest $200 in a web site.

To your untrained eye, you may not recognize the Microsoft FrontPage style template that $200 bought.

Not only has the web designer created some static content, they’ve thoughtfully created:

  • A blog
  • An e-mail address
  • A “Contact me” form
  • The Full Social-Package™, including but not limited to: Twitter, Facebook Pages, Instagram, and Skype.

After an all-too-brief explanation, you, sit back and wait for new business opportunities to arrive, digitally.

And nothing happens.

Maybe a blog post will help. So, you create the first (and last) blog post.

And still nothing happens.

So, business resumes as normal. The web site goes unmodified. The blog post remains, dull, and outdated.

E-mails aren’t flooding in, so the e-mail address that was set up isn’t checked frequently or at all.

So, when a potential customer uses one of the social options or an email to contact your business, there is no timely response (if there’s one at all).

And then…, you’ve lost a customer.

Sorry, but I’m going to find a different business that meets my needs.


 

If a small business doesn’t check and respond to voice mails once a (work) day, they may loose business. If that same business does not check their email, social accounts, MySpace pages, etc., they also may loose business.

I’m sure they meant well by having a web site with an email address, etc., but if it’s not used, it’s no different than not answering the phone.

So, what happened? It started with unreasonable expectations.

A blog, social-media accounts, email accounts, do not directly create new business opportunities. They are simply new channels for communication. It’s two-way. If your business doesn’t have a plan for these new forms of communication, they will fail.

You will miss out on new customer opportunities. And worse, you may lose existing customers who may transition to using the other forms of communication you’ve claimed to offer. Spend an extra $100 to have a daily (or more frequently) plan developed to consistently use these communication options. Delete and remove any that don’t fit your business needs or that sit unused. If you don’t understand these forms of communication or how to integrate them effectively, there are lots of on line resources that can help, both paid and free.

I like buying local and will support businesses that work best with my lifestyle and communication preferences.

Small business owners can do better. Please.

HTML 5 Support: iOS 4.1 Browser vs. Windows Phone 7 Browser

Now that the final v1 Windows Phone 7 is available, I performed a few browser tests using http://www.HTML5Test.com (which is a slick and easy way of testing browser support for some upcoming HTML5 features).

Any guesses which is iOS 4.1?

image image

Biggest missing elements from the IE browser on Windows Phone 7:

  • Input element types. The browser won’t be able to provide a keyboard/input panel that is appropriate for the data being requested. For example, a number field that automatically switches to a number only input pad. See here for some examples.
  • Geo-location. Seriously. The phone has a GPS. Why not expose it? (IE9 doesn’t either unfortunately, but that bothers me less).
  • Canvas. IE9 can do it, why not you? There are so many UIs that can be enhanced by use of a canvas,without resorting to server side rendering and other messy hacks.
  • Web applications (cache). Then, we could package a web application into an offline application and use the browser to drive the UI rather than SL/XNA. That’d be a win in my book as it would be easier to build cross platform phone solutions.
  • Session storage and local storage. See previous point. It also makes using cookies less necessary in some scenarios.

It is a better browser than the CRAP in previous versions of the Windows Phone. But, the bar has been set much higher these days. I’m pleased that typical web sites work well, and that it’s reasonably fast. I can even understand why they stopped where they did – as it seemed sufficient for typical browsing needs on the go, especially given the development team obviously had deadlines.

But with technology moving at such a rapid pace and the adoption of HTML5 proceeding regardless of standards, Microsoft must keep up to survive. This phone will get a lot of “hate” if it can’t adequately browse the web in a few years. Developers are tired of building in hacks to support browser X or Y. This is yet another browser that may need to be supported, if adoption rates are reasonable.

image

IE9 Beta 1 scores only a 96.

image

It’s missing Web applications (arrgh), and websockets.