Flex :: Implementing A MVC Pattern Without A Framework, Should Httpservice Be In The Model Or The Controller?

Jul 1, 2011

I would like to implement the MVC pattern to an existing Flex project.I want to separate out the controllers and models from the views. They currently all live together in large mxml files.My question is, should httpservice requests be in the model or the controller? What sort of advantages/disadvantages would there be to either?

View 3 Replies


Similar Posts:


Java :: Hibernate And Servlets With Adobe Flex + Model View Controller Pattern?

Aug 30, 2010

I am preparing a document for a project. The project's backend is developed in Java, frontend is adobe flex.
I am not sure about the correct way of describe the project in Model-View-Controller way.

For Model layer: Using Hibernate Java beans to implement all the business logic and persistence? For View Layer: Using Adobe flex send post or get request to Controller layer, and get respond in XML format. For Controller Layer: Using Java servlet to handle requests from Flex client?

View 2 Replies

Flex - Cairngorm Model Locator Pattern?

Jul 5, 2011

In Cairngorm (Flex Framework), there is Model Locator Pattern, which is similar to Global variables, is it a right pattern, Adobe is saying for flex its best pattern

[Code]...

View 1 Replies

Flex :: Project Doing In Mvc Pattern Using Cairngorm Framework?

Jun 17, 2010

I wish to do my project in mvc pattern. so I chose cairngorm framework and just read some of the document about this framework.But I cant understand deeply to do project using this framework. Have any methods or examples to study doing project in cairngorm framework??

View 1 Replies

Flex :: Zend Framework Model With Service?

Feb 10, 2010

i have a question about Zend Framework and mainly the model part. I know there is no abstract model class and understand why. I red a lot of blog posts about it, but couldn't find any example that would clearly explain it to me. I'm building a very basic application. Lets imagine we have just three tables.company(ID, name, street, streetNo, Town), meta(ID, name, description), company2meta(ID, companyID, metaID, value, note). All types of realtionship are there (1n n1, nm). The a need also services (amf) with Value Objects. So, here is what I think:

[Code]...

View 1 Replies

Flex :: Presentation Model Pattern Can View Specific Logic Reside In View?

Aug 15, 2011

I'm currently using RobotLegs with the Presentation Model pattern to develop a Flex 4 project. I understand that all business logic related to a View resides in the Presentation Model associated with that view, however, I am confused when it comes to View specific logic.For example, I have an indicator that needs to be positioned relatively to list items depending on which list item is selected. Is it acceptable in the Presentation pattern to put the logic that will position the indicator in the View and simply have that logic run in reaction to a selectedIndex property changing in the presentation model?The reason I am considering this is that since the Presentation Model does not have a reference to the view it is difficult to come up with an ideal solution for manipulating view components.

View 1 Replies

Actionscript 3 :: Model View Controller - Where To Keep Simple Logic

Mar 18, 2011

I often see very different implementations of the Model View Controller Pattern, and completely understand that you should adapt and use what fits your needs the best, but I was wondering what would be the advantages/disadvantages/best practice of keeping simple game logic in ether the controller or model? In essence which is the correct way I should be doing this? for this simple example the player receives damage and I have listed three possible ways of dealing with it:

[Code]...

View 1 Replies

ActionScript 3.0 :: Model View Controller Simple Image Load

Jul 25, 2011

Here I want to load an image. The arrangement produces no errors and no results. I'm really trying to get my head around this design pattern.

[Code]...

View 4 Replies

Actionscript 3 :: MVC Pattern - Bind Event Listeners From Controller Onto Views Elements?

Sep 2, 2010

How do you bind an event listener from the controller to the view's elements eg button (click event) to its own handler? Originally I was doing this from the view eg. button.addEventListener(MouseEvent.CLICK, controller.buttonClick); But now realise this is wrong since reading "each view is only supposed to "know" about the model which it represents, and "know" nothing of the controller"

View 2 Replies

Flash :: Silverlight - MVVM - Presentation Model In Flex Vs Presentation Model In Silverlight: Advantages And Disadvantages?

Apr 10, 2011

As it is said here: [URL] "If you do a Google search today for "MVVM and Flex", the first post is by somebody who claims that MVVM is not a good fit for Flex. I couldn't disagree more. Out of the box, the Flex framework makes it much easier to implement a Presentation Model than similar MVVM implementations in Silverlight. That is not to say that there aren't good third-party libraries that make it easier in Silverlight, but without any help, it is easier to do in Flex." So MVVM as LOGICAL CONCEPT can be implemented in both but the way it is implemented in Silverlight requires more Plumbing than Flex.

What prevents Silverlight MVVM to be implemented like Flex ? Doesn't Silverlight have same capability in event system to do the same? If yes why does Silverlight do things more complicated what's the advantages then ? Is it about using Class Interfaces which are more strongly typed? What are the disadvantages also ? For example as for implementing MULTIPLE VIEWS for 1 View-Model does Flex implementation make it also more obvious?

View 2 Replies

ActionScript 3.0 :: Search A String For A Particular Pattern, And Replace It With Elements From Within The Pattern?

Nov 25, 2009

i'm trying to search a string for a particular pattern, and replace it with elements from within the pattern... for example..here's the given string...if you want to learn how to use regexp, {url===http://somesite.com, text===click here}.

the pattern...
{url===http://somesite.com, text===replacement text}

and the intended result...
if you want to learn how to use regexp, click here.

of course, i'll extract the url and do something else with it... i'm just wondering what the regexp is for that pattern, and how i can extract things from the results returned.

View 5 Replies

Flex :: .NET Webservice In MVC - Access (controller)?

Jun 22, 2010

I am working on a flex application which makes calls to an .NET webservice. I am trying to follow the MVC design pattern. I have created a model, which stores all information received from the webservice. The webservice itself is created by actionscript in the controller. The view in my case, consists of various user-defined components (multiple .mxml files).

The Model is a singleton class, and each of the views accesses a getInstance of the model. The question is how do i access the webservice (i.e. controller) from each of these components? Does the controller also need to be a singleton class just like the model? and let each component get an instance of the controller in order to access the webservice?

View 1 Replies

Flex :: Registering Event Listeners In A Controller?

Nov 10, 2009

I'm working on creating a simple MCV application, in order to understand MVC better. The problem I'm having is registering event listeners. The way I see MVC is that the view dispatches events, the controller listens for these events and acts on them, either updating the model or amending the view. So in my MVC app I have a controller which during initialisation should register all the events that are dispatched by the view. This is my controller:

[Code]...

Now is this the way to do this, and why is it that my controller is not registering the event handlers?

View 2 Replies

.net :: .NET MVC Controller Action Not Invoked By GET Or POST From Flex App

Mar 3, 2010

A flex app running in a view of my .NET MVC app can load data fine from another route, but submitting data via either POST or GET never invokes the controller action. Interestingly, the only way I can get the action method to fire is by passing intentionally malformed post variables in the http request. Odd. Content type is application/x-www-form-urlencoded and I have set authentication to "None" in web.config with no improvement.

View 1 Replies

Flex :: Implementing States In App

Apr 24, 2010

I'm trying to work out how to use states in my Flex app.I've created two states, State1 and Stage 2. Both are based off the base state. I've created a few visual elements for State1, and given each of them includeIn="State1".But when I'm in design mode and click on State2, these elements are still visible?If I try to delete them while State2 is selected, all that happens is RemoveChild is added to the State2 tag.

View 1 Replies

Flex :: Implementing Undo/Redo Within A TextArea?

Dec 2, 2009

Im wondering how to implement undo redo functionality with a TextArea. I already have an undoredo framework functionality working, now I have two questions.When do I start/stop a new undo/redo command, eg when a user hits undo, how far back do I go. How do I implement this(1.) in a normal TextAreay thinking:I thinking that I should create a new undo command, when anything but a alphanumber+space is hit. To do this I would use the keyDown event and test if the key is alpha num if it is not I will reset the command.

View 3 Replies

Actionscript :: Flex - Implementing Singleton Class?

Jul 22, 2010

I know actionscript does not allowed private contstructor at any time and But if i want to write a sinlgleton class in action script So how to implement it in actionscript.

Can anyone provide an sample example of a singleton pattern in actionscript?

View 5 Replies

Flex :: Implementing Process Workflow In PureMVC

Oct 11, 2011

I'm looking for suggestions regarding implementing process flow / work flow management in a PureMVC based application. Our Flex application includes a number of processes such as account creation, payment processing, etc. Within our team, there is some discussion of how rigidly we should adhere to the PureMVC model. Within the PureMVC model, it seems reasonable that the current state in the process could be managed in a Proxy. Commands are clearly responsible for processing the actions required of each node and for node transitions. Mediators for managing the UI.

However, I think that there is an important bit still missing here: a ProcessController. The approaches we've reviewed all seem to either violate the PureMVC model (even just slightly) or make unreadable code. A proxy would maintain the state of the process. As such, it seems to be an appropriate way to implement the controller. However, this is putting a lot of business logic into the proxy.

[Code]...

View 3 Replies

Flex :: Connecting Flex Application To Tomcat + Spring 3.0 Framework With BlazeDS?

Apr 9, 2011

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 Replies

Flex :: Class Implementing IEventDispatcher Cannot Use Event Metadata Tag

May 4, 2011

we have following class

[Code]...

If you run these, you'll notice that the MXML-component can't hear the event. The question is simple, is there some way of getting the Event-metadata tag to work WITHOUT extending EventDispatcher? I would like to keep this class independent and use object composition as much as possible. And no, I don't want to use ActionScript addEventListener in the MXML-file. It doesn't tell the developer anything like good old Event metadata tag, and besides, that is not the point of this example. :)

View 2 Replies

Flex :: Framework Have Used So Far?

Aug 7, 2009

I have been seeing some Flex Frameworks, but would like to ask to the programmers and Architects down here on which has suited best in your application.

View 3 Replies

Flex :: Use Framework Within An Air App?

Sep 11, 2009

Possible to use the flex 4 framework within an Air app.

View 1 Replies

Flex :: Use The Framework RSL Within An RSL?

Sep 25, 2009

I have a rather large Flex SWF and am breaking it up into separate Modules. There is some overlap between the modules and I want to put all of this into one shared RSL. The problem is that this RSL gets really large as soon as I use any Flex code because it has to include the Flex Library.Flex Builder doesn't seem to give me the option to use the Flex framework RSL in a library. Also compiling with compc and passing the runtime-shared-library-path doesn't seem to actually use the rsl.So it seems like this is something that is unsupported? Does anyone have any idea how I can do this? Is it just not possible? Is this something that is likely to be supported in the future or already supported in Gumbo?

View 1 Replies

Flex :: Last Occurrence Of String Pattern

Aug 9, 2010

Is there any inbuild function to find out the last occurrence of a string pattern in a string in actionscript.

View 1 Replies

Flex :: Gzip - Flex - HTTPService And Gzipped Responses?

Jul 5, 2010

I have a Flex client making RESTful calls to a webservice using HTTPService. The server is returning JSON responses, which we would like to compress. Can Flex using HTTPService handle gzip-encoded responses? If so, what steps are required to make it work (e.g., which headers to set, how to decompress, etc.)? If not, can you suggest a simple alternative?

View 1 Replies

Flex :: Callback To Model Object?

Jul 23, 2010

I am trying to figure out how to define a callback to my model object, via the Mate Frameworks LocalEventMap.

<EventHandlers type="{WebServiceEvent.RT_GET}" debug="true">
<HTTPServiceInvoker url="/services/rtGet.asp">
<resultHandlers>

[Code]....

I get essentially the same error if I try to make method="model.rtGetHandleResult"

So, in keeping with the presentation model... how do I have the event map get this to the model to execute?

View 2 Replies

Flex :: Store The Model Of An Application?

Apr 25, 2011

I am working on an StoryBoarding application,it is a slide based application in which the authors can put several components like image , sound , captions etc in each of the slide.A collection of slides will make a storyboard.This application will be deployed on a web server (sharepoint + IIS , and php+apache), and several users can collaborate with each other for authoring or reviewing the storyboard.In my application I also want to support auto save ,which will keep on storing the state of the storyboard.User can also save at any point of time by clicking the save button.I am confused about how to store the state of the storyboard.

1)Presently I am doing this by passing all the storyboard data to a dot net web-service and then that service is storing images,caption etc in their respective tables into a database .2)Another approach possible is to store the model of the application as a serialized object into the db , which will be more convenient since separating the components of the model (like images,captions etc..) will not be required and also restoring the state of the objects in the application will be easy . I have two doubts about using approach 2 :-i) I want the the saved storyboard to load quickly, for which I would like to support the partial so that lighter objects like caption can be loaded quickly but other heavier objects like image,video etc can be loaded on demand. Using approach 2 , do I have to send the whole data in one go or is there way to support partial loading ?

View 1 Replies

Flex :: DTO / VO Versus Presentation Model

May 5, 2011

In Flex world, is DTO / VO same as Presentation Model?

View 2 Replies

Flex :: Bind XMLListCollection Into Model?

Mar 24, 2012

When the XMLListCollection is updated in the DataGrid, I want it to add the XML (bind it) into the Model. How would I do this? Or if not possible, how would I manually add XML into the Model?

This is a rough example of what I'm trying to do. Adding data to the DataGrid works fine; it just doesn't go into the Model when sending to the HTTPService.

<mx:Model id="model">
<root><colors>{collection}</colors></root>
</mx:Model>
<mx:XMLListCollection id="collection" />

[Code]....

View 1 Replies

Java :: What's Different When Implementing Flex Authentication/authorization In A Clustered Environment

Sep 25, 2010

Are there any differences implementing Flex application security in a clustered Java environment (such as Oracle Application Server/OC4J or a JBoss cluster) vs a single application server environment? (And/or does it depend on the specific environment software?)

What considerations are there in a situation where you need to authenticate with LDAP (AD) and store user access information in a database (ex. USER table containing username + permissions/roles info)? Any differences between Blaze DS and Granite DS?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved