How does the portability of PureMVC benefit the application developer?
Asked Answered
D

6

6

One of the stated goals of the PureMVC framework is to avoid platform dependencies in order to be portable. Considering that because of language and API differences application code will always be heavily dependent on the platform, and that avoiding platform dependencies makes the framework reinvent the wheel and/or only provide a least-common-denominator feature set, in what way does the portability of the framework benefit me as an application developer?

Diminution answered 27/9, 2008 at 10:55 Comment(0)
G
4

I've worked with PureMVC. They're trying to implement their stuff in quite a lot of languages. You may be right about the least common denominator, but overall, it's not a bad framework, and I've seen a really nice AS3 app in PureMVC.

I don't think they're talking about portability in terms of porting actual code. The idea there is more that you're using a generalized MVC architecture, which you could apply to other projects and other languages.

They're trying to say that if you become familiar with the PureMVC pattern, you could potentially come into a new PureMVC codebase, even if it's another language, and you would already know the lay of the land.

You might also say that developers who develop good PureMVC skills are likely to develop good habits which will translate as they go from language to language. But then again, maybe not.. for the reasons you mentioned.

Guevara answered 27/9, 2008 at 11:12 Comment(0)
L
3

We've been using PureMVC on two projects now and in my opinion the attempted language-independence is quite a burden.

The promise of jumping straight in a project because the framework is already know does not seem relevant to me if the languages are not already pretty similar (C# to java would make sense, as3 to php not) -- I agree that it is useful to have known ways of solving things, but for that the 'plain' patterns are good enough.

However, I also don't really agree with the usage of the various patterns the project uses, so our choice to not use it on the next project might be related to both issues, and not just the attempt at language/platform independence.

Ladyinwaiting answered 24/12, 2008 at 18:49 Comment(2)
"so our choice to not use it on the next project might be related to both issues..". What are you guys going to use instead? Have to apply a framework in my next project, deciding what to go for.Racial
The current choice is to not use a 'master' framework to build an app but just code according to some internal and per-project conventions. We do separate code into modules and along MVC conventions most of the time but not in a way that is enforced by a framework. (Auto)-wiring solutions don't have the same benefits as those used in Java projects, so I just wire up my components by hand/code.Ladyinwaiting
O
3

PureMVC's portability will help you when you migrate to or reimplement in another language.

I can't count the number of platforms and languages I've written code for that are now extinct and for which, even if I still had the source code it would be mostly worthless and have to be rewritten from the ground up today, since the code was usually 100% platform specific.

But all application code need not be heavily dependent upon the platform. View components and services (the boundaries of your application) will necessarily be, but your application logic which is sandwiched between the boundaries need not be.

The scope of PureMVC is really quite narrow; merely to help you split your code into the three tiers proscribed by the MVC meta-pattern. There is no reason why this code has to be tied deeply to your platform in order to be optimal.

When it comes time to migrate, you'll appreciate that the framework actors and their roles, responsibilities and collaborations remain the same. This leaves you to deal with syntactic differences of the language, recreating the view components and services. At least you won't have to completely re-architect.

And for the case of reimplementing in a different language, imagine you're trying to capture a significant part of the mobile market with your app. The market is so fractured, you'll have to implement the same program on 2 or more of Windows Mobile, iPhone, Flash, and Java. Sure you'll probably have separate teams in charge of the apps, but why have a totally different architecture? With PureMVC, you could have a single architecture for all versions of your application.

-=Cliff>

Osmosis answered 5/11, 2009 at 16:25 Comment(2)
To say "there is no reason why [application] code has to be tied deeply to your platform in order to be optimal" strikes me as naive. What do you even mean by that? Of course my application code will be tied to the platform, it's written for that platform, and designed to make full use of it's benefits. Should I need to change platform I would want to use all of the power of the new one, not trying to fit into some kind of lowest common denominator.Diminution
What I said was "But all application code need not be heavily dependent upon the platform." - the operative word being ALL. Its like the wiring harness in a car that carries the data from the sensors to the dashboard. The thing that will be different from one car to another is sensors and dials (like services and views). The wire in between just has to carry electrons from one end to another. It doesn't have to be specially made for that specific sensor or dial in order for the sensor and dial to communicate effectively.Osmosis
N
2

PureMVC is the only real option for Flash Platform developers who choose not to use the Flex Framework. For certain projects the size cost of Flex is too expensive (it happens!).

I like to prototype in Flex and then rip it out and replace my views with custom components when the application is near completion. PureMVC makes this really easy to do with it's Mediator pattern. I'm not sure there is any other framework that would allow me this workflow.

Personally, I think PureMVC went too far with it's portability goals: I enjoy that fact that it works with Flash AND Flex (for the reasons mentioned above), but feel that it should have stopped there, and made use of the native Flash Player event architecture.

Nika answered 12/1, 2009 at 16:41 Comment(0)
R
1

Are there examples of people using PureMVC to build and port applications across multiple platforms?

My company is building a Flex application that we may need to port to other platforms:

  • Silverlight (likely)
  • Mobile (maybe)
  • Desktop (maybe -- not just AIR!)
  • TV sets (maybe eventually)

I am considering PureMVC as a framework if it can ease porting and maintenance. I am curious to know if other people have ported a PureMVC app to a different platform and what their experience was with porting and then having development proceed in parallel for the app on multiple platforms.

Cheers,

Karthik

Rondeau answered 9/12, 2009 at 10:23 Comment(0)
P
1

PureMVC does not rely on a platform for its internal workings (Flash Events etc). So, while it does not make porting any easier per-say, it can assist simply by showing us its friendly and familiar face wherever we may choose to go ;-)

Pikestaff answered 17/8, 2010 at 7:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.