Flex :: Advantages To Adding Spring
Aug 28, 2009What are some of the advantages in adding Spring into a Flex / AIR application? And When would you recommend using Spring?
View 2 RepliesWhat are some of the advantages in adding Spring into a Flex / AIR application? And When would you recommend using Spring?
View 2 RepliesI tried asking this on the Spring forums ([URL]) but did not get a response. I'm working on a web application that has an (end user) user interface built in Flex and a management user interface built using Spring MVC. I'm trying to secure both interfaces and can get each one working separately, but not together. I'm using a snapshot build of spring-flex-core 1.5.0 with Spring Security 3.1RC1 and Spring 3.1M1
[Code]...
I'm obviously missing something but while the Spring Flex documentation describes how to configure a hybrid MVC+Flex application at the servlet level it appears to only consider security from the perspective of a flex-only application.
I was reading these days about large projects implementation in python and Flex, and very often people praise the use of framework (like Cairngorm, PureMVC or others) over traditional OOP coding.
I think i dont really understand the advantage of using FW, which is the strong point over classic programming? how big should be the project in order to use FW? it is intended mainly for web-applications? or can be used for desktop apps as well?
they both seem to accomplish the same things with different syntax, whats the point of using two different technologies. highlight every possible benefit of using mxml. Also are there scenarios when one is more beneficial than the other and why. clarify this runtime behavior of mxml vs AS3 as discussed in Oreilly Flex 4 Cookbook page 1:
[Code]....
What are the Advantages and Disadvantages over the Bitmap and MovieClip in Flash.
View 1 RepliesI had experiences using Mate and Parsley. But for now, I'm using none.For instance, I'm using observer and singleton patterns like following.
RegisterView.mxml implements IRegisterAction interface
function onBtnRegisterClick(){
var action:RegisterAction = new RegisterAction();[code].......
This is my interface IRegisterAction.as
function registerCallback(customer:Customer ):void;
My question is "What additional benefits I will get, if I use a particular framework ?".
I'm tasked with writing an application for placing and connecting objects (sort of like a room planner where you can place furniture). i've made a demo using Flash Builder 4 and built it for AIR as a desktop app. Now the client wants the full app, but they and I am unsure whether to continue building it as an AIR app or transform it to a web application using Flex. I tried making a simple conversion of the AIR app to a web app, and most things worked but not all. The things that don't work seem to be simple bugs, though, not complete lack of capability.The capabilities that I'm going to need (except for the modelling) are: Printing of the finished image + a list of the furniture that has been placed
A way to save and retrieve finished plans
A way to export the list of furniture to Excel format
Handling a whole slew of data about the different objects
Only the printing has been implemented so far, and seems to work in the web app as well.What advantages/disadvantages are there with the two approaches? Are any of the capabilities I need much worse (or even impossible) to implement in either approach?
Disadvantages
Requires Flash 10 (for saving files)
Requires a web server to serve content
Sligthly longer development time (from where I am right now)
Requires an internet connection to work
Lots of data transport, may be slow on a slow network
Desktop AIR app
Advantages
Slightly faster development time (from where I am right now)
No web server necessary
Can be used while not connected to the internet
All data is local and faster to load
Disadvantages
Requires the Adobe AIR runtime + a separate installation of the program
Updates need to be distributed to all users and an admin needs to install them
I'm developing a web application (client in Flash Builder 4, server in Eclipse 3.6 + Tomcat 7 + Spring 3 Framework). How do I make the Flex client automatically deploy in the Tomcat server and use BlazeDS messaging and remoting more seamlessly?
View 14 RepliesI'm currently developing a Spring + Flex app. What is the best Flex framework to use? I've been using PureMVC...
View 1 RepliesI should build a web application for back-office purposes and one of the main requisites is a good UI. On server-side I'll use Java very likely Spring framework, depending on what I'll be using client-side. I think to basically have 3 choices for client-side: a "normal" web application, meaning JSP pages, using JQuery framework. In this case, I will use full Spring's features, complete MVC pattern etc. I've been using Spring and JQuery for 2 years, so I know these techs very well. But I also know that it's quite complicated to realize some effects, much javascript code involved, specially when dealing with ajax calls and dynamic changes of page structure.
Flex with add-ons such as BlazeDs to integrate with Spring. I have no experience using Flex, I just read some articles and tutorial about it, but I really would like to learn something new :-) Google Web Toolkit, maybe with something like gwt-ext. No experience, but I really like to learn. It's plenty of support out there if I need, but I think I will struggle to maintain Spring MVC and GWT in the same project, I read that it's not so easy but there are a couple of patterns to follow.
Which is the best way to integrate existent spring-MVC-Project with flex. I'am using Spring-2.5 lib with annotations. e.g my list controller:
[Code]...
I have also a colors.jsp which displays the colors. Now I would like to integrate flex as an UI-Layer. I only need to integrate the Spring-View with shown RequestMappings above.
I want to use Spring BlazeDS Integration.I write them like this.
[web.xml]
<servlet>
<servlet-name>flex</servlet-name>
[code].....
Some background: I have a Flex app embedded in an HTML page and am using Flex to send a soap request to my Java backend that does some authentication depending on the username and password entered in the Flex form. If I enter the correct login everything works fine and the Flex app can continue making further requests. But with an incorrect username/password, an "Authentication Required" dialog box pops up in my Browser and my Flex app won't respond with its proper handler until I click cancel. I'd like to get rid of the dialog box somehow,
View 2 RepliesI try to start JEE, so after studying the frameworks avalaible for this architecture, i choose to use the following one: Flex, BlazeDS, Spring, Hibernate, mysql. i will work with eclipse or STS.The problem is that, after trying different project all over web tutorial, i wasn't able to create an architecture that gather all the last versions off technologies i choose.SO, can someone send me a links which refer a tutorial where it's preferable that the source code is available to download, and it gives the explanation about what is done.
View 2 RepliesI have been trying to upgrade spring-flex 1.0.3 to 1.5.2 in order to check new features, i.e. Hibernate lazy fetching support in BlazeDS 4. I downloaded all necessary packages, changed dependencies in Maven for Spring (to 3.0.7), Hibernate (to 3.6.9) and Spring flex core (to 1.5.2). When I try to build and deploy application, I got NullPointerException which indicates cause in my domain class (at the end of stack trace):
[Code]...
I have a simple hibernate/spring/flex project. The project was developed under apache tomcat6. Can anyone point me how to proceed to deploy it on IBM webshphere v6.1?
View 1 RepliesHow Flex knows to call the particular service in Spring framework.
I give in Flex side:
<mx:remoteObject id="myObj" destination="mySpringservice"/>
And remote-config.xml file:
<destination id="mySpringservice">
<properties>
<factory>spring</factory>
[Code]....
And how server knows to the particular flex remote object calls to particular spring service. any thing need to configure in service-config.xml file?
We have a Flex-BlazeDS-Spring-JMS application. The issue is sometimes we get a Blazeds error: NoSuchMethodException. It is not able to find the Java service. The weird issue with this it does not happen all the item...1 time it goes through and returns the result, the 2nd time it fails, 3rd time fails and so on. Also not all methods fail, only 2 method calls fail.
[Code]...
I've got the Spring Security preauthentication sample configured and working with JBoss. The next step is to somehow get the user information into a flex client GUI. What are some methods that will let me get the Authentication or UserDetails object that's created by spring-security on http access into the flex client? Since I'm logging in externally, I can't use channelset.login(), right? All the examples I've seen so far assume that the user logs in manually through the flex client, but the requirement is for container-based authentication. Using flex3, spring 3.0.4, spring-security-3.0.3
View 3 RepliesI'm going to be using Flex 4 with Spring and Hibernate.Everything is configured and working. I know this as I can do simple queries, like listing all values in a table.Problem is when I try to perform a 'select' query, then I get all the values, as I was getting before, and not the specific attributes through Select query.I'm a beginner, so kindly overlook my lack of more technically sound words..but I don use them as I don wanna mis-quote.This is class used to store data coming from the MySQL database--
package flex;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
[code]....
The reference doc ( here ) tells us to download the sample application: Included in the project distribution is a collection of samples called the Spring BlazeDS Integration Test Drive. This samples project is set up to be built with Maven and then imported into Eclipse for running the application via WTP.
The samples in question, must either be spring-flex-testdrive-spring3.zip which is linked to in the document or spring-flex-testdrive-spring3.zip based on the notion that this is release 1.5.0.M1 (docs and samples).After I configure maven as described with the proper environment variable:
MAVEN_OPTS="-Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m"
I then execute (per instruction) the command to install: mvn clean install from the extracted samples directory (in my case C:spring-flex-testdrive ), I receive the following error:
C:spring-flex-testdrive>mvn clean install
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[code]....
I have managed to get a "Spring BlazeDS" application working (with Flex), but now I'm at the point where I need to implement security, and if the samples would compile and run correctly.
Is there a good Maven archtype for Flex Spring Hibernate integration which can be used as template?
View 1 RepliesThe Spring BlazeDS integration (in our cases 1.0.5M1) allows us to define MessageInterceptor instances and register them in the message broker. what this mechanism should or shouldn't be used for?
From the API documentation I can see that the framework itself uses interceptors for Spring Security integration. We were thinking of using these interceptors as a way of enforcing our own special kind of security (we track our users using our own services in the application context), where a condition is evaluated every time a message is sent across the wire.
I'm trying to figure out the best way to leverage a vanilla HttpServlet from a Spring-Flex (with BlazeDS) project I'm working on. My team has an HttpServlet that they've used in the past (that some other team built) that processes a request given some key/value pairs passed over HTTP GET. I want to use this HttpServlet class to do the same work, but I want to call it in Java, when my Flex client invokes a method on a Service. Ideally, the class invoking the HttpServlet can use the standard @Service and @RemotingDestination annotations (see here).
So, this is the HttpServlet:
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
[Code] .....
How to write my @Service class. I've tried going down a few different roads, but haven't had much luck. So far, I've considered and come up with secondary questions on the matter (but I've yet to work out the solution):
Do I need a @Controller for this sort of work?
Do I need a Servlet Factory?
Can the HttpServlet be a Spring managed bean, and call the ASP page another way?
(I like this idea least) Should I call the HttpServlet from Flex, and leverage logging and data the Servlet needs with a Remote Object?
The reason for my stubbornness in wanting to do this from Java is that I want to do some logging, and maybe leverage some other Singleton beans in the scope of the @Service class. However I work this out, I want to be as close to "Best Practices" as possible.
I have a spring BlazeDS integration application. I would like to log all the request.I planned to use Filter. In my filter when I check the request parameter. It does not contain anything related to the client request. If I change the order of my filter(I have spring Security), then it prints some thing related to spring security.I am unable to log the user request.
View 1 RepliesI'm using Spring, Spring Security, BlazeDS, Flex and spring-flex.I know that I can call channelSet.login() and channelSet.logout() to hook into Spring Security for authentication.channelSet.authenticated apparently only knows about the current Flex session, as it always starts off as false, until you call channelSet.login().hat I want to do: Check from Flex to know if a user is already in a session.
View 3 RepliesI am developing a IT Monitoring Dashboard for the company I work at. The system will primarily perform monitoring of files, databases and servers. There will be a small part of the system which will allow the users to configure static data about the system eg: file locations, server names etc...
So as the app. will be a dashboard a lot of the application will consist of publishing data to the flex client to update all the monitoring views. So there will be limited database activity ie: insert/update/deletes.
[Code]...
In my attempt to learn flex remoting I came across thisflexService.getRules.addEventListener(ResultEvent.RESULT, loadRules);here flexService is a remote java object . me that when esultEvent.RESULT will occur. On studying about ResultEvent in AS document it states as The event that indicates an RPC operation has successfully returned a resultSo keeping that in mind my guess is ResultEvent will be fired when flexService.getRules method will successfully return a list of object,where flexService is object of remote class FlexService having getRules function which returns list of object, Can any one please tell how exactly it works
View 2 RepliesI have attached a service-adapter to a spring message-destination as follows:
<flex:message-destination
id="secured-chat"
send-security-constraint="trusted"
[code]....
I'm trying to implement a simple application which uses Flex on the front end and a Spring/Hibernate application on the back end, with communication between the two going over a BlazeDS channel.
I'm seeking direction as to the best and/or simplest way to approach this. I have the UI set up in such a way that the user is presented with a file chooser in which they pick the image file they want to upload. When this is chosen and submitted (as a form submission) then the server side should receive the image file data as well as some related metadata such as a description and date, then populate a Hibernate entity/POJO with the image file data and related metadata, and then persist the entity/POJO into the database.
I have found some examples of how you would do a file upload and download using servlets here and the FileReference class (here and here) but these don't appear to address the problem in a way which leverages BlazeDS and/or Spring/Hibernate. I want to put the image file data and related metadata (description, capture date, etc.) into a value object within the Flex application and then send this over BlazeDS to a service provided by my Spring/Hibernate application running on Tomcat. In this service I want to extract the image data (both the actual JPG/PNG/GIF data and the related metadata such as description, etc.) from the value object sent from the Flex app into an entity/POJO which is then persisted via Hibernate in my database.
Can this be done, and if so what's the best way to go about it? Am I mistaken in assuming that if I use BlazeDS then I am somehow bypassing the need to provide HTTP-based services such as servlets on the server side and instead I can use my Java services as "RemoteObjects"? Is there necessarily a one-to-one mapping between Java POJO/entity class and the Flex value object class when making this sort of transfer? If so is there a tool which creates corresponding Flex value objects from Java POJOs or vice versa.
Update: Some code to make this more clear:I have this as my value object in Flex:
package valueobjects
{
import flash.utils.ByteArray;
[Bindable]
[code]....
When I set a breakpoint in the method above and look at the image variable it looks to be empty, so I'm assuming that the transformation from the Flex value object to the Java POJO did not go as expected and that there's more to it than just adding a RemoteClass alias in the Flex value object class.