Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
May 25, 2017, 09:18:12 AM
Home Help Search Login Register
News: ATTENTION: Spambots must die! Humans must visit http://contact.futurescale.com to request forum access.
Pages: [1]
Print
Author Topic: New to pureMVC  (Read 6685 times)
andremolnar
Newbie
*
Posts: 4


View Profile Email
« on: October 07, 2009, 10:37:51 AM »

Hello all,

I dabbled with pureMVC a few months ago in the flash/flex world, and recently I've been evaluating some php MVC frameworks and remembered that pureMVC was ported to all sorts of platforms - so I came back.

I guess I'll start with a few questions:

1) Licensing: I saw this FAQ item http://puremvc.org/content/view/83/188/ but it hasn't been updated in a year.  I was wondering if indeed the main pureMVC code will go MIT and whether the php port will become licensed under MIT.  Having played in open source circles for the past 5 years I can say with pretty good confidence that the MIT license would address everything that Cliff mentions in the answer to the FAQ.
If its a question of "work", I'll be glad to patch the files to include the new license Smiley  There is also the option of dual licensing the code if the powers that be want to give people the option to use the CC license instead of the MIT license.  Just a thought.
Of course I can live with CC, its just a bit odd (as in different).

2) This is a more technical question regarding porting multicore:
In the case of other languages I can see the use cases for running multicore right away.  I was wondering if anyone has imagined a use case in the php world.  I'm currently in my architecting phase for my app and still in the 'wrap my head around' pureMVC for php phase.  I have yet to see a need for multicore, but maybe its because I haven't coded enough to have run into a wall that singlecore puts in my path.

3) This is a general question on architecting php apps with pureMVC and libraries:
I saw this thread http://forums.puremvc.org/index.php?topic=1234.0 where zermattchris (http://forums.puremvc.org/index.php?action=profile;u=1419) asks about how to do routing.
(I may have a more specific question about this later)  Obviously this is a rather common task in bigger php apps. i.e. routing URLs to execute the appropriate code within the php application.  Other common tasks are session handling w/ authentication etc.
So it would seem to me the best way to handle some of these common tasks is to build a few 'libraries' or 'modules' of code.  I would guess that I would write up some command classes proxies and mediators and bundle them together in a folder somewhere in my app and include them as needed in the main project.  My question I guess is has anyone done something a bit more complex in php pureMVC where they've built reusable bundles like this?  Are there any gotchas?  Have these bits of work been contributed somewhere?
I guess I'm looking for some best practice advice for the php world.  Cliff's best practices docs on AS3 are great but a) folder structure best practice advice isn't explicit (assumes AS3 world and its best practices) b) a bit off topic, but the code exampes are in AS3 Smiley

4) As I was typing the last question, I realized part of what I was asking was:
How big is the php pureMVC 'community'?  Or has the port simply been an academic exercise that's just kind of sitting here waiting for a community to form?  As mentioned before, I haven't run across any 'contributed modules' (e.g. a routing library) on the web.

5) Kind of leads me to my next question:  As I tinker I may likely end up writing chunks of code that may be reusable for others.  Besides posting on my own blog or having it in my own repository is there someplace else I could/should be posting things?

Anyway - besides all the questions, I just wanted to say that I like what I've seen so far.  I managed to write up my first 'hello world' app in no time (granted it wasn't pulling hello world from 3 different data sources and it didn't spit it out into a themeable templating engine), but its a start.  I'm going to take it a bit farther today.

andre
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2866



View Profile WWW
« Reply #1 on: October 08, 2009, 06:54:01 AM »

Quote
1) Licensing: ...  I was wondering if indeed the main pureMVC code will go MIT and whether the php port will become licensed under MIT ... If its a question of "work", I'll be glad to patch the files to include the new license.
Well, the main holdup is in fact the work. We have 90+ repos right now. And we're not talking about just changing a file in each repo. It's actually every source file in the repo, as the procedure has been to include that in the header comments. And that's going to have to be a minor release for each project (we wouldn't want different downloaded packages out there purporting to be under different licenses). It shouldn't require a recompile of anything (hopefully), but it does mean that the new releases have to be tagged and have new download archives created. That's a LOT of work. And of course we need to get the buy-in of all the contributors on this, but I don't think it'll be a problem, just more to do. However, if after this, you're still interested in doing that work, I think we can probably arrange it.

Quote
2)... question regarding porting multicore
I have a PHP port of MultiCore with Pipes sitting in my queue right now. I can put you in touch with the author and you could trade ideas on this if you like. Just contact me directly through the contact page.

Quote
3) ... how to do routing. ... Obviously this is a rather common task in bigger php apps. i.e. routing URLs to execute the appropriate code within the php application.  Other common tasks are session handling w/ authentication etc. So it would seem to me the best way to handle some of these common tasks is to build a few 'libraries' or 'modules' of code.  I would guess that I would write up some command classes proxies and mediators and bundle them together in a folder somewhere in my app and include them as needed in the main project. 
The way Java servlet filters works comes to mind. Basically the request passes through a series of filters before your actual service even receives them. Auth, deserialization, etc. This sounds like a multicore pipeline to me.

Quote
4) How big is the php pureMVC 'community'?  Or has the port simply been an academic exercise that's just kind of sitting here waiting for a community to form?  As mentioned before, I haven't run across any 'contributed modules' (e.g. a routing library) on the web.
The port owner (Hasan) uses it daily in his work at Almer/Blank, a large digital agency. I wish they allowed him more time to contribute, but he's vouched for it working in a production environment with non-trivial apps. However we have no champion in the PHP world at the moment, and so it remains for the most part just another MVC option to that community.

Quote
5) As I tinker I may likely end up writing chunks of code that may be reusable for others.  Besides posting on my own blog or having it in my own repository is there someplace else I could/should be posting things?
Just send them to me.

Quote
Anyway - besides all the questions, I just wanted to say that I like what I've seen so far.  I managed to write up my first 'hello world' app in no time (granted it wasn't pulling hello world from 3 different data sources and it didn't spit it out into a themeable templating engine), but its a start.  I'm going to take it a bit farther today.
Let me know what you come up with. Getting some more demos up there would certainly be a step in the right direction!

-=Cliff>
Logged
andremolnar
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: October 08, 2009, 02:40:47 PM »

1) re: licensing and work
This sounds like it could very much be scripted.  If you're willing to put the word out that there may be a licensing change in the works and see if you can get buy-in from contribs, I could see about scripting a solution.
-check out all the repos.
-Iterate through each file
-Str replace
-commit
Am I crazy to think this could be done in a day?

2) I'll contact you.  I'm just groking pureMVC will have to grok how multicore works before I could be a great deal of help.  Though I've noticed that in general a class autoloader would be a nice addition to even to singlecore. Leveraging php 5.3 namespaces could be another nice feature in pureMVC.

4,5) Cool.  I'll be in touch as needed.

Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2866



View Profile WWW
« Reply #3 on: October 09, 2009, 12:08:51 PM »

Quote
scripting a solution.
-check out all the repos.
-Iterate through each file
-Str replace
-commit

I'm not sure it'd be that easy. Again it would require tagging a new version, and creation of the new archive for download, and that archive is actually on another system. And updating of the Trac sites to point to the new tag (the links for browse source usually point to the repo for browsing source unless it's pretty printed as is the case with AS3).

Personally, I don't see this as scriptable.


Quote
Leveraging php 5.3 namespaces could be another nice feature in pureMVC.
Actually that's one of the things PureMVC abstains from that makes portability possible. AS3 has namespaces as well, but they might not offer the same thing as PHP and any language that doesn't have them would have to be implemented and worked with in a totally different way. We go for the simplest and most common constructs in each language to avoid there being wild differences in best practices and implementations.

-=Cliff>
« Last Edit: October 09, 2009, 12:59:21 PM by puremvc » Logged
Pages: [1]
Print
Jump to: