Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 849
Registered: ‎03-03-2011
My Device: Z10

Re: Which language/framework is the best for developing cross-platform form-based apps?

I have decided (of course, I can always change my mind):

 

1. Client = Cascades + C/C++ (later if requested: Objective C)

2. Server = IBM WebSphere (later if requested: other Java app. servers)

 

I want an effective app that runs smoothly and supports wide range of UI components. Hopefully QML descriptions can be also dynamic ones.

 

I know BB is the best business platform and so is IBM, but at the end customers are forcing you what to use. I will bet on BB+IBM combination, at least in a prototype stage.

 

--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?


zezke wrote:

One thing that comes to mind jtegen, is the difficulty of AIR supporting different screen pixel densities.


Difficulty? Flex & AIR make it super-easy! Use vector assets and you don't even need to think about it. Contrary to popular belief, vector assets work fine on mobile. Or use media queries with bitmap assets if you really need to (for games and such).

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?


 

In Air/AS3

You will probably be required to write more code if you want to go cross-platform in AIR/AS3. Although animations, transition, effects are all super smooth and slick, the amount of skinning, tweaking and coding you'd need to do to achieve a rich ui may not be worth the effort if you cannot deploy your AIR/AS3 application to multiple platforms.



This is absolutely not true. Cross platform deployment with AIR is usually as simple as ticking a box in the export options. It makes sense to write your layouts to be scalable, and centralize your platform-specific functions, but that is the case for any language or framework.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?


soaman wrote:

 

4. My app will strongly rely on lists/tables, UI managers and different fields/pickers/etc. because it is a form based business app. Unfortunately I don't want to design each form separately but I want to do that automaticaly/programatically. So MXML is not OK for me unless I can use those UI components dynamically.

  


Flex/MXML is really ideal for this. It lets you place your forms in custom components, then instantiate those components wherever you need them. You can even subclass and override those components to tweak the form but maintain its basic functionality. You can add, tweak, remove components dynamically in Flex.

 


soaman wrote:

 

5. Beside UI, app will strongly use HTTPS, SOAP/REST and XML parsing. If possible asynchronous calls are going to be used, but (unless I am wrong) XML parsing is total synchronous. I am missing threads here. I could use ANE but then I am stuck at multiple native coding.

  


In AIR, everything is asynchronous. Retrieving data from a remote location is asynchronous too. Once received, parsing is indeed done in the main thread, but AS3 has low-level support for XML and JSON, so unless you have really huge datasets (megabytes) coming back, it should not be a problem.

 

For enterprise apps, the big advantage of AS3 over JavaScript is that it is strongly typed, has a solid inheritance model, is checked at compile time and can be unit tested. In many ways it's more akin to Java or C# than to JavaScript. The Flex framework is fully event-driven, whereas most JS frameworks are callback-based, with all the dangers that brings.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?


soaman wrote:

I have decided (of course, I can always change my mind):

 

1. Client = Cascades + C/C++ (later if requested: Objective C)

 


With Cascades you'll be locked into BB10 of course.

 

If you want to keep your cross-platform options open, AIR and HTML5 are the main choices for mobile enterprise apps, followed at a distance by Qt (doesn't work well on Android), Mono (only Android, IOS, Windows) and some hybrid/transpiling platforms like Appcelerator.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 849
Registered: ‎03-03-2011
My Device: Z10

Re: Which language/framework is the best for developing cross-platform form-based apps?

Maybe I am already locked into BB10.

 

Why?

 

Where can I put my client app so every user can download it?

 

In case of iOS, on Apple app store. If a serious bug appears in my app that may cause financial loss to a company on daily basis (while not working) and when the bug is solved, users still need to wait days till the app is being approved, then it is a NO GO for me. Additionally Apple and IBM can get into a conflict and app can be rejected (Dropbox issue).

 

Android is much better because it can allow download from its own intranet portal (if Unknown sources is checked). But users will never be notified about new release so upgrade must be done manually. I am also concerned about bad security and there are too many different devices on the market - it's hard to manage all.

 

So BlackBerry 10 with Fusion server is the only proper solution for serious company.

 

Can somebody please give me some directions/links about learning Flex, especially I am interested into programatically developed UI?

 

 

 

--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?


soaman wrote:

 

Can somebody please give me some directions/links about learning Flex, especially I am interested into programatically developed UI?

  


I posted a book tip a few weeks ago:

http://supportforums.blackberry.com/t5/Adobe-AIR-Development/Book-tip/m-p/1660665

 

Another excellent book, though now slightly dated and not mobile specific:

http://www.manning.com/ahmed2/


Yet another, haven't read it myself:

http://www.amazon.com/Beginning-Flash-Development-Mobile-Devices/dp/0470948159/ref=sr_1_sc_3?s=books...

 

Adobe has loads of blog posts, videos and even some courseware online:

http://www.adobe.com/devnet/flex.html?view=gettingstarted

 

Lynda.com has some paid courseware:

http://www.lynda.com/Flex-training-tutorials/212-0.html

 

Finally, make sure you look in the Flash Builder help, it contains a lot of background info and detailed reference.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Developer
Posts: 849
Registered: ‎03-03-2011
My Device: Z10

Re: Which language/framework is the best for developing cross-platform form-based apps?

[ Edited ]

I wanted to know this:

LINK

 

So the answer is to programmatical MXML in AS3 is: YES.

 

--------------------------------------------------------------------------------------
Leader of Ljubljana BlackBerry Developer Group
BlackBerry Certified Builder for Native Application Development
Highlighted
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Which language/framework is the best for developing cross-platform form-based apps?

Of course! MXML is just declerative markup for Flex components, very similar to QML in Cascades. It's much quicker and easier than writing it all out in AS3. But you're free to mix & match MXML and AS3, e.g. use AS3 to insert new components into a container declared in MXML, or vice versa. In the end they are all one tree of classes. In fact, at compile time MXML is actually converted into AS3 first, then compiled to bytecode. So anything you can do declaritavely in MXML, you can do programatically in AS3 too.

 

The ability to use MXML for composite components (such as a password screen with some logic) but also do it all in AS3 if you prefer makes Flex live up to its name.

 

There some little things to keep in mind: Flex manages the lifecycle & layout of your components, so they must support a few methods to facilitate this. You can't insert a plain Sprite or Movieclip into a Flex container because they don't have these methods. But there are some intermediate utility classes that can be used to wrap them in. Or if you're writing your own components in AS3, derive from a Flex base class or implement the IVisualElement interface.

 

The mixture of MXML and AS3, the transition from the old MX components to the new Spark ones and the magic of bindings sometimes makes Flex a little confusing, but once the penny drops and you realize that behind the scenes it's all just AS3, you'll understand how powerful and enterprise-friendly the framework is. 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands