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

Show Posts

* | |

  Show Posts
Pages: 1 [2]
16  PureMVC Manifold / Standard Version / Re: Any plans for more demos? on: May 23, 2009, 01:31:56
Thanks Cliff,

That's exactly what I'm going to try and do. I'm using the Rewrite rules, lifted from the Zend .htaccess file, to send any request that doesn't map to a found public resource, to the index.php page (which makes it a catch-all), which (via a non-public bootstrap file) kicks off the Facade. Here's the .htaccess code if anyone's interested:

# This is the Zend rewrite that sends all requests to the index.php page.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

In the boostrap I'm setting up my app's environment constants as well as calling facade-startup()

My Startup Command is registering a *RequestProxy*.
The index.php public entry page is then passing the requested URL into the RequestProxy:
$facade = ApplicationFacade::getInstance();
$facade->retrieveProxy( "RequestProxy" )->setRequest( $_SERVER['PHP_SELF'] );

Which parses the URL and sends off a *ROUTE* Notification to the rest of the system.

I'm still at the very beginning of my grasp of PureMVC, and I wouldn't be surprised to find a cleaner way of what I'm' doing above, but the basic concept is slick! I'm also planning on being able to handle multiple languages in the URL. The Router concept above makes it easy to do translation lookups on the URL string coming in. Our project is based in the midst of Europe (Zermatt, Switzerland to be exact) and we're looking to support multiple languages in a solid SEO way.

If I can come up with a semi-clean way of doing this routing, I'll drop you a line and if you're interested you can critique it, with an eye towards making it a community add-on.

Thanks much for the really cool stuff Cliff (and friends).


17  PureMVC Manifold / Standard Version / Re: Any plans for more demos? on: May 21, 2009, 12:54:34
Hi Cliff,

I'd be happy to share anything of appropriate sharing quality that might come out of my current experimenting.  :)

One thing I'm looking at from the Zend framework, is the way they use a FrontController to handle routing. Basically, they only have a single index.php page in the public part of the site and all requests are routed through it to the Zend Frameworks, which then figures out which class(es) need to be called and returns the correct View (with re-writing).

I'm not exactly sure how PureMVC would handle such a set-up? Am I be better off trying to mimic the Zend way, or should I be creating matching public directories and index.htm files, that match the incoming URLs and then pass the work off to PureMVC?

The advantages I see of trying the Zend way are:
  • Single point of public entry into the system -- keeps things cleaner
  • Single point of public entry into the system -- if done correctly would most likely be more secure

The advantages of having a 'routing' index.htm file in each of the appropriate public visible folder would be:
  • Might be easier to glean the site's structure from the public directory tree
  • Might also keep the back-end code a bit simpler
  • Would allow the [simple] use of .htaccess in various areas of the site, to say force SSL in a basket area
  • No need to muck with rewriting the URL

To be honest, I'm not sure which Route (no pun intended) I should be looking to move forward with here. Cliff (or others) if you have any suggestions, I'm all ears  8)


18  PureMVC Manifold / Standard Version / Multi-core for PHP on: May 18, 2009, 08:11:09
Hi gang,

Just wondering if anyone's considered porting the multi-core version to PHP?

I'm not versed enough in PureMVC to know if this would be a benefit for building sites with PHP, but the thought of being able to split our apps into modules is rather appealing.  :)

19  PureMVC Manifold / Standard Version / Re: Any plans for more demos? on: May 18, 2009, 07:39:23
We're also looking at basing a rather large project on PureMVC for PHP -- more demos would be fantastic from our end as well  :)


Actually, I've just spent the last couple of hours setting up a local dev virtual host (Apache) and digging through the php example code with Aptana (using the Andretti beta -- its a lot better than the current shipping version!) and XDebug (bitch to get that working correctly, but *what* a god-send to have it!).

Not only have I found the example to be *very* clean & clear, I've found it to be a lot easier to follow than the AS3 version I've been digging around in over the last months (that might be because I'm more comfortable with PHP than AS3, but also might be as one doesn't have to dig through all of the Flex bits to get to the core of the idea).

I'm very pleased to have taken a proper look at this, as we were considering using the Zend framework, but I must admit that Zend seems to be not only a bit of a moving target, but also the fact that there's so much of it (that's good & bad) that it makes starting a project with it for the first time rather daunting. At the moment, after looking at the PHP port of PureMVC, the idea of using it as the project's base MVC setup and then possibly using some of the Zend modules on their own, sounds very appealing -- the best of both worlds!


20  PureMVC Manifold / Standard Version / Re: Any plans for more demos? on: May 18, 2009, 05:39:29
We're also looking at basing a rather large project on PureMVC for PHP -- more demos would be fantastic from our end as well  :)

21  Announcements and General Discussion / Fabrication / Re: Fabrication - Simplified PureMVC multicore modules on: May 10, 2009, 10:40:15
Hi Darshan (and Cliff!),

Just digging through the combo PureMVC & Fabrication apps, examples and docs, and was just thinking that if one of you (or several) gurus decided to put together a book on building advanced apps (Flex, AIR) with PureMVC & Fabrication, I would be the first to buy it (along the lines of Manning's *Groovy in Action*).

Something about having a nice thick computer book to fall asleep to -- somehow it sinks in more quickly than sniffing through all the scattered and disjointed pieces that one finds online.

Irregardless of book idea, the combo of AIR, Flex Builder, PureMVC & Fabrication looks to be the answer to my prayers! A great big thank you for taking the time and energy to make this stuff happen :)

22  PureMVC Manifold / MultiCore Version / PMVC for Groovy too?? on: February 18, 2009, 08:43:05

Hi gang,

I'm just making the switch to Flex/AIR for our small company's products and have started to take a serious look at PureMVC (the concepts are great, now I just need to 'grok' it  :) ).

Anyway, part of one of our tools is a system built in Groovy/Ant running on a remote server, and I was wondering if anyone's had a go at using the Java port together with Groovy? Theoretically, it should work, but I thought I'd just ask to see if someone else has any experience with it (yes, I'm lazy!).

If I can manage to grasp PMVC, it would be great to be able to use the same concepts for our different coding environments (AS3/Javascript/PHP/Groovy).


23  Announcements and General Discussion / Fabrication / Re: Fabrication - Simplified PureMVC multicore modules on: January 02, 2009, 03:55:41

I am working on improving the documentation. I have added several pages to the wiki to get things rolling on this front. You can check out the below links.


[2] : Getting Started

Hi Darshan,

Hope I'm posting this in the right place!

Am trying to make my first steps with both PureMVC and Fabrication with AIR 1.5, but after [attempting to] following the steps in your Getting Started above, I'm getting the following error in Flex (3):

override public function execute(note:INotification):void {
        registerMediator(new HelloFabricationMediator(note.getBody()));
        sendNotification("now", new Date());

1180: Call to a possibly undefined method HelloFabricationMediator.   HelloFabrication/src/controller   

I've added the following libs to the project:
  • PureMVC MutiCore 1.0.5
  • MultiCore Pipes 1.1
  • Fabrication Air 0.5.3

I've copied/pasted the code from your Getting Started example for AIR

It almost looks like view/HelloFabricationMediator needs to be imported in the HelloFabricationStartupCommand, but if I add an import view.HelloFabricationMediator; (and the same to HelloFabricationMediator for the following error for respondToNow(note:INotification) ), I get a whole page of run-time errors when I try and run the app, starting with the line:

Error: Unable to perform reflection for classpath view.HelloFabricationMediator. Check if getClassByName is defined on the main fabrication class (and then a bunch more).

Wondering if you might have any ideas as to where I'm going wrong?


Pages: 1 [2]