7 articles and counting

How Adobe can get Flash onto the iPhone and beat Apple at its own game

So everyone is aware of the “fued” between Apple and Adobe regarding Flash’s absence on the iPhone and now iPad. Currently as it stands the only way to get Flash applications to run on the iPhone you have to use Adobe Flash Professional CS5( still in beta as of this post) and export the file as a native app, and then follow Apple’s normal app store submission guidelines. But I have a plan to get Flash onto the iPhone without having to convert existing apps…

Create an iPhone browser app based off of Webkit that natively plays Flash content. I did some research, and there are currently several browser apps available, for example iCab Mobile. Obviously they would have to handle flash content natively rather than really on a 3rd party plugin.  They would have to come out with a solid product with features to differentiate itself sufficiently from Mobile Safari but I think it would also get some good press for Adobe if they do it right AND can make Apple look like the fool! What do you think?

P.S. Let me say something about battery life. I have a 3rd gen iPod Touch 32GB. My wife can surf the internet for hours on that thing but 15-20 minutes of playing Finger Physics brings up the dreaded 20% battery life warning. So why is it I can consume large amounts of battery in such of short amount of time with an iPhone app, but Steve Jobs won’t allow me to waste the same amount of battery life playing Flash content online?

Don’t Get Stuck in Your Stack

Stuck in your stack? Here’s some helpful ways for you to break free and experience the freedom that best in class, out-of-stack solutions can provide.

I have felt the feelings you feel, closed in, cornered, you have a need and there’s a hole in your technology stack and you just don’t know what to do. Or worse, it’s not exactly a hole, but your stack doesn’t really provide the solution that you’d like but you feel compelled to use it anyway since it’s what you know.  Or even worse than worse, you’re damning the torpedoes and sticking to your stack because you’ve drank so much kool-aide that you can’t help yourself.

Many of us are stack-oriented, we have devoted ourselves to a range of sometimes vendor-specific technologies and we spend our time developing those skills and avoiding others that pretty much do the same thing.  Case and point – PHP and ASP.Net – both are server side scripting technologies used to develop web applications; both can be used as a platform to develop RIAs (rich internet applications) using AJAX, FLASH or SilverLight technology and both require a relatively high level of experience and skill to employ successfully.

You may write an ASP.NET mailer in C# using System.Net.SmtpClient and it might look something like this:

SmtpClient mailer = new SmtpClient("mail.somemailhost.com");

mailer.Send("me@3rdbit.com", "you@yoursite.com", "Yeti Alert", "The Yetis are upon you - flee in terror!");

You’re open source, free love, hippy PHP-using counterpart might use the mail()  method and do it like this:


mail('you@yoursite.com', 'Yeti Alert', 'The Yetis are upon you - flee in terror!', $headers);


  (pretend that $headers contains the from address)

Both languages are accomplishing the same thing, an email will go out saving someone’s life from an advancing Yeti horde – which, as anyone from Nepal will tell you, is something worth doing.  

I’m not suggesting that there is no difference between PHP and ASP.NET, I’m not advocating that you should use one or the other, I’m just pointing out that two very different tools can be used use to accomplish the same task.  The tools you use will be defined by your chosen technology stack and I’m confident that a Yeti warning system developed using either stack would be successful in saving lives.

There’s nothing wrong with that!

Being stack oriented is a good thing.  You can’t be good at everything and you shouldn’t try to split your time becoming familiar with everything.  You’ll end up knowing a little about alot of things and you won’t be the expert in any.  You’ll be that person at the party who’s heard of that book, saw that preview, read half of that article and almost took that trip.

Choose your weapons wisely, master them and make sure you’re always adding 1 or 2 new weapons gradually.   Stack orientation helps you direct your efforts toward technologies that can be used together to create solutions that any one of them can’t alone.  Certainly the weapons you choose don’t have to be from the same stack though it is often convenient.   Certain stacks work and mesh well together and knowing a combination of them can be a real advantage.

(I will say that if you’re the one developer who can master ASP.NET (VB/C#), JSP, PHP, RUBY, PERL, Python, etc…  Let me know who you are so I can get with all the other mortals and erect a statue in your honor.)

It’s Good, but don’t get Stuck

While it’s good to have your technology roadmap defined don’t be afraid to step outside your stack for solutions, especially if they’re clearly better than what you’ve got to work with.  There’s alot of kool-aide drinkers out there who spend a lot of extra time forcing a known-skill or product into a solution and end up either frustrated or with something that sortive, almost solves the problem at hand. 

Example 1, Lego Starship

I used to work with an Oracle forms based ERP system that became “web-enabled”.  My job existed solely to create applications that plugged holes in the ERP’s functionality/feature set or to create solutions that the ERP was years away from natively.  The developers of  the ERP chose to use PL/SQL Pages to web-enable the product.  (That’s alot like trying to build an interstellar spacecraft out of legos).  PL/SQL Pages was a valid tool in their stack, but they were stuck in their stack and avoided a few other options that could have made their product ALOT more agile, user friendly, maintainable, etc…  As a result of that choice (and others like it) the inability of the application to keep of with my company’s needs forced us to move on.  Though, certainly in this example, these developers were not only stuck in their stack, they were stuck with an aging skill-set.  Don’t do that either – Learn or Die!

Example 2, Me and Source Control

As a Microsoft-stack-oriented developer I too was stuck in my stack when it came to source control.  For years I was using Visual Source Safe for all my source control needs and man was I frustrated.  I couldn’t concurrently work on a file that was checked out by one of my developers, branching and merging was practically non-existent, there was no LDAP integration for security, no native file format storage and it was as slow as Christmas over VPN.  Heck it was just slow in general.

Then I learned about Subversion and VisualSVN.   Talking about the features of each is out of the scope of this post (follow those links for more intel). 

Here was an out-of-stack solution for source control that was clearly a better solution for my team than VSS and it was open source, practically free and ran on Apache!  Shutter – an MS dev group using SVN – watch out for the pitch-forks and torches of the Microsoft Technology Evangelists! 

I soon learned that this particular combination of stacks is actually quite common.  I had stepped out of my stack for a better solution and have never been happier with source control.

Step our of your Stack if the Out-Of-Stack Solution is Better

Don’t be afraid to step out of your stack if another stack has a ready-made solution that you can use.  I challenge every VSS user to compare VSS to SVN.  Get over the fact that it requires an apache server – you can run that on Windows Server and VisualSVN gives you an installer that sets everything up – it couldn’t be easier.  (I’d recommend installing it on a VM, but that’s a post for another day)

Step away from the kool-aide and find the best in class solution that meets your needs and fits into your paradigm.  Don’t go out and install a bunch of Linux servers in your windows server farm just so you can run Apache for SVN.  Your windows server admins don’t really know Linux and you don’t want to have to manage the server.  Likewise, don’t run out and install MONO on your linux box just so you can develop in .NET from a LAMP environment.  If you’re going to develop .NET, buy a Windows Server license, run IIS and do it right.

Use common sense, some stack-combinations work great – if you’d like to develop in .NET and use MySql or Oracle as a DB, do it – it works, I’ve done it and had great results.  Find those combos that make sense and that don’t break your paradigm and work them in.

Example 3, Me and this Blog Engine

Yes, as you read these words you are witnessing another out of stack solution that has made me very happy.  This blog engine, WordPress, is built on the LAMP stack, there’s no MS tech anywhere yet it’s fantastic and I rave about it.  I don’t need it to fit into my development paradigm because I have no desire to extend it or change it.  There are lots of ready-made plugins that do the things that I want a blog engine to do.  The mail source code you see above, for example, is formatted by a plugin written for WordPress that implements an open source JavaScript formatting engine that was written by a Russian guy I’ve never met.  (Which is good cause Russian programmers are scary).  All I had to do was upload a few files and put a single tag around the code – awesome!

I could have spent a lot of time and effort finding a .NET blog engine so I could feel comfortable in the knowledge that if I ever needed to hack the engine I could – though really – I’m not concerned about that.  I’m busy -  I’d rather spend my time working on projects that I feel are important to me and blog engines is not one of them. 

That’s it – Your Turn

I challenge you to review your stack, your tools and the solutions you’ve implemented and look for weaknesses.  If you find one then perhaps there’s an out-of-stack solution out there than you can take advantage of that you may have overlooked before.  I did and I’ve been very happy with the solutions and tools that I’ve found that have enabled me to do things better than I could have on my own by sticking to my stack.

Happy Programming and remember, Don’t Get Stuck in Your Stack!

How Adobe Flex won me over AJAX

I will admit my opinion is a little late  in regard to the  battle over Flex vs. AJAX debate but I thought my experience may be helpful to other developers who may face the same dilemma.

First, I will  still use AJAX when I develop VB.NET web applications because I think it offers  nice enhancements like no full page post backs and other general UI enhancements. So when I was needing a tool to do graphics manipulation my first thought was to look for an AJAX solution like jQueryUI . I played with it for awhile and figured it could do the job. However, my boss loves Flash and he suggested I look into using Flash, which I had no real development experience other than playing with it for few hours back with Flash 4 some time ago. Now I am not a big anti-propriety solutions guy,  but I did come from a background of hand-coding CSS-designed sites which inevitably  led me to read sites that were big on standards and openness.  I was definitely hesitant to the say the least, because I believed Flash was best for videos and cool interfaces, but not serious application development. But then I met Flex, and that changed everything.

READ FULL ARTICLE How Adobe Flex won me over AJAX

XSLT, Widgets and MailTo Links Oh MY!

(Ok, so this’ll be short but it’s something that I had a mental hangup on the other day.  After I finally figured it out I thought – I should blog that…)

I’ve never really used XSLT as much as I should have been favoring instead to consume XML data using flash, however recently I’ve moved away from a lot of what I was doing in flash in favor of using simple AJAX using the Microsoft AJAX Toolkit for nothing more than expediance of development, etc…  (I am by no means a proponent of AJAX over Flash or FLEX for RIA’s however that’s a blog for another day. Though yes, I am one of those developers who LOVES SWF content and thinks that AJAX is a day late and a dollar short.)

The other day I was working on an FLEX Based RIA that uses a .NET middle tier and I had the need for some XSLT magic.   

First, some background intel on the application just to set the mood. 

The application is comprised of content pages that are comprised of widgets that are comprised of data items that are comprised of XML data.   Each widget has a type that defines how the data item’s XML data is rendered.  There are chart widgets, metric widges, table widgets and mixed content widgets – the Flex UI knows how to handle each type and renders itself accordingly.  Mixed content widgets are widgets that don’t have a defined set or style of content and are meant as catch-alls for any content not already handled by the other widget types. 

Since the mixed contents are catch-alls and can potentially display anything I chose to use XSLT to render their data and since Flex can render a subset of standard HTML this works quite well.   (Though it would great if FLEX would natively support the full set of standard HTML – c’mon Adobe!)   When the web service receives a request from a data item an XML result packet containing the data to be  rendered is passed back.  Mixed content widget data is transformed inside the service and standard HTML is handed back in <CDATA> tags, Flex picks up the HTML and renders the widget – and whamo all is right with the world.

SO, all that to get to this.  I needed to hand back a MailTO: link as part of a result packet and the XSLT to create one was not what I expected.

<xsl:when test="EMAIL!= ''">
                <xsl:attribute name="href">
                  mailto:<xsl:value-of select="EMAIL"/>
                <xsl:value-of select="USER_NAME"/>

The weird part for me was the following line:

<xsl:attribute name="href">

I kept struggling with the quotes that would need to hug the href and value parts of the  mailto, however the solution ended up not being a matter of escaping quote characters – it was just a matter of using XSLT the way it wanted to be used.

So that was it, a small mental hangup that ended up having a simple solution that I thought might help someone else. 

Happy coding!

Web Service Authentication – Kerberos Style

Ok, so this is not the blog post that talks about every possible way to athenticate to a .Net webservice – however – it is the blog post that tells you how to flow the current user’s credentials into your webservice.

The scenario where you might need to do this is relatively specific, here’s the specifics.

  • Your WebService is being served from IIS using Integration Windows Authentication, IWA, Anonymous Access is turned off. 
  • The client application is a .NET app will be served in the same way.
  • You want your service to treat the client as the current user, meaning, the client will make calls in the context of the current user.  (Perhaps you’re interested in continuing the flow of credentials down to your SQL Server or the file system and you want to ensure security inegrity based on the users rights and permissions) 

So here’s the Code in C#, this is the code on the client that is calling the service.

remoteService.Service1 service = new remoteService.Service1();

service.Credentials =CredentialCache.DefaultCredentials;

The first line instantiates an instance of your service.

The second line tells the service to use the Default Credentials stores in the Credential Cache.  These are the credentials of the current user in an IWA environment.

One another thing, WebService Web.config updates…

In the web.config of your service you need to set the authentication mode to Windows.

<authentication mode=Windows/>

If you intend to continue the flow of user credentials down to another system on the other side of your service, you’ll need to set the identity impersonate attribute in the web.config to true.

<identity impersonate=true />

That’s it – not too bad at all, hope it helps!



– You’ve now come to the end of the post, close your web browser and go write some code.  May the 3rd bit be with you…

Web App within a Web App – Build an Onion!

Sometimes you don’t always have total control of the web site or web application project you’re working with and you have a need to insert or extend the existing project.  Or perhaps you’ve inherited a project that was coded so horribly wrong you can’t easily make a needed update without first expending time you don’t have doing .NET project triage.   (Such is the case many times when designers try to play application developer)

Or perhaps you’ve got a need to use some new .NET functionality within a project that you can’t upgrade.  IE, you need to do something using .NET 3.5 but the site you have to use is based on .NET 2.0.  

Looks like you may need to build an Onion – just add layers :)

Such was the case for me the other day.  I had a corporate .Net 2.0 website that was hosted on a domain that I needed to publish a 3.5 web application project to and I didn’t have the level of source control I needed to seamlessly nest my project within the existing project.  (The existing project also had some issues due to the way the developers manage their source however that is an article for another day)

Since I couldn’t nest my new project within the existing one I decided to create a new web app type project and publish to a new directory within the existing project.  I needed my new project to have it’s own web.config and bin directory.

This actually turned out to be quite easy, here’s what you do.

  1. Create your New Web Application Project
  2. Modify your new web.config to play nice within it’s parent project
    1. Comment out the <configSections> element.  If you leave this element in you’ll get some fun errors about settings already being specified.  Why?  Because the parent web.config likely already has a <configSections> element.
      1. If you’d like to read about <configSections> check out the page on MSDN, talking about it here is outsite the scope of this post. 
    2. Comment out the ScriptModule key in the <httpModules> element.
  3. Publish your project to the target folder within the parent project

That’s it, not too bad.  The new project will use it’s web.config and it’s bin folder independent of the parent project – yes, even though it may be a different version of the framework

But Wait – There’s a Catch. 

If your situation was like mine and you need to roll something out quickly inside of a larger project that you don’t totally control your new web app could be at risk.  If the parent project is re-published and during publishing the user chooses to do delete remote files your web app will be deleted since it’s not part of the parent project.