Mobile Evolution: Obj-C –> TypeScript with DevExtreme


It still amazes me, the number of developers who have put writing mobile apps into the ‘too hard’ basket. The scenario is the same around the world… someone at a corporate level decides it would be cool to have an ‘app’, but when you start looking into it, well, it’s a nightmare. There is framework after framework, promise after promise, and then when you start looking at the costs and small print, its a mine field! The question that has been raised for years is still as relevant as ever… “do I go native or hybrid?”, well that still depends on your project, your skill set and budget, but if you are wanting to break into the mobile market at attack all three major players at once, I recommend hybrid. People who know me would be shocked at that last statement since I love native iOS development, but the truth is simple, you cannot hit multiple platforms from the comfort of Objective-C. That’s when I decided to take on a challenge, to create a hybrid version of an existing iOS application that I developed years ago, and since TypeScript was officially released in Visual Studio Update 2, I decided it should be the language of choice.

Join me on April 29, 10am (PDT) as I turn a native iOS application into a DevExtreme generated hybrid and get maximum exposure from a single codebase.

Register Today

Not Flappy, Not Happy, Ratings gone MAD!


Ok, I don’t rant too often, but this one has me annoyed. Local development house PIG Studios decided to do something a little different when it wanted to launch itself. Effectively there are a number of games in the pipeline, but given the noise of flappy bird, they decided to try and launch a quick, annoyingly addictive game – Fello Pean Tubes. Enter Cecil… now Cecil is a sperm, albeit a cartoon one, he looks like an albino tadpole, and the idea is that you have to help Cecil navigate his way through the fallopian tubes to help fertilise the egg. There are three different game modes (baby, crawl and run), each offering a different starting speed. All the game assets were unique, created by the artists at PIG Studios, the intro music was a stock file while the in game experience was written again by one of the guys at the studio. Almost a month ago, Tim submitted the game for Apple’s approval having jumped through all the hoops of becoming a registered Apple developer. After the obligatory week of waiting, the game (known from now on as FT) was rejected. Apple cited a problem with the advertising information in the pList, and it was rated wrong…

Rejected

So, the boys decided to remove iAd and just sell the game for a meagre $0.99. This time the rating was put to 9+ and a resubmission was made. Now remember at this point, there were no faults with the game, it was all admin related. Another 7 days go by, then the app is moved into “Review” for 3 days!. Finally, REJECTED! the reason was the same, your rating is wrong, this game has suggestive mature content!!!

I may be broad minded, having raised 3 girls and two boys has meant everything in life was discussed. But telling a developer you have to have an R17+ rating on a swimming albino tadpole because it is suggestive??

For now the boys decided to up the rating and just get the game into the AppStore, but I feel it is censorship gone mad. There are more suggestive cartoons on free to air TV than what FT offers, I mean aren’t schools now giving “The Talk” at a younger age now? Seriously Apple!

Anyway, best of luck to the boys over at PIG Studios, I would recommend any iPhone users grab a copy of Fello Pean Tubes (Android version coming soon, so I’m told), and I know they have some exciting things in the pipeline, FT is the first of a 4 part series, and there is some cool Unity development going on too.

Why not grab your copy and help these guys out…

Download_on_the_App_Store_Badge_US-UK_135x40_0824

ar_2

What’s involved in setting up ASP.NET security?


ImageWhat’s involved in setting up ASP.NET security? well it depends who you ask and what you want to do.  It is interesting to see that something so important causes many developers to stumble.  How do you set up a basic registration page? how do you maintain what roles or memberships a person has? how do you set a page to be secure?  Well, join me February 11 (EST) [which again means 4am for the Aussies, 7am for the Kiwi's, 6pm for the Brits] for a fast paced, hard hitting webinar that takes you through some of the basic implementations of securing your ASP.NET website. Full details available here. Don’t worry if you can’t make it, the session will be recorded an put on the DevExpress Youtube channel as well.

.Net PDF Viewer Showdown – revisited


Sometime last year I wrote a post on PDF Viewers and the difficulty in choosing one that was inexpensive, easy to implement and performant. Since that time DevExpress released a PDF Viewer for WinForms, WPF and XAML, so I thought it time to add them into the equation.

- – - – - – - -

Ok, it was a simple enough feature to add. A viewer that would allow PDF’s to be shown on screen. Already in my toolkit I had the SyncFusion control, but after a couple of quick tests I found the speed to be woeful and thus started the painful process of looking for a control to use.

A number of vendors offer PDF creation, manipulation, annotations etc, but not viewing. I was most disappointed that DevExpress did not have anything in their swag, which means the project in question is now only 99% DX :( This is the cool part, the project can go back to 100% DX :)

The list came down to

- DevExpress (www.DevExpress.com)
- Gnostice (www.gnostice.com)
- Atalasoft (www.atalasoft.com)
- DynamicPDF (www.dynamicpdf.com)
- Aspose (www.aspose.com)
- ActivePDF (www.activepdf.com)
- Deaja (www.daeja.com)
- Snowbound Software (snowbound.com)
- Bluebeam Q (www.bluebeam.com)
- PDFTron (www.pdftron.com)
- GDPicture (www.gdpicture.com)
- SyncFusion (www.syncfusion.com)
- O2 Solutions (www.o2sol.com)

So what was I looking for ? a .Net Assembly that could be added to my project, capable of adding a control to a WinForm to display/interact/print existing PDF’s. It would be nice to add annotations and stamps to documents someday. Whilst price had to be balanced, licensing was important. Royalty Free distribution is a must.

How would I test? install a demo version of the product, create a viewer control on my form, set the properties, load a pdf, zoom and print. All the PDF’s tested would be live client data, the sort of thing that would be used in the final product, varying in size, content and properties. If the project could not be put together in 30minutes or less then the product was too complicated.

The litmus test is being able to do as much of the above as possible without referring to the documentation.

Round One::
Dismissed straight away because of what I thought were hideous websites were Deaja and Bluebeam. In the world of technology when your primary clients would be developers, you need something that is informative and stylish. Both these products would have been rejected on price/licensing if they had made it through round one, although to be fair, Bluebeam didn’t really fit the bill as far as a .Net library was concerned.

The list continued to get smaller as products whittled down…

Round Two::
: Snowbound – license pricing too high;
: PDFTron – restrictive licensing, too expensive;
: activePDF – confusing web site, licensing model complex and no pricing available
: DynamicPDF – restrictive licensing
: Atalasoft – PDF Reader SDK too expensive (price vs functionaltiy)

The following products made it through to testing

Round Three::
: Syncfusion – easy to implement, very slow in performance
This was the product that started me down the slippery slope of viewers, I was startled that with a $1700 price tag (for single product), the performance was dreadful.

: O2 Solutions – too hard to build a testing demo
After installing the product things look promising, until I tried to add some code. The documentation was poor, it was simply too hard to try and build the demo.

: Aspose – looked really promising, until you try and build a demo !
A single 10mb dll? I was a little surprised by how hard it was to try and create a viewer. There was nothing to add to the toolbox, the website is verbose and confusing, the forums turned up nothing. After 30minutes of trying to get something to happen I simply gave up and put it in the too hard basket.

: Gnostice – easy to implement, crashed in demo app and slow performance
The Gnostice library was easy to install and quick to implement in the project. The methods and properties were discoverable and the demo was built in a matter of minutes, unfortunately when opening one of the PDF’s we got booted with an exception, and other PDF’s were very slow.

: GdPicture – complex product matrix, confusing mix of sdk and plugins, but FAST !
GdPicture nearly got thrown out because of the complicated product matrix, I already had a partner license so I persevered – and glad I did. It looks confusing with the large number of options available, I wasn’t sure which product I needed, or plug-ins, but GdPicture has a royalty-free license, a major plus. GdPicture installed quickly, and a test app could be produced easily. Performance was fantastic. Best of all, it did not get in the way of our interface, a simple container that allowed me to add the buttons and functionality required on the form. If it’s just PDF viewing you want then the $950 license is one of the most economical on the market, if you want image manipulation as well as viewer then GdPicture still hold the lead, however,

The NEW Winner !

: DevExpress – as an existing DevExpress customer the PDF Viewer when released was automatically included in my subscription, however, for a WinForms implementation I would have had to pay just $899 which included a LOT of additional controls, not just PDF. At time of writing, the version of the PDF Viewer worked extremely well, it was faster than everyone tested except GdPicture, but the royalty free licensing makes it really attractive. I was able to drag the control onto my form and set a few properties, everything worked, but what was really cool, was the ability (from the SmartTag) to auto create either a Toolbar or Ribbon bar with file, navigation and zoom functionality.

- – - – - – - – -

In summary, the majority of vendors seem to favour a limited license instead of a royalty free one, which was disappointing, a number seemed to think that high pricing was the way to go. I still think for wanting a basic feature there are too many hoops to jump through, especially when you consider that PDF Viewing on OS X, iOS (iPhone/iPad) is native, no additional libraries or costs required. It also seems component vendors need to think about their web sites when offering some of this stuff, it is a jungle out there.

I do hope that DevExpress have a note on a story board somewhere that shows “create pdf viewer” !

It was really encouraging to see DevExpress enter the market with a viewer early 2013 (beta) and in less than 12 months deliver a low cost, powerful PDF Viewer.

100% DX – What’s New for 13.2


It’s no secret that I think an application should be built with one set of tools, I’ve been running the 100% DX challenge for 18 months now, so imagine how excited I am about the 13.2 release of the DevExpress controls!!! There are so many new things to be delivered it’s like Christmas came early. What’s more, I get the honor of sharing with the world all the newest products and features for our WinForms, WPF, and Windows 8 XAML toolset… I’m not going to give everything away today, but there are some exciting things coming, including enhancements to our grid controls across all three platforms, a Spreadsheet and PDF Viewer for WPF and so much more. Intrigued? Join me live December 2, at 10am (PST), that makes it 4am for the Aussies, 7am for the Kiwi’s and 6pm for the Brits. Even if you can’t make the live session, register so you can receive notification on the replay via YouTube.

Register here

Azure, iOS and enterprise deployment


If you want to deploy an iOS application provisioned under an enterprise license on an IIS box the steps are simple enough:

- Create a folder where the .ipa file will be stored such as \inetpub\wwwroot\myApp
- Create a manifest (.plist) file, here is an example of what that should look like


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>items</key>
  <array>
    <dict>
     <key>assets</key>
      <array>
       <dict>
        <key>kind</key>
        <string>software-package</string>
        <key>url</key>
        <string>http://www.yourdomain.com/myApp/myApp.ipa</string>
       </dict>
      </array>
    <key>metadata</key>
     <dict>
      <key>bundle-identifier</key>
      <string>com.yourdomain.myApp</string>
      <key>bundle-version</key>
      <string>1.12.08.1200</string>
      <key>kind</key>
      <string>software</string>
      <key>title</key>
      <string>myApp</string>
     </dict>
    </dict>
  </array>
</dict>
</plist>

- Next step would be to create a link in your web page that points to the manifest file you just created, notice it is a special type of scheme:

...
<a href="itms-services://?action=download-manifest&url=http://www.yourdomain.com/myApp/myApp.plist"> Tap Here to Install myApp</a>
...

Now if you tried to click on the link at this stage you would start receiving errors. So the next thing to do is add a couple of extensions into your MIME types

.ipa – application/octet-stream
.plist – text/xml

Done, you can now browse to the page on your iPhone/iPad/iPod and install your newly provisioned enterprise application.

WHAT ABOUT AZURE? I did mention Azure in the title of the post, so what’s different if you want to deploy via a Azure Website?

Technically, nothing is different, you still need the manifest file, and you still need to set up the href. The caveat here is that you cannot edit MIME Types in your Azure admin area.

Thankfully it is not a difficult thing to overcome. You can add your MIME Type directly to the web.config file

...
<system.webServer>
    <staticContent>
      <mimeMap fileExtension=".ipa" mimeType="application/octet-stream" /> 
      <mimeMap fileExtension=".plist" mimeType="text/xml" /> 
    </staticContent>   
</system.webServer>  
...

Now your enterprise application can be distributed using the power of Azure Websites :)

Hello iOS World!


I remember writing my first mobile app for the Psion Series II, it started my passion for mobile devices. So it was no surprise to the family when I started writing apps for the iPhone all the way back in 2009. There were countless hours spent reading documentation, trying to get things to compile, and banging my head on the desk wondering what the strange language called Objective-C was all about. Apple have made it somewhat easier with advancements in Xcode & iOS (especially embedding Interface Builder), there have been some great tutorials written, as well as 100′s of books, but where should you start? The answer is WintellectNOW! I recently had the honour of producing a quick primer on ‘Building Your First iOS App with Objective-C‘ and for a short time you can see it for free :) I would also encourage you to have a look at some of the other awesome videos on the site. Register and use the coupon USHER-13 and you can access *everything* for free for 14 days.