I am core java and Java EE developer with loads of experience in UI and web applications. I have encountered in a project now which has Flex and ActionScript as technologies for development and i have totally no idea about what is the above two and never worked in technical environment.
I just wanted a start as how it works, what the things to be taken care of to start with PureMVC and Flex coding.
Examples are Java has class files as output, we need to code in .java and literals expressions methods and classes. What's dere in flex and AS?
Is PureMVC same as MVC used in web applications?
PureMVC is an MVC framework with a flex port (actually, the original was developed in flex and later ported to other platforms). It was one of the first frameworks (along with Cairngorm) to be released for flex. I find it to be a little restrictive myself with a learning curve.
You'll find AS3 to be somewhat natural for a Java developer. The syntax may be a little funky, but you will have most of what you want directly translated to AS3. AS3 source files end in *.as and the output is either a *.swf (executable) or a *.swc (library).
If you pick up flex, you'll also find *.mxml files which is its markup language. The fundamental difference between MXML and programming in Android's XML template or webdevelopment with HTML is that the MXML file actually compiles to a pure actionscript class.
For a Java developer, I would recommend that you take a look at spring actionscript. It one of the first (if not the first) dependency injection frameworks and comes out of the port directly from Java Spring. You will get your annotation-based injection or injection through XML configuration.
Personally, if I were to start from scratch as a beginner, my framework of choice is swiz for its simplicity.
I not really recommend you start with PureMVC and Flex. Most of all enterprise solution use Parsley + Flex. Parsley very similar to Spring and you as Java and Java EE developer will be more easy understand how it work.
Related
I heared the cairngorm is not a framework and parsely framework is inbuilt(IOC container). So we here no need to use the frontcontroler to control the request to respose. Can any one please send ma clear architecture of the cairngorm3.
I had searched documents for cairngorm 3 architecture but not found anywhere.
Is it necessary to know the cairngorm2 or parsely framework (IoC container) or design patterns for learning cairngorm3 architecture.?
Thanks,
ravi
Everything you need is written here :
http://opensource.adobe.com/wiki/display/cairngorm/CairngormGuidelines
As already said , Cairngorm3 is not a framework, it's more like an architecture blueprint, guidelines and some libraries. So you can use CG3 with a "standard" MVC framework. I would stay away from Cairngorm2 if I were you.
Adobe uses mainly Parsley, but you can use CG3 with Swiz, Spring Source, Robotlegs, ...
I'm working on a pretty big application for Flex/Air. We are using GraniteDS and Tide to interact with the model from our Java EE server.
I've been reading about modularization and Modules in Flex. The application has already been built, and I'm figuring a way out to re-design some classes and parts. From what I've read so far, I understand a Module is a different swf which can be dynamically load. Most of the tutorials/documentation are oriented to Flash "programmers" who are using Flex or Air instead of real developers, so that makes online resources harder to get.
What I can't understand - yet - is how to encapsulate ActionScript classes or MXML views under this module.
I've separated some of the code into libraries. For example, the generated code from Granite is in a "server" library. But I would like to separate parts of the logic with its Moderators, Controllers and Views. Are modules the way to go? Is there a "modules for dummies" or "head first Flex Modules for programmers" like tutorial in order to get a better perspective in order to build my architecture? When to choose libraries and when to choose modules?
I'm using Flex 3.5, and a migration to Flex 4 is way far into the future, so no Flex 4 answers please, thanks!
Modules are the answer for encapsulating UI into different sections that do not depend on each other. Think of them like applications inside of applications.
If you want to encapsulate "code", meaning non-ui actionscript, then you really just want classes and packages of classes. You could also package that code into a swc, which is just a compiled version of that code that you can include in multiple projects (I think this is what you meant by libraries).
You wouldn't want to create a module just to contain non-ui code. You wouldn't want to use modules for separating out the model/view/controller in your application.
If you have part of your application, that for the most part runs completely on its own, with no real dependencies on the rest of the application except for maybe a little bit of information passed in, then it makes sense for modules.
Where we use modules mostly is for an application that has different sections to it where you are only working in one section at a time. There is no need for the other sections to be taking up resources, so we have the different sections in modules and load/unload them as necessary.
Does that help?
Edit in reply to the comment below:
By libraries I meant Flex Library
Projects, where you encapsulate
classses and use the swc. Can you have
these libraries inside a Flex Project?
(I use a separate Library Project for
each new library).
Yes, you can use these swc's (Libraries of code) inside of your flex projects. Just drop the swc in the lib directory in your flex/flash builder project and the code is automatically added to your classpath. Just make sure that everything that the code inside a single swc needs is inside that swc. Don't make a swc rely on another swc to function.
Now before I dive too far into this this question, I am aware of nDjango and MonoRail; however, those project seem to be lacking.
What I'm wondering is if there is a solution out in the .Net world that has the following features out of a single box like Rails has in Ruby or Django has for Python. I know tools that do pieces but am curious if there's 1 unified solution out there.
Database Versioning/Migrations
ORM or similar code gen
MVC-based
Pre-generated administrative screens
View generation
Theming / styling
(I'm sure I'm forgetting another cornerstone feature)
There's lots of options that cover one or more of these aspects but is there something in .Net that covers all of them?
Thanks
I have not yet found a solution as you have described, but as you know there are bits and pieces that could be used together to provide a stack that is close:
Database Versioning/Migrations - DotNetMigrations
ORM or similar code gen - Nhibernate, Entity Framework
MVC-based - native to ASP.NET MVC
Pre-generated administrative screens - PLINQO
view generation - available in Entity Framework or CodeSmith templates, PLINQO
Theming / styling - native to ASP.NET
This would provide a stack that is .NET and not another ecosystem sitting on top of a .NET substrate.
You can actually run Rails under the .NET DLR. This allows you to not only access the feature set Rails provides, but also everything else which is available in the .NET ecosystem.
I haven't found a one click installer which gives me everything on your list, but, as you say, I have found excellent solutions for each point on your list which integrate well.
I'm honestly not sure how close this gets you, but S#arp Architecture seems to be trying to cover a lot of this ground in a single package.
There is a django for .net, the name is django!
In the web there is a lot of post about django running with ironpython (a implementation of python for the "virtual machine" of C#, CLR, i think)
there is also ndjango - the django templating language written in f# for .net. you can use it with bistro or asp.net mvc (or whatever else that you plug it into)
Is it possible (and if so recommended) to use Flex remoting (mx.rpc) classes in an ActionScript only project?
I'm creating an application with login and registration to a PHP backend using AMFphp.
As an option I was wondering if it made sense to take advantage of the mx.rpc flex classes.
Actionscript only projects still use the flex framework, so you're fine. Are you trying to do it with the Flash IDE, or are you using FlexBuilder? If Flex Builder, then it doesn't matter at all.
You can use NetConnection class too.
You can use the entire RPC framework, including remote objects, but you have to manually initialize it by registering a number of class aliases (the Flex framework would do this for you, otherwise).
This great blog post explains the how and why.
If you're not really interested in the details and just want to get going, I wrote a tutorial on how to integrate BlazeDS with RobotLegs, which includes a framework-agnostic example you can use as a turnkey.
I came across the Adobe Flex framework one day. After watching http://www.adobe.com/products/flex/media/flexapp/'> the demo of Flex, it looks to me it is a bundle of different Ajax controls. I have no working knowledge of Flex at all and know very little about Flex. Therefore, I would like to hear from the developers here with some Flex experience to explain a bit more pros and cons of this Framework. In particular:
How productive it is to program in Flex compared to the .Net + Silverlight?
Any technical advantages over other frameworks?
Any disadvantages ?
Does it have any known scaling issues?
What kind of web servers can it be hosted on?
Any other things I should be aware of about Flex?
How productive it is to program in Flex compared to the .Net + Silverlight?
Way more productive than Silverlight as it has a much richer and capable control library. Silverlight is rapidly gaining ground here though. I think by the time SL 4 comes out they will reach feature parity, maybe even SL 3.
Any technical advantages over other frameworks?
If you can create it in Photoshop, you can pretty much do it in Flex with the help of the Flash drawing API. If you want to build very interesting data visualizations (tree/node diagrams, such as an org chart) you can do this Flex without a ton of work.
Any disadvantages ?
There is no server-side component to ActionScript so you need to find a way to pass data between Flex and your backend, be it Java, .NET, PHP, etc. There are libraries out there to AMF remoting with just about any backend which makes it easy. But as far as the objects you pass between the two, you need to maintain both or use a code generation tool to create AS3 classes from your backend classes.
Does it have any known scaling issues?
Flex is simply a presentation technology so this question doesn't really apply.
What kind of web servers can it be hosted on?
Again, only a presentation technology. It compiles out to a SWF file that is loaded by the browser over HTTP and then executes inside of the Flash Player plugin.
Well ~~ .. it's more that Silverlight is similar to Flex. It's not Ajax so much as a kind of 'walled-garden' inside of which you have a rich programming environment. Somewhat like Java apps say.
The usual criticism derives from just that. Flex/Flash applications tend to be ignorant of the browser (more or less) so that stuff like back-button usually gives unexpected results.
It'll run on all the current browsers on all platforms. You don't need to "host" flex as you build a SWF file that gets loaded into the browser and is executed by the Flash Player which your users are expected to have already downloaded/installed .. (95+%) penetration helps.
I've been using Flex for the last year or so and it's served my purposes well. It can be integrated nicely with javascript stuff on your web pages and provides a very rich set of capabilities for doing all sorta things like web-services and XML processing and of course all your video/audio/music rich media.
The language is ActionScript 3. Which is fundamentally a strict superset of javascript. You can use javascript as-is. (ActionScript was intended - by Adobe - to be next-gen javascript.)
It can compiled in two modes. One is for hosting in a browser as web app, using the Flash runtime object to provide granular GUI controls.
Or it can be compiled in desktop mode, where it uses another runtime (named AIR) to operate interchangeably on Windows, Mac, or Linux.
I wouldn't compare it to Ajax. It's more like .NET, if .NET didn't have such a disparity between desktop.NET and ASP.NET. Pretend ASP.NET offered a desktop runtime, maybe. (Not a bad idea, actually).
Like a lot of non-MS technology, it tends to be basic yet cover the important capabilities. More conceptual integrity, IMHO. About the same scale, scope, and complexity as VB6 and useful for about the same set of tasks, for about the same audience of developers and users. Yes, it's got good database connectivity too.