Flex/Openlaslzo for RIAs? - apache-flex

I recently stumbled upon flex/openlaszlo (OL). Both seem very useful and I have a few questions about them:
What is needed to deploy flex apps? From what I understand, the flex sdk
is open source, but the other tools
(for development and deployment) are
proprietary.
What is needed to deploy openlaszlo? Is it completely open
source (from development to
deployment), or does it have
development/deployment "gotchas" like
flex?
Specifically, I'd like to use flex or openlaszlo to either augment or
replace an editable table I created
using js, ajax, html, and css. Is this
the type of thing flex/OL can/should
be used for? Are there any drawbacks
or pitfalls to using flex/OL for this
rather than straight js, ajax, html,
css?
Thanks.
Edit: Are there any licensing (use) restrictions on applications built on flex? i.e. applications built on flex can be for only non-commercial use, unless a commercial license is purchased?

The following link has some discussion about openlaszlo and flex, it may help you:
Use the best open source client-side framework for cloud computing

You do not need anything special to deploy Flex apps. Just put the compile app (a SWF file) on any web server. Flex apps can talk to any back-end.

Flex SDK is free, but Flex Builder is not. You can use the free and open source FlashDevelop to write flex apps - it doesn't have drag-n-drop features like flex builder, but it offers code hinting and stuff. I don't know about openlaszlo.

Below is the link providing details of tools/IDEs for developing OpenLazlo applications
http://wiki.openlaszlo.org/Development_Tools

Re: "What is needed to deploy openlaszlo? Is it completely open source (from development to deployment)"
OpenLaszlo is OpenSource, but the typical versions you install come with the main components pre-compiled into a SWF for the SWF run-time. However, you can download the full source code if you wish to look at it and/or compile the core yourself:
Last official released version (4.9.0): http://download.openlaszlo.org/4.9.0/openlaszlo-4.9.0-src.tar.gz
Nightly builds:
http://download.openlaszlo.org/nightly/trunk/ (you will see "source" as an option after you click the link of the version you want)
OpenLaszlo does not require anything else to be deployed but itself, except if your application is compiled to the SWF run-time then the user will need the Adobe Flash player installed in their browser to use it.

I'll answer your last question: the biggest drawback to using Flex is that it requires the client to have the Flash Player plugin installed in their browser. Not that big a deal for most people since Flash Player is over 98% of all computers. With the straight Javascript, AJAX, HTML, CSS approach it should work on all browsers, assuming you wrote it correctly.

Related

A-Frame: standalone environment (ala PhoneGap)

Are there any options for packaging an A-Frame application into a standalone form? Sort of like how PhoneGap packages webapps?
I imagine the solution would need to package all HTML/JS files and resources together with a standalone browser? And then launch with 'headset mode' on by default?
A-Frame apps are just webapp, so try the existing toolchains like Cordova or Phonegap. There may be issues and your mileage may vary though as we don't put much effort towards those use cases. There are several issues filed for Cordova + A-Frame on GitHub for an introductory read.
It seems though recent webvr-polyfill issues may not be friendly for WebViews: https://github.com/aframevr/aframe/issues/1940
I've been using crosswalk lately, all the latest APIs and no browser compatibility problems.
It's very easy to add on to an existing html5 project : https://crosswalk-project.org/

Does Adobe Flex have the ability to compile into HTML/JavaScript?

I'm fairly sure I know what the answer will be here, but since I recently stumbled across Apache FlexJS: https://blogs.apache.org/flex/entry/apache_flexjs_0_6_0 I thought I would double-check.
Is there a way to compile Adobe Flex applications into HTML/JavaScript, using the Adobe Flex SDK? I have done some digging and this new development on the Apache Flex project seems to be the only path forward in that respect.
In theory yes, as described on the schema of https://cwiki.apache.org/confluence/display/FLEX/FlexJS : you get the same source code and can compile it into HTML/JS or SWC.
However, in practice you will get issues because the component library is currently very limited in HTML/JS.

Will a Flex app run on a mobile device?

Can a Flex application that was designed for use on a PC be run on an iPad, iPhone, or Android-based mobile device?
Seems like a simple enough question. Visiting http://www.adobe.com/products/flex.html yields a picture of a dude running a (presumably) Flex application on an Android. So at first glance, the answer would appear to be "yes." End of story.
but yet…
There is so much (mis)information out there on various tech sites that suggest Flash-based technologies simply won't run on iOS or other mobile platforms. Why is this? Perhaps they mean to say that Flex won't run "out of the box" and requires a plugin? Or do they mean it won't run at all?
Every time I think I've reached a definitive conclusion, some post on SlashDot or CNET directly contradicts it. So what's the scoop? Can one take an existing Flex application and run it on iOS/Android? (I realize there are screen size issues to consider so the app might not run effectively. I just want to know if the runtimes are available on the mobile devices to allow the Flex app to launch at all.)
Sorry for the noob question. My background is WPF / HTML5. Adobe technologies are completely foreign to me.
I wrote a lot below if you'd like to read it enjoy, if not sorry for taking your valuable bytes :) I directly answered the questions up here first:
Why is this?
It's a confusing matter read below for the why details.
Perhaps they mean to say that Flex won't run "out of the box" and requires a plugin?
Or do they mean it won't run at all?
Using the flash builder tools (the bin folder in the SDK) you can compile for native desktop application, desktop web browsers, native iOS application, native Android application. Android with FlashPlayer plugin installed will show Flash content within the web browser, iOS will only run the ones compiled with AIR, not in the the web browser but as a native app.
Every time I think I've reached a definitive conclusion, some post on SlashDot or CNET directly contradicts it. So what's the scoop? Can one take an existing Flex application and run it on iOS/Android?
Yes, if using AIR and run as a native app on all three platforms (the desktop Flex API is for the most part a superset of the web Flex API), your other points about performance and form factor are valid and should be considered though. The nice thing is you can write your model/controller code in a common library in AS3 then write separate presentation layer interfaces that all share the library.
Here's the very long version:
Using the flash compiler results in "bytecode" in the form of a file with a swf extension using the swf format, you can read a ton more about that here:
http://www.adobe.com/devnet/swf.html
To interpret the file you need some sort of run-time similar to some degree to running WPF/XAML/C# within a .NET framework context (either desktop or using silverlight on the web). In the case of adobe technologies (rough equivalence):
AS3 = C#
MXML = XAML
Flex = WPF+WCF (client side RPC not server side)
Flash Player = Silverlight
AIR (Adobe integrated runtime) = .NET
Framework Redistributable .dll(s)/.so(s) for desktop OSes
(Read this list very loosely please, I know XAML is preserved in the MSIL or whatever which is different because MXML is compiled to AS3 and only if a debug flag is set on the compiler does it include the debugging symbols, there's certainly tons of differences but I think this is an easy and correct enough model to use)
On iOS the browser does not allow for plugins in the traditional sense of netscape browser plugins or ActiveX plugins. For this reason you'll not be able to execute a plugin ie flashplayer or silverlight in the browser. Since Adobe did release a flashplayer for Android devices that does run in the browser it will work on those devices in the browser, however they have essentially thrown in the towel for supporting this long term, as they have to support the majority mobile device platform, iOS, in order to remain relevant (this was I think more a collective throwing in of the towel by Google, device manufacturers, carriers, Microsoft, all just following suit and trying to make the best business decision, WebKit and V8 or SpiderMonkey can probably do 99% of what Flash can do and better in some cases and WebKit will hopefully not splinter and will remain open source... frameworks and the browsers just need to get fleshed out and stabilized).
If the user installs AIR (or the runtime is packaged with the app) then a Flex/Flash (that is stuff coded in AS3 and/or MXML and compiled to a swf) can be transcoded/packaged to be interpreted by the run-time for that device correctly (be it iOS or Android or whatever RIM did, I don't think they have AIR for Windows Phone 7 and Win8 on ARM won't support browser plugins either). Part of the confusion is possibly from the fact that Apple denied the distribution of Apps that were "cross-compiled" which kept AIR out of the list of options for iOS for a good year, just after Adobe started announcing it was usable for that purpose (kicking Adobe while their down). Another part of the confusion probably comes from real vids of people who have 1 hacked their device or 2 were able to get open source alternatives to the flash player run-time to work on their iOS device (gnash was one I'm aware of from some occasional Linux tinkering, also possibly FAKE vids).
You can run Flex applications on mobile devices, but you cannot simply run any Flex project.
In Flash Builder ( Flex Ide) or in Flash Professional you can create mobile projects. These projects generate native applications for iOS and Android.
Last time I tried, the result and the available components where less than what I expected. So, if you can, I'll much recommend you go for something like Appcelerator.com or similar, which turns HTML5/Js code into native apps. I tried them, worked a lot better than Flex.
Short answer: No
Long answer: You can use Adobe's tools to compile your Flash/Flex app for use as a native iOS app. So you won't be able to embed the app in a web page like you normally could with Flex, but you can build it as a native app. Note you have to have Flash Builder 4.5 to do this.
It won't run on iPhone as a .swf file, but it will run on Android based devices that have adobe flash installed. It will also run on the BB playbook, which also has flash.
Flex is a framework.( Anyway it is very beutiful one which even sometime looks like complete different language ).
As soon as you are building AIR application it can run on various platforms like : Windows, iOS, Android, upcomming TV's, PlayBook, even .. into the future ( maybe/hopefuly ) on Windows Phone, plus Linux ( which AIR future is not very clear anyway ( but hopefuly Adobe will reconsider ) ).
So - application created with Flash Builder 4.5+ would probably run everywhere as soon as it is AIR application.
The compilation methoods is really simple, and you almost simultaneously compiling for everything you wanna to.
And one of the most important things here - your applications will run, work, look and feel the same way you were designed on one device. Flex is the thing which is responsible for everything to looks beutiful on each platform it is running.
For instance i am compiling currently for Android, and without even test i can clearly say that it will looks and feel the same way under iOS and Windows, and it will.

What technology for a rich UI desktop application?

For an internship, I'm gonna have to develop a desktop application. The focus is creating a rich UI ( cool effects, sound etc ). Which tech should I go with ?
- Flash ? ( in this case, shoud I go with a flex project ? AIR ? what is the gain between this and a simple raw flash project )
- C#/Silverlight ?
Any other possibility ?
If experienced developers could give their advice, that would be great thanks.
The best technology to use is probably the one you're most familiar with, unless you mean you're going to be learning on the fly. But for the various options I'll take a stab.
Flash itself (the runtime) is a browser plugin, so that's not what you want, but if you build your application in Flash or Flex (the authoring tools), then you can publish it as an AIR application. AIR is also a runtime - basically it's Flash, plus a bunch of extra APIs for running outside the browser. The advantages to making an AIR app are:
The same app runs on win/mac/linux
You can make it with the same skills/tools you use for Flash (dubious utility if you don't have those skills/tools, of course)
Close tool integration with other Adobe tools (photoshop, after effects, etc.)
The main disadvantage is incomplete access to native (i.e. OS) capabilities. The way a runtime allows you to run the same app on win/mac/linux is by restricting you from doing some of the things that you could do with a native application.
As for Flex, whether you use Flex or not is a separate question. Flex is a framework within Flash - an AIR app can be made using Flex or not using it. Basically, if you expect your app to have a lot of controls, slider bars, charts, accordion panels, etc., you might look into Flex. If you expect it to have a lot of animations and pictures and sounds, plain-old-Flash may be better.
Apart from Flash, the other main choice for a runtime is Silverlight. The advantages there are, to be honest, basically the same. You use .NET instead of ActionScript, and the tooling integration is with MS' Expression suite instead of Adobe's creative suite, but the development process and the results are quite similar. The choice between AIR and Silverlight is really a choice between Adobe tools and MS tools, and between two programming languages of entirely comparable power. Most everyone simply uses the one they're more familiar with.
Finally, the other set of options is not to use a runtime, and to simply compile an app from any language/development environment you like - C, C++, .NET, Python, anything. The advantage here is you get (in general) full access to OS capabilities. The disadvantages are, you (in general) need to do extra development to run on multiple platforms, and also I don't think you'll find a language/environment that lets you work with multimedia as easily as you can in AIR and Silverlight.
Depends what programming languages are you proficient in. If you are .NET/C#/VB.NET guy go with SilverLight or WPF. If you know ActionScript, go with Adobe line of products.
My preference goes to the (slightly) most opened universe. Assumed that you know how to write Object-oriented programs, Adobe is using Eclipse as a base for his tools, using plugins.
Actionscript is just like Javascript syntax. You just have to learn the flex 4 libraries.
Then, publish you app as an Air desktop application that can run everywhere. Really everywhere
The only thing to know about MS tools and languages and libraries is that they are very well designed and usable. and it runs on Win and mac also. and Only.
If the main request is to have a rich UI the simplest approach is to build a Flex application running under Adobe AIR platform. The answer to the questions Flash or Flex is very simple: if you are a designer go with Flash, if you are a developer stay away from Flash and use Flex. The Flex framework was created for developers, and is really hard to replicate all its features in Flash (think only what you have to do in Flash if you want to resize your app).
On the other hand if you are coming from a .NET background it will make more sense to stick with Silverlight/C#
I'm not sure if this helps but I'm developing in Flex and now I have started to learn Silverlight and I can say that developing in Flex Builder is much more faster then developing in Silverlight( Visual Studios ) . For me Flex Builder is much better because you use only one IDE to develop both back and front end. And that's when it comes to web development. If you want to do desktop applications then you do the same thing and a plus is that you get everything in only one file. You also have a small SQL database that comes with it.
But on the other hand when you develop in Silverlight you have to use several IDE's or tools outside Visual Studios to make awesome graphics. But if you want to have more time for design then I would suggest to use Flex Builder and not Silverlight.

What are the Pros/Cons of Flash Builder vs. FlashDevelop?

I want to play around a bit with FLASH for app development. I'm looking for a good IDE for that. Someone suggested Flash Develop.
Flash Builder
Pros
better debugging and profiling
visual designer for MXML
because of Eclipse: support for other languages (eg. with Aptana, PDT...) and usage of plug-ins for the Eclipse Platform with features not shipped with FlexBuilder (code snippets with CFEclipse "Dynamic Snippets", "auto-code" for getter/setters with Monkey scripts...)
support of virtual folders/files (links to external files/folders handled intern by Eclipse, so also working on Windows)
refactoring (renaming of classes, functions, properties with automatic changing of dependencies)
Cons
Commercial license
Big and because of Eclipse problematic with newer Eclipse versions for the FlexBuilder plug-in version (eg. not working with Eclipse Ganymede 3.4.1)
adding and configuring the missing features with Eclipse plug-ins needs time and searching in the Internet (which plug-in? settings etc.)
Code assist only average and sometimes buggy eg. if correct imports are missing ("java.lang.NullPointerException")
missing of a code formatter or automatic get/setters (but there are solutions with other Eclipse plugins like Monkey Scripts, CFeclipse, Flexformatter "FlexPrettyPrintCommand"...)
sometimes a bit sluggish if background tasks in Eclipse are working
no package explorer
AS2 and AS3 only - no Haxe
FlashDevelop
Pros
free and Open Source (developed with C#)
lightweight and snappy
best available Code Assist for ActionScript
supports all flash languages - AS2, AS3, haxe
"auto code" for automatic getter/setter, variables, code for event handlers
code snippets with integrated snippet editor
extendible with plug-ins
support for asdoc comments
package explorer (show classes, symbols from a SWC file)
basic refactoring
multiple source code folders per project
useful plugins : ANT integration, SWC creation, mini map, quick navigate
Cons
only for Windows
no visual designer for MXML
no support of virtual folders/files inside the project
weak refactoring
changing classpaths must be done manually
plug-ins often not working in newer versions and many plug-ins are only rarely updated
limited support for debugging Haxe applications
Common
Pros
projects for full range of flash apps : websites, AIR (desktop, mobile)
debugging of FP/AIR apps with breakpoints and stepping
debugging with watch windows and locals
support for ASDoc comments
automatic adding of imports and organizing of imports
class wizard
SVG/GIT integration
Cons
no editing of graphics or animation (use Flash IDE for that)
Summary
For debugging, visual design of MXML forms : Flash Builder
For coding AS2/AS3/Haxe projects under Windows : FlashDevelop
Major reason to use FlexBuilder: has a real debugger you can set breakpoints and single step and watch/edit variables.
Unless FlashDevelop has .. developed .. don't think it got any of that yet.
BTW - if you are a student/teacher FlexBuilder can be had for free
Flex builder has a design view for MXML so you can build more visually. Flashdevelop on the other hand is free!
I've been using Flash Developer. Trying now FlashDevelop. FlashDevelop is fast and light, and I'm trying to switch just because of that.
I'm using HG + TortoiseHG for source control. I have 2 screens, so having external source control is not a big problem. Also the IDE stays a little cleaner by not having all the little source control icons.
DesignView helps with not having integrated design.
Also, I can debug with FlashDevelop and see the variables. I'm using FD3.2.1.
Along with what was already mentioned, Flex Builder has some nice tools that helps a developer to learn how to create a data enabled Flex application in form of the Data Wizards and also a nice web services introspection tool that automatically creates an ActionScript 3 client for a web service.
I'm using the new Jetbrains IntelliJ 8, and it's great (especially if your used to java developement). Has a lot better XML/JavaScript editors that any other IDE.
The latest version of IntelliJ also has a good flex/javascript debugger.
Here are two objective contrasts between FlashDevelop (with the Flex 3 SDK) and FlexBuilder. First, only FlexBuilder includes AdvancedDataGrid. Second, FlashDevelop has no source control integration.
AdvancedDataGrid is not included in either the free or open source Flex 3 SDKs; if you want it, you have to buy FlexBuilder. (I assume it is probably possible to use it via another SDK if you possess FlexBuilder.)
FlashDevelop doesn't have any source control integration, FlexBuilder possesses the existing, stable source control options for Eclipse. This includes Subclipse for SVN, as well as a lot of other things. As a longtime Visual Studio and Emacs user, in FlashDevelop I'm beginning to feel unsatisfied with leaving the editor to check in.
Flash Builder, even in version 4.5, has primitive, useless syntax coloring and customization features. From a 700$ package I was expecting at least what I can do with my free text editor.
In the syntax coloring preferences, there is a total of 6 keywords, and you cannot add any custom one.
How am I expected to code having variable names, function calls, and classes look exactly the same?
I will stick to Flash Pro CS5.5 and SciTe.

Resources