Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Observations and a Question  (Read 6061 times)
landed
Full Member
***
Posts: 37


View Profile Email
« on: April 27, 2009, 06:09:52 »

I have possibly recently at last got to grips very well with (as I have used MVC for some time) the concept of MVC. So I start to look at your framework in the context of actionscript.

You use the term 'pure' yet it seems that this variation of the pattern is less clean and more complex. I will give my reasons why as a possitive Criticism of at least the Documentation.

You introduce a 4th top level class - Singleton called Facade (I understand that it is supposed to simplify things however so await to try it out but it seems I can do everything here (going against the idea of modularity facade=frame1 stick all my code here type of thing)  and undermines the strict chain of command and decoupling that MVC originally set out to do)

You introduce Proxies to the model (I suppose to encapsulate the model further- I always when using proxies think its an unnecessary step on many occasions too far - too many wrappers).

You Introduce mediators as a part of the view which itself is a Singleton, I assume the main view is a singleton but obviously there is a need for multiple view classes, so then are there each time a view its a Singleton ? Perhaps I need a view not to be a Singleton. For me I could understand the top level view being a Singleton but I don't like views being Singletons for no good reason. And back to Mediators they seem like views to me ? Confusion here. Events dispatching would be done from the views to the controller traditionally and I can understand this. Are views Abstract mediators ? So the concrete is the mediator and the abstract the view and in fact then a mediator is just another view or nested view ?

Can you see how a beginner to patterns is getting lost here. I hope so this is mostly what I want the point of this post to be. As I'm sure this is a great framework and there are benefits, just that the documentation is a bit well confusing.

e.g. You state that with Commands and the Controller "They are the home of your application’s Business Logic." well I thought and was comfortable knowing that (in MVC) the business logic is with the Model and ONLY here ! I would like an answer to this.

You are using the "ç" character in the code examples given in façade is this good practise ? I cant type it quickly and will myself substitute it.

It is just stuff stopping me from trying out the framework.

http://calvincrane.com

 ???
« Last Edit: April 27, 2009, 10:12:11 by landed » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: April 28, 2009, 09:07:42 »

Regarding MVC, it is a meta-pattern; a suggestion about the separation to be achieved without a specific implementation suggested. This is why every MVC implementation is different.

The approach taken with PureMVC was to create an implementation that achieved the goal in a way that scales both up and down in terms of application size using tried and true design patterns, rather than cooking up new ideas to solve each problem.

As for the Facade. it is a well known and documented pattern, as are the Singleton, Proxy, Mediator and Command patterns. I suggest giving them a read either on Wikipedia or from the source Design Patterns: Elements of Reusable Object-Oriented Software (http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=pd_bbs_sr_1).

Also, for the "ç" character in Facade, I can't really help it, MS Word inserts them as though I were French.

I understand all your criticisms here, and they've each been dealt with at length in the forums and documentation, so I'll not dally defending a handful of patterns that have survived since Smalltalk-80's heyday.

I also understand you haven't yet used the framework, and are not yet able to provide unique criticism from hands-on experience. When that time comes, do feel free to add your comments and questions here, I'll be around to answer them.

-=Cliff>
Logged
landed
Full Member
***
Posts: 37


View Profile Email
« Reply #2 on: April 28, 2009, 10:20:04 »

Thanks cliff yes im getting there, it looks simpler than it indeed sounds as I was reading, if I for example assume that mediators are kinds of views and proxies are sort of models then we almost have halved my confusion already. I will hope to clear the air as a noob sees things sometimes its good to write from this perspective, it may help some people but I will do that when I do indeed have a fuller understanding so as for the partial sighted leading the blind...
Logged
Pages: [1]
Print